/* ══════════════════════════════════════════════════
   CART PANEL
   ══════════════════════════════════════════════════ */

.cart-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-panel-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  max-width: 92vw;
  height: 100vh;      /* fallback */
  height: 100dvh;     /* dynamic viewport height, mobile-safe */
  z-index: 9999;
  background: rgba(12, 12, 10, 0.97);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border-left: 1px solid rgba(130, 49, 255, 0.15);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.cart-panel.active { transform: translateX(0); }

.cart-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--b2);
  flex-shrink: 0;
}
.cart-panel-title {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--fg);
  margin: 0;
  letter-spacing: -0.01em;
}
.cart-panel-close {
  background: none; border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color .2s;
}
.cart-panel-close:hover { color: var(--fg); }

.cart-panel-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}
.cart-panel-empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 0;
  margin: 0;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--b2);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
  width: 52px; height: 52px;
  object-fit: cover;
  border-radius: 8px;
  background: #1a1a1a;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 0.9rem;
  color: var(--fg);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
}
.cart-item-remove {
  background: none; border: none;
  color: var(--muted); font-size: 1.1rem;
  cursor: pointer; padding: 0 4px;
  transition: color .2s;
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--fg); }

.cart-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 2rem 0;
  justify-content: center;
}
.cart-loading-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--b2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cart-panel-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--b2);
  flex-shrink: 0;
}
.cart-panel-browse {
  display: block;
  margin: 0 1.5rem;
  padding: 10px 0;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  border: none;
  border-bottom: 1px solid var(--b2);
  transition: color .2s;
}
.cart-panel-browse:hover {
  color: #fff;
}

.cart-panel-coupon {
  display: flex;
  gap: 8px;
  margin-bottom: 0.75rem;
}
.cart-panel-coupon input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--b2);
  border-radius: 6px;
  color: var(--fg);
  font-size: 0.85rem;
  font-family: inherit;
}
.cart-panel-coupon input:focus {
  outline: none;
  border-color: var(--accent);
}
.cart-panel-coupon button {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--b2);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.cart-panel-coupon button:hover { color: var(--fg); border-color: var(--fg); }

.cart-coupon-msg {
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
  padding: 6px 10px;
  border-radius: 4px;
}
.cart-coupon-msg.success { color: #4ade80; background: rgba(74,222,128,.08); }
.cart-coupon-msg.error   { color: #f87171; background: rgba(248,113,113,.08); }

.cart-panel-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.cart-panel-total {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  color: var(--fg);
}
.cart-checkout-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .2s;
}
.cart-checkout-btn:hover { opacity: 0.88; }
.cart-checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cart panel mobile ── */
@media (max-width: 600px) {
  .cart-panel-header { padding: 1rem 1rem 0.75rem; }
  .cart-panel-items { padding: 0 1rem; }
  .cart-panel-item { padding: 0.75rem 1rem; }
  .cart-panel-coupon { padding: 0.25rem 1rem 0.75rem; }
  .cart-panel-footer { padding: 0.75rem 1rem 1rem; }
}

/* ── Toast notification ── */
.atone-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(20,20,18,0.95);
  border: 1px solid var(--accent);
  color: var(--fg);
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 10000;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  white-space: nowrap;
}
.atone-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════
   CHECKOUT OVERLAY (Stripe inline)
   ══════════════════════════════════════════════════ */
.atone-checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.atone-checkout-card {
  background: #111110;
  border: 1px solid var(--b2);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}
