:root {
    /* Paleta Premium Auction - Oro / Bronce / BorgoÃ±a */
    --primary: #00585C;
    --primary-container: #78acab;
    --on-primary: #ffffff;
    --on-primary-container: #261900;
    --secondary: #4a0e0e;

    /* JerarquÃ­a de Superficies (Tonal Layering) */
    --surface: #fdfaf3;
    /* Base: Hueso */
    --surface-container-low: #f7f3e9;
    --surface-container: #f1ede4;
    --surface-container-high: #ebe7de;
    --surface-container-highest: #e5e1d9;
    --surface-container-lowest: #ffffff;

    --on-surface: #191c1d;
    /* No 100% Black */
    --on-surface-variant: #404848;
    --outline: #6f7979;
    --outline-variant: rgba(111, 121, 121, 0.2);

    /* Semantic Colors */
    --error: #ba1a1a;
    --on-error: #ffffff;
    --error-container: #ffdad6;
    --on-error-container: #410002;

    /* TipografÃ­a */
    --font-display: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Fluid Typography Scale (responsive-design skill) */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.5rem);
    --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);

    /* Fluid Spacing Scale (8pt Grid adapted to Fluid) */
    --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
    --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-md: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --space-xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --space-xxl: clamp(3rem, 2rem + 5vw, 5rem);
    --space-huge: clamp(4rem, 3rem + 5vw, 7rem);

    /* Animations */
    --ease-editorial: cubic-bezier(0.2, 1, 0.3, 1);
    --transition-slow: 0.6s var(--ease-editorial);
    --transition-fast: 0.3s var(--ease-editorial);

    /* =====================================================
       Z-INDEX MAP â€” Sistema de Capas Unificado
       Escala semÃ¡ntica: nunca usar valores mÃ¡gicos.
       ===================================================== */
    --z-below: -1;
    /* Pseudo-elementos de fondo      */
    --z-base: 1;
    /* Elementos base                 */
    --z-raised: 10;
    /* PosiciÃ³n relativa (hero, logo) */
    --z-dropdown: 100;
    /* Botones de cierre, tooltips    */
    --z-nav: 1000;
    /* Navbars                        */
    --z-drawer: 3000;
    /* Drawers laterales (favoritos)  */
    --z-modal: 5000;
    /* Modales (SweetAlert2)          */
    --z-overlay: 9000;
    /* Overlays fullscreen            */
    --z-toast: 10000;
    /* Notificaciones / toasts        */
}

/* --- CORE DARK THEME VARIABLES --- */
[data-theme="dark"] {
    --surface: #0a0a0a;
    --surface-container-low: #141414;
    --surface-container: #1a1a1a;
    --surface-container-high: #212121;
    --surface-container-highest: #282828;
    --surface-container-lowest: #050505;

    --on-surface: #f1f5f9;
    --on-surface-variant: #94a3b8;
    --outline: #475569;
    --outline-variant: rgba(148, 163, 184, 0.1);
}


/* Utility Classes */
.u-text-primary {
    color: var(--primary) !important;
}

.u-text-muted {
    color: var(--on-surface-variant) !important;
}

.u-mb-lg {
    margin-bottom: var(--space-lg) !important;
}

.u-border-success {
    border-left-color: #28a745 !important;
}

/* Hardcoded color here is for status, but using a variable is better if defined */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
    font-family: var(--font-body);
    font-size: var(--text-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Content Protection */
body:not(.admin-body) {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Permitir selección en inputs y campos de texto */
body:not(.admin-body) input,
body:not(.admin-body) textarea,
body:not(.admin-body) .allow-select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.catalog-footer {
    text-align: center;
    margin: var(--space-huge) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.catalog-stats {
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    text-transform: lowercase;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

.btn-discover {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--on-surface);
    text-decoration: none;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 4px;
    transition: 0.3s;
}

.btn-discover:hover {
    color: var(--primary);
    border-color: var(--on-surface);
}

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--surface);
    z-index: var(--z-toast) !important;
    /* --z-toast: 10000 */
    transform: translateZ(0);
    border-bottom: 1px solid var(--outline-variant);
    display: flex;
    align-items: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

body.quickview-is-open .top-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1220px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    display: none !important;
    /* Oculto por defecto en desktop */
    background: transparent;
    border: none;
    color: var(--on-surface);
    cursor: pointer;
    padding: 8px;
    z-index: calc(var(--z-nav) / 2);
    /* ~500, entre base y nav */
}

.top-nav .logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.05em;
}

.logo-composite {
    display: flex;
    align-items: center;
    /* gap: 12px; */
    text-decoration: none;
}

