@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,700;1,900&display=swap');
        :root {
            --color-primary-amber: #f59e0b;
            --color-primary-amber-darker: #d97706;
            --color-success-green: #10B981;
            --color-success-green-hover: #059669;
            --color-text-light: white;
            --color-text-muted: #94a3b8; 
            --color-text-dark: black;
            --background-main: #1c1c1e;
            --background-card: #2a2a2e;
            --background-section-header: #3a3a3e;
            --background-section-even: #252528;
            --border-color-medium: #4a4a4a;
            --border-color-light: #4a4a4a;
            --glow-color-default: rgba(245, 158, 11, 0.5);
            --theme-switch-duration: 300ms;
            --theme-icon-scale-halloween: 2.6;
        }

        body[data-theme="light"] {
            --background-main: #f4f4f5;
            --background-card: #2a2a2e; 
            --background-section-header: #d1d5db;
            --background-section-even: #e4e4e7;
            --color-text-light: #18181b;
            --color-text-muted: #94a3b8;
            --border-color-medium: #d1d5db;
            --border-color-light: #e4e4e7;
        }

        body[data-theme="light"] .social-icon { background-color: white; border-color: #d1d5db; }
        .social-icon:hover { 
            transform: translateY(-2px); 
            background-color: rgba(250, 204, 21, 0.1); 
            border-color: rgba(250, 204, 21, 0.3);
        }
        body[data-theme="light"] .section-header { color: white; border-color: #d1d5db; }
        body[data-theme="light"] #modalDialog { background-color: #f1f5f9; color: #1e293b; }
        body[data-theme="light"] #modalDialog .border-b, body[data-theme="light"] #modalDialog .border-t { border-color: #e2e8f0; }
        body[data-theme="light"] #modalDialog #closeModalButton { color: #64748b; }
        body[data-theme="light"] #modalDialog #closeModalButton:hover { color: #1e293b; }
        body[data-theme="light"] #modalDialog .text-slate-400 { color: #64748b; }
        body[data-theme="light"] #modalDialog .text-slate-300 { color: #475569; }
        body[data-theme="light"] .bundle-subitem { background-color: #e5e7eb; border-color: #d1d5db; }
        body[data-theme="light"] .bundle-subitem p { color: #1f2937; }
        body[data-theme="light"] #occurrencesList::-webkit-scrollbar-track { background: #e2e8f0; }
        body[data-theme="light"] .occurrence-entry { color: #334155; border-color: rgba(203, 213, 225, 0.5); }
        body[data-theme="light"] .nav-text-link > div { color: white; }
        body[data-theme="light"] .nav-text-link.active > div { color: var(--color-text-dark); }
        body[data-theme="light"] .nav-text-link.active:hover > div { color: var(--color-text-dark); }
        body[data-theme="light"] #section-nav-text::before { background: linear-gradient(to bottom, rgb(89, 89, 89) 40%, transparent); }
        body[data-theme="light"] #section-nav-text::after { background: linear-gradient(to top, rgb(89, 89, 89) 40%, transparent); }
        body[data-theme="light"] #mobile-nav { background-color: #e5e7eb; color: #374151; border-top-color: #d1d5db; }
        body[data-theme="light"] #mobile-nav .mobile-nav-link { color: #6b7280; }
        body[data-theme="light"] #mobile-nav .mobile-nav-link.active { color: var(--color-primary-amber); }
        body[data-theme="light"] #mobile-search-overlay { background-color: transparent; }
        body[data-theme="light"] #mobile-search-input { background-color: #ffffff; color: #18181b; }

        main.main-content { flex-grow: 1; }
/* ================================================================
   ESTILOS DE NAVEGACIÓN PRINCIPAL (BEM)
================================================================ */

/* Contenedor principal de la barra de navegación */
.main-nav {
    /* Estas clases estaban en el HTML, ahora las definimos aquí */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
    background-color: #111827; /* Este es el color oscuro (slate-900) que tenía antes */
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* Sombra (shadow-lg) */
}

/* Mantener header, navegación superior y barra de fecha por encima de los modales */
header,
#main-nav,
.date-bar {
    position: relative;
    z-index: 300; /* above modal container and content dim overlay */
}

/* Dimming solo del contenido principal cuando hay un modal abierto */
#main-content {
    position: relative; /* necesario para el pseudo-elemento overlay */
}

#main-content.dimmed {
    pointer-events: none; /* evita interacción en el contenido de la tienda */
}

#main-content.dimmed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); /* capa oscura solo sobre el main */
    z-index: 150; /* under header/nav (300), above main content */
    pointer-events: none; /* no bloquea el scroll de la página */
    transition: opacity 0.2s ease-in-out;
}

/* Cuando hay un modal abierto, deshabilitamos la interacción del resto de UI fija
   excepto la cabecera, la navegación superior, la barra de fecha y el propio modal */
body.modal-open #side-nav-wrapper,
body.modal-open #social-container,
body.modal-open #chat-buttons-container,
body.modal-open #page-corner-actions,
body.modal-open #scroll-to-top,
body.modal-open #mobile-nav,
body.modal-open #mobile-search-overlay:not(.is-visible),
body.modal-open #filter-overlay:not(.is-visible),
/* Música y video: deshabilitar controles y contenedor emergente */
body.modal-open #music-control-bar,
body.modal-open #mobile-music-controller,
body.modal-open #music-video-container {
    pointer-events: none !important;
}

/* --- Grupos funcionales --- */
.main-nav__navigation,
.main-nav__actions {
    flex-shrink: 0; /* Evita que estos grupos se encojan */
}

.main-nav__search {
    flex-grow: 1; /* Permite que este grupo crezca y ocupe el espacio sobrante */
    display: flex;
    justify-content: center;
    min-width: 180px; /* Un límite para que no desaparezca */
}

/* --- Elementos de la lista de navegación --- */
.main-nav__list {
    display: flex;
    align-items: center;
    gap: 2rem; /* 32px */
    list-style: none;
    margin: 0;
    padding: 0;
}

/* El enlace de navegación (reemplaza a .main-nav-link) */
.main-nav__link {
    position: relative;
    padding: 0.5rem 0;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: color 0.2s ease-in-out;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.main-nav__link:hover, .main-nav__link.active {
    color: var(--color-primary-amber);
}
.main-nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-primary-amber);
    border-radius: 2px;
}
.main-nav__link .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.main-nav__link .fa-store {
    font-size: 1.5rem;
    width: 1.5rem;
}
.main-nav__link svg.nav-icon {
    width: 1.6rem;
    height: 1.6rem;
    margin-top: 2px;
}
/* Específico para el icono de novedades que es más grande */
#nav-updates .nav-icon {
    width: 2.2rem;
    height: 2.2rem;
}


/* ================================================================
   ESTILOS PARA EL NUEVO TEMPORIZADOR DE LA TIENDA
================================================================ */

/* Contenedor principal del temporizador con el nuevo estilo */
.shop-timer--new-style {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px de espacio entre las cajas */
    
    /* Reseteamos estilos que pudiera heredar del contenedor original */
    background-color: transparent;
    padding: 0;
    font-size: 1rem;
}

/* Estilo para cada una de las cajas (horas, minutos, segundos) */
.shop-timer__box {
    background-color: rgba(255, 255, 255, 0.1); /* Blanco con 10% de opacidad (90% transparente) */
    border-radius: 0.5rem; /* 8px de borde redondeado */
    width: 48px;
    
    /* Técnica para mantenerlo siempre cuadrado */
    aspect-ratio: 1 / 1;
    
    /* Centra el número perfectamente dentro de la caja */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Sombra sutil para darle profundidad */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Estilo para el número dentro de la caja */
.shop-timer__value {
    color: white;
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    line-height: 1; /* Evita que el texto ocupe más altura de la necesaria */

    /* Buena práctica para números: asegura que todos ocupen el mismo ancho */
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

/* Estilo para el texto "Tienda Actualizada" */
.shop-timer__updated-text {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
}


/* --- BLOQUE FINAL Y CORRECTO para style.css --- */
#mobile-shop-timer-container.shop-timer--new-style {
    gap: 0.25rem;         /* <-- AHORA SÍ FUNCIONARÁ: Espacio mínimo entre cajas. */
    padding: 0.25rem; /* Mantenemos el "contorno" original. */
}

#mobile-shop-timer-container .shop-timer__box {
    width: 32px;      /* Mantenemos el tamaño original. */
    height: 32px;     
    border-radius: 0.25rem;
    padding: 0.25rem;
}

#mobile-shop-timer-container .shop-timer__value {
    font-size: 1rem; /* Reducido de 1.125rem a 1rem (16px) */
    line-height: 1.2; /* Ajuste fino para mejor visualización */
}

/* Ajustar las etiquetas de tiempo para que sean más compactas */
#mobile-shop-timer-container .shop-timer__label {
    font-size: 0.6rem; /* Hacer las etiquetas más pequeñas */
    margin-top: 0.1rem; /* Reducir espacio sobre las etiquetas */
}

        #store-wrapper, #viacuenta-wrapper, #updates-wrapper { display: none; }
        body[data-view="store"] #store-wrapper,
        body[data-view="viacuenta"] #viacuenta-wrapper,
        body[data-view="updates"] #updates-wrapper { display: block; }
        body:not([data-view="store"]) #side-nav-wrapper { display: none; }

        #section-nav-dots, #section-nav-text { background-color: rgba(23, 23, 23, 0.7); backdrop-filter: blur(8px); }
        #section-nav-text { scrollbar-width: thin; scrollbar-color: var(--color-primary-amber) #171717; }
        #section-nav-text::after, #section-nav-text::before { content: ''; position: sticky; display: block; width: calc(100% + 16px); margin: 0 -8px; height: 41px; pointer-events: none; transition: opacity 0.2s; opacity: 1; z-index: 5; }
        #section-nav-text::before { top: -1px; margin-bottom: -41px; background: linear-gradient(to bottom, rgba(23, 23, 23, 1) 40%, transparent); }
        #section-nav-text::after { bottom: -1px; margin-top: -41px; background: linear-gradient(to top, rgba(23, 23, 23, 1) 40%, transparent); }
        #section-nav-text.is-scrolled-to-top::before { opacity: 0; }
        #section-nav-text.is-scrolled-to-bottom::after { opacity: 0; }
        #section-nav-text::-webkit-scrollbar { width: 4px; }
        #section-nav-text::-webkit-scrollbar-track { background: #171717; }
        #section-nav-text::-webkit-scrollbar-thumb { background-color: var(--color-primary-amber); border-radius: 20px; }
        .nav-text-link { position: relative; z-index: 1; display: block; padding: 0.25rem; }
        .nav-text-link > div { color: white; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 0.5rem; padding: 0.25rem 0.75rem; position: relative; z-index: 1; transition: background-color 0.1s, color 0.1s; }
        .nav-text-link.active > div { background-color: #e5e7eb; color: var(--color-text-dark); }
        .nav-text-link.active:hover > div { color: var(--color-text-dark); }
        .nav-text-link::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 1px solid white; border-radius: 0.5rem; opacity: 0; transition: opacity 0.075s ease-in-out 0.05s; pointer-events: none; z-index: 2; }
        .nav-text-link::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: 0 0 0 3px white; border-radius: 0.5rem; opacity: 0; transition: opacity 0.05s ease-in-out; pointer-events: none; z-index: 1; }
        .nav-text-link:hover::after { opacity: 1; transition-duration: 0s; transition-delay: 0s; }
        .nav-text-link:hover::before { opacity: 1; }
        .nav-dot { width: 0.5rem; height: 0.5rem; background-color: white; opacity: 0.5; transition: all 0.2s ease-in-out; }
        .nav-dot-link.active .nav-dot { transform: scale(1.5); opacity: 1; }
        #store-container > div { padding: 1.5rem 0; border-radius: 12px; }
        #store-container > div:nth-child(even) { background-color: var(--background-section-even); }
        .section-header {
            border: 2px solid var(--border-color-medium);
            /* Usamos la variable CSS que definimos, con un fallback por si acaso */
            background-color: var(--section-header-bg, var(--background-section-header));
            padding: 10px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            font-size: 1.5rem;
            font-weight: bold;
            text-transform: uppercase;
            color: white;
            display: flex;
            align-items: center;
        }

.item-card-wrapper {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    z-index: 2;
    background-color: var(--background-card);
    transition: box-shadow 0.3s, transform 0.3s;
    contain: layout paint; /* isolate for better rendering performance */
}

.item-card-content {
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 8px;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px */
    margin-bottom: 0.25rem; /* 4px */
}

.item-meta__divider {
    width: 1px;
    height: 12px;
    background-color: var(--border-color-medium);
}