.atone-checkout-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  color: var(--muted); font-size: 1.4rem;
  cursor: pointer; transition: color .2s;
}
.atone-checkout-close:hover { color: var(--fg); }
.atone-checkout-title {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: normal;
  color: var(--fg);
  margin: 0 0 1.5rem;
}
.atone-checkout-login-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -1rem 0 1.5rem;
}
.atone-checkout-login-hint a {
  color: var(--accent);
  text-decoration: underline;
}
.atone-checkout-login-hint a:hover { color: var(--fg); }
.atone-checkout-form .form-group { margin-bottom: 1rem; }
.atone-checkout-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.atone-checkout-form label:not(.consent-label) {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.atone-checkout-form input[type="text"],
.atone-checkout-form input[type="email"],
.atone-checkout-form input[type="tel"] {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--b2);
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.9rem;
  font-family: inherit;
}
.atone-checkout-form input:focus { outline: none; border-color: var(--accent); }
.atone-card-element {
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--b2);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.atone-card-element.StripeElement--focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(130, 49, 255, 0.2);
}
.atone-card-element.StripeElement--invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.15);
}
.atone-card-errors { font-size: 0.82rem; color: #f87171; min-height: 1.2em; margin-top: 6px; }
.consent-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.8rem; color: var(--muted);
  margin: 1rem 0 0.5rem; cursor: pointer;
  line-height: 1.4;
}
.consent-label a { color: var(--accent); }
.consent-error { font-size: 0.78rem; color: #f87171; margin-bottom: 0.75rem; }
.atone-checkout-error {
  font-size: 0.85rem; color: #f87171;
  background: rgba(248,113,113,.08);
  padding: 8px 12px; border-radius: 6px;
  margin-bottom: 1rem;
}
.atone-checkout-submit {
  width: 100%; margin-top: 1rem;
  padding: 13px;
  background: var(--accent); border: none;
  border-radius: 8px; color: #fff;
  font-size: 0.85rem; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer;
  transition: opacity .2s;
  font-family: inherit;
}
.atone-checkout-submit:hover { opacity: 0.88; }
.atone-checkout-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════
   TIENDA PAGE
   ══════════════════════════════════════════════════ */
.tienda-main { min-height: 100vh; }

.tienda-hero {
  padding: 7rem 2rem 2rem;
  text-align: center;
}
.tienda-hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: normal;
  margin: 0.3rem 0 0;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.tienda-filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 2rem;
  margin-bottom: 3.5rem;
}
.tienda-filter-btn {
  padding: 6px 18px;
  border: 1px solid var(--b2);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.tienda-filter-btn.active,
.tienda-filter-btn:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.tienda-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}
.tienda-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 3rem 0;
}

@media (max-width: 600px) {
  .tienda-grid {
    grid-template-columns: 1fr;
    gap: 56px;
    max-width: 320px;
    padding: 0 1rem 4rem;
  }
}

/* ══════════════════════════════════════════════════
   TIENDA CARD — icono de producto (estilo iPhone icon)
   Imagen llena la tarjeta, texto overlay brutalista.
   ══════════════════════════════════════════════════ */

/* ── Base: Video (púrpura) ── */
.tienda-card {
  position: relative;
  border-radius: 21px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  transition: box-shadow .3s ease, transform .25s ease;
}

/* Táctil (sin hover real): plana en reposo, el glow solo aparece al tocar */
@media (hover: none), (pointer: coarse) {
  /* Tap: anima el glow antes de navegar (ver js/tienda-card-tap.js) */
  .tienda-card.is-pressed {
    transform: translateY(-3px);
    box-shadow:
      -20px -18px 20px -16px rgba(130,49,255,0.38),
      0 -1px 9px 5px rgba(130,49,255,0.25),
      0 0 20px 8px rgba(100,60,180,0.38),
      -1px 16px 20px 20px rgba(0,0,0,0.6);
  }
  .tienda-card[data-category~="sonido"].is-pressed {
    box-shadow:
      -20px -18px 20px -16px rgba(245,208,32,0.35),
      0 -1px 9px 5px rgba(245,208,32,0.22),
      0 0 20px 8px rgba(245,208,32,0.35),
      -1px 16px 20px 20px rgba(0,0,0,0.6);
  }
  .tienda-card.is-pressed .tienda-card-cta {
    background: rgba(130,49,255,0.35);
    color: #fff;
    border-color: rgba(130,49,255,0.5);
  }
  .tienda-card[data-category~="sonido"].is-pressed .tienda-card-cta {
    background: rgba(245,208,32,0.25);
    border-color: rgba(245,208,32,0.4);
  }
}