.logo-icon-wrapper {
    width: 85px;
    height: 85px;
    position: relative;
    border-radius: 8px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.logo-icon {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 100%;
    width: auto;
    object-fit: contain;
    transform-origin: 70% 90%;
    animation: gavel-strike 1.8s ease-in-out;
}

.logo-composite:hover .logo-icon {
    animation: gavel-strike 1.8s ease-in-out;
}

@keyframes gavel-strike {
    0% {
        transform: var(--gavel-base, translateY(-50%)) rotate(0deg);
    }

    20% {
        transform: var(--gavel-base, translateY(-50%)) rotate(-12deg);
    }

    45% {
        transform: var(--gavel-base, translateY(-50%)) rotate(4deg);
    }

    70% {
        transform: var(--gavel-base, translateY(-50%)) rotate(-2deg);
    }

    100% {
        transform: var(--gavel-base, translateY(-50%)) rotate(0deg);
    }
}

/* AplicaciÃ³n suave en el tema Fresh */
.editorial-logo img {
    --gavel-base: translateY(12px);
    transform-origin: 70% 90%;
}

.mobile-logo-compact img {
    --gavel-base: none;
    transform-origin: 70% 90%;
}

.editorial-logo:hover img,
.mobile-logo-compact:hover img {
    animation: gavel-strike 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-main {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--on-surface);
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-slogan {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    color: var(--primary);
    font-style: italic;
    letter-spacing: 0.05em;
    font-weight: 400;
    margin-top: 4px;
    margin-left: 4px;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 4px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar input {
    background: var(--surface-container-low);
    border: none;
    padding: 10px 48px 10px 24px;
    border-radius: 12px;
    width: 260px;
    font-size: 0.85rem;
    color: var(--on-surface);
    transition: var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    background: var(--surface-container);
    box-shadow: 0 0 0 2px var(--outline-variant);
}

.search-bar .material-symbols-outlined {
    position: absolute;
    right: 16px;
    font-size: 20px;
    color: var(--outline);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 350px;
    background: var(--surface-container-highest);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--outline-variant);
    max-height: 450px;
    overflow-y: auto;
    z-index: 110 !important;
    display: none;
    backdrop-filter: blur(15px);
    padding: var(--space-sm) 0;
}

.search-dropdown.active {
    display: block;
    animation: slideUpDropdown 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

@keyframes slideUpDropdown {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all 0.2s;
}

.search-item:hover {
    background: var(--surface-container-high);
    padding-left: var(--space-lg);
}

.search-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
}

.search-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--on-surface);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-price {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 800;
    font-family: var(--font-display);
}

.search-no-results {
    padding: var(--space-lg);
    text-align: center;
    color: var(--outline);
    font-size: 0.85rem;
    font-style: italic;
}

.action-icons {
    display: flex;
    gap: var(--space-md);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--on-surface-variant);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--surface-container-low);
    color: var(--primary);
}

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Hero Section */
.hero {
    padding: 100px 0 50px;
    position: relative;
    z-index: 50;
}

.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
}

.hero-text {
    flex: 1;
    width: 100%;
}

@keyframes text-shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes line-breath {

    0%,
    100% {
        width: 15px;
        opacity: 1;
    }

    50% {
        width: 30px;
        opacity: 0.6;
    }
}

.hero .label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    display: flex;
    align-items: center;
    gap: 20px;
    /* margin-top: 40px; */
    margin-bottom: var(--space-lg);

    /* ConfiguraciÃ³n para el brillo dinÃ¡mico */
    background: linear-gradient(to right,
            var(--primary) 20%,
            var(--on-primary-container) 40%,
            var(--on-primary-container) 60%,
            var(--primary) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 6s linear infinite;
}

.hero .label::before {
    content: "";
    width: 30px;
    height: 2px;
    background: var(--primary-container);
    border-radius: 2px;
    animation: line-breath 4s ease-in-out infinite;
}

.hero .label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--outline-variant), transparent);
    opacity: 0.4;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: var(--text-huge);
    line-height: 1;
    margin-bottom: var(--space-xl);
    color: var(--on-surface);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.hero h1 .italic {
    display: block;
    font-weight: 300;
    font-style: italic;
    color: var(--outline-variant);
    margin-top: 10px;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.bcv-badge {
    display: flex;
    align-items: center;
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    padding: 4px 20px 4px 4px;
    border-radius: 12px;
    gap: 12px;
    transition: var(--transition-fast);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.bcv-badge:hover {
    border-color: var(--primary);
    background: var(--surface-container);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.bcv-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.bcv-icon .material-symbols-outlined {
    font-size: 20px !important;
}

.bcv-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.bcv-text {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--outline);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

.bcv-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--on-surface);
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.bcv-value small {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-left: 2px;
}

.bcv-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--outline);
    font-weight: 600;
    padding-right: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #4caf50;
    border-radius: 50%;
}

.status-dot.pulse {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
    }

    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.hero-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    gap: var(--space-lg);
    flex-wrap: wrap;
    width: 100%;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-container-lowest);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid var(--outline-variant);
    transition: var(--transition-fast);
    cursor: pointer;
}