.item-card .text-gray-400 { color: #9ca3af; }
.item-card .text-gray-300 { color: #d1d5db; }
.item-card .buy-now-button { color: white; }

/* V-Bucks icon (SVG) sizing and theming */
.vbucks-icon {
    display: inline-block;
    width: 1.25rem;  /* 20px default, overridden by utility classes */
    height: 1.25rem;
    color: currentColor; /* inherit text color for themeability */
}

/* Base class for any inline SVG icon */
.icon {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none; /* icons are decorative; prevent accidental clicks */
    fill: currentColor;
}

/* V-Bucks price row alignment and spacing */
.vbucks-block[data-currency="vbucks"] {
    align-items: center;
}
.vbucks-block .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 1px, 1px); white-space: nowrap; border: 0; }

/* Stack prices vertically for discounted items */
.item-card-wrapper .price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

/* Reset margin for stacked prices */
.item-card-wrapper .price-block .line-through,
.item-card-wrapper .price-block .original-price {
    margin-right: 0 !important;
    line-height: 1.2;
}

/* Ensure non-discounted items stay in a row */
.item-card-wrapper .price-block:not(:has(.line-through)) {
    flex-direction: row;
    align-items: center;
}

/* Re-apply margin for non-discounted items */
.item-card-wrapper .price-block:not(:has(.line-through)) .original-price {
    margin-right: 6px !important;
}

.item-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    /* Remove filter from container so badges aren't affected */
    transition: opacity 0.2s ease-in-out;
}

/* Brighten effect via overlay so badges stay visually constant (z-index above overlay) */
.item-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 1; /* Below badges (z-index:10), above image */
    transition: background 0.2s ease-in-out;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.15s ease-in-out;
    image-rendering: -webkit-optimize-contrast; 
}

.item-card-wrapper:hover,
.item-card-wrapper:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px white;
    z-index: 20;
    outline: none;
}

.item-card-wrapper:hover .item-image-container::after,
.item-card-wrapper:focus-visible .item-image-container::after {
    background: rgba(255, 255, 255, 0.22);
}

.item-card-wrapper:hover .item-image,
.item-card-wrapper:focus-visible .item-image {
    transform: scale(1.1);
}

.item-card-wrapper:hover .tile-size-2-x-1 .item-image,
.item-card-wrapper:focus-visible .tile-size-2-x-1 .item-image,
.item-card-wrapper:hover .tile-size-3-x-1 .item-image,
.item-card-wrapper:focus-visible .tile-size-3-x-1 .item-image,
.item-card-wrapper:hover .tile-size-4-x-1 .item-image,
.item-card-wrapper:focus-visible .tile-size-4-x-1 .item-image {
    transform: scale(1.1) translateY(-5%);
}

.item-card[data-item-type="Lote"] .item-image-container {
    align-items: flex-end;
}

#viacuenta-wrapper .item-image-container {
    aspect-ratio: auto;
    background-color: var(--background-card);
}
#viacuenta-wrapper .item-image {
    object-fit: cover;
}

.item-badge { position: absolute; top: 10px; left: 10px; background-color: rgba(0, 0, 0, 0.7); color: white; padding: 4px 8px; font-size: 0.75rem; font-weight: bold; border-radius: 4px; text-transform: uppercase; z-index: 10; }
.item-timer { position: absolute; bottom: 8px; right: 8px; background-color: rgba(0, 0, 0, 0.8); color: #ffffff; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: bold; display: inline-flex; align-items: center; z-index: 10; backdrop-filter: blur(2px); transition: background-color 0.3s ease; }
.item-timer.critical { background-color: #c53030; }
.item-timer .icon { margin-right: 4px; width: 14px; height: 14px; }

/* Structured discount badge (percent + price) */
.badge-discount {
    display: inline-flex;
    align-items: center;
    gap: 0.4em; /* Ligeramente reducido para un look más compacto */
    padding: 0.3em 0.7em; /* Ajustamos padding horizontal */
    border-radius: 6px;
    font-weight: 900;
    font-style: italic;
    /* Tipografía fluida que se ajusta al tamaño de la tarjeta/viewport */
    font-size: clamp(0.7rem, 0.6rem + 0.5vw, 0.9rem);
    text-transform: uppercase;
    backdrop-filter: blur(2px);
    white-space: nowrap;
}
.badge-separator {
    width: 2px;
    /* El alto será un porcentaje del alto del badge para que sea adaptable */
    height: 0.9em; 
    border-radius: 1px;
    /* El color se aplica con JS, pero podemos poner un fallback */
    background-color: rgba(0, 0, 0, 0.2); 
}

.badge-percent, .badge-text {
    /* Asegura que el texto no cause saltos de línea extraños */
    line-height: 1;
}
.badge-discount .badge-percent {
    letter-spacing: 0.2px;
}
.badge-discount .badge-price {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.refresh-button { background: linear-gradient(135deg,var(--color-primary-amber) 0%,var(--color-primary-amber-darker) 100%); }
.refresh-button:hover { background: linear-gradient(135deg,#4f46e5 0%,#7c3aed 100%); }

#itemDetailModal.flex { display: flex; opacity: 1; }
#itemDetailModal #modalDialog.opacity-100 { opacity: 1; transform: scale(1); }

/* Stacking context for modal vs headers/backdrop
   - Backdrop: #main-content.dimmed::after (z-index: 150) stays below headers
   - Top bars: header, #main-nav, .date-bar at z-index: 300 (already defined above)
   - Modal content: above headers to avoid being overlapped near scroll top */
#itemDetailModal {
    position: fixed; /* ensure it creates a stacking context */
    inset: 0;
    z-index: 340; /* above headers (300), below any super-overlays you may add later */
}

#itemDetailModal #modalDialog {
    position: relative;
    z-index: 350; /* modal content above headers */
}

/* Note: do not lock page scroll on modal open (per UX requirement) */

/* Ensure the filter overlay always sits above header/nav/date (z-index: 300)
   but below the item detail modal (z-index: 340+) */
#filter-overlay {
    z-index: 320; /* header @ 300, modal @ 340 */
}

/* ================================================================
   MODAL CTA TOOLBAR LAYOUT
   - Two buttons side-by-side, equal width
   - No squeezing by helper text or stray elements
   - Stretch vertically to match each other
================================================================ */
#modal-actions-container {
  width: 100%;
}

#modal-actions-container .cta-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

#modal-actions-container .cta-toolbar > * {
  min-width: 0; /* allow equal distribution without overflow */
}

#modal-actions-container .cta-toolbar > button {
  width: 100%;
  align-self: stretch;
}

/* ================================================================
   MODAL-ONLY PRICE ROW LAYOUT
   - Two prices on one line: left V-Bucks, right final fiat
   - Keep fiat typography exactly as-is (no font-size/weight changes)
   - Do NOT baseline-align; use optical vertical centering
   - Tight, fixed horizontal gap ~12px (10–17px acceptable)
   - Do not pin fiat block to modal right edge
   - No wrapping or truncation
================================================================ */
#itemDetailModal #modal-price-block {
  display: inline-flex;            /* keep inline flow within header area */
  align-items: center;             /* optical vertical centering vs baseline */
  column-gap: 12px;                /* fixed horizontal gap between the two blocks */
  flex-wrap: nowrap;               /* do not allow line wrapping */
  white-space: nowrap;             /* keep both prices on one line */
}

/* The fiat wrapper created by JS currently has Tailwind classes: .ml-3.flex.items-baseline.gap-2
   We neutralize ml-3 (margin-left) since the outer block already sets the gap,
   and switch alignment from baseline to center without touching font sizes. */
#itemDetailModal #modal-price-block > .ml-3 {
  margin-left: 0 !important;       /* avoid doubling the outer 12px gap */
  display: inline-flex;            /* keep inline sizing */
  flex-direction: column;          /* stack base above final */
  align-items: flex-start;         /* left-align the two-line block */
  row-gap: 3px;                    /* tiny vertical gap (~2–4px) */
  flex: 0 0 auto;                  /* prevent flex from stretching/shrinking this block */
  white-space: normal;             /* allow internal vertical stacking */
}

/* Minor optical alignment for the V icon next to the V-Bucks value */
#itemDetailModal #modal-price-block img,
#itemDetailModal #modal-price-block svg { 
  vertical-align: middle; 
}

/* High contrast / forced colors support */
@media (forced-colors: active) {
  .vbucks-icon, .icon {
    forced-color-adjust: auto;
  }
}

/* Respect reduced motion for spinner animation */
@media (prefers-reduced-motion: reduce) {
  .custom-spinner { animation: none !important; }
}

/* stacked layout achieved via flex-direction: column; no extra rules needed on children */

.series-tag {
    background-color: #52525b; 
    color: white;
}