/* Ratón/trackpad (hover real): el glow solo aparece al pasar el cursor */
@media (hover: hover) and (pointer: fine) {
  .tienda-card:hover {
    transform: translateY(-3px);
    box-shadow:
      -20px -18px 20px -16px rgba(130,49,255,0.38),
      0 -1px 9px 5px rgba(130,49,255,0.25),
      0 0 20px 8px rgba(100,60,180,0.38),
      -1px 16px 20px 20px rgba(0,0,0,0.6);
  }

  /* ── Sonido → glow amarillo ── */
  .tienda-card[data-category~="sonido"]:hover {
    box-shadow:
      -20px -18px 20px -16px rgba(245,208,32,0.35),
      0 -1px 9px 5px rgba(245,208,32,0.22),
      0 0 20px 8px rgba(245,208,32,0.35),
      -1px 16px 20px 20px rgba(0,0,0,0.6);
  }

  .tienda-card:hover .tienda-card-cta {
    background: rgba(130,49,255,0.35);
    color: #fff;
    border-color: rgba(130,49,255,0.5);
  }
  .tienda-card[data-category~="sonido"]:hover .tienda-card-cta {
    background: rgba(245,208,32,0.25);
    border-color: rgba(245,208,32,0.4);
  }
}

/* ── Link ocupa toda la tarjeta ── */
.tienda-card-link {
  display: block;
  width: 100%; height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* ── Imagen de fondo ── */
.tienda-card-bg {
  position: absolute;
  inset: 0;
  background: #111;
}
.tienda-card-bg img,
.tienda-card-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tienda-card-bg-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #111 0%, #1c1c1a 100%);
}

/* ── Gradiente oscuro sobre la imagen ── */
.tienda-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9% 9% 10%;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.45) 0%,
      transparent 40%,
      transparent 55%,
      rgba(0,0,0,0.72) 100%);
}

/* ── Título: brutalista, grande, uppercase ── */
.tienda-card-name {
  font-family: Georgia, serif;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: normal;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.0;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.tienda-card-sub {
  display: block;
  font-size: 0.38em;
  font-family: 'IBM Plex Mono', monospace;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 7px;
  line-height: 1.4;
}

/* ── Pie: precio + CTA ── */
.tienda-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.tienda-card-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 700;
  color: var(--c-video);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  line-height: 1;
}
.tienda-card[data-category~="sonido"] .tienda-card-price { color: var(--c-audio); }

.tienda-card-cta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(10,10,8,0.55);
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

/* Botón oculto para JS (productos simples) */
.tienda-card-add-hidden { display: none; }

/* ══════════════════════════════════════════════════
   PLASTIFIED PRODUCT CARD
   ══════════════════════════════════════════════════ */