.sort-wrapper:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sort-wrapper .material-symbols-outlined {
    font-size: 20px;
    color: var(--primary);
}

.sort-select {
    background: transparent;
    border: none;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--on-surface);
    cursor: pointer;
    outline: none;
    padding-right: 4px;
    appearance: none;
    /* Remove default arrow for custom look if needed, but keeping for now */
}

.pill {
    padding: 12px 28px;
    background: var(--surface-container-high);
    color: var(--on-surface);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.pill:hover {
    background: var(--surface-container-highest);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pill.active {
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 4px 12px rgba(0, 101, 101, 0.2);
}

/* Animations State (for GSAP) - Solo aplicar inicialmente */
.animate-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Cuando GSAP ha animado, remover la clase */
.animate-hidden.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Grid de Productos (4 Columnas responsivas) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    row-gap: var(--space-xl);
    column-gap: var(--space-md);
    margin-top: var(--space-xl);
}

.product-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #EAE7E0;
    transition: var(--transition-slow);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    container-type: inline-size;
    container-name: product;
}

/* AdaptaciÃ³n intrÃ­nseca de la tarjeta (independiente del viewport) */
@container product (max-width: 260px) {
    .product-title {
        font-size: var(--text-sm) !important;
        -webkit-line-clamp: 2;
    }

    .price-usd {
        font-size: var(--text-lg) !important;
    }

    .btn-apartar {
        padding: var(--space-sm) !important;
        font-size: 0.85rem !important;
    }
}

.product-card.search-hidden {
    display: none !important;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--surface-container-highest);
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: normal;
    transition: var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.04);
}

.product-info {
    padding: 20px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.product-category.pill {
    background: #EAF4F4 !important;
    color: #00585C !important;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 99px;
    margin: 0;
    border: none;
}

.product-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #71717A;
    font-size: 0.75rem;
    font-family: var(--font-body);
}

.product-title {
    font-family: var(--font-headline);
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: #1A1A1A;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.product-footer {
    display: block;
    width: 100%;
}

/* Modifiers: Estado No Disponible & Hover (Sellos Editoriales) */
.product-card.estado-no-disponible .product-image img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.product-card.estado-no-disponible .product-info {
    opacity: 0.5;
}

/* Base Sello Editorial */
.status-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 30;
    pointer-events: none;
    transition: var(--transition-fast);
    padding: 4px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-overlay span {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Variante: Reservado */
.status-overlay.reservado {
    background: #fef3c7;
}

.status-overlay.reservado span {
    color: #92400e;
}

.status-overlay.vendido {
    background: #fee2e2;
}

.status-overlay.vendido span {
    color: #991b1b;
}

/* Variante: Ver Detalles (Hover) */
.status-overlay.hover-detalles {
    opacity: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: none;
}

.status-overlay.hover-detalles span {
    color: var(--on-primary);
    border-color: var(--primary);
    background: var(--primary);
}

.product-card:not(.estado-no-disponible):hover .status-overlay.hover-detalles {
    opacity: 1;
}

.price-container {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.price-usd {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 800;
    color: #00585C;
}

.price-ves {
    font-size: 0.85rem;
    color: #A1A1AA;
    font-weight: 500;
}

.btn-apartar {
    background: #00585C;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-slow);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px;
    box-shadow: none;
}

.btn-apartar:hover:not(:disabled) {
    background: #004548;
    transform: translateY(-2px);
}

.btn-apartar:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-apartar:disabled,
.btn-apartar.disabled {
    background: #EBEBE6;
    color: #A1A1AA;
    cursor: not-allowed;
    transform: none;
}

.badges-container {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}

.badge {
    background: rgba(255, 255, 255, 0.95);
    color: #1A1A1A;
    padding: 4px 10px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 99px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fav-heart-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #71717A;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
}

.fav-heart-btn:hover {
    background: #ffffff;
    color: #ef4444;
}

.fav-heart-btn .fav-icon {
    font-size: 18px;
}

footer {
    margin-top: var(--space-huge);
    padding: var(--space-huge) 0;
    background: var(--surface-container-low);
    text-align: left;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
    display: block;
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    height: 28px;
    width: auto;
    opacity: 0.9;
}

.footer-desc {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--on-surface-variant);
    max-width: 300px;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--on-surface-variant);
    max-width: 300px;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
    color: var(--on-surface);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--on-surface-variant);
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.trust-badges {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--outline-variant);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.7rem;
    color: var(--on-surface-variant);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.trust-badge i {
    font-size: 1rem;
    color: var(--primary);
}

.copy {
    margin-top: var(--space-xl);
    font-size: 0.75rem;
    color: var(--outline);
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--outline-variant);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.trust-stamp {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--primary);
    opacity: 0.8;
}

/* Enlace icon-btn (para <a> usados como botones) */
.icon-btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