.parent-bundle-indicator { border-color: var(--color-primary-amber) !important; border-style: dashed !important; }
.bundle-subitem img { width: 100%; aspect-ratio: 1/1; object-fit: contain; margin-bottom: 4px; }
.bundle-subitem p { font-size: 0.7rem; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modal-buy-now-button { background-color: var(--color-success-green); }
.modal-buy-now-button:hover { background-color: var(--color-success-green-hover); }
#occurrencesList.expanded { max-height: 200px; margin-top: 0.5rem; padding-top: 0.5rem; }
#occurrencesCaret.expanded { transform: rotate(-180deg); }
#occurrencesList::-webkit-scrollbar { width: 6px; }
#occurrencesList::-webkit-scrollbar-track { background: var(--background-section-header); border-radius: 3px; }
#occurrencesList::-webkit-scrollbar-thumb { background-color: var(--color-primary-amber); border-radius: 3px; }

#scroll-to-top {
    /* position, bottom, right, y z-index ahora vienen de las clases de Tailwind */
    width: 40px;
    height: 40px;
    background-color: var(--color-primary-amber);
    color: var(--background-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
#scroll-to-top.visible { opacity: 1; visibility: visible; }
#scroll-to-top:hover { transform: scale(1.1); }

#mobile-nav { background-color: #18181b; border-top: 1px solid #3f3f46; }
.mobile-nav-link { color: var(--color-text-muted); transition: color 0.2s ease-in-out; }
.mobile-nav-link.active { color: var(--color-primary-amber); }
#mobile-search-overlay { 
    background-color: transparent;
    transition: opacity 0.3s ease-in-out; 
}
#mobile-search-input { background-color: #2a2a2e; }

#mobile-section-dropdown.is-open #mobile-section-caret { transform: rotate(180deg); }
#section-list-dropdown-ul .section-link-item { display: block; padding: 0.75rem 1.5rem; font-weight: 700; text-transform: uppercase; color: var(--color-text-muted); transition: background-color 0.2s, color 0.2s; cursor: pointer; }
#section-list-dropdown-ul .section-link-item:hover { background-color: rgba(245, 158, 11, 0.1); }
#section-list-dropdown-ul .section-link-item.active { color: var(--color-primary-amber); background-color: rgba(0, 0, 0, 0.2); }
#current-section-name { transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out; }
#current-section-name.is-updating { opacity: 0; transform: translateY(-5px); }

#filter-overlay { visibility: hidden; opacity: 0; transition: visibility 0s 0.3s, opacity 0.3s ease; }
#filter-overlay.is-visible { visibility: visible; opacity: 1; transition: visibility 0s, opacity 0.3s ease; }
#filter-panel { transition: transform 0.3s ease; }
#filter-overlay:not(.is-desktop) #filter-panel { transform: translateY(100%); }
#filter-overlay.is-visible:not(.is-desktop) #filter-panel { transform: translateY(0); }
.filter-button { position: relative; width: 40px; height: 40px; border-radius: 8px; }
#filter-btn-mobile { background-color: rgba(255, 255, 255, 0.1); }
#filter-btn-mobile:hover { background-color: rgba(255, 255, 255, 0.2); }
#filter-btn-desktop { background-color: #333335; transition: background-color 0.2s ease-in-out; }
#filter-btn-desktop:hover { background-color: #4a4a4e; }
#desktop-clear-btn { background-color: rgba(255,255,255,0.8); }
#desktop-clear-btn:hover { background-color: rgba(255,255,255,0.95); }
.notification-dot { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; background-color: #f5de4c; border-radius: 50%; border: 2px solid #1c1c1e; display: none; }
.filter-button.has-active-filters .notification-dot { display: block; }
.custom-checkbox input[type="checkbox"] { opacity: 0; width: 0; height: 0; position: absolute; }
.custom-checkbox .checkbox-visual { width: 32px; height: 32px; border: 2px solid white; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; }
.custom-checkbox .checkbox-visual svg { display: none; }
.custom-checkbox input[type="checkbox"]:checked + .checkbox-visual { background-color: #f5de4c; border-color: #f5de4c; }
.custom-checkbox input[type="checkbox"]:checked + .checkbox-visual svg { display: block; color: #1c1c1e; }
#filter-buttons-container button:disabled { opacity: 0.5; cursor: not-allowed; }
@media (min-width: 768px) {
    #filter-overlay.is-desktop { align-items: stretch; justify-content: flex-start; padding: 0; }
    #filter-overlay.is-desktop #filter-panel { transform: translateX(-100%); border-radius: 0; height: 100%; max-height: 100vh; max-width: 384px; }
    #filter-overlay.is-desktop.is-visible #filter-panel { transform: translateX(0); }
}

.view-switch-btn { cursor: pointer; opacity: 0.5; transition: all 0.2s ease-in-out; padding: 4px; border-radius: 6px; }
.view-switch-btn:hover { opacity: 0.75; background-color: rgba(255, 255, 255, 0.1); }
.view-switch-btn.active { opacity: 1; transform: scale(1.1); background-color: rgba(245, 158, 11, 0.2); }
.view-switch-btn img { width: 32px; height: 32px; object-fit: contain; }

.video-volume-toggle { position: absolute; bottom: 12px; right: 12px; width: 36px; height: 36px; background-color: rgba(0, 0, 0, 0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 15; cursor: pointer; color: white; border: none; transition: background-color 0.2s; }
.video-volume-toggle:hover { background-color: rgba(0, 0, 0, 0.8); }
.video-volume-toggle i { font-size: 16px; }

#music-video-container {
    position: fixed;
    z-index: 1001;
    background-color: black;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#music-video-container.visible { opacity: 1; pointer-events: auto; }
#music-video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; display: none; }
.video-minimized #music-video-overlay { display: block; }
.video-minimized { transition: opacity 0.4s, width 0.4s, height 0.4s, top 0.1s linear, right 0.1s linear !important; }

#music-control-bar { position: fixed; z-index: 1002; opacity: 0; transition: opacity 0.3s ease-out, top 0.1s linear, right 0.1s linear, bottom 0.1s linear, left 0.1s linear; }
#music-control-bar.visible { display: flex; opacity: 1; }
#music-control-bar.hidden-by-video { opacity: 0; pointer-events: none; }
#music-control-bar .control-inner { background-color: rgba(31, 41, 55, 0.85); backdrop-filter: blur(8px); }
#music-control-bar button { background: none; border: none; color: #d1d5db; cursor: pointer; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background-color 0.2s, color 0.2s; }
#music-control-bar button:hover { background-color: rgba(255, 255, 255, 0.1); color: white; }

#mobile-music-controller { position: fixed; top: 80px; right: 15px; width: 56px; z-index: 1002; background-color: rgba(31, 41, 55, 0.85); backdrop-filter: blur(8px); border-radius: 1.5rem; padding: 8px; display: none; flex-direction: column; align-items: center; gap: 8px; }
#mobile-music-controller.visible { display: flex; }

#modalItemImageContainer {
    position: relative !important; 
}

.gesto-video-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shop-timer {
    display: flex;
    align-items: center;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.shop-timer i {
    margin-right: 0.5rem;
}

.shop-timer__time {
    min-width: 100px; /* Asegura que el contenedor no cambie de tamaño constantemente */
    text-align: center;
}

#store-wrapper .card-footer-pricing {
    container-type: inline-size;
    container-name: price-shop;
}

#viacuenta-wrapper .card-footer-pricing {
    container-type: inline-size;
    container-name: price-vc;
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

@container price-shop (max-width: 170px) {
    .base-price {
        display: none;
    }
}

@container price-vc (max-width: 130px) {
    .base-price {
        display: none;
    }
}

#viacuenta-wrapper .card-footer-pricing {
    justify-content: flex-end;
}

.text-green-500 {
    color: #2ecc71;
}

.badge-content {
    display: flex;
    align-items: center;
}

.badge-separator {
    width: 1px;
    height: 1.5em;
    background-color: color-mix(in srgb, var(--badge-bg-color) 70%, black);
    margin: 0 0.25em;
}

.badge-discount {
    background-color: var(--badge-bg-color);
    color: var(--badge-text-color);
}


.video-volume-toggle-btn { 
    width: 36px;
    height: 36px;
    background-color: rgba(30, 30, 30, 0.7); 
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white; 
    border: none;
    pointer-events: auto; 
    transition: none !important; 
}

.video-volume-toggle-btn i { 
    font-size: 16px;
    width: 16px;
    text-align: center;
}

.volume-slider-container {
    background-color: rgba(30, 30, 30, 0.75); 
    backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 12px 0px; 
    margin-bottom: 10px;
    width: 38px;
    height: 130px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden; 
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s 0.2s;
    pointer-events: none; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.gesto-video-controls:hover .volume-slider-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s 0s;
}

input[type="range"].volume-slider.vertical {
    writing-mode: vertical-lr; 
    -webkit-appearance: slider-vertical; 
    appearance: none; 
    width: 8px;      
    height: 100px;  
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: transparent !important; 
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    direction: rtl; 
    --volume-track-fill-percentage: 75%; 
    accent-color: white; 
}

input[type="range"].volume-slider.vertical:focus,
input[type="range"].volume-slider.vertical:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

input[type="range"].volume-slider.vertical::-webkit-slider-runnable-track {
    width: 6px; 
    height: 100%;
    background: linear-gradient(to top, 
        white 0%, 
        white var(--volume-track-fill-percentage), 
        #6b7280 var(--volume-track-fill-percentage), 
        #6b7280 100%
    ) !important; 
    border-radius: 3px;
    border: none !important; 
    box-shadow: none !important;
    transition: none !important;
}

input[type="range"].volume-slider.vertical::-moz-range-track {
    width: 6px;
    height: 100%;
    background: #6b7280; 
    border-radius: 3px;
    border: none !important;
    box-shadow: none !important;
    transition: none !important;
}
input[type="range"].volume-slider.vertical::-moz-range-progress {
    background-color: white !important; 
    border-radius: 3px;
}

input[type="range"].volume-slider.vertical:hover::-moz-range-track,
input[type="range"].volume-slider.vertical:focus::-moz-range-track,
input[type="range"].volume-slider.vertical:active::-moz-range-track {
    background: #6b7280 !important;
    box-shadow: none !important;
}
input[type="range"].volume-slider.vertical:hover::-moz-range-progress,
input[type="range"].volume-slider.vertical:focus::-moz-range-progress,
input[type="range"].volume-slider.vertical:active::-moz-range-progress {
    background-color: white !important;
}

input[type="range"].volume-slider.vertical::-webkit-slider-thumb {
    -webkit-appearance: none !important; 
    appearance: none !important;
    width: 18px; 
    height: 18px;
    background-color: white !important; 
    background-image: none !important;
    border-radius: 50% !important;
    border: none !important; 
    box-shadow: none !important;
    outline: none !important;
    margin-left: -6px; 
    position: relative; 
    top: 0; 
    transition: none !important;
}

input[type="range"].volume-slider.vertical::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background-color: white !important;
    background-image: none !important;
    border-radius: 50% !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transition: none !important;
}

input[type="range"].volume-slider.vertical:hover::-webkit-slider-thumb,
input[type="range"].volume-slider.vertical:focus::-webkit-slider-thumb,
input[type="range"].volume-slider.vertical:active::-webkit-slider-thumb {
    background-color: white !important;
    box-shadow: none !important;
    border: none !important;
}
input[type="range"].volume-slider.vertical:hover::-moz-range-thumb,
input[type="range"].volume-slider.vertical:focus::-moz-range-thumb,
input[type="range"].volume-slider.vertical:active::-moz-range-thumb {
    background-color: white !important;
    box-shadow: none !important;
    border: none !important;
}
.horizontal-scroll-section {
  /* container for horizontally scrollable sections */
  position: relative;
}

.horizontal-scroll-section .section-header-wrapper {
  /* spacing wrapper for section header above horizontal scrollers */
  margin-bottom: 4px;
}

.horizontal-scroll-section .section-header-wrapper h2.section-header {
  /* ensure headers inside horizontal sections keep correct spacing */
  margin-bottom: 0;
}

.carousel-viewport-wrapper {
    position: relative; 
    overflow: visible; 
}

.carousel-items-container {
    display: flex;
    overflow-x: auto;
    overflow-y: visible !important;
    gap: 1rem;
    padding: 30px 25px;
    margin: -15px 0 0 -25px;
    clip-path: inset(0 0 0 25px);

    scrollbar-width: none; 
    -ms-overflow-style: none;  
}
.carousel-items-container::-webkit-scrollbar { 
    display: none;
}

.carousel-card-container {
    flex-shrink: 0; 
    flex-grow: 0;   
    flex-basis: 300px; 
    width: 300px;       
    margin-bottom: 0; 

    padding: 5px; 
}

.carousel-card-container .item-card-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

@media (max-width: 1280px) { 
    .carousel-card-container {
        width: 270px; 
        flex-basis: 270px; 
    }
}
@media (max-width: 1024px) { 
    .carousel-card-container {
        width: 250px; 
        flex-basis: 250px; 
    }
}
@media (max-width: 767px) { 
    .carousel-card-container {
        width: 200px;  
        flex-basis: 200px; 
    }
    .carousel-items-container { 
        gap: 0.75rem; 
    }
}
@media (max-width: 480px) { 
    .carousel-card-container { 
        width: 170px; 
        flex-basis: 170px; 
    }
    .carousel-items-container { 
        gap: 0.5rem; 
    }
}

.carousel-nav-btn {
    border: none;
    border-radius: 8px;
    width: 40px; 
    height: 40px;
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);

    transition-property: background-color, opacity, transform, box-shadow;
    transition-duration: 0.15s; 
    transition-timing-function: ease-in-out;
}

.carousel-nav-btn i {
    font-size: 1.25rem; 
    line-height: 1; 
    transition: transform 0.15s ease-in-out; 
}

.carousel-nav-btn { 
    background-color: rgba(255, 255, 255, 0.8); 
    color: #2D3748;                             
}

.carousel-nav-btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.95); 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);

}

.carousel-nav-btn:active:not(:disabled) { 
    background-color: white; 

    transition-duration: 0.05s; 
}

.carousel-nav-btn:disabled {
    background-color: rgba(220, 220, 220, 0.6); 
    color: #A0AEC0;                             
    opacity: 0.7; 
    cursor: not-allowed;
    box-shadow: none; 
}

body[data-theme="light"] .carousel-nav-btn {
    background-color: rgba(55, 65, 81, 0.8);  
    color: white;                              
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}
body[data-theme="light"] .carousel-nav-btn:hover:not(:disabled) {
    background-color: rgba(31, 41, 55, 0.9);   
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.07);

}
body[data-theme="light"] .carousel-nav-btn:active:not(:disabled) { 
    background-color: #1f2937; 

    transition-duration: 0.05s; 
}
body[data-theme="light"] .carousel-nav-btn:disabled {
    background-color: rgba(107, 114, 128, 0.6); 
    color: #E5E7EB;                              
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.carousel-nav-btn.desktop-nav {
    position: absolute;
    top: 35%; 
    transform: translateY(-50%) scale(1); 
    transform-origin: center center; 
    z-index: 30; 
}

.carousel-nav-btn.desktop-nav:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.1); 
}

.carousel-nav-btn.desktop-nav:active:not(:disabled) {
    transform: translateY(-50%) scale(1.05); 

}

.carousel-nav-btn.desktop-nav.prev { left: -15px; }
.carousel-nav-btn.desktop-nav.next { right: -15px; }

.carousel-nav-buttons-bottom { 
    display: flex; 
    justify-content: center; 
    gap: 1rem; 
    margin-top: 1rem; 
    padding-bottom: 0.5rem; 
}

#image-preloader {
    display: none;
}

.tile-size-2-x-1,
.tile-size-3-x-1,
.tile-size-4-x-1 {
    grid-column: span 2 / span 2;
}

@media (min-width: 768px) {
    .tile-size-3-x-1,
    .tile-size-4-x-1 {
        grid-column: span 3 / span 3;
    }
    .tile-size-2-x-1 {
        grid-column: span 2 / span 2;
    }
}

@media (min-width: 1024px) {
    .tile-size-4-x-1 {
        grid-column: span 4 / span 4;
    }
    .tile-size-3-x-1 {
        grid-column: span 3 / span 3;
    }
    .tile-size-2-x-1 {
        grid-column: span 2 / span 2;
    }
}

.item-image-container {

    height: 260px;
}

@media (max-width: 767px) {
    .item-image-container {

        height: 45vw;
    }
}

@media (min-width: 1024px) {

    .tile-size-2-x-1 .item-image-container,
    .tile-size-3-x-1 .item-image-container,
    .tile-size-4-x-1 .item-image-container {
        align-items: flex-start;
    }

    .tile-size-2-x-1 .item-image,
    .tile-size-3-x-1 .item-image,
    .tile-size-4-x-1 .item-image {
        width: 60%;
        height: auto; 
    }
}

    .tile-size-2-x-1 .item-image-container,
    .tile-size-3-x-1 .item-image-container,
    .tile-size-4-x-1 .item-image-container {
        align-items: flex-start; 
    }

.tile-size-2-x-1 .item-timer,
.tile-size-3-x-1 .item-timer,
.tile-size-4-x-1 .item-timer {
    bottom: 35px;
}

@media (min-width: 1024px) {

    .tile-size-3-x-1 .item-image {
        transform: translateY(-30px);
    }

    .tile-size-4-x-1 .item-image {
        transform: translateY(-60px);
    }
}

.style-selector-channel {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color-medium);
}