.product-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Asa plástica */
.product-card-handle {
  width: 140px;
  height: 48px;
  border-radius: 15px 15px 0 0;
  background: rgba(130, 49, 255, 0.10);
  box-shadow:
    0 10px 17px rgba(130, 49, 255, 0.15),
    0 0 0 2px var(--accent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}
.product-card-handle-hole {
  width: 63%;
  height: 18px;
  border-radius: 21px;
  background: var(--bg);
}

/* Tarjeta */
.product-card {
  width: 100%;
  max-width: 320px;
  background: #141414;
  border-radius: 21px;
  box-shadow:
    0 2px 7px rgba(146, 144, 150, 0.25),
    0 0 26px 2px rgba(130, 49, 255, 0.35),
    0 -1px 8px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 8px 20px rgba(146, 144, 150, 0.2),
    0 0 40px 4px rgba(130, 49, 255, 0.55),
    0 -1px 8px rgba(255, 255, 255, 0.07);
}

.product-card-media-link { display: block; }
.product-card-media {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1a1a1a;
}
.product-card-media img,
.product-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.product-card-info {
  padding: 16px 20px 22px;
}
.product-card-name {
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: normal;
  color: var(--fg);
  margin: 0 0 6px;
  line-height: 1.3;
}
.product-card-price {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.product-card-add {
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.product-card-add:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Tematización por categoría ── */

/* Sonido → amarillo --c-audio (#f5d020) */
.product-card-wrap[data-category~="sonido"] .product-card-handle {
  background: rgba(245,208,32,0.12);
  box-shadow: 0 10px 17px rgba(245,208,32,0.15), 0 0 0 2px var(--c-audio);
}
.product-card-wrap[data-category~="sonido"] .product-card {
  box-shadow:
    0 2px 7px rgba(146,144,150,0.25),
    0 0 26px 2px rgba(245,208,32,0.3),
    0 -1px 8px rgba(255,255,255,0.05);
}
.product-card-wrap[data-category~="sonido"] .product-card:hover {
  box-shadow:
    0 8px 20px rgba(146,144,150,0.2),
    0 0 40px 4px rgba(245,208,32,0.5),
    0 -1px 8px rgba(255,255,255,0.07);
}
.product-card-wrap[data-category~="sonido"] .product-card-price { color: var(--c-audio); }
.product-card-wrap[data-category~="sonido"] .product-card-add   { border-color: var(--c-audio); color: var(--c-audio); }
.product-card-wrap[data-category~="sonido"] .product-card-add:hover { background: var(--c-audio); color: var(--c-audio-fg); }

/* Video → púrpura corporativo --c-video (= --accent, ya es el default, explicitado) */
.product-card-wrap[data-category~="video"] .product-card-handle {
  background: rgba(130,49,255,0.10);
  box-shadow: 0 10px 17px rgba(130,49,255,0.15), 0 0 0 2px var(--c-video);
}

/* ══════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ══════════════════════════════════════════════════ */
.producto-main { min-height: 100vh; padding: 5.5rem 2rem 4rem; }

.producto-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 960px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 720px) {
  .producto-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.producto-media-col {
  display: flex;
  justify-content: center;
}
.product-card--detail { max-width: 100%; }

.producto-info-col { padding-top: 0; }
.producto-thumb {
  width: 100%;
  max-width: 340px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: block;
}
.producto-breadcrumb {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.producto-breadcrumb a { color: var(--muted); text-decoration: none; }
.producto-breadcrumb a:hover { color: var(--fg); }

.producto-title {
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: normal;
  color: var(--fg);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.producto-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.3rem;
  color: var(--accent);
  margin: 0 0 1rem;
}
.producto-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.producto-add-btn {
  display: block; width: 100%;
  padding: 14px;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .2s;
  font-family: inherit;
}
.producto-add-btn:hover    { opacity: 0.88; }
.producto-add-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Estado: el cliente ya posee el producto digital (bloqueo duro, es un <a>) */
.producto-add-btn.is-owned {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--b2);
  text-decoration: none;
}
.producto-add-btn.is-owned:hover { opacity: 1; background: var(--bg); }

/* Estado: conflicto de suscripción (CTA con modal previo) */
.producto-add-btn.is-conflict { /* mantiene el púrpura del accent */ }

/* ── Selector de variaciones ── */
.producto-variants { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }

.producto-variant-group {}
.producto-variant-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 8px;
}
.producto-variant-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.producto-variant-pill {
  padding: 6px 14px;
  border: 1px solid var(--b2);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.producto-variant-pill:hover  { border-color: var(--fg); color: var(--fg); }
.producto-variant-pill.is-active {
  border-color: var(--accent);
  color: var(--fg);
  background: rgba(130,49,255,0.08);
}

/* Sonido → pills sobre fondo oscuro: borde y texto ámbar claro */
.producto-main--sonido .producto-variant-pill {
  border-color: oklch(64% 0.06 90 / 0.35);
  color: oklch(82% 0.07 92);
}
.producto-main--sonido .producto-variant-pill:hover {
  border-color: oklch(84% 0.19 102);
  color: oklch(94% 0.08 95);
}
.producto-main--sonido .producto-variant-pill.is-active {
  border-color: oklch(84% 0.19 102);
  background: oklch(84% 0.19 102);
  color: oklch(18% 0.04 84);
}
/* Botón añadir al carrito: amarillo brillante + texto oscuro
   Especificidad reforzada (.producto-inner) para ganar sobre `.producto-inner *` */
.producto-main--sonido .producto-inner .btn-primary,
.producto-main--sonido .producto-inner .btn-primary.producto-add-btn {
  background: oklch(84% 0.19 102);
  border-color: oklch(84% 0.19 102);
  color: oklch(18% 0.04 84);
}
.producto-main--sonido .producto-inner .btn-primary:hover:not(:disabled) {
  background: oklch(90% 0.18 100);
  border-color: oklch(90% 0.18 100);
  color: oklch(14% 0.03 82);
}
.producto-main--sonido .producto-inner .btn-primary:disabled {
  color: oklch(28% 0.05 86);
  opacity: 0.75;
}

.producto-back {
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  color: oklch(74% 0.04 280);
  text-decoration: none;
  letter-spacing: 0.06em;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding: 0.55em 1.2em;
  border: 1px solid oklch(68% 0.05 280 / 0.35);
  transition: color .2s, border-color .2s, background .2s;
}
.producto-back:hover {
  color: var(--fg);
  border-color: oklch(85% 0.03 280 / 0.55);
  background: oklch(100% 0 0 / 0.04);
}
.producto-full-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(237,233,220,0.1);
}
.producto-full-desc p            { margin-bottom: 1em; }
.producto-full-desc p:last-child { margin-bottom: 0; }
.producto-full-desc strong       { color: var(--fg); }
.producto-full-desc h2,
.producto-full-desc h3 {
  font-family: Georgia, serif;
  font-weight: normal;
  margin: 1.6rem 0 0.5rem;
  color: var(--fg);
}

/* Acordeones <details>/<summary> en descripción de producto */
.producto-full-desc .faq-container { margin-top: 1.2rem; }
.producto-full-desc .faq-container > h2 {
  font-size: 0.9rem;
  font-family: var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.producto-full-desc details {
  border-top: 1px solid var(--b0);
}
.producto-full-desc details:last-of-type {
  border-bottom: 1px solid var(--b0);
  margin-bottom: 1rem;
}
.producto-full-desc summary {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 0.75rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.producto-full-desc summary::-webkit-details-marker { display: none; }
.producto-full-desc summary::after {
  content: '+';
  font-family: var(--f-mono);
  font-size: 1rem;
  color: var(--accent);
  line-height: 1;
  transition: transform .2s;
}
.producto-full-desc details[open] summary::after {
  transform: rotate(45deg);
}
.producto-full-desc details > :not(summary) {
  padding: 0 0 0.8rem;
}
.producto-full-desc details ul {
  padding-left: 1.1rem;
  margin: 0.4rem 0;
}
.producto-full-desc details li {
  margin-bottom: 0.25rem;
  color: var(--muted);
}
.producto-not-found,
.producto-loading {
  text-align: center;
  padding: 6rem 2rem;
}
.producto-not-found h1 {
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: normal;
  margin: 0.5rem 0 2rem;
  color: var(--fg);
}

/* ── Tematización página de detalle ── */
/* Sonido → amarillo */
.producto-main--sonido .producto-price              { color: var(--c-audio); }
.producto-main--sonido .producto-add-btn            { background: var(--c-audio); color: var(--c-audio-fg); }
.producto-main--sonido .producto-add-btn:hover      { opacity: 0.88; }
.producto-main--sonido .producto-breadcrumb a:hover { color: var(--c-audio); }
.producto-main--sonido .product-card-handle {
  background: rgba(245,208,32,0.12);
  box-shadow: 0 10px 17px rgba(245,208,32,0.15), 0 0 0 2px var(--c-audio);
}
.producto-main--sonido .product-card {
  box-shadow:
    0 2px 7px rgba(146,144,150,0.25),
    0 0 26px 2px rgba(245,208,32,0.3),
    0 -1px 8px rgba(255,255,255,0.05);
}
/* Video → púrpura (default, confirmado) */
.producto-main--video .product-card-handle {
  background: rgba(130,49,255,0.10);
  box-shadow: 0 10px 17px rgba(130,49,255,0.15), 0 0 0 2px var(--c-video);
}

/* ══════════════════════════════════════════════════
   SUBSCRIPTION POPUP (Cuaderno)
   ══════════════════════════════════════════════════ */
.sub-popup-backdrop {
  position: fixed; inset: 0;
  z-index: 9996;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.sub-popup-backdrop.active { opacity: 1; pointer-events: auto; }

/* Bloqueo de fondo: cuando cualquier overlay/modal está abierto, #page-content
   recibe inert desde JS. Como fallback para navegadores que no lo soportan
   completamente, reforzamos con pointer-events y scroll lock. */
#page-content[inert] { pointer-events: none; user-select: none; }
body:has(#page-content[inert]) { overflow: hidden; overscroll-behavior: contain; }

.sub-popup {
  position: fixed;
  bottom: -100%;
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 420px;
  z-index: 9997;
  background: rgba(12, 12, 10, 0.97);
  border: 1px solid rgba(130, 49, 255, 0.25);
  border-radius: 16px 16px 0 0;
  padding: 2rem 1.75rem 1.25rem;
  text-align: center;
  /* pointer-events: none cuando el popup está inactivo. En desktop, el
     popup está visualmente en el centro con opacity 0 pero seguiría
     interceptando clics en su área si no se desactiva explícitamente,
     robando clics sobre los posts del cuaderno */
  pointer-events: none;
  transition: bottom .35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sub-popup.active { bottom: 0; pointer-events: auto; }

@media (min-width: 640px) {
  .sub-popup {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -40%);
    border-radius: 16px;
    opacity: 0;
    transition: opacity .25s, transform .25s;
  }
  .sub-popup.active {
    bottom: auto;
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.sub-popup-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none;
  font-size: 1.3rem; color: var(--muted);
  cursor: pointer; transition: color .2s;
}
.sub-popup-close:hover { color: var(--fg); }
.sub-popup-label {
  font-size: 0.75rem; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
}
.sub-popup-title {
  font-family: Georgia, serif;
  font-size: 1.15rem; font-weight: normal; font-style: italic;
  color: var(--fg); margin: 0 0 0.75rem; opacity: 0.85;
}
.sub-popup-body {
  font-size: 0.9rem; color: var(--muted);
  line-height: 1.5; margin: 0 0 1.5rem;
}
.sub-popup-cta {
  width: 100%; padding: 13px;
  background: var(--accent); border: none;
  border-radius: 8px; color: #fff;
  font-size: 0.85rem; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer;
  transition: opacity .2s; font-family: inherit;
  margin-bottom: 0.75rem;
  display: block;
}
.sub-popup-cta:hover { opacity: 0.88; }

/* === SUB-POPUP TIERS ===
   Versión compacta de la tarjeta de tier. Reusa los tokens visuales de
   .tier-card (gradiente púrpura 130,49,255; borde #ae64f4; Georgia + Plex Mono;
   glow lila) en una escala reducida adecuada al popup en móvil/tablet. */
.sub-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin: 1.25rem 0 1rem;
  perspective: 1000px;
}

.sub-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 12px;
  background-image: linear-gradient(135deg, rgba(130, 49, 255, 0.28), rgba(99, 7, 230, 0.16));
  border: 1.5px solid rgba(174, 100, 244, 0.35);
  border-radius: 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .25s ease, box-shadow .25s ease, transform .15s ease;
  font-family: inherit;
  isolation: isolate;
  overflow: hidden;
}
/* Patrón de dots (mismo que .tier-card pero a escala más fina, 8px) */
.sub-tier::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(rgba(130,49,255,.12) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
  z-index: 0;
}
.sub-tier > * { position: relative; z-index: 1; }
.sub-tier:hover {
  border-color: #ae64f4;
  background-image: linear-gradient(135deg, rgba(130, 49, 255, 0.40), rgba(99, 7, 230, 0.24));
  transform: translateY(-2px);
}
.sub-tier--active {
  border-color: #ae64f4;
  background-image: linear-gradient(135deg, rgba(130, 49, 255, 0.55), rgba(99, 7, 230, 0.36));
  box-shadow: 0 0 14px rgba(167, 144, 241, 0.45);
}
.sub-tier-name  {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}
.sub-tier-price {
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.sub-tier-price small {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  opacity: 0.55;
  margin-left: 2px;
}
.sub-tier-desc {
  font-size: 11px;
  opacity: 0.7;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .sub-tiers { gap: 6px; }
  .sub-tier  { padding: 12px 10px; }
  .sub-tier-price { font-size: 22px; }
  .sub-tier-desc  { display: none; }
}

/* === Conmutación compact ↔ full por breakpoint ===
   <900px: el popup muestra el selector compacto + CTA único.
   ≥900px: el popup muestra un tier-rack idéntico al de /cuenta#suscripciones
   (cada card con su propio CTA). El popup se ensancha en función del nº de tiers.

   --tier-count se inyecta desde Twig (style="--tier-count: N").
   max-width: 120px base + 260px por tier, cap en 900px.
   → 1 tier: ~380px  |  2 tiers: ~640px  |  3+ tiers: ~900px */
.sub-popup__full { display: none; }

@media (min-width: 900px) {
  .sub-popup__compact { display: none; }
  .sub-popup__full    { display: block; }

  .sub-popup.sub-popup--tiers {
    max-width: min(calc(120px + var(--tier-count, 3) * 260px), 900px);
  }

  /* Columnas del tier-rack = nº de tiers (sobreescribe las media queries globales
     que solo activan 3 cols a 1050px). Padding compacto para que respiren. */
  .sub-popup__full .tier-rack {
    grid-template-columns: repeat(var(--tier-count, 3), 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
  }
  .sub-popup__full .tier-card { padding: 1.5rem 1.25rem; gap: 1rem; }
  .sub-popup__full .tier-card__name  { font-size: 1.6rem; }
  .sub-popup__full .tier-card__price { font-size: 1.4rem; }
}

/* === SUB-POPUP CONFIRM CHANGE ===
   Vista alternativa del mismo overlay #subPopup; se muestra cuando el backend
   reporta subscription_conflict. Mantiene la geometría bottom-sheet del popup,
   solo cambian los textos y la disposición de acciones. */
.sub-popup-confirm-body {
  font-size: 0.92rem; color: var(--muted);
  line-height: 1.55; margin: 0.25rem 0 0.5rem;
}
.sub-popup-confirm-body strong { color: var(--fg); font-weight: 600; }
.sub-popup-confirm-note {
  font-size: 0.82rem; color: var(--muted);
  opacity: 0.75; margin: 0 0 1.25rem;
}
.sub-popup-confirm-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.sub-popup-confirm-actions .sub-popup-cta { margin-bottom: 0; }
.sub-popup-confirm-secondary {
  display: block;
  width: 100%; padding: 10px;
  background: none;
  border: 1px solid var(--b2);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem; font-family: inherit;
  text-align: center; text-decoration: none;
  transition: color .2s, border-color .2s;
}
.sub-popup-confirm-secondary:hover { color: var(--fg); border-color: var(--fg); }

/* ══════════════════════════════════════════════════
   ACCOUNT PAGE — Orders
   ══════════════════════════════════════════════════ */
.account-alert {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.account-alert--success {
  background: rgba(74, 222, 128, .08);
  border: 1px solid rgba(74, 222, 128, .2);
  color: #4ade80;
}

/* .account-section eliminado: el layout viejo lo usaba como wrapper de
   bloques. Hoy account-sidebar y los tabpanels lo sustituyen. */
.account-section-title {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--fg);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.account-empty {
  font-size: 0.9rem; color: var(--muted);
}
.account-empty a { color: var(--accent); text-decoration: none; }

/* Cancelar suscripción — pill simple, no usa el lenguaje liquid-metal de
   las cards de cambio de plan. Reutiliza .btn--ghost.btn--danger del
   sistema (texto y borde en #f87171) y sólo añade la forma capsular y
   un padding más compacto para encajar en la card. */
.sub-cancel-btn {
  margin-top: 6px;
  align-self: center;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-size: 9px;
}

/* .account-profile eliminado — reemplazado por .account-data en account-sidebar */

/* .account-actions eliminado: el contenedor viejo lo usaba para alinear
   logout+eliminar al final del layout. Ahora viven en .account-sidebar__actions
   (estilo definido en la sección /account al final del archivo). */

/* Variantes de botón para acciones destructivas */
.btn--ghost {
  background: transparent;
  border-color: var(--b2);
  color: var(--muted);
}
.btn--ghost:hover { background: rgba(255,255,255,.05); color: var(--fg); }
.btn--danger {
  background: transparent;
  border-color: rgba(248,113,113,.4);
  color: #f87171;
}
.btn--danger:hover { background: rgba(248,113,113,.08); color: #fca5a5; }

/* Modal de confirmación */
.modal h3 {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: normal;
  margin: 0 0 .75rem;
}
.modal p { font-size: .88rem; color: var(--muted); margin: 0 0 1.5rem; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-actions--end { justify-content: flex-end; }
.modal-error {
  margin-top: .75rem;
  font-size: .82rem;
  color: #f87171;
}

/* ══════════════════════════════════════════════════
   CORRECCIONES DE GEOMETRÍA
   El sitio usa geometría limpia/angular. Los únicos
   bordes fuertemente redondeados son los del producto
   "empaquetado" en la página de detalle.
   ══════════════════════════════════════════════════ */

/* Nav store button */
.nav-store         { border-radius: 3px; }
.nav-store-badge   { border-radius: 3px; }

/* Carrito lateral */
.cart-item-image   { border-radius: 3px; }
.cart-panel-coupon input  { border-radius: 3px; }
.cart-panel-coupon button { border-radius: 3px; }
.cart-checkout-btn         { border-radius: 3px; }
.cart-coupon-msg           { border-radius: 2px; }

/* Checkout overlay */
.atone-checkout-card                           { border-radius: 4px; }
.atone-checkout-form input[type="text"],
.atone-checkout-form input[type="email"],
.atone-checkout-form input[type="tel"]         { border-radius: 3px; }
.atone-card-element                            { border-radius: 8px; }
.atone-checkout-submit                         { border-radius: 3px; }
.atone-checkout-error                          { border-radius: 2px; }
.atone-toast                                   { border-radius: 3px; }

/* Toast */
.atone-toast { border-radius: 3px; }

/* Variantes de producto */
.producto-variant-pill  { border-radius: 3px; }
.producto-add-btn       { border-radius: 3px; }
.producto-back          { border-radius: 0; }


/* Botones generales de la tienda */
.tienda-card-btn        { border-radius: 3px; }
.tienda-filter-btn      { border-radius: 3px; }

/* ══════════════════════════════════════════════════
   NAV ACTIONS — store + user agrupados
   ══════════════════════════════════════════════════ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