/* Product category pill (movido de inline) */
.product-category.pill {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Icono dentro de btn-apartar */
.btn-apartar-icon {
    font-size: 1.2em;
}

/* Arrow del custom select */
.custom-select-arrow {
    font-size: 20px;
}

/* ==========================================================================
   FAVORITES SYSTEM
   ========================================================================== */

/* CorazÃ³n en la tarjeta */
.fav-heart-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s var(--ease-editorial), background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .fav-heart-btn {
    background: rgba(30, 30, 30, 0.85);
}

.fav-heart-btn:hover {
    transform: scale(1.15);
}

.fav-heart-btn .fav-icon {
    font-size: 1.1rem;
    color: var(--outline);
    transition: color 0.2s, transform 0.2s;
}

.fav-heart-btn.active .fav-icon {
    color: #ef4444;
    animation: heart-pop 0.35s var(--ease-editorial);
}

@keyframes heart-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Badge en el botÃ³n de bolsa del nav */
.fav-bag-btn {
    position: relative;
}

.fav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
    animation: badge-pop 0.3s var(--ease-editorial);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Overlay y Drawer */
.fav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-drawer) - 1);
    /* --z-drawer: 3000, overlay justo debajo */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
}

.fav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.fav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 380px;
    max-width: 95vw;
    background: var(--surface);
    z-index: var(--z-drawer);
    /* --z-drawer: 3000 */
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
}

.fav-drawer.open {
    transform: translateX(0);
}

.fav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--outline-variant);
}

.fav-drawer-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.fav-drawer-title span {
    color: #ef4444;
    font-variation-settings: 'FILL' 1;
}

.fav-drawer-title h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--on-surface);
    margin: 0;
}

.fav-drawer-close {
    background: var(--surface-container-high);
    border: none;
    cursor: pointer;
    color: var(--on-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s var(--ease-editorial);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fav-drawer-close:hover {
    background: var(--primary);
    color: var(--on-primary);
    transform: rotate(90deg);
}

.fav-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md) var(--space-xl);
}

.fav-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: var(--space-md);
    color: var(--on-surface-variant);
    text-align: center;
    padding: var(--space-xxl);
}

.fav-empty span {
    font-size: 3rem;
    opacity: 0.3;
}

.fav-empty p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.fav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--outline-variant);
    animation: fadeInUp 0.3s ease;
}

.fav-item:last-child {
    border-bottom: none;
}

/* Zona clickeable (imagen + info) */
.fav-item-clickable {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
    border-radius: 8px;
    transition: background 0.2s;
}

.fav-item-clickable:hover {
    background: var(--surface-container-high);
}

.fav-item-clickable:hover .fav-item-cta {
    opacity: 1;
    transform: translateX(0);
}

.fav-item-cta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
    margin-top: 2px;
}

.fav-item-img {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--surface-container-high);
    flex-shrink: 0;
}

.fav-item-info {
    flex: 1;
    min-width: 0;
}

.fav-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.fav-item-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
}

.fav-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--outline);
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.fav-item-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.fav-drawer-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--outline-variant);
}

.fav-clear-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--outline-variant);
    border-radius: 30px;
    background: transparent;
    color: var(--on-surface-variant);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.fav-clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Las cards con GSAP no necesitan animaciÃ³n CSS adicional */
.product-card:not(.gsap-item) {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

/* Si hay gsap-item, usar solo la animaciÃ³n GSAP */
.product-card.gsap-item {
    opacity: 1;
}

.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.15s;
}

.product-card:nth-child(3) {
    animation-delay: 0.2s;
}

.product-card:nth-child(4) {
    animation-delay: 0.25s;
}

.product-card:nth-child(5) {
    animation-delay: 0.3s;
}

.product-card:nth-child(6) {
    animation-delay: 0.35s;
}

.product-card:nth-child(7) {
    animation-delay: 0.4s;
}

.product-card:nth-child(8) {
    animation-delay: 0.45s;
}

.product-card:nth-child(9) {
    animation-delay: 0.5s;
}

.product-card:nth-child(10) {
    animation-delay: 0.55s;
}

.product-card:nth-child(11) {
    animation-delay: 0.6s;
}

.product-card:nth-child(12) {
    animation-delay: 0.65s;
}

/* QuickView Scroll Reset Tooltip Adjustment */
/* Eliminado duplicado de activaciÃ³n */

/* Editorial Modal Styles (SweetAlert2 Customization) */
.editorial-modal {
    border-radius: 16px !important;
    padding: 30px !important;
    background: var(--surface) !important;
    border: 1px solid var(--outline-variant) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

.swal2-title {
    font-family: var(--font-display) !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em !important;
    font-size: 1.6rem !important;
    /* Un poco mÃ¡s pequeÃ±o */
    color: var(--on-surface) !important;
    margin: 0 0 12px 0 !important;
    /* Casi sin margen superior */
    position: relative;
    padding-bottom: 10px;
}

.swal2-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--primary);
    border-radius: 10px;
    opacity: 0.8;
}

.qv-form-container {
    text-align: left;
    padding: 0 var(--space-sm);
}

.qv-intro-text {
    text-align: center;
    margin-bottom: 24px;
    /* Un poco mÃ¡s de aire */
    padding: 0;
}

.qv-intro-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--on-surface-variant);
    line-height: 1.6;
}

.qv-intro-text strong {
    color: var(--primary);
    font-weight: 700;
}

.qv-field {
    margin-bottom: 16px;
}

.qv-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 4px;
}

.qv-input {
    width: 100%;
    background: var(--surface-container-low) !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
    color: var(--on-surface) !important;
    transition: var(--transition-fast) !important;
}

.qv-input:focus {
    background: var(--surface-container) !important;
    border-color: var(--outline-variant) !important;
    box-shadow: none !important;
}

.qv-trust-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--outline-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qv-trust-footer .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary);
}

.qv-trust-footer span {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
}

/* Modificar botones de Swal2 para que coincidan con el sitio */
.swal2-actions {
    margin-top: var(--space-xl) !important;
    gap: 12px;
}

.swal2-confirm.editorial-btn {
    background: var(--primary) !important;
    color: var(--on-primary) !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 12px rgba(0, 72, 75, 0.25) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    line-height: 1 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.swal2-confirm.editorial-btn:hover {
    background: var(--primary-container) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 72, 75, 0.35) !important;
}

.swal2-cancel.editorial-btn {
    background: var(--surface-container-high) !important;
    color: var(--on-surface-variant) !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    line-height: 1 !important;
    margin: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    box-sizing: border-box !important;
}

.swal2-cancel.editorial-btn:hover {
    background: var(--surface-container-highest) !important;
    color: var(--on-surface) !important;
    border-color: var(--outline-variant) !important;
}

/* SweetAlert2: por encima del overlay (--z-overlay: 9000) */
.swal2-container {
    z-index: calc(var(--z-overlay) + 1) !important;
    /* 9001 */
}

/* QuickView Drawer (The Editorial Version) */
.quickview-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: var(--surface);
    z-index: var(--z-overlay) !important;
    /* --z-overlay: 9000 */
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
    display: none;
    justify-content: flex-end;
    pointer-events: none;
}

.quickview-overlay.active {
    opacity: 1;
    visibility: visible;
    display: flex;
    pointer-events: all;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

.quickview-drawer {
    width: 100%;
    max-width: 1000px;
    height: 100vh;
    background: var(--surface);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.8s var(--ease-editorial);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: var(--z-overlay) !important;
    /* Hijo del overlay, hereda su contexto */
}

.quickview-overlay.active .quickview-drawer {
    transform: translateX(0);
}

.qv-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--surface-container-lowest);
    border: none;
    color: var(--on-surface);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: var(--z-dropdown);
    /* --z-dropdown: 100 â€” botÃ³n de cierre del QV */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qv-close:hover {
    transform: rotate(90deg);
    color: var(--error);
}

.qv-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.qv-gallery {
    background: var(--surface-container-low);
    padding: var(--space-huge);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    border-right: 1px solid var(--outline-variant);
    position: relative;
}

.qv-main-img {
    width: 100%;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-container-lowest);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--outline-variant);
}

.qv-main-img img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.qv-main-img:hover img {
    transform: scale(1.05);
}

.qv-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 10px;
    flex-wrap: wrap;
}

.qv-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    background: var(--surface-container-highest);
    border: 2px solid transparent;
}

.qv-thumbnails img:hover {
    opacity: 1;
    transform: translateY(-4px);
}

.qv-thumbnails img.active {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
    transform: scale(1.1);
}


.qv-thumbnails img:hover,
.qv-thumbnails img.active {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qv-info {
    padding: 32px 40px;
    /* Recuperamos algo de padding editorial */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* Espacio equilibrado */
    background: var(--surface);
    min-height: 100%;
}

.qv-breadcrumb {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--on-surface-variant);
}

.qv-info h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--on-surface);
    letter-spacing: -0.04em;
    margin-bottom: 4px;
}


.qv-price-box {
    background: var(--surface-container-lowest);
    padding: 12px 16px;
    /* Reducido de LG a 12/16 */
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--outline-variant);
}

.qv-price-main {
    display: flex;
    flex-direction: column;
}

.qv-price-usd {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--on-surface);
}

.qv-price-ves {
    font-size: 0.9rem;
    color: var(--outline);
    font-weight: 500;
}

.qv-tasa-note {
    text-align: right;
    font-size: 0.65rem;
    color: var(--outline);
    text-transform: uppercase;
    line-height: 1.4;
}

.qv-description h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    /* Un poco mÃ¡s pequeÃ±o */
    margin-bottom: 8px;
    /* Reducido de MD a 8px */
    font-weight: 700;
}

.qv-description p {
    color: var(--on-surface-variant);
    white-space: pre-wrap;
}

.qv-trust-pills {
    display: flex;
    gap: 8px;
    /* Reducido de MD a 8px */
    flex-wrap: nowrap;
}

.qv-trust-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-container-low);
    padding: var(--space-sm) var(--space-md);
    border-radius: 12px;
    border: 1px solid var(--outline-variant);
}

.qv-trust-pill .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.qv-trust-pill span {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--on-surface);
}

.qv-actions {
    margin-top: auto;
    /* Empuja los botones al final de los 100vh */
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 32px;
}

.qv-actions .btn-apartar {
    width: 100%;
    padding: 20px;
    font-size: .85rem;
    justify-content: center;
    border-radius: 12px;
}

.btn-secondary {
    background: var(--surface-container-high);
    color: var(--on-surface);
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1rem;
}

.btn-secondary:hover {
    background: var(--surface-container-highest);
}

/* ========================================================================= */
/* DARK THEME (RADICAL TRUST PROTOCOL) - Reference Colors */
/* ========================================================================= */

/* --- LOGO: VISIBILIDAD UNIFICADA (ANTI-DUPLICIDAD) --- */
.logo-icon {
    display: none !important;
}

/* Tema Claro (Por defecto o explÃ­cito) */
html:not([data-theme="dark"]) .logo-icon.logo-light {
    display: block !important;
}

/* Tema Oscuro */
[data-theme="dark"] .logo-icon.logo-dark {
    display: block !important;
}

[data-theme="dark"],
html.dark-theme,
html.dark {
    /* Paleta Radiante - Ajustada al tono del martillo para fondo oscuro */
    --primary: #62d0d4;
    /* Cian ligeramente mÃ¡s vibrante para empatar con el martillo */
    --primary-container: #0a7575;
    --on-primary: #003737;

    /* JerarquÃ­a de Superficies (Tonal Layering Invertido) / Asfalto y Ã‰bano */
    --surface: #191c1d;
    --surface-container-low: #1d2020;
    --surface-container: #212525;
    --surface-container-high: #272a2b;
    --surface-container-highest: #333737;
    --surface-container-lowest: #1a1c1c;

    --on-surface: #e1e3e4;
    --on-surface-variant: #bdc9c8;
    --outline: #899392;
    --outline-variant: #3e4949;

    /* Semantic Colors adaptados */
    --error: #ffb4ab;
    --on-error: #690005;
    --error-container: #93000a;
    --on-error-container: #ffdad6;
}

/* PequeÃ±os matices para el Modo Oscuro puro en algunos elementos */
[data-theme="dark"] .top-nav,
html.dark-theme .top-nav,
html.dark .top-nav {
    background: rgba(18, 20, 21, 0.8);
    /* bg-background/80 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* border-white/5 */
}

[data-theme="dark"] .search-bar input,
html.dark-theme .search-bar input,
html.dark .search-bar input {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-bar input::placeholder,
html.dark-theme .search-bar input::placeholder,
html.dark .search-bar input::placeholder {
    color: rgba(137, 147, 146, 0.5);
    /* text-outline/40 approximating */
}

[data-theme="dark"] .quickview-overlay,
html.dark-theme .quickview-overlay,
html.dark .quickview-overlay {
    background: var(--surface);
}

[data-theme="dark"] .product-image img,
html.dark-theme .product-image img,
html.dark .product-image img {
    mix-blend-mode: normal;
    /* El multiply a veces ensucia la imagen sobre fondos oscuros */
}

/* ========================================================================= */
/* FIX: IluminaciÃ³n de Estudio para el QuickView (E-Commerce Premium)        */
/* ========================================================================= */
[data-theme="dark"] .qv-gallery,
html.dark-theme .qv-gallery,
html.dark .qv-gallery {
    /* Mantenemos la cabina fotogrÃ¡fica en color Hueso para que el producto SIEMPRE resalte
       y el mix-blend-mode: multiply funcione perfecto limpiando los fondos blancos de JPGs */
    background: #fdfaf3;
    border-right: 1px solid var(--outline-variant);
}

[data-theme="dark"] .qv-thumbnails img,
html.dark-theme .qv-thumbnails img,
html.dark .qv-thumbnails img {
    /* Para que las miniaturas no queden oscuras flotando en un fondo claro */
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .qv-thumbnails img.active,
html.dark-theme .qv-thumbnails img.active,
html.dark .qv-thumbnails img.active {
    border-color: var(--primary);
    /* El turquesa resalta hermoso sobre el hueso */
}

/* ========================================================================= */
/* SEMANTIC COLOR THEMES (EDITORIAL SOFT MINIMALISM)                         */
/* ========================================================================= */

[class*="theme-"] {
    /* background-color: var(--t-bg, var(--surface-container-high)) !important; */
    color: var(--t-text, var(--on-surface)) !important;
    border: 1px solid var(--t-border, transparent) !important;
}

.theme-default {
    --t-bg: var(--surface-container-high);
    --t-text: var(--on-surface);
    --t-border: var(--outline-variant);
}

.theme-ruby {
    --t-bg: #ffe4e6;
    --t-text: #881337;
    --t-border: #fecdd3;
}

[data-theme="dark"] .theme-ruby {
    --t-bg: #4c0519;
    --t-text: #fecdd3;
    --t-border: #881337;
}

.theme-gold {
    --t-bg: #fef3c7;
    --t-text: #78350f;
    --t-border: #fde68a;
}

[data-theme="dark"] .theme-gold {
    --t-bg: #451a03;
    --t-text: #fde68a;
    --t-border: #78350f;
}

.theme-emerald {
    --t-bg: #d1fae5;
    --t-text: #064e3b;
    --t-border: #a7f3d0;
}

[data-theme="dark"] .theme-emerald {
    --t-bg: #022c22;
    --t-text: #a7f3d0;
    --t-border: #064e3b;
}

.theme-sapphire {
    --t-bg: #dbeafe;
    --t-text: #1e3a8a;
    --t-border: #bfdbfe;
}

[data-theme="dark"] .theme-sapphire {
    --t-bg: #172554;
    --t-text: #bfdbfe;
    --t-border: #1e3a8a;
}

.theme-slate {
    --t-bg: #f1f5f9;
    --t-text: #0f172a;
    --t-border: #e2e8f0;
}

[data-theme="dark"] .theme-slate {
    --t-bg: #0f172a;
    --t-text: #e2e8f0;
    --t-border: #334155;
}

.theme-coral {
    --t-bg: #ffedd5;
    --t-text: #7c2d12;
    --t-border: #fed7aa;
}

[data-theme="dark"] .theme-coral {
    --t-bg: #431407;
    --t-text: #fed7aa;
    --t-border: #7c2d12;
}

.theme-pearl {
    --t-bg: #ffffff;
    --t-text: #3f3f46;
    --t-border: #e4e4e7;
}

[data-theme="dark"] .theme-pearl {
    --t-bg: #18181b;
    --t-text: #e4e4e7;
    --t-border: #3f3f46;
}

.theme-onyx {
    --t-bg: #27272a;
    --t-text: #fafafa;
    --t-border: #52525b;
}

[data-theme="dark"] .theme-onyx {
    --t-bg: #e4e4e7;
    --t-text: #18181b;
    --t-border: #a1a1aa;
}

.theme-bronze {
    --t-bg: #ffedd5;
    --t-text: #78350f;
    --t-border: #fdba74;
}

[data-theme="dark"] .theme-bronze {
    --t-bg: #451a03;
    --t-text: #fdba74;
    --t-border: #9a3412;
}

/* ==========================================================================
   CUSTOM SELECT (FILTER DROPDOWN)
   ========================================================================== */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--outline-variant);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.custom-select-wrapper:hover {
    border-color: var(--primary);
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--on-surface);
}

.custom-select-trigger .arrow {
    transition: transform 0.3s ease;
    color: var(--on-surface-variant);
}

.custom-select-wrapper.open .custom-select-trigger .arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    min-width: 220px;
    overflow: hidden;
    padding: 8px 0;
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 12px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    color: var(--on-surface);
}

.custom-option:hover {
    background: var(--surface-container-high);
    color: var(--primary);
}

.custom-option.selected {
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
}