#modalStyleSelectorContainer > .style-selector-channel:first-child {
    border-top: none;
    padding-top: 0;
}

.style-selector-title {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.style-selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.style-option-btn {
    background-color: transparent;
    border: 2px solid var(--border-color-light);
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.style-option-btn:hover:not(.disabled) {
    border-color: var(--color-primary-amber);
    transform: scale(1.05);
}

.style-option-btn.active {
    border-color: var(--color-primary-amber);
    box-shadow: 0 0 10px var(--glow-color-default);
}

.style-option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.style-option-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.style-option-btn-numbered {
    background-color: #3a3a3e; 
    color: white;
    font-weight: 700;
    font-size: 1.125rem; 
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}
.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.whatsapp-button {
    background-color: #25D366;
}
.messenger-button {
    background-color: #0084FF;
}

.chat-button-text {
    position: absolute;
    right: 100%;
    margin-right: 12px;

    background-color: #2D3748; 
    color: white;              
    font-weight: 700;          
    border: none;              
    padding: 8px 14px;         
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 

    font-size: 0.875rem;
    white-space: nowrap;

    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.group:hover .chat-button-text {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-channel-button i {
    font-size: 1.5rem !important; 
}

#social-menu-trigger .svg-main-color {

    transition: fill 0.2s ease-in-out;
}

#social-menu-trigger:hover .svg-main-color {
    fill: #52525B; 
}

#nav-updates svg.nav-icon {
    width: 2.2rem; 
    height: 2.2rem;
}

body[data-theme="light"] #closeReferidosModal:hover {
    color: #111827; 
}

.manual-discount-badge {
    background-color: #3b82f6; 
    color: white;
}

#section-random-offer .grid {

    justify-content: center;
}

.video-icon-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background-color: #000000; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2); 
}
.video-icon-overlay i {
    color: white;
    font-size: 12px;
    margin-left: 2px; 
}

.video-controls-bar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%); 

    display: flex;
    gap: 4px; 

    background-color: rgba(20, 20, 20, 0.65); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 6px;
    border-radius: 9999px; 
    border: 1px solid rgba(255, 255, 255, 0.1);

    z-index: 15;
}

.control-bar-button {
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;

    width: 38px;  
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    transition: background-color 0.15s ease-out;
}

.control-bar-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.control-bar-button svg {
    width: 26px;  
    height: 26px;
}

/* Random offers header: center grid cards on that section */
#section-random-offer .grid { justify-content: center; }

/* Current section name truncate fix */
#current-section-name { min-width: 0; }

/* New info button and popover for 'Ofertas Random del Día' header */
.section-header { position: relative; }
.section-info-btn {
  position: absolute;
  top: 50%; /* perfectly centered vertically */
  transform: translateY(-50%);
  right: 10px; /* equal to header's vertical padding */
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px; /* circular badge */
  border: none; /* no border/ring */
  cursor: pointer;
  color: #FFFFFF; /* white 'i' */
  background-color: rgba(0,0,0,0.50); /* default opacity 0.50 */
  transition: background-color 10ms linear, color 10ms linear, opacity 10ms linear;
}
.section-info-btn:hover {
  background-color: rgba(30,30,30,0.50); /* same opacity, slightly lighter gray */
}
.section-info-btn:active {
  background-color: rgba(0,0,0,0.60); /* pure black with 0.60 opacity */
  color: #FFFFFF;
}
.section-info-btn svg { pointer-events: none; }

.section-info-popover {
  position: absolute;
  right: 10px; /* align with button */
  bottom: calc(100% + 8px); /* open upward (top placement) */
  background: rgba(17,24,39,0.95);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(4px) scale(0.98); /* subtle upward animation */
  transition: opacity 140ms ease, transform 180ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.section-info-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.section-info-popover::after {
  content: '';
  position: absolute;
  bottom: -6px; /* arrow at bottom when opening upward */
  right: 16px;
  border-width: 6px;
  border-style: solid;
  border-color: rgba(17,24,39,0.95) transparent transparent transparent; /* triangle pointing downwards */
}

#viacuenta-wrapper .item-card .line-through {
    color: #65748a; 
}

@media (max-width: 767px) {

    #viacuenta-wrapper .item-card .text-xs.font-semibold {
        display: none;
    }

    #viacuenta-wrapper .item-card .relative .absolute {
        position: static;
        transform: none;
        text-align: left;

        margin-top: 10px; 
        width: 100%;
    }

    #viacuenta-wrapper .item-card .relative {
        display: block;
    }

    #viacuenta-wrapper .item-card h3.font-bold {
        font-size: 1rem;
        line-height: 1.25rem;
    }

    #viacuenta-wrapper .item-card .relative .absolute > div {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        width: 100%;
    }

    #viacuenta-wrapper .item-card .text-xs.line-through {
        font-size: 0.85rem;
    }
    #viacuenta-wrapper .item-card .font-bold.text-lg {
        font-size: 1.2rem;
    }
}

.youtube-icon-overlay {
    position: absolute;
    top: 6px;  
    right: 6px; 
    z-index: 11;
    pointer-events: none;
}

.youtube-icon-overlay img {
    width: 32px;  
    height: auto;

    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

@keyframes spin-animation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.custom-spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;

  color: white; 
}

.custom-spinner {
  animation: spin-animation 1s linear infinite;

  width: 40px;
  height: 40px;
}

body[data-theme="light"] .prose {
    color: #334151; 
}

body[data-theme="light"] .prose strong {
    color: #1e293b; 
}

#viacuenta-wrapper .item-image-container {
    height: auto;       
    aspect-ratio: auto; 
}

#viacuenta-wrapper .item-image {
    object-fit: contain; 
    height: auto;        
}

@media (max-width: 767px) {

    #viacuenta-wrapper .viacuenta-tipo {
        display: none;
    }

    #viacuenta-wrapper .viacuenta-nombre {
        font-size: 1rem;      
        line-height: 1.25rem; 
    }

    #viacuenta-wrapper .viacuenta-price-container {

        margin-top: 0; 

        display: block; 
    }

    #viacuenta-wrapper .viacuenta-price-container .flex.flex-col {
        flex-direction: row;        
        justify-content: flex-start;  
        align-items: baseline;      
        gap: 0.5rem;                
    }

    #viacuenta-wrapper .viacuenta-price-container .text-xs.line-through {
        font-size: 0.875rem; 
        margin-right: 6px; /* keep a clear gap before discounted price */
    }
    #viacuenta-wrapper .viacuenta-price-container .font-bold.text-lg {
        font-size: 1.125rem; 
    }
}

#viacuenta-wrapper .item-image-container {
    height: auto;
    aspect-ratio: auto;
}
#viacuenta-wrapper .item-image {
    object-fit: contain;
    height: auto;
}

#viacuenta-wrapper .viacuenta-price-block {
    text-align: right;
    margin-top: -28px; 
}

@media (max-width: 767px) {

    #viacuenta-wrapper .text-xs.font-semibold {
        display: none;
    }

    #viacuenta-wrapper h3.font-bold {
        font-size: 1rem;
        line-height: 1.25rem;
    }

    #viacuenta-wrapper .viacuenta-price-block {
        text-align: left; 
        margin-top: 8px;  
    }

    #viacuenta-wrapper .viacuenta-price-block {
        display: flex;
        align-items: baseline;
        gap: 0.5rem; 
    }
}

.item-image-container {
    display: flex; 
    justify-content: center;
    align-items: center;

    min-height: 150px; 
}

.error-icon-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    background-color: rgba(0, 0, 0, 0.1);

    flex-grow: 1; 
}

.error-svg-icon {
    width: 2.5rem;  
    height: 2.5rem; 
    opacity: 0.6;
    color: var(--color-text-light); 
}

body[data-theme="light"] .error-svg-icon {
    color: var(--color-text-dark);
}

#occurrencesHeader:focus {
    outline: none;
    box-shadow: none; 
}
#occurrencesHeader:focus-visible {

    background-color: rgba(255, 255, 255, 0.05);
}

#occurrencesList {
    max-height: 0;
    overflow-y: hidden; 

    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid transparent; 
}

#occurrencesList.expanded {
    max-height: 50rem; 
    overflow-y: visible; 
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top-color: rgba(100, 116, 139, 0.5); 
}

#occurrencesCaret.expanded {
    transform: rotate(-180deg);
}

#occurrencesList::-webkit-scrollbar { width: 6px; }
#occurrencesList::-webkit-scrollbar-track { background: var(--background-section-header); border-radius: 3px; }
#occurrencesList::-webkit-scrollbar-thumb { background-color: var(--color-primary-amber); border-radius: 3px; }

nav#mobile-section-dropdown {
  z-index: 60;
}

nav#mobile-section-dropdown > div:first-child {
  background-color: rgba(28, 28, 30, 0.7);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  border-bottom: 1px solid rgba(82, 82, 91, 0.5);
  position: relative;
  z-index: 10;
}

#section-list-overlay {
  position: absolute;

  top: 100%;
  left: 0;
  width: 100%;

  height: calc(100vh - 56px);

  z-index: 5;
  background-color: rgba(28, 28, 30, 0.7);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);

  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
#section-list-overlay.is-open {
  display: block;
  opacity: 1;
}

#section-list-dropdown-ul {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    padding-top: 1rem; 
    padding-bottom: 80px;
}
#section-list-dropdown-ul .section-link-item {
    color: white;
}
#section-list-dropdown-ul .section-link-item.active {
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    font-weight: 900;
    border-radius: 12px;
}

#mobile-nav { z-index: 70; }
#scroll-to-top { z-index: 40; }

#mobile-section-dropdown.is-open #mobile-section-caret { transform: rotate(180deg); }

.title-mobile {
    display: none;
}

@media (max-width: 767px) {

    .title-desktop {
        display: none;
    }

    .title-mobile {
        display: inline;
    }
}

.desktop-header .container #theme-switcher {
    position: absolute;
    right: 1rem;  
    top: 50%;     
    transform: translateY(-50%); 
}

.header-action-btn {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 0.5rem; 
    height: 40px; 
    padding: 0 0.75rem; 
    border-radius: 9999px;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0; 
}

.header-action-btn:has(i),
.header-action-btn:has(svg) {
    width: 40px; 
}

.header-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.3);
    transform: scale(1.03);
}

.header-action-btn:active {
    background-color: rgba(0, 0, 0, 0.4);
    transform: scale(0.98);
    transition-duration: 0.1s;
}

@media (max-width: 767px) {
    .header-action-btn {
        width: 32px; 
        height: 32px;
        padding: 0;
    }
    .header-action-btn span {
        display: none;
    }
}

.card-actions-container {
    display: flex;
    gap: 0.25rem; 
    margin-top: 0.75rem; 
}

.card-actions-container .buy-now-button {
    flex-grow: 1; 
    margin-top: 0;

    border-radius: 0.375rem; 
    transition: background-color 0.2s ease-in-out; 
}

.card-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 2.75rem;
    height: 2.75rem;

    background-color: var(--color-primary-amber);
    color: white;
    cursor: pointer;

    border-radius: 0.375rem; 

    transition: all 0.2s ease-in-out;
}

.card-actions-container .buy-now-button:hover {
    background-color: var(--color-success-green);
}

.card-cart-btn:hover {
    background-color: var(--color-success-green);
    transform: scale(1.05);
}

.card-cart-btn:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

.card-cart-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

#cart-panel {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
#cart-panel.is-open {
    transform: translateX(0);
}
#cart-overlay.is-open {
    opacity: 1;
}

.cart-item {
    display: flex;
    gap: 0.75rem; 
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb; 
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}
.cart-item:last-child {
    border-bottom: none;
}
.cart-item.is-removing {
    transform: translateX(100%);
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    height: 0;
    border-width: 0;
    margin: 0;
}

.cart-item-image-container {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}
.cart-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; 
}
.cart-item-name {
    font-weight: 500;
    color: #0f172a; 
    line-height: 1.3;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item-price {
    font-weight: 700;
    color: #b91c1c; 
    margin-top: 0.25rem;
}

.cart-item-quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db; 
    border-radius: 0.5rem; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-top: auto; 
    width: fit-content;
}

.quantity-btn, .quantity-display {
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    user-select: none;
}
.quantity-btn {
    background-color: #f9fafb; 
    color: #1f2937; 
    cursor: pointer;
    transition: background-color 0.15s;
}
.quantity-btn:hover {
    background-color: #f3f4f6; 
}
.quantity-btn.minus-btn {
    border-right: 1px solid #d1d5db;
    border-top-left-radius: 0.4rem;
    border-bottom-left-radius: 0.4rem;
}
.quantity-btn.plus-btn {
    border-left: 1px solid #d1d5db;
    border-top-right-radius: 0.4rem;
    border-bottom-right-radius: 0.4rem;
}
.quantity-btn.trash-btn:hover {
    background-color: #fee2e2; 
    color: #b91c1c;
}

.quantity-display {
    background-color: transparent;
    font-size: 1rem;
}

.quantity-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb; 
    border-top-color: #3b82f6; 
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.trash-svg-icon {
    width: 18px;
    height: 18px;
}

body.cart-visible #page-corner-actions {

    transform: translateX(calc(-150px - 20px)); 
}

#scroll-to-top {
    opacity: 0;
    visibility: hidden;

}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

:root {
    --fc-bg: #ffffff;
    --fc-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    --fc-text-subtle: #565959;
    --fc-text-main: #0f1111;
    --fc-text-price: #b12704;
    --fc-btn-border: #adb1b8;
    --fc-item-border: #e7e7e7;
    --fc-qty-border: #FFC107;
    --fc-skeleton-bg: #f0f2f2;
    --fc-skeleton-shimmer: linear-gradient(90deg, transparent 20%, #e5e7eb 50%, transparent 80%);
    --fc-item-hover-bg: #f5f5f5;
}

body[data-theme="dark"],
body[data-theme="halloween"] {
    --fc-bg: #1e293b;
    --fc-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --fc-text-subtle: #94a3b8;
    --fc-text-main: #f1f5f9;
    --fc-text-price: #f87171;
    --fc-btn-border: #475569;
    --fc-item-border: #334155;
    --fc-qty-border: #f59e0b;
    --fc-skeleton-bg: #334155;
    --fc-skeleton-shimmer: linear-gradient(90deg, transparent 20%, #475569 50%, transparent 80%);
    --fc-item-hover-bg: #334155;
}

.floating-cart {
    position: fixed; top: 0; right: 0;
    width: 150px; height: 100vh;
    background-color: var(--fc-bg);
    box-shadow: var(--fc-shadow);
    z-index: 1010;
    display: flex; flex-direction: column;
    padding: 14px;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 0.35s ease-in-out;
}
.floating-cart.visible { transform: translateX(0); }

.fc-header {
    padding: 0; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px;
}
.fc-subtotal-block {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.fc-subtotal-text { font-size: 14px; color: var(--fc-text-subtle); }
.fc-subtotal-price { font-size: 20px; font-weight: 700; color: var(--fc-text-price); }

.fc-checkout-btn {
    width: 100%; padding: 6px 12px; font-size: 13px; font-weight: 500;
    color: var(--fc-text-main); background-color: transparent;
    border: 1px solid var(--fc-btn-border); border-radius: 3px;
    cursor: pointer; text-decoration: none; text-align: center;
    transition: background-color 0.2s; line-height: 1.5;
}
.fc-checkout-btn.skeleton { border-color: transparent; color: transparent; }
.fc-checkout-btn:hover { background-color: rgba(128, 128, 128, 0.1); }

.fc-items-container {
    flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column;
    gap: 16px; padding-right: 4px; margin-right: -4px;
    scrollbar-width: thin; scrollbar-color: var(--fc-qty-border) transparent;
}
.fc-items-container::-webkit-scrollbar { width: 4px; }
.fc-items-container::-webkit-scrollbar-track { background: transparent; }
.fc-items-container::-webkit-scrollbar-thumb { background-color: var(--fc-qty-border); border-radius: 4px; }

.fc-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    border-top: 1px solid var(--fc-item-border); padding-top: 16px;
}
.fc-items-container .fc-item:first-child { border-top: none; padding-top: 0; }
.fc-item-main-content {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    width: 100%; padding: 8px 4px; border-radius: 6px;
    transition: background-color 0.15s ease-out;
}
.fc-item-main-content:hover { background-color: var(--fc-item-hover-bg); }
.fc-item-image-container {
    width: 90px; 

    border-radius: 4px; 
    overflow: hidden;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    flex-shrink: 0;
}
.fc-item-image {
    width: 100%; 
    height: auto; 
    display: block; 
    object-fit: contain; 
    cursor: pointer; 
    transition: transform 0.2s ease-out;
}
.fc-item-image:hover { transform: scale(1.08); }
.fc-item-price { font-size: 16px; font-weight: 700; color: var(--fc-text-main); }

.fc-quantity-selector {
    display: inline-flex; align-items: center; height: 32px; flex-shrink: 0;
    border: 2px solid var(--fc-qty-border); border-radius: 9999px;
    background-color: var(--fc-bg); overflow: hidden;
}
.fc-quantity-selector.skeleton { border: none; width: 100px; }
.fc-quantity-selector .quantity-btn {
    border: none; background-color: transparent; cursor: pointer; height: 100%;
    padding: 0 10px; display: flex; align-items: center; justify-content: center;
    color: var(--fc-text-main); transition: background-color 0.2s;
}
.fc-quantity-selector .quantity-btn:hover { background-color: rgba(128, 128, 128, 0.1); }
.fc-quantity-selector .quantity-btn svg { width: 14px; height: 14px; }
.fc-quantity-selector .quantity-display {
    font-size: 14px; font-weight: 700; color: var(--fc-text-main); padding: 0 12px; height: 60%;
    border-left: 1px solid var(--fc-item-border); border-right: 1px solid var(--fc-item-border);
}

.skeleton {
    background-color: var(--fc-skeleton-bg);
    position: relative; overflow: hidden; border-radius: 4px;
}
.skeleton::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: var(--fc-skeleton-shimmer); animation: shimmer 1.8s infinite linear;
}
@keyframes shimmer { 100% { transform: translateX(200%); } }
.skeleton-text {
    color: transparent !important; user-select: none;
    background-color: var(--fc-skeleton-bg);
    border-radius: 4px; position: relative; overflow: hidden;
}
.skeleton-text::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: var(--fc-skeleton-shimmer); animation: shimmer 1.8s infinite linear;
}

.skeleton-fade-out {
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

#page-corner-actions { transition: transform 0.35s ease-in-out; }
body.cart-visible #page-corner-actions { transform: translateX(calc(-150px - 20px)); }
.a-offscreen { position: absolute !important; clip: rect(1px, 1px, 1px, 1px) !important; padding: 0 !important; border: 0 !important; height: 1px !important; width: 1px !important; overflow: hidden !important; }
#scroll-to-top { opacity: 0; visibility: hidden; }
#scroll-to-top.visible { opacity: 1; visibility: visible; }

@keyframes skeleton-pulse {
    50% { background-color: rgba(58, 58, 62, 0.6); }
}

body[data-theme="light"] {

    --skeleton-pulse-color: #e2e8f0; 
}
body[data-theme="dark"],
body[data-theme="halloween"] {
    --skeleton-pulse-color: rgba(58, 58, 62, 0.8);
}

@keyframes skeleton-pulse-light {
    50% { background-color: #f1f5f9; }
}

.skeleton-header, .skeleton-items {

    background-color: var(--skeleton-pulse-color);
    animation: skeleton-pulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

body[data-theme="light"] .skeleton-header,
body[data-theme="light"] .skeleton-items {
    animation-name: skeleton-pulse-light;
}

.skeleton-header {
    border-color: transparent !important;
    color: transparent !important;
    user-select: none;
    border-radius: 8px;
    height: 52px; 
    margin-bottom: 20px;
}
.skeleton-header > * {
    visibility: hidden; 
}

.skeleton-items {
    min-height: 300px; 
    border-radius: 12px;
    animation-delay: 0.1s;
}

#viacuenta-wrapper .item-image-container {
    height: auto;       
    aspect-ratio: auto; 
}

#viacuenta-wrapper .item-image {
    object-fit: contain; 
    height: auto;        
}

#itemDetailModal {
    pointer-events: none !important; /* never block clicks outside dialog */
    opacity: 0;
    visibility: hidden;

    transition: opacity 0.3s ease, visibility 0s linear 0.3s;

    display: flex;
    align-items: center;
    justify-content: center;
}

#itemDetailModal.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

#modalDialog {

    transform: scale(0.95);
    opacity: 0;

    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
}

#itemDetailModal.is-visible #modalDialog {
    transform: scale(1);
    opacity: 1;
}

#itemDetailModal #modalDialog {
    pointer-events: auto; /* dialog remains interactive */
}

/* ================================================================
   ESTILOS PARA BOTÓN DE CAMBIO DE TEMA ANIMADO
================================================================ */

/* ESTADO CORREGIDO */
.header-action-btn {
    position: relative; /* Esencial para que los iconos absolutos se posicionen dentro de él */
    /* overflow: hidden;   <-- ¡HEMOS QUITADO ESTA LÍNEA! */
}

/* Y AÑADE ESTA NUEVA REGLA JUSTO DEBAJO */
#theme-toggle-btn,
#mobile-theme-toggle-btn {
    overflow: hidden; /* Aplicamos el overflow solo a los botones de tema */
}

/* 2. Los Iconos SVG (los Hijos) */
.header-action-btn .theme-icon {
    /* Los sacamos del flujo normal y los apilamos uno sobre otro */
    position: absolute; 
    top: 50%;
    left: 50%;
    /* Tamaño visible */
    width: 1.25rem;  /* 20px */
    height: 1.25rem; /* 20px */
    /* Animación top-to-bottom consistente */
    transition: transform var(--theme-switch-duration) ease-in-out, opacity var(--theme-switch-duration) ease-in-out;
    /* Estado base: fuera de vista por ARRIBA */
    transform: translate(-50%, -150%);
    opacity: 0;
    will-change: transform, opacity;
    pointer-events: none;
}

/* 3. Nuevas clases de animación: top-to-bottom para TODOS los cambios */
.header-action-btn .theme-icon.is-visible {
    transform: translate(-50%, -50%);
    opacity: 1;
}
.header-action-btn .theme-icon.is-entering {
    transform: translate(-50%, -50%);
    opacity: 1;
}
.header-action-btn .theme-icon.is-exiting {
    transform: translate(-50%, 150%);
    opacity: 0;
}

/* Halloween 3x size when active */
body[data-theme="halloween"] [data-theme-icon="halloween"].is-visible,
body[data-theme="halloween"] [data-theme-icon="halloween"].is-entering {
    transform: translate(-50%, -50%) scale(var(--theme-icon-scale-halloween));
}
body[data-theme="halloween"] [data-theme-icon="halloween"].is-exiting {
    transform: translate(-50%, 150%) scale(var(--theme-icon-scale-halloween));
}

/* Allow overflow only when Halloween is active so the enlarged icon can be prominent */
body[data-theme="halloween"] #theme-toggle-btn,
body[data-theme="halloween"] #mobile-theme-toggle-btn {
    overflow: visible;
}

/* While animating in/out of Halloween, allow overflow regardless of body theme */
#theme-toggle-btn.theme-animating,
#mobile-theme-toggle-btn.theme-animating {
    overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
  .header-action-btn .theme-icon {
    transition: none !important;
  }
}

/* Fallback de visibilidad inicial por tema (sin animación) */
body[data-theme="halloween"] [data-theme-icon="halloween"],
body[data-theme="light"] [data-theme-icon="sun"],
body[data-theme="dark"] [data-theme-icon="moon"] {
    transform: translate(-50%, -50%);
    opacity: 1;
}

/* Apply scale in fallback when Halloween is the active theme to avoid initial flash */
body[data-theme="halloween"] [data-theme-icon="halloween"] {
    transform: translate(-50%, -50%) scale(var(--theme-icon-scale-halloween));
}

/* 5. Fondo de Halloween solo en escritorio (pantallas grandes) */
@media (min-width: 1024px) {
  body[data-theme="halloween"] {
    background-image: url('https://res.cloudinary.com/dri9gvpwm/image/upload/v1761368469/Generated_Image_October_24_2025_-_9_01PM_eeklgj.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }
}

/* ================================================================
   CORRECCIÓN PARA BOTÓN DE ACCIÓN CON TEXTO E ICONO
================================================================ */
.header-action-text-btn {
    width: auto; /* ¡LA CLAVE! Anula el ancho fijo de 40px. */
    justify-content: flex-start; /* Alinea el contenido a la izquierda en lugar de centrarlo. */
    white-space: nowrap; /* Asegura que "Iniciar Sesión" nunca se divida en dos líneas. */
}

/* ================================================================
   ESTILOS PARA EL CONTADOR DEL CARRITO (CÍRCULO ROJO)
================================================================ */

/* 1. Hacemos que el botón del carrito sea el 'lienzo' para el contador. */
.header-action-btn {
    position: relative;
}

/* 2. Estilo y posición del contador (el círculo rojo). */
.cart-counter-badge {
    position: absolute;
    top: -2px;      /* Ajusta para que sobresalga un poco por arriba */
    right: -2px;     /* Ajusta para que sobresalga un poco por la derecha */

    background-color: #ef4444; /* Rojo (red-500) */
    color: white;
    
    /* Dimensiones y forma */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    
    /* Centrar el número dentro del círculo */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Estilo del texto */
    font-size: 12px;
    font-weight: 700;
    line-height: 1;

    /* Estado inicial (oculto) y animación */
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

/* 3. Clase 'visible' que activa la aparición del contador. */
.cart-counter-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* 4. Aseguramos que el icono del carrito siempre esté centrado */
.header-action-btn i.fa-shopping-cart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ================================================================
   MOVIMIENTO DE ACCIONES DEL HEADER AL ABRIR CARRITO
================================================================ */

/* 1. Preparamos ambos contenedores para una transición suave. */
#desktop-header-actions,
#mobile-header-actions {
    /* Usamos la misma duración y efecto que el carrito para que se muevan en sincronía. */
    transition: transform 0.35s ease-in-out;
}

/* 2. La regla principal: Cuando el body tiene la clase 'cart-visible'... */
body.cart-visible #desktop-header-actions,
body.cart-visible #mobile-header-actions {
    /* ...los movemos a la izquierda la misma distancia que el buscador. */
    /* 150px es el ancho del carrito + 20px de un pequeño margen. */
    transform: translate(-50%, -50%) translateX(calc(-150px - 20px));
}

/* 3. CORRECCIÓN: Como ya usamos transform para centrar verticalmente,
   debemos combinar los transforms para no sobreescribirlos. */
#desktop-header-actions,
#mobile-header-actions {
    /* Estado inicial: centrado verticalmente */
    transform: translateY(-50%);
    transition: transform 0.35s ease-in-out;
}
body.cart-visible #desktop-header-actions,
body.cart-visible #mobile-header-actions {
    /* Estado final: centrado verticalmente Y movido a la izquierda */
    transform: translateY(-50%) translateX(calc(-150px - 20px));
}

/* ============================
   TOKENS GLOBALES
   ============================ */
:root {
  /* Fallback colors (HEX + RGB triplets) */
  --fade-hex-light: #595858;       /* light base (#595858) */
  --fade-hex-dark:  #191919;       /* dark base (#191919) */
  --fade-rgb-light: 89 88 88;      /* triplet for rgba() */
  --fade-rgb-dark:  25 25 25;

  /* Modern OKLCH tokens (neutral) */
  --fade-oklch-light: oklch(46.1319% 0 0);
  --fade-oklch-dark:  oklch(21.3422% 0 0);

  /* Layout / control */
  --fade-height: 40px;
  --fade-stop: 30%;     /* where solid color ends */
  --fade-end: 100%;     /* where transparency ends */
  --fade-transition: 0.28s;
  --fade-ease: ease;

  /* Default: light theme */
  --fade-bg-color: var(--fade-oklch-light);
  --fade-fallback-hex: var(--fade-hex-light);
  --fade-rgb: var(--fade-rgb-light);
}

/* ============================
   THEME RESOLUTION
   ============================ */
body[data-theme="dark"],
body[data-theme="halloween"] {
  --fade-bg-color: var(--fade-oklch-dark);
  --fade-fallback-hex: var(--fade-hex-dark);
  --fade-rgb: var(--fade-rgb-dark);
}
body[data-theme="light"] {
  --fade-bg-color: var(--fade-oklch-light);
  --fade-fallback-hex: var(--fade-hex-light);
  --fade-rgb: var(--fade-rgb-light);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --fade-bg-color: var(--fade-oklch-dark);
    --fade-fallback-hex: var(--fade-hex-dark);
    --fade-rgb: var(--fade-rgb-dark);
  }
}

/* ============================
   COMPONENT: SCROLL FADE
   ============================ */
.scroll-fade {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  contain: paint;
  isolation: isolate;
}

.scroll-fade::before,
.scroll-fade::after {
  content: "";
  position: sticky;
  left: 0;
  right: 0;
  height: var(--fade-height);
  pointer-events: none;
  will-change: opacity;
  transition: opacity var(--fade-transition) var(--fade-ease);
  backface-visibility: hidden;
  /* Por defecto, ambos degradados son visibles */
  opacity: 1;
}

.scroll-fade::before { top: 0; }
.scroll-fade::after  { bottom: 0; }

/* ---------- FALLBACK GRADIENT (RGB/HEX) ---------- */
.scroll-fade::before {
  background-image:
    linear-gradient(
      to bottom,
      var(--fade-fallback-hex) var(--fade-stop),
      rgb(var(--fade-rgb) / 0) var(--fade-end)
    );
}
.scroll-fade::after {
  background-image:
    linear-gradient(
      to top,
      var(--fade-fallback-hex) var(--fade-stop),
      rgb(var(--fade-rgb) / 0) var(--fade-end)
    );
}

/* ---------- MODERN OVERRIDE: OKLCH ---------- */
@supports (color: oklch(50% 0 0)) {
  .scroll-fade::before {
    background-image:
      linear-gradient(
        to bottom,
        var(--fade-bg-color) var(--fade-stop),
        oklch(from var(--fade-bg-color) l c h / 0) var(--fade-end)
      );
  }
  .scroll-fade::after {
    background-image:
      linear-gradient(
        to top,
        var(--fade-bg-color) var(--fade-stop),
        oklch(from var(--fade-bg-color) l c h / 0) var(--fade-end)
      );
  }
}

/* ========================================================= */
/* ======> VISIBILITY CONTROL (LÓGICA SIMPLIFICADA) <======= */
/* ========================================================= */

/* Cuando el contenedor NO se ha movido del inicio, OCULTA el degradado superior (::before) */
#section-nav-text:not(.scrolled-past-start) .scroll-fade::before {
  opacity: 0;
}

/* Cuando el contenedor SÍ ha llegado al final, OCULTA el degradado inferior (::after) */
#section-nav-text.scrolled-to-end .scroll-fade::after {
  opacity: 0;
}

/* ============================
   ACCESSIBILITY
   ============================ */
@media (prefers-reduced-motion: reduce) {
  .scroll-fade::before,
  .scroll-fade::after {
    transition: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --fade-stop: 20%;
  }
}

/* ========================================================= */
/* ======> REEMPLAZA EL BLOQUE CSS DE LA BÚSQUEDA <======= */
/* ========================================================= */

/* --- Componente: Barra de Búsqueda del Header --- */
.header-search-form {
    --search-height: 2.5rem; /* 40px */
    --search-padding-inline: 1rem; /* 16px */
    --search-gap: 0.75rem; /* 12px */
    --search-icon-size: 1rem; /* 16px */
    --search-border-radius: 9999px;
    --search-bg-color: rgba(255, 255, 255, 0.05);
    --search-border-color: rgba(255, 255, 255, 0.15);
    --search-text-color: #FFFFFF;
    --search-placeholder-color: rgba(255, 255, 255, 0.4);
    --search-icon-color: rgba(255, 255, 255, 0.65);
    --search-transition-duration: 0.2s;
    --search-transition-easing: ease-in-out;

    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 42rem;
    height: var(--search-height);
    background-color: var(--search-bg-color);
    border: 1px solid var(--search-border-color);
    border-radius: var(--search-border-radius);
    padding: 0 var(--search-padding-inline);
    gap: var(--search-gap);
    transition: border-color var(--search-transition-duration) var(--search-transition-easing), 
                background-color var(--search-transition-duration) var(--search-transition-easing),
                box-shadow var(--search-transition-duration) var(--search-transition-easing);
}

/* --- Input de Búsqueda --- */
.search-input {
    background-color: transparent;
    border: none;
    outline: none;
    padding: 0;
    color: var(--search-text-color);
    font-size: 0.875rem;
    height: 100%;
    width: 100%;
}

/* Y aquí aplicamos el efecto cuando el input de adentro tiene el foco */
.header-search-form:has(.search-input:focus-visible) {
    border-color: rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1.5px white, 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
    color: var(--search-placeholder-color);
    opacity: 1;
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance:none;
}

/* --- Botones y Iconos --- */
.search-submit-btn,
.search-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--search-icon-color);
}

.search-submit-btn {
    order: -1;
}

.search-icon,
.close-icon {
    width: var(--search-icon-size);
    height: var(--search-icon-size);
    fill: currentColor;
    transition: color var(--search-transition-duration) var(--search-transition-easing);
}

/* --- Lógica de Visibilidad del Botón de Cierre --- */
.search-close-btn {
    visibility: hidden;
    opacity: 0;
    transform: scale(0.7);
    transition: visibility 0s var(--search-transition-duration), 
                opacity var(--search-transition-duration) var(--search-transition-easing), 
                transform var(--search-transition-duration) var(--search-transition-easing);
}

.header-search-form.is-filled .search-close-btn {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}
/* ===== Visibilidad por breakpoint ===== */

/* Oculta el menú de escritorio en móviles */
@media (max-width: 767.98px) {
  #main-nav {
    display: none;
  }
}

/* Menú móvil oculto en escritorio/tablet */
@media (min-width: 768px) {
  #mobile-nav,
  #mobile-switcher-pop { display: none !important; }
}

/* Floating-cart oculto en móviles */
@media (max-width: 767px) {
  #floating-cart { display: none !important; }
}

/* ===== Chevron al lado del icono ===== */
#mobile-nav .mobile-icon-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#mobile-nav .mobile-icon-row .chevron {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  transform: rotate(0deg);
  transition: transform 120ms ease;
}
/* Rota cuando el cubo está abierto */
#mobile-nav[data-switcher-open="true"] .mobile-icon-row .chevron {
  transform: rotate(180deg);
}

/* Tamaño de los iconos clonados */
#mobile-nav .icon-slot svg,
#mobile-switcher-pop .icon-slot svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ================================================================
   CORRECCIONES DE COLOR PARA TEMA CLARO
================================================================ */

/* --- 1. Título del Modal --- */

/* Por defecto (tema oscuro), el título es blanco. */
#modalItemNameHeader {
    color: var(--color-text-light);
}

/* En el tema claro, el título toma el color del texto oscuro principal. */
body[data-theme="light"] #modalItemNameHeader {
    color: var(--color-text-dark); /* Esto usa tu variable --color-text-dark */
}

/* --- 2. Switcher/Cubo del menú móvil --- */

/* Por defecto (tema oscuro), el texto del cubo es blanco. */
.switcher-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: #fff; /* Se mantiene blanco por defecto */
}

/* En el tema claro, el fondo del cubo es blanco, así que el texto debe ser oscuro. */
body[data-theme="light"] .switcher-item {
  color: #111827; /* Un color oscuro casi negro (slate-900) */
}

/* ================================================================
   ESTILOS PARA BOTONES DE ACCIÓN DEL MODAL
================================================================ */

/* Contenedor principal para alinear botones */
.modal-buy-now-button,
.modal-add-cart-button {
    display: inline-flex;
    align-items: center;
    text-align: center;
    font-weight: 700;
    padding: 0.75rem 1.5rem; /* 12px 24px */
    border-radius: 0.375rem; /* 6px */
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    height: 50px;       /* <-- Altura fija para el botón */
    line-height: 1.2;   /* <-- Asegura que el texto no se estire demasiado verticalmente */
}

/* Botón principal: Comprar ahora (verde) */
.modal-buy-now-button {
    background-color: var(--color-success-green);
    color: white;
}
.modal-buy-now-button:hover:not(:disabled) {
    background-color: var(--color-success-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Botón secundario: Agregar al carrito (estilo "outline") */
.modal-add-cart-button {
    background-color: transparent;
    color: #cbd5e1; /* slate-300 */
    border: 2px solid #475569; /* slate-600 */
}
.modal-add-cart-button:hover:not(:disabled) {
    background-color: #334155; /* slate-700 */
    color: white;
    border-color: #64748b; /* slate-500 */
    transform: translateY(-1px);
}

/* Estilo para tema claro */
body[data-theme="light"] .modal-add-cart-button {
    color: #475569; /* slate-600 */
    border-color: #94a3b8; /* slate-400 */
}
body[data-theme="light"] .modal-add-cart-button:hover:not(:disabled) {
    background-color: #e2e8f0; /* slate-200 */
    color: #1e293b; /* slate-800 */
    border-color: #475569; /* slate-600 */
}

/* Estado deshabilitado para ambos botones */
.modal-buy-now-button:disabled,
.modal-add-cart-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================================================
   SISTEMA DE NOTIFICACIONES (TOAST) - V3 (TRANSICIÓN SIMULTÁNEA)
================================================================ */

/* 1. El Contenedor Principal (sin cambios) */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

/* 2. La Notificación Individual (ahora un solo elemento) */
#toast-notification {
    background-color: #2d3748; /* slate-800 */
    color: white;
    padding: 14px 22px;
    border-radius: 9999px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    
    /* Estado inicial (oculta y fuera de la vista) */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden; /* Clave: oculta completamente por defecto */
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

/* 3. Clase 'show' para activar la animación de entrada */
#toast-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible; /* Clave: la hace visible */
}

/* 4. Variantes de Color (SIN border-bottom) */
.toast-notification.success {
    background-color: #2f855a; /* Verde */
}

.toast-notification.error {
    background-color: #c53030; /* Rojo */
}

/* NUEVA VARIANTE */
.toast-notification.info {
    background-color: #2b6cb0; /* Azul */
}

/* ================================================================
   POSICIONAMIENTO DEL CONTADOR DEL CARRITO EN EL MENÚ MÓVIL
================================================================ */

/* 1. Aseguramos que el botón del carrito sea el ancla de posicionamiento. */
#mobile-nav-cart-button {
    position: relative;
}

/* 2. Reglas específicas para el contador dentro de la barra móvil. */
#mobile-nav .cart-counter-badge {
    /* Reseteamos la posición derecha que hereda del estilo de escritorio. */
    right: auto;
    
    /* Lo posicionamos desde la parte superior y desde el centro horizontal del botón. */
    top: 6px;   /* Ajusta este valor para subirlo o bajarlo (menos es más arriba) */
    left: 50%;
    
    /* 
     * El truco clave:
     * Lo movemos 10px a la derecha desde el centro (translateX)
     * y aplicamos la animación de escala inicial (scale).
     * Esto coloca el contador justo a la derecha del ícono centrado.
    */
    transform: translateX(10px) scale(0.5);
}

/* 3. Estado visible: Mantenemos el desplazamiento y cambiamos solo la escala. */
#mobile-nav .cart-counter-badge.visible {
    transform: translateX(10px) scale(1);
}

/* ================================================================
   AJUSTES RESPONSIVE PARA NOTIFICACIONES
================================================================ */

/* Oculta el contenedor de toasts en pantallas de tablet hacia abajo */
@media (max-width: 767px) {
  #toast-container {
    display: none;
  }
}

/* ================================================================
   ANIMACIÓN "BUMP" PARA EL CONTADOR DEL CARRITO (CON COLOR)
================================================================ */

@keyframes bump-animation {
  0% {
    transform: translateX(10px) scale(1);
    background-color: #ef4444; /* Rojo normal (red-500) */
  }
  30% {
    transform: translateX(10px) scale(1.4);
    background-color: #f87171; /* Rojo más brillante (red-400) */
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.7); /* Añade un brillo */
  }
  50% {
    transform: translateX(10px) scale(0.9);
    background-color: #ef4444; /* Vuelve al rojo normal */
  }
  70% {
    transform: translateX(10px) scale(1.1);
  }
  100% {
    transform: translateX(10px) scale(1);
    background-color: #ef4444; /* Asegura el color final */
  }
}

/* La clase que aplica la animación no cambia */
#mobile-nav .cart-counter-badge.bump {
  animation: bump-animation 0.4s ease-out;
}

/* ================================================================
   ESTILOS PARA EL FALLBACK DE IMAGEN ROTA
================================================================ */

.item-image-container {
    display: flex; 
    justify-content: center;
    align-items: center;
    min-height: 150px; 
}

.error-icon-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Un fondo sutil para diferenciarlo del color principal */
    background-color: rgba(0, 0, 0, 0.1);
    /* Asegura que ocupe todo el espacio si la imagen se elimina */
    flex-grow: 1; 
}

.error-svg-icon {
    width: 2.5rem;  /* 40px */
    height: 2.5rem; /* 40px */
    opacity: 0.6;
    color: var(--color-text-light); 
}

/* Ajuste para tema claro */
body[data-theme="light"] .error-svg-icon {
    color: var(--color-text-dark);
}
/* ================================================================
   MODAL DE CARRITO PARA MÓVILES Y TABLETS
================================================================ */

/* Regla GLOBAL: Oculta el modal en TODAS las pantallas por defecto. */
.mobile-cart-overlay {
    display: none; /* <-- ¡LA LÍNEA CLAVE! */
}

/* Reglas específicas que SÓLO se aplican en pantallas pequeñas */
@media (max-width: 1024px) {
    .mobile-cart-overlay {
        display: flex; /* Anula el 'none' para que pueda mostrarse */
        position: fixed;
        inset: 0;
        z-index: 1000;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        justify-content: center;
        align-items: flex-end;
        
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    }

    .mobile-cart-overlay.is-open {
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }

    .mobile-cart-modal {
        background-color: var(--background-main);
        color: var(--color-text-light);
        width: 100%;
        max-width: 500px; /* Un máximo para tablets en horizontal */
        height: 90vh; /* Ocupa el 90% de la altura de la pantalla */
        max-height: 800px;
        border-radius: 1.25rem 1.25rem 0 0; /* Esquinas redondeadas solo arriba */
        box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
        display: flex;
        flex-direction: column;
        overflow: hidden;

        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-cart-overlay.is-open .mobile-cart-modal {
        transform: translateY(0);
    }

    /* --- Cabecera --- */
    .mobile-cart-header {
        position: sticky;
        top: 0;
        flex-shrink: 0;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color-medium);
        background-color: var(--background-main);
        z-index: 10;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
    }
    .mobile-cart-header .title {
        font-size: 1.25rem;
        font-weight: 900;
        grid-column: 1 / 2;
    }
    .mobile-cart-header .summary {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        font-size: 0.875rem;
    }
    .mobile-cart-header .summary .price {
        font-weight: 700;
        color: var(--fc-text-price);
    }
    .mobile-cart-header .close-btn {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        font-size: 2rem;
        color: var(--color-text-muted);
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.25rem;
    }

    /* --- Contenedor de Productos --- */
    .mobile-cart-products-container {
        flex-grow: 1;
        overflow-y: auto;
        padding: 0.5rem 1.25rem 1.25rem;
    }

    .mobile-cart-item {
        display: flex;
        gap: 1rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color-medium);
    }
    .mobile-cart-item:last-child { border-bottom: none; }

    .mobile-cart-item .item-image {
        width: 80px;
        height: 80px;
        object-fit: contain;
        flex-shrink: 0;
        cursor: pointer;
    }

    .mobile-cart-item .item-info {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .mobile-cart-item .item-name {
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-cart-item .item-meta {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.25rem;
        font-size: 0.75rem;
    }
    .mobile-cart-item .item-rarity {
        font-weight: 900;
        padding: 2px 6px;
        border-radius: 4px;
    }
    .mobile-cart-item .item-type {
        color: var(--color-text-muted);
        font-weight: 700;
        text-transform: uppercase;
    }

    .mobile-cart-item .item-footer {
        margin-top: auto;
        padding-top: 0.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-cart-item .item-price-display .original-price {
        font-size: 0.75rem;
        color: var(--color-text-muted);
        text-decoration: line-through;
        margin-right: 0.5rem;
    }
    .mobile-cart-item .item-price-display .final-price {
        font-size: 1.125rem;
        font-weight: 900;
        color: var(--color-primary-amber);
    }
    .mobile-cart-item .item-rarity {
        font-weight: 900;
        padding: 2px 6px; /* Espaciado interno */
        border-radius: 4px; /* Esquinas redondeadas */
        font-size: 0.75rem; /* Tamaño de letra pequeño */
        line-height: 1.2;
        text-transform: uppercase;
    }
    body[data-theme="light"] .mobile-cart-item .item-price-display .final-price {
        color: var(--color-success-green);
    }
    

    /* --- Estado Vacío --- */
    .mobile-cart-empty-state {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 2rem;
        flex-grow: 1;
        color: var(--color-text-muted);
    }
    .mobile-cart-empty-state .empty-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
        opacity: 0.5;
    }
    .mobile-cart-empty-state .empty-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--color-text-light);
    }

    /* --- Pie del Modal --- */
    .mobile-cart-footer {
        flex-shrink: 0;
        padding: 1rem 1.25rem;
        border-top: 1px solid var(--border-color-medium);
        background-color: var(--background-main);
    }

    .mobile-cart-footer .checkout-btn {
        display: block;
        width: 100%;
        padding: 0.8rem 1rem;
        background-color: var(--color-primary-amber);
        color: var(--color-text-dark);
        text-align: center;
        font-size: 1.125rem;
        font-weight: 900;
        border-radius: 0.75rem;
        text-decoration: none;
        transition: background-color 0.2s;
    }
    .mobile-cart-footer .checkout-btn:hover {
        background-color: var(--color-primary-amber-darker);
    }

    /* --- Ocultar/Mostrar elementos según el estado del carrito --- */
    .mobile-cart-modal.is-empty .mobile-cart-products-container,
    .mobile-cart-modal.is-empty .mobile-cart-footer,
    .mobile-cart-modal.is-empty .mobile-cart-summary {
        display: none;
    }
    .mobile-cart-modal.is-empty .mobile-cart-empty-state {
        display: flex;
    }
}

/* ================================================================
   ESTILOS PARA PIE DE PÁGINA FIJO EN MODAL (MÓVIL) - VERSIÓN FINAL 2.0
================================================================ */
@media (max-width: 1024px) {
    #modalDialog {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #modalDialog > .flex-grow {
        overflow-y: auto;
        /* Asegura que el contenido nunca quede oculto bajo la barra de CTAs fija */
        padding-bottom: calc(
            var(--modal-cta-height, 0px)
            + max(env(safe-area-inset-bottom, 0px), 0px)
            + 16px
        );
    }
    
    #modal-actions-container {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 1rem;
        z-index: 20;

        background-color: #2a2a2e;
        border-top: 1px solid var(--border-color-medium);
        box-shadow: 0 -5px 15px rgba(0,0,0,0.2);

        gap: 0;
        flex-direction: row; 
    }

    body[data-theme="light"] #modal-actions-container {
        background-color: #f1f5f9;
    }

    #modal-actions-container .modal-add-cart-button {
        border-radius: 0.75rem 0 0 0.75rem; 
        border-right: 1px solid #475569;
    }
    
    body[data-theme="light"] #modal-actions-container .modal-add-cart-button {
         border-right-color: #94a3b8;
    }

    #modal-actions-container .modal-buy-now-button {
        border-radius: 0 0.75rem 0.75rem 0;
    }
}

/* Mobile-only background scroll locking when a modal is open */
@media (max-width: 1024px) {
  body.modal-open.lock-scroll {
    position: fixed;
    overflow: hidden;
    width: 100%;
    touch-action: none;
    overscroll-behavior: contain;
  }
}


/* ================================================================
   AJUSTES DE COLOR Y ESTILO PARA CARRITO MÓVIL
================================================================ */

/* Regla GLOBAL: El texto del botón "Finalizar Compra" siempre será negro */
.mobile-cart-footer .checkout-btn {
    color: var(--color-text-dark) !important; /* Usamos !important para asegurar que anule otras reglas */
}

@media (max-width: 1024px) {
    /* Reglas específicas para el TEMA CLARO en el modal móvil */
    body[data-theme="light"] .mobile-cart-modal {
        /* El color de fondo y texto principal ya se heredan bien, pero lo reforzamos */
        background-color: #f1f5f9; /* Color claro del modal */
        color: #1e293b; /* Color de texto oscuro principal */
    }
    
    /* Título "Tu Carrito" en negro */
    body[data-theme="light"] .mobile-cart-header .title {
        color: #1e293b; /* Color de texto oscuro principal */
    }

    /* Color del texto "Subtotal" y precio */
    body[data-theme="light"] .mobile-cart-header .summary {
        color: var(--fc-text-subtle); /* Hereda el color sutil del carrito de escritorio */
    }
    
    /* Color del precio del subtotal */
    body[data-theme="light"] .mobile-cart-header .summary .price {
        color: var(--fc-text-price); /* Hereda el color del precio del carrito de escritorio */
    }
}

/* ================================================================
   AJUSTES DE COLOR PARA ESTADO DE CARRITO VACÍO (TEMA CLARO)
================================================================ */
@media (max-width: 1024px) {
    body[data-theme="light"] .mobile-cart-empty-state .empty-icon {
        color: #d1d5db; /* Un gris más oscuro y menos prominente (slate-300) */
    }

    body[data-theme="light"] .mobile-cart-empty-state .empty-text {
        color: #6b7280; /* Un gris más oscuro y legible (slate-500) */
    }
}

/* ================================================================
   ESTILOS PARA EL OVERLAY DE CARGA GLOBAL
================================================================ */
.loading-overlay {
    position: fixed; /* Lo saca del flujo normal y lo fija a la ventana */
    inset: 0; /* Hace que ocupe toda la pantalla (top:0, right:0, bottom:0, left:0) */
    z-index: 9998; /* Un z-index muy alto para que esté por encima de todo */
    
    background-color: var(--background-main); /* Usa el color de fondo actual del tema */

    display: flex;
    align-items: center;
    justify-content: center;

    /* Transición para una aparición y desaparición suave */
    opacity: 1;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0s;
    visibility: visible;
}

/* Cuando le añadimos la clase 'hidden', se desvanece y desaparece */
.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ================================================================
   BARRA DE FECHA INDEPENDIENTE
================================================================ */

.date-bar__container {
    /* Aplica el mismo padding horizontal que la barra de navegación principal */
    padding-left: 1rem;
    padding-right: 1rem;
    
    /* Mantiene el centrado vertical si fuera necesario en el futuro */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================================
   UNIFIED SECTION SPINNER (Pure SVG)
   - Provided SVG structure with rotating group.
   - No gradients/filters/shadows. Only two stroke colors.
================================================================ */

.spinner-container {
  display: block;
  margin: 24px auto; /* horizontal centering and spacing */
  pointer-events: none;
}

.spinner-group {
  animation: spinner-rotate 1.1s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;
}

.spinner-group.is-paused { animation: none !important; }

@keyframes spinner-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================================================================
   SISTEMA DE BANNERS PARA TARJETAS DE PRODUCTO (V5 - ELITE)
================================================================ */

/* 1. Tokens de Diseño Configurables y Semánticos en :root. */
:root {
    --banner-offset: 6px;
    --banner-padding-block: 0.3em;  /* 2. Padding relativo a la fuente para escalar proporcionalmente. */
    --banner-padding-inline: 0.8em;
    --banner-radius: 6px;
    --banner-font-weight: 900;
    --banner-font-style: italic;

    /* 3. Tipografía Fluida con clamp(): El tamaño se adapta al viewport. */
    --banner-font-size: clamp(0.8rem, 0.7rem + 0.5vw, 0.95rem);

    /* 4. Colores definidos por temas, incluyendo OKLCH y fallbacks. */
    --banner-new-bg: #FFEA00;
    --banner-new-text: #000000;
    --banner-default-bg: rgb(28 28 30 / 0.85);
    --banner-default-text: #FFFFFF;
}
@supports (color: oklch(0% 0 0)) {
    :root {
        --banner-new-bg: oklch(95% 0.25 90);
        --banner-new-text: oklch(20% 0 0);
    }
}

/* 5. Estilo base con propiedades lógicas y variables. */
[data-banner-type] {
    /* Posicionamiento y Layout */
    position: absolute;
    inset-block-start: var(--banner-offset);
    inset-inline-start: var(--banner-offset);
    z-index: 10;
    contain: layout paint style; /* 6. Containment más estricto para máximo rendimiento. */
    
    /* Apariencia */
    padding-block: var(--banner-padding-block);
    padding-inline: var(--banner-padding-inline);
    border-radius: var(--banner-radius);
    border: none;
    
    font: var(--banner-font-style) var(--banner-font-weight) var(--banner-font-size) / 1.3 sans-serif;
    text-transform: uppercase; /* <<-- AÑADE ESTA LÍNEA */
    letter-spacing: 0.05em;    /* <<-- AÑADE ESTA (Opcional, pero recomendado) */
    
    white-space: nowrap;
    text-align: center;
    text-shadow: 0 1px 3px rgb(0 0 0 / 0.5);

    /* 7. Transición para futuras animaciones (optimización). */
    will-change: transform, opacity;
}

/* 8. Estilos de variantes modulares. */
[data-banner-type="discount"] {
    background-color: #FFFFFF;
    color: #000000;
    text-shadow: none;
}
[data-banner-type="new"] {
    background-color: var(--banner-new-bg);
    color: var(--banner-new-text);
    text-shadow: none;
}
[data-banner-type="default"] {
    background-color: var(--banner-default-bg);
    color: var(--banner-default-text);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* 9. Soporte para impresión: Ocultar banners decorativos al imprimir. */
@media print {
    [data-banner-type] {
        display: none;
    }
}

/* 10. Contexto de Apilamiento: Crear un nuevo contexto para evitar problemas con z-index. */
.item-image-container {
    isolation: isolate;
}
/* Esto asegura que el z-index del banner (10) sea siempre relativo al contenedor
   de la imagen y no compita con otros elementos de la página. */
   
/* 11. Ajuste de Contraste para Accesibilidad. */
@media (prefers-contrast: more) {
    [data-banner-type] {
        /* Borde sutil para delinear el banner en modo de alto contraste. */
        outline: 2px solid;
        outline-offset: -2px;
    }
}

@layer components {
    :root {
        /* 1. Tokens de Diseño Puros: Estas son solo constantes con valores. */
        --icon-size-default: 1.8rem;
        --icon-size-pistas: 3.0rem;
        --icon-size-vibras: 3.0rem;
        --icon-margin-inline-end: 0.85rem;
    }

    .section-header-icon {
        /* 2. La propiedad `width` ahora usa la variable local `--_icon-size`. */
        /* Si no está definida localmente, usa el token global `--icon-size-default` como fallback. */
        width: var(--_icon-size, var(--icon-size-default));
        aspect-ratio: 1;
        margin-inline-end: var(--icon-margin-inline-end);
        
        display: inline-grid;
        place-items: center;
        flex-shrink: 0;
        contain: strict;
    }

    .section-header-icon {
        /* 3. Anulación de la variable local: Esto ahora funciona como se espera. */
        &[data-icon-id="pistas"] { --_icon-size: var(--icon-size-pistas); }
        &[data-icon-id="vibras"] { --_icon-size: var(--icon-size-vibras); }

        & > i {
            /* 4. `font-size` también usa la variable local para escalar correctamente. */
            font-size: calc(var(--_icon-size, var(--icon-size-default)) * 0.7);
            line-height: 1;
        }
        & > img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
    }
    
    /* 5. Accesibilidad y Estilos de Interacción se mantienen, ya que son buenas prácticas. */
    @media (prefers-contrast: more) {
        .section-header-icon {
            outline: 2px solid CanvasText;
            outline-offset: 2px;
        }
    }
}

/* ================================================================
   FIX: ALTURA UNIFORME PARA CABECERAS DE SECCIÓN
================================================================ */

/* 1. Selector ligeramente más específico para anular estilos previos.
   Apuntamos a cualquier .section-header que esté dentro de una sección. */
   div[id^="section-"] > .section-header {
    height: 56px;      /* Altura fija y consistente para todas las cabeceras. */
    padding-top: 0;    /* Anulamos el padding vertical previo. */
    padding-bottom: 0; /* Anulamos el padding vertical previo. */
}

/* 2. Salvaguarda para el tamaño máximo de los iconos. */
.section-header-icon {
    /* Le decimos al icono que nunca sea más alto que la cabecera. */
    max-height: calc(56px - 16px);
    max-width: calc(56px - 16px);
}



.horizontal-scroll-section {
    position: relative;
}
.carousel-viewport-wrapper {
    position: relative;
    overflow: visible; 
}
.carousel-items-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    &::-webkit-scrollbar {
        display: none;
    }
}
.carousel-nav-btn.desktop-nav {
    display: none;
}
@media (min-width: 1024px) {
    .carousel-nav-btn.desktop-nav {
        display: inline-flex;
    }
    .carousel-nav-buttons-bottom {
        display: none;
    }
}

/* ================================================================
   CONTENEDOR DE BADGES PARA EVITAR COLISIONES
================================================================ */
.card-badges-container {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    
    display: flex;
    align-items: center;
    gap: 6px; /* <-- ESTE ES EL ESPACIO HORIZONTAL ENTRE BADGE Y BANNER */
}

/* Anulamos el posicionamiento absoluto de los hijos directos del contenedor */
.card-badges-container > .item-badge,
.card-badges-container > [data-banner-type] {
    position: static; /* <-- Clave: ahora fluyen dentro del contenedor flex */
    top: auto;
    left: auto;
}

/* ================================================================
   CONTENEDOR DE BADGES PARA EVITAR COLISIONES
================================================================ */
.card-badges-container {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    
    /* Clave: Usamos Flexbox para alinear los elementos horizontalmente. */
    display: flex;
    align-items: center;
    gap: 6px; /* Espacio entre el badge y el banner si ambos aparecen. */
}

/* Anulamos el posicionamiento absoluto de los hijos directos del contenedor */
.card-badges-container > .item-badge,
.card-badges-container > [data-banner-type] {
    position: static; /* <-- Clave: ahora fluyen dentro del contenedor flex. */
    top: auto;
    left: auto;
}

/* Regla para posicionar el badge en la esquina inferior izquierda */
.item-badge[data-position="bottom-left"] {
    top: auto;
    bottom: 10px;
    left: 10px;
}



/* ================================================================
   ESTILOS PARA SUB-ITEMS EN EL MODAL (RÉPLICA 1:1 CON AJUSTES FINALES)
   ================================================================ */

/* --- Contenedor del Grid --- */
#modalBundleItems {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.5rem;
    width: 100%;
}

/* --- Contenedor Principal <a> de cada Sub-Ítem --- */
.bundle-subitem {
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    
    box-shadow: 0 0 0 0px #fff;
    transition: box-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Borde blanco por defecto (para tema oscuro) */
.bundle-subitem:hover,
.bundle-subitem:focus-visible {
    box-shadow: 0 0 0 2px #fff;
    outline: none;
}

body[data-theme="light"] .bundle-subitem:hover,
body[data-theme="light"] .bundle-subitem:focus-visible {
    box-shadow: 0 0 0 2px #d1d5db; /* ¡CAMBIO! Un gris claro. */
}

/* --- Recuadro de la Imagen --- */
.bundle-subitem__image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    
    /* ¡AJUSTE FINAL! Se elimina la transición para que la iluminación sea instantánea. */
}

.bundle-subitem:hover .bundle-subitem__image-wrapper {
    background-color: rgba(255, 255, 255, 0.5); 
}

/* --- La Imagen <img> del Cosmético --- */
.bundle-subitem__image {
    width: 100%;
    height: 105%;
    object-fit: contain;
    object-position: 50% 100%;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bundle-subitem:hover .bundle-subitem__image {
    transform: scale(1.1);
}

/* --- Barra de Texto Inferior --- */
.bundle-subitem__text-wrapper {
    background-color: rgba(0, 0, 0, 0.45);
    padding: 0.4rem 0.4rem;
    text-align: left;
}

/* --- El Texto del Nombre --- */
.bundle-subitem__text {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.8rem; /* ¡CAMBIO! Antes era 0.875rem */
    line-height: 1.42;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* --- Ajustes para Tema Claro --- */
body[data-theme="light"] .bundle-subitem__image-wrapper {
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .bundle-subitem:hover .bundle-subitem__image-wrapper {
    background-color: rgba(0, 0, 0, 0.1);
}
body[data-theme="light"] .bundle-subitem__text-wrapper {
    background-color: rgba(0, 0, 0, 0.6);
}

/* --- Indicador de "Lote Padre" --- */
.parent-bundle-indicator {
    border: 2px dashed var(--color-primary-amber) !important;
    box-shadow: none !important;
}



/* ================================================================
   ESTILOS PARA DIFICULTAD DE JAM TRACKS (MODAL)
================================================================ */

/* Contenedor principal que se inserta en el modal */
.jam-track-difficulty-container {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color-medium);
    margin-top: 1rem;
}
body[data-theme="light"] .jam-track-difficulty-container {
    border-top-color: #e2e8f0;
}

/* Grid que organiza las filas de instrumentos en dos columnas */
.jam-track-difficulty-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem; /* 12px vertical, 24px horizontal */
}

/* Fila individual para un instrumento */
.jam-track-part {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 12px */
}

/* Número grande de dificultad */
.jam-track-part-difficulty {
    font-size: 2.25rem; /* 36px */
    font-weight: 900;
    line-height: 1;
    color: white;
    flex-shrink: 0;
}
body[data-theme="light"] .jam-track-part-difficulty {
    color: #1e293b;
}

/* Contenedor para el nombre y las barras */
.jam-track-part-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* Nombre del instrumento (Vocal, Bass, etc.) */
.jam-track-part-name {
    font-size: 0.875rem; /* 14px */
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: #94a3b8; /* slate-400 */
    white-space: nowrap;
}
body[data-theme="light"] .jam-track-part-name {
    color: #64748b; /* slate-500 */
}

/* Contenedor de las 7 barras de dificultad */
.jam-track-part-bars {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

/* Barra individual de dificultad */
.jam-track-part-bar {
    width: 14px;
    height: 8px;
    background-color: #4b5563; /* gris oscuro por defecto */
    border-radius: 2px;
    transform: skewX(-15deg); /* Efecto inclinado como en la imagen */
}
body[data-theme="light"] .jam-track-part-bar {
    background-color: #d1d5db; /* gris claro para tema light */
}

/* Barra activa (encendida) */
.jam-track-part-bar.active {
    background-color: white;
}
body[data-theme="light"] .jam-track-part-bar.active {
    background-color: #475569; /* gris más oscuro para tema light */
}

/* En pantallas muy pequeñas, pasa a una sola columna */
@media (max-width: 420px) {
    .jam-track-difficulty-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   ESTILOS PARA BADGE DE DESCUENTO UNIFICADO (VERSIÓN FINAL)
================================================================ */

.badge-discount {
    display: inline-flex;
    /* Organiza el contenido principal (texto) y el timer (si existe) en columna */
    flex-direction: column; 
    align-items: stretch; 
    text-align: center;
    
    font-weight: 900;
    font-style: italic;
    font-size: clamp(0.7rem, 0.6rem + 0.5vw, 0.9rem);
    text-transform: uppercase;
    backdrop-filter: blur(2px);
    white-space: nowrap;
    overflow: hidden;
    /* Quitamos el padding global para controlar cada parte por separado */
    padding: 0; 
}

/* Estilos para las partes de texto del badge */
.badge-percent, .badge-text {
    padding: 0.3em 0.7em;
    line-height: 1.2;
}

.badge-separator {
    width: 2px;
    /* Le damos una altura del 90% del tamaño de la fuente actual. */
    height: 0.9em; 
    background-color: rgba(0, 0, 0, 0.2); 
}