/* ==========================================================================
   DJ LEBRON — estilos exclusivos de la Tienda (filtros, catálogo, toast)
   ========================================================================== */

/* ---------- Banner superior de la página ---------- */
.shop-banner {
  background-image:
    linear-gradient(180deg, rgba(6,6,6,0.4) 0%, rgba(6,6,6,0.95) 100%),
    repeating-linear-gradient(135deg, rgba(244,197,49,0.06) 0px, rgba(244,197,49,0.06) 2px, transparent 2px, transparent 24px);
}

/* ---------- Checkbox / radio personalizados ---------- */
.chk {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid rgba(244, 197, 49, 0.5);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.chk:hover { border-color: var(--gold); }
.chk:checked {
  background-color: var(--gold);
  border-color: var(--gold);
}
.chk:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #060606;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- Inputs numéricos (precio / bpm) ---------- */
.filter-input {
  background: #0d0d0d;
  border: 1px solid rgba(244, 197, 49, 0.25);
  color: #fff;
  padding: 0.55rem 0.75rem;
  width: 100%;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}
.filter-input:focus {
  outline: none;
  border-color: var(--gold);
}
.filter-input::placeholder { color: rgba(255,255,255,0.35); }

/* Quitar flechas de spinner en number inputs para look más limpio */
.filter-input::-webkit-outer-spin-button,
.filter-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.filter-input[type=number] { -moz-appearance: textfield; }

/* ---------- Select (ordenar por) ---------- */
.filter-select {
  background: #0d0d0d;
  border: 1px solid rgba(244, 197, 49, 0.25);
  color: #fff;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  width: 100%;
}
.filter-select:focus { outline: none; border-color: var(--gold); }

/* ---------- Panel de filtros ---------- */
.filter-group + .filter-group {
  border-top: 1px solid rgba(244, 197, 49, 0.12);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

/* ---------- Toggle de filtros en móvil ---------- */
#filters-panel {
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
}
@media (max-width: 1023px) {
  #filters-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }
  #filters-panel.is-open {
    max-height: 3000px;
    opacity: 1;
    margin-bottom: 2rem;
  }
}

/* ---------- Badge de categoría en tarjeta ---------- */
.badge-cat {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(244, 197, 49, 0.5);
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
}

/* ---------- Cover placeholder con icono ---------- */
.cover-placeholder {
  background:
    radial-gradient(circle at 30% 20%, rgba(244,197,49,0.12), transparent 60%),
    #0a0a0a;
}

/* ---------- Toast de confirmación (placeholder de compra) ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--gold);
  color: #060606;
  padding: 0.9rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  max-width: min(92vw, 420px);
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 24px rgba(244,197,49,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
}
#toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Estado vacío ---------- */
#empty-state {
  border: 1px dashed rgba(244, 197, 49, 0.3);
}

/* ---------- Hot Sales ---------- */
.hot-sales-title {
  text-shadow: 0 0 10px rgba(244, 197, 49, 0.7), 0 0 24px rgba(244, 197, 49, 0.4);
}

.hot-sale-card {
  position: relative !important;
  border-color: rgba(244, 197, 49, 0.6) !important;
  box-shadow: 0 0 0 1px rgba(244, 197, 49, 0.25), 0 0 30px rgba(244, 197, 49, 0.12);
}

.hot-sale-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  background: var(--gold);
  color: #060606;
  font-family: 'Anton', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  box-shadow: 0 0 16px rgba(244, 197, 49, 0.7);
}

/* ---------- Reproductor de preview por canción ---------- */
.preview-player {
  color-scheme: dark;
  height: 34px;
}
.preview-placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ---------- Botón de guardar producto (bookmark, ver js/tienda.js) ---------- */
.btn-save {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 6, 0.75);
  border: 1px solid rgba(244, 197, 49, 0.35);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-save:hover { color: var(--gold); border-color: var(--gold); }
.btn-save:active { transform: scale(0.9); }
.btn-save:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-save[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #060606;
  box-shadow: 0 0 14px rgba(244, 197, 49, 0.55);
}
.btn-save[aria-pressed="true"] svg { fill: currentColor; }

/* Tooltip ("Guardar" / "Quitar de guardados") */
.btn-save::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background: #000;
  color: #fff;
  border: 1px solid rgba(244, 197, 49, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.btn-save:hover::after,
.btn-save:focus-visible::after { opacity: 1; }

/* ---------- Modal de login / registro ---------- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-modal:not(.is-open) { display: none; }

.auth-tab {
  flex: 1;
  padding: 0.6rem 0;
  font-family: 'Anton', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.auth-tab:hover { color: #fff; }
.auth-tab[aria-selected="true"] { color: var(--gold); border-color: var(--gold); }

/* ---------- Mi cuenta ---------- */
.mc-layout { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .mc-layout { grid-template-columns: 240px 1fr; align-items: start; }
}
.mc-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(244, 197, 49, 0.15);
}
@media (min-width: 900px) {
  .mc-tabs { flex-direction: column; border-bottom: 0; position: sticky; top: 7rem; }
}
.mc-tab {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s;
}
@media (min-width: 900px) {
  .mc-tab { border-bottom: 0; border-left: 2px solid transparent; }
}
.mc-tab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.mc-tab:hover { color: #fff; background: rgba(244, 197, 49, 0.05); }
.mc-tab[aria-selected="true"] {
  color: var(--gold);
  background: rgba(244, 197, 49, 0.08);
  border-color: var(--gold);
}
.mc-count:not(:empty) {
  margin-left: auto;
  font-size: 0.7rem;
  background: rgba(244, 197, 49, 0.15);
  color: var(--gold);
  padding: 0.05rem 0.45rem;
}
.mc-section { display: none; }
.mc-section.is-active { display: block; }
.mc-title {
  font-family: 'Anton', sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}
.mc-card {
  background: #121212;
  border: 1px solid rgba(244, 197, 49, 0.15);
  padding: 1.5rem;
}
.mc-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.3rem;
}
.btn-ghost-gold {
  border: 1px solid rgba(244, 197, 49, 0.5);
  color: var(--gold);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.15s;
}
.btn-ghost-gold:hover { background: rgba(244, 197, 49, 0.1); }
.btn-ghost-gold:disabled { opacity: 0.4; pointer-events: none; }

.mc-empty {
  border: 1px dashed rgba(244, 197, 49, 0.25);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}
.mc-product {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: center;
  background: #121212;
  border: 1px solid rgba(244, 197, 49, 0.15);
  padding: 0.9rem;
}
.mc-product + .mc-product { margin-top: 0.75rem; }
.mc-product .cover {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid rgba(244, 197, 49, 0.2);
}
.mc-product .actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
@media (min-width: 640px) {
  .mc-product { grid-template-columns: 72px 1fr auto; }
  .mc-product .actions { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
}
.mc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.mc-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(244, 197, 49, 0.15);
}
.mc-table td { padding: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); vertical-align: middle; }
.mc-table-wrap { overflow-x: auto; border: 1px solid rgba(244, 197, 49, 0.15); background: #121212; }

/* ---------- Buscador: selector "Todo / Artista / Nombre" pegado al campo ---------- */
.search-box .search-scope { width: auto; flex-shrink: 0; border-right: 0; }
.search-box input { width: 100%; }

/* ---------- Aviso "marca de agua solo en el preview" ---------- */
.wm-notice {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 85;
  width: min(440px, calc(100vw - 2rem));
  background: #121212;
  border: 1px solid rgba(244, 197, 49, 0.45);
  box-shadow: 0 0 24px rgba(244, 197, 49, 0.15), 0 12px 32px rgba(0, 0, 0, 0.6);
  padding: 1rem 1.1rem;
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.wm-notice.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.wm-notice-icon { font-size: 1.25rem; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) {
  .wm-notice { transition: opacity 0.2s ease; }
}

/* ---------- Descuento de Hot Sales ---------- */
.hot-discount {
  background: var(--gold);
  color: #060606;
  font-family: 'Anton', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem;
}

/* ---------- Contador de cambio de los Hot Sales ---------- */
.hot-countdown {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(244, 197, 49, 0.45);
  background: rgba(244, 197, 49, 0.06);
  padding: 0.35rem 0.75rem;
}
.hot-countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
}
.hot-countdown-time {
  font-family: 'Anton', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(244, 197, 49, 0.45);
  min-width: 6.2ch;
}
@media (max-width: 640px) {
  .hot-countdown { margin-left: 0; width: 100%; justify-content: center; }
}

/* ---------- Carrito ---------- */
.cart-nav-btn { position: relative; display: inline-flex; align-items: center; padding: 0.25rem; }
.cart-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.55rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--gold);
  color: #060606;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
}
.cart-badge.static-badge { position: static; }
.btn-buy.is-in-cart { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }

.cart-panel { position: fixed; inset: 0; z-index: 95; pointer-events: none; }
.cart-panel.is-open { pointer-events: auto; }
.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cart-panel.is-open .cart-backdrop { opacity: 1; }
.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  display: flex;
  flex-direction: column;
  background: #0d0d0d;
  border-left: 1px solid rgba(244, 197, 49, 0.3);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.cart-panel.is-open .cart-drawer { transform: translateX(0); }
.cart-panel.is-loading .cart-footer [data-checkout] { opacity: 0.5; pointer-events: none; }
.cart-line {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem;
  background: #121212;
  border: 1px solid rgba(244, 197, 49, 0.12);
}
.cart-cover { width: 56px; height: 56px; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(244, 197, 49, 0.2); }
.cart-free {
  background: var(--gold);
  color: #060606;
  font-family: 'Anton', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem;
}
.cart-applied, .cart-hints { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.8rem; }
.cart-applied { color: var(--gold); margin-bottom: 1rem; padding: 0.7rem 0.85rem; border: 1px solid rgba(244, 197, 49, 0.35); background: rgba(244, 197, 49, 0.06); }
.cart-hints { color: rgba(255, 255, 255, 0.65); margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .cart-drawer, .cart-backdrop { transition: none; }
}

/* Franja de ofertas en la tienda */
.promo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.85rem;
  background: rgba(244, 197, 49, 0.1);
  border: 1px solid rgba(244, 197, 49, 0.45);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