[data-theme="dark"] .custom-select-options {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ========================================================================= */
/* SEARCH OVERLAY (MOBILE PREMIUM)                                           */
/* ========================================================================= */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 11000 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .search-overlay {
    background: rgba(18, 18, 18, 0.95);
}

.search-overlay.active {
    display: flex !important;
    flex-direction: column;
    opacity: 1;
}

.overlay-header {
    padding: var(--space-xl);
    display: flex;
    justify-content: flex-end;
}

.close-overlay {
    background: var(--surface-container-high);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20000 !important;
    /* Prioridad de Cierre Absoluta */
    background: var(--primary) !important;
    color: var(--on-primary) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.overlay-content {
    padding: var(--space-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.search-input-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: var(--space-xl);
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.2rem;
    color: var(--primary);
}

#overlay-search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary);
    padding: 16px 16px 16px 50px;
    font-size: 1.8rem;
    font-family: var(--font-display);
    color: var(--on-surface);
    outline: none;
}

@media (max-width: 480px) {
    #overlay-search-input {
        font-size: 1.2rem;
        padding: 12px 12px 12px 40px;
    }

    .search-overlay .material-symbols-outlined {
        font-size: 1.5rem;
    }
}

.overlay-results {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.search-hint {
    text-align: center;
    color: var(--on-surface-variant);
    font-style: italic;
    margin-top: 40px;
    font-size: 1.1rem;
}

/* ==========================================================================
   SISTEMA GLOBAL DE TEMAS (BADGES & ACCENTS)
   ========================================================================== */
.pill {
    padding: 3px 10px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.58rem;
    border-width: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.theme-default {

    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--on-surface-variant) !important;
    border-color: var(--outline-variant) !important;
}

.theme-ruby {
    background-color: rgba(255, 0, 229, 0.12) !important;
    color: #ff00e5 !important;
    border-color: rgba(255, 0, 229, 0.3) !important;
    text-shadow: 0 0 8px rgba(255, 0, 229, 0.4);
}

.theme-emerald {
    background-color: rgba(0, 245, 255, 0.1) !important;
    color: #00f5ff !important;
    border-color: rgba(0, 245, 255, 0.3) !important;
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.4);
}

.theme-gold {
    background-color: rgba(255, 215, 0, 0.12) !important;
    color: #ffd700 !important;
    border-color: rgba(255, 215, 0, 0.3) !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.theme-sapphire {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.theme-slate {
    background-color: rgba(100, 116, 139, 0.12) !important;
    color: #94a3b8 !important;
    border-color: rgba(100, 116, 139, 0.3) !important;
}

.theme-coral {
    background-color: rgba(255, 127, 80, 0.12) !important;
    color: #ff7f50 !important;
    border-color: rgba(255, 127, 80, 0.3) !important;
}

.theme-pearl {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8f9fa !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.theme-onyx {
    background-color: rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.theme-bronze {
    background-color: rgba(205, 127, 50, 0.12) !important;
    color: #cd7f32 !important;
    border-color: rgba(205, 127, 50, 0.3) !important;
}

/* Utilidades Zero-Hacks Generales (Ãrea PÃºblica) */
.u-hidden {
    display: none !important;
}

.u-icon-sm {
    font-size: 18px;
}

.u-icon-xs {
    font-size: 14px;
}

.u-icon-lg {
    font-size: 28px;
}

.u-valign-text-bottom {
    vertical-align: text-bottom;
}

.u-valign-baseline {
    vertical-align: -2px;
}

.u-valign-sub {
    vertical-align: -3px;
}

.u-z-overlay {
    z-index: 1100;
}

.u-max-w-xs {
    max-width: 480px;
}

.u-p-xl {
    padding: var(--space-xl);
}

.u-p-sm {
    padding: var(--space-sm);
}

.u-mb-xl {
    margin-bottom: var(--space-xl);
}

.u-mb-sm {
    margin-bottom: var(--space-sm);
}

.u-mb-md {
    margin-bottom: var(--space-md);
}

.u-mt-xs {
    margin-top: var(--space-xs);
}

.u-mt-md {
    margin-top: var(--space-md);
}

.u-flex {
    display: flex;
}

.u-align-center {
    align-items: center;
}

.u-gap-sm {
    gap: 12px;
}

.u-text-primary {
    color: var(--primary);
}

.u-text-error {
    color: var(--error);
}

.u-text-muted {
    color: var(--on-surface-variant);
}

.u-font-display {
    font-family: var(--font-display);
}

.u-text-xl {
    font-size: 1.4rem;
}

.u-font-bold {
    font-weight: 800;
}

.u-font-normal {
    font-weight: 400;
}

.u-m-0 {
    margin: 0;
}

.u-text-sm {
    font-size: 0.9rem;
}

.u-text-xs {
    font-size: 0.875rem;
}

.u-text-xxs {
    font-size: 0.78rem;
}

.u-resize-y {
    resize: vertical;
}

.u-min-h-100 {
    min-height: 100px;
}

.u-w-full {
    width: 100%;
}

.u-justify-center {
    justify-content: center;
}

.u-text-center {
    text-align: center;
}

.form-error-box {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
    border-radius: 8px;
    padding: var(--space-sm);
    background: rgba(255, 100, 100, 0.1);
}

.footer-credit {
    text-align: center;
    font-size: 0.5rem;
    letter-spacing: 0.3em;
    color: var(--stone);
    opacity: 0.5;
    padding-top: 0.5rem;
    /* padding-bottom: 2rem; */
    text-transform: uppercase;
}

.footer-credit a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-credit a:hover {
    opacity: 1;
}

/* Sugerencias de Búsqueda Inteligente */
.search-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin: 25px 0 12px 10px;
    opacity: 0.8;
}

.search-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-container-low);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.search-category-item:hover {
    background: var(--primary-container);
    border-color: var(--primary);
    transform: translateX(5px);
}

.search-category-item .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.2rem;
}

.search-category-item span:not(.material-symbols-outlined) {
    font-size: 0.95rem;
    color: var(--on-surface);
}

.search-category-item strong {
    color: var(--primary);
}

/* Bot�n Ghost de Acci�n (Quickview Share) */
.btn-action-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action-ghost:hover {
    background: var(--surface-container-high);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-action-ghost .material-symbols-outlined {
    font-size: 1.2rem;
}