/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Breakpoints: 480=mobile-small, 768=mobile, 992=tablet, 1024=desktop, 1200=desktop-large */
    --bp-mobile-small: 480px;
    --bp-mobile: 768px;
    --bp-tablet: 992px;
    --bp-desktop: 1024px;
    --bp-desktop-large: 1200px;

    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --bg-search-border: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #E52056;
    --accent-hover: #c41847;
    --accent-light: #ff2d6a;
    --danger: #ff4444;
    --warning: #ffaa00;
    --border: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --surface: #1a1a1a;

    /* Theme variables for content sections only */
    --content-bg: #0a0a0a;
    --content-surface: #1a1a1a;
    --content-card: #252525;
    --content-text: #ffffff;
    --content-text-secondary: #b0b0b0;
    --content-border: #333333;
    --content-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);

    /* Escala tipográfica - Desktop */
    --font-h1: 32px;
    --font-h2: 24px;
    --font-h3: 18px;
    --font-body: 16px;
    --font-small: 14px;
    --font-weight-heading: 700;
    --font-weight-body: 400;
    --line-height-heading: 1.3;
    --line-height-body: 1.6;

    /* Header stack (aprox.) — el valor final de --header-total lo fija JS (medición real) */
    --header-top-bar: 40px;
    --header-main-block: 78px;
    --navbar-height: 52px;
    --header-total: calc(var(--header-top-bar) + var(--header-main-block) + var(--navbar-height));

    /* Ancho máximo del storefront (header, home, categorías, footer, cuenta) */
    --storefront-max-width: 1440px;

    /* Banners desktop: 1920×700 → altura = ancho container × 700/1920 */
    --hero-banner-w: 1920;
    --hero-banner-h: 700;
    --hero-desktop-height: calc(var(--storefront-max-width) * var(--hero-banner-h) / var(--hero-banner-w));
}

@media (min-width: 1920px) {
    :root {
        --storefront-max-width: 1600px;
    }
}

@media (min-width: 2560px) {
    :root {
        --storefront-max-width: 1760px;
    }
}

/* Light theme variables */
.light-theme {
    /* Global surfaces */
    --bg-primary: #f6f7fb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-search-border: #e2e8f0;
    --surface: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 8px 20px rgba(15, 23, 42, 0.08);

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;

    /* Content sections */
    --content-bg: #f6f7fb;
    --content-surface: #ffffff;
    --content-card: #ffffff;
    --content-text: #0f172a;
    --content-text-secondary: #475569;
    --content-border: #e5e7eb;
    --content-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Global Typography Rules */
h1, .h1 { font-size: var(--font-h1); font-weight: var(--font-weight-heading); line-height: var(--line-height-heading); }
h2, .h2 { font-size: var(--font-h2); font-weight: var(--font-weight-heading); line-height: var(--line-height-heading); }
h3, .h3 { font-size: var(--font-h3); font-weight: var(--font-weight-heading); line-height: var(--line-height-heading); }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--line-height-body);
    /* clip no fuerza overflow-y:auto (a diferencia de hidden) → un solo scrollport */
    overflow-x: clip;
    padding-top: var(--header-total);
}

html {
    overflow-x: clip;
    overflow-y: auto;
    min-height: 100%;
    background: var(--bg-primary);
}

body.storefront {
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body.storefront .storefront-main,
body.storefront .account-container {
    flex: 1 0 auto;
    width: 100%;
}

/* Escala tipográfica responsiva - Tablet */
@media (max-width: 1024px) {
    :root {
        --font-h1: 28px;
        --font-h2: 22px;
        --font-h3: 17px;
        --font-body: 15px;
        --font-small: 13px;
    }
}

/* Escala tipográfica responsiva - Móvil */
@media (max-width: 768px) {
    :root {
        --font-h1: 24px;
        --font-h2: 20px;
        --font-h3: 16px;
        --font-body: 14px;
        --font-small: 12px;
    }
}

.container-fluid {
    width: 100%;
    padding: 0 40px;
    margin: 0 auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
}

/* Top Header Styles */
.top-header {
    background: var(--surface);
    border-bottom: 1px solid rgba(229, 32, 86, 0.1);
    font-size: 0.9rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.top-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    min-height: 40px;
}

.welcome-text {
    color: var(--text-primary);
    font-weight: 500;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.top-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    transition: var(--transition);
    white-space: nowrap;
}

.top-link:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.top-link i {
    font-size: 0.8rem;
}

.top-link-form {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.top-link-form button.top-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    color: var(--text-secondary);
}

.top-link-form button.top-link:hover {
    color: var(--accent);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(229, 32, 86, 0.2);
    cursor: pointer;
}

.theme-label {
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.theme-label.active {
    color: var(--accent);
}

.theme-label:hover {
    color: var(--accent);
}

.theme-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    padding: 0;
    border: 1px solid rgba(229, 32, 86, 0.25);
    border-radius: 10px;
    background: rgba(229, 32, 86, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(229, 32, 86, 0.12);
}

.theme-toggle-btn i {
    font-size: 1rem;
}

.theme-toggle-btn .icon-moon {
    display: none;
}

.light-theme .theme-toggle-btn .icon-sun {
    display: none;
}

.light-theme .theme-toggle-btn .icon-moon {
    display: inline-block;
}

.theme-toggle--legacy {
    display: none;
}

/* Mobile Theme Toggle - Ocultar en desktop (ya tiene toggle en top-header) */
.theme-toggle-mobile {
    display: none;
}

/* Header Fixed */
.header {
    background: var(--bg-secondary);
    position: fixed;
    top: var(--header-top-bar);
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(229, 32, 86, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 30px rgba(229, 32, 86, 0.2);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
}

/* ===== Light Theme - Header / Navbar (híbrido: barra superior + header claro + navbar oscuro slim) ===== */
.light-theme .top-header {
    background: #1f2937;
    border-bottom: 1px solid rgba(229, 32, 86, 0.12);
}

.light-theme .top-header-content {
    padding: 6px 0;
    min-height: 36px;
}

.light-theme .top-header .welcome-text {
    color: #e2e8f0;
}

.light-theme .top-header .top-link {
    color: #94a3b8;
}

.light-theme .top-header .top-link:hover {
    color: var(--accent);
}

.light-theme .top-header .theme-label {
    color: #94a3b8;
}

.light-theme .top-header .theme-label.active {
    color: var(--accent);
}

.light-theme .top-header .theme-separator {
    color: #64748b;
}

.light-theme .top-header .theme-toggle-btn {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.light-theme .top-header .theme-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(229, 32, 86, 0.12);
}

.light-theme .header {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.light-theme .header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(10px);
}

.light-theme .header-top {
    border-bottom: 1px solid #e5e7eb;
}

.light-theme .header .search-bar {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.light-theme .header .search-bar:focus-within {
    background: #f8fafc;
    border-color: var(--accent);
}

.light-theme .header .search-bar input {
    color: #0f172a;
}

.light-theme .header .search-bar input::placeholder {
    color: #64748b;
}

.light-theme .header .action-item {
    color: #475569;
}

.light-theme .header .action-item:hover {
    color: var(--accent);
}

.light-theme .header .navbar-toggle {
    color: #0f172a;
}

.light-theme .header .search-wrapper {
    border-top-color: #e5e7eb;
}

.light-theme .main-navbar {
    background: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-height: 44px;
    padding: 4px 0;
}

.light-theme .main-navbar .nav-link {
    color: #e2e8f0;
    padding: 10px 16px;
    font-size: 12px;
}

.light-theme .main-navbar .nav-link:hover,
.light-theme .main-navbar .nav-link.active {
    color: var(--accent);
    background: rgba(229, 32, 86, 0.12);
}

.light-theme .main-navbar .dropdown-menu {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.5);
}

.light-theme .main-navbar .dropdown-item {
    color: #94a3b8;
}

.light-theme .main-navbar .dropdown-item:hover {
    color: var(--accent);
    background: rgba(229, 32, 86, 0.08);
}

.light-theme .main-navbar .dropdown-footer a {
    color: var(--accent);
}

.light-theme .main-navbar .mega-menu {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.5);
}

.light-theme .main-navbar .mega-menu-title {
    color: #e2e8f0;
}

.light-theme .main-navbar .mega-menu-list a {
    color: #94a3b8;
}

.light-theme .main-navbar .mega-menu-list a:hover {
    color: var(--accent);
}

/* Light theme: mobile sidebar stays dark */
@media (max-width: 768px) {
    .light-theme .navbar-nav {
        background: #1e293b;
    }

    .light-theme .main-navbar .nav-link {
        color: #cbd5e1;
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }
}

.header-top {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(229, 32, 86, 0.3);
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 2rem;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-primary);
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid var(--bg-search-border);
    transition: var(--transition);
    padding: 4px 4px 4px 0;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(229, 32, 86, 0.2);
}

.search-bar input {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
}

.search-bar button,
.search-bar .search-submit-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, #c41a48 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button i,
.search-bar .search-submit-btn i {
    font-size: 0.95rem;
    line-height: 1;
}

.search-bar button:hover,
.search-bar .search-submit-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover, #c41a48) 0%, #a8153c 100%);
    box-shadow: 0 0 12px rgba(229, 32, 86, 0.35);
}

/* ============================================
   Search Autocomplete - Vertical Minimalist
   ============================================ */
.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.search-wrapper .search-bar {
    max-width: 100%;
}

.search-autocomplete {
    position: fixed;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10055;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-autocomplete.active {
    display: block;
    animation: slideDownAutocomplete 0.2s ease;
}

@keyframes slideDownAutocomplete {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.autocomplete-results {
    display: flex;
    flex-direction: column;
}

/* Autocomplete Product - Vertical List Item */
.autocomplete-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.autocomplete-product:last-child {
    border-bottom: none;
}

.autocomplete-product:hover,
.autocomplete-product.focused {
    background: rgba(229, 32, 86, 0.1);
}

.autocomplete-product-image {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.autocomplete-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.autocomplete-product-info {
    flex: 1;
    min-width: 0;
}

.autocomplete-product-info h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.autocomplete-product-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 2px;
}

.autocomplete-product-price .price-original {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: normal;
}

.autocomplete-loading,
.autocomplete-empty {
    text-align: center;
    padding: 25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.autocomplete-loading i,
.autocomplete-empty i {
    margin-right: 8px;
}

/* Mobile: compact items, same dropdown position */
@media (max-width: 768px) {
    .search-autocomplete {
        max-height: 60vh;
    }

    .autocomplete-product {
        padding: 10px 14px;
        gap: 10px;
    }

    .autocomplete-product-image {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .autocomplete-product-info h4 {
        font-size: 0.85rem;
    }

    .autocomplete-product-price {
        font-size: 0.8rem;
    }
}

.header-actions {
    display: flex;
    gap: 25px;
}

.action-item {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.action-item:hover {
    color: var(--accent);
}

.action-item i {
    font-size: 1.2rem;
}

.action-text {
    display: none;
}

/* Mini Cart in Header - Dropdown oculto, solo visible con JS toggle */

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(229, 32, 86, 0.4);
    animation: pulse 2s infinite;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Navigation Menu */
.nav-menu {
    background: var(--bg-primary);
    padding: 15px 0;
    width: 100%;
    transition: var(--transition);
}

.menu-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
}

.menu-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.menu-list a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.menu-list a:hover:after,
.menu-list a.active:after {
    width: 100%;
}

.menu-list a:hover,
.menu-list a.active {
    color: var(--accent);
}

/* Old dropdown styles removed - using new menu system */

/* Old dropdown-menu styles removed - using new menu system */

/* Hero Slider - banners dinámicos (responsive, sin recorte) */
.hero-slider {
    margin: 0;
    padding: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    /* Escala con el ancho: ~720px en 1920px, tope para ultrawide */
    height: max(300px, min(38vw, 720px));
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: inherit;
}

.slider-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.2) 0%, rgba(10, 10, 10, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

.slide {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    animation: slideIn 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* Prevent height jumping during transitions */
    min-height: inherit;
}

.slide.active {
    display: flex;
}

/* Slide solo con imagen de fondo (sin contenido) */
.slide.image-only {
    justify-content: center;
    align-items: center;
}

.slide.image-only.active {
    display: flex;
}

/* El enlace se ajusta al tamaño real de la imagen: solo la imagen es clicable,
   los márgenes laterales del slide quedan sin link */
.slide-link {
    position: relative;
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
    text-decoration: none;
}

.slide-picture {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
}

.slide-image {
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* CTA del banner: oculto por defecto; al hover del slide aparece con estilo plano y suave. */
.slide-cta {
    position: absolute;
    right: clamp(16px, 3.5vw, 48px);
    bottom: clamp(14px, 3.5vw, 40px);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: clamp(0.72rem, 0.9vw, 0.84rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 0.24s ease,
        visibility 0.24s ease,
        transform 0.24s ease,
        background 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease;
    will-change: opacity, transform;
}

.slide-cta i {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.88);
    transition: transform 0.24s ease, color 0.24s ease;
}

.slide-link:hover .slide-cta,
.slide-link:focus-visible .slide-cta {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.slide-link:hover .slide-cta i,
.slide-link:focus-visible .slide-cta i {
    color: #fff;
    transform: translateX(3px);
}

.slide-link:active .slide-cta {
    transform: translateY(1px);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
}

@media (hover: none) {
    .slide-cta {
        opacity: 0.88;
        visibility: visible;
        transform: translateY(0);
        background: rgba(255, 255, 255, 0.16);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.slide-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 32, 86, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 2;
}

.slide-content p {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(229, 32, 86, 0.3);
    position: relative;
    z-index: 2;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(229, 32, 86, 0.4);
}



.slider-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    /* Flechas al borde del banner (mismo ancho que el storefront) */
    width: min(var(--storefront-max-width), calc(100% - 32px));
    max-width: var(--storefront-max-width);
    padding: 0 12px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 100;
}

.slider-controls button {
    background: rgba(10, 10, 10, 0.45);
    border: 1px solid rgba(229, 32, 86, 0.55);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: all;
    backdrop-filter: blur(8px);
}

.slider-controls button:hover {
    background: rgba(229, 32, 86, 0.85);
    color: white;
    transform: scale(1.05);
}

@media (max-width: 992px) {
    .hero-slider {
        height: max(280px, min(42vw, 560px));
    }
}

@media (max-width: 768px) {
    .hero-slider {
        /* Banners móviles: proporción más compacta, imagen a ancho completo */
        height: max(220px, min(52vw, 400px));
    }

    /* Móvil: banner a sangre completa, toda el área visible es imagen */
    .slide-link,
    .slide-picture {
        width: 100%;
        height: 100%;
    }

    .slide-cta {
        padding: 8px 16px;
        gap: 7px;
        font-size: 0.68rem;
        letter-spacing: 0.8px;
        right: 12px;
        bottom: 12px;
    }

    .slide-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    /* Móvil: swipe + dots; flechas ocultas para no tapar el banner */
    .hero-slider .slider-controls {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: max(280px, min(80vw, 480px));
    }
}

@media (max-width: 768px) {
    .slide-content {
        margin: 0 20px;
        max-width: calc(100% - 40px);
    }
}

.slider-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 20px 0;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    /* Por debajo del header/menú móvil: no competir con z-index del header (1000) */
    z-index: 12;
    width: auto;
}

.dot {
    width: 12px;
    height: 12px;
    background: var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--accent);
    width: 30px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(229, 32, 86, 0.5);
}

/* Sections - Full Width */
.section {
    padding: 60px 0;
    width: 100%;
}

.offers-section {
    background: linear-gradient(180deg, var(--content-bg) 0%, var(--content-surface) 50%, var(--content-bg) 100%);
    color: var(--content-text);
}

.featured-section {
    background: var(--content-bg);
    color: var(--content-text);
}

.latest-section {
    background: linear-gradient(180deg, var(--content-bg) 0%, var(--content-surface) 100%);
    color: var(--content-text);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0 40px;
    width: 100%;
}

.section-header h2 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--content-text);
}

.section-header h2 i {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(229, 32, 86, 0.4);
}

.light-theme .section-header h2 i {
    text-shadow: none;
}

/* Alinea títulos y carruseles con el mismo ancho máximo en home */
.storefront-section-inner {
    max-width: var(--storefront-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
    width: 100%;
    box-sizing: border-box;
}

.storefront-section-inner .section-header {
    padding-left: 0;
    padding-right: 0;
}

.storefront-section-inner .carousel-container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.view-all {
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.view-all:hover {
    gap: 10px;
    text-shadow: 0 0 10px rgba(229, 32, 86, 0.4);
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: var(--storefront-max-width);
    margin: 0 auto;
    padding: 0 50px;
    overflow: hidden;
}

/*
 * Viewport interno: recorta las cards al content-box.
 * Sin esto, overflow:hidden del container corta en el padding edge y
 * asoma la siguiente card en la zona de las flechas (peek de la 7.ª).
 */
.carousel-viewport {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.products-carousel {
    display: flex;
    gap: 12px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 10px 0;
    will-change: transform;
}

/*
 * Cards por vista (gap 12px). El -1px evita redondeo subpixel que asoma la siguiente card
 * al ampliar el container (1600/1760).
 * ≤768:2 · ≤992:3 · ≤1200:4 · <1400:5 · ≥1400:6 (HD→4K, mismo conteo)
 */
.products-carousel .category-product-card {
    flex: 0 0 calc((100% - 48px) / 5 - 1px); /* 5 cards, 4 gaps of 12px */
    max-width: calc((100% - 48px) / 5 - 1px);
    min-width: 0;
    box-sizing: border-box;
}

@media (min-width: 1400px) {
    .products-carousel .category-product-card {
        flex: 0 0 calc((100% - 60px) / 6 - 1px); /* 6 cards, 5 gaps of 12px */
        max-width: calc((100% - 60px) / 6 - 1px);
    }
}

@media (max-width: 1200px) {
    .products-carousel .category-product-card {
        flex: 0 0 calc((100% - 36px) / 4 - 1px);
        max-width: calc((100% - 36px) / 4 - 1px);
    }
}

@media (max-width: 992px) {
    .products-carousel .category-product-card {
        flex: 0 0 calc((100% - 24px) / 3 - 1px);
        max-width: calc((100% - 24px) / 3 - 1px);
    }
}

/* Ajustes para móviles - Sistema simplificado */
@media (max-width: 768px) {
    /* Carruseles con .products-carousel: casi ancho completo; sin flechas (deslizar) */
    .carousel-container:has(.products-carousel) {
        padding: 0 8px;
    }

    .carousel-container:has(.products-carousel) .carousel-btn {
        display: none;
    }

    /* Otros carruseles (p. ej. marcas): padding moderado y flechas compactas */
    .carousel-container:not(:has(.products-carousel)) {
        padding: 0 40px;
    }

    .carousel-container:not(:has(.products-carousel)) .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .carousel-container:not(:has(.products-carousel)) .carousel-prev {
        left: 6px;
    }

    .carousel-container:not(:has(.products-carousel)) .carousel-next {
        right: 6px;
    }

    .product-card {
        width: calc(100% - 30px);
        min-width: 0;
        max-width: calc(100% - 30px);
        flex: 0 0 calc(100% - 30px);
    }

    /* Móvil: 2 cards visibles por vista */
    .products-carousel .category-product-card {
        flex: 0 0 calc((100% - 16px) / 2 - 1px);
        max-width: calc((100% - 16px) / 2 - 1px);
        min-width: 0;
    }

    .products-carousel {
        gap: 12px;
    }

    .products-carousel .category-product-info {
        padding: 10px 8px 0;
    }

    .products-carousel .category-product-info h3 {
        font-size: 0.8rem;
        line-height: 1.3;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        min-height: 0;
    }

    .products-carousel .category-product-image {
        padding: 12px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .carousel-container:has(.products-carousel) {
        padding: 0 6px;
    }

    .carousel-container:not(:has(.products-carousel)) {
        padding: 0 36px;
    }

    .carousel-container:not(:has(.products-carousel)) .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .product-card {
        width: calc(100% - 20px);
        min-width: 0;
        max-width: calc(100% - 20px);
        flex: 0 0 calc(100% - 20px);
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(229, 32, 86, 0.3);
}

.carousel-btn:hover:not([style*="opacity: 0.5"]) {
    background: var(--accent-hover);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn[style*="opacity: 0.5"] {
    cursor: not-allowed;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* Legacy product-card (unused in Blade; kept for compatibility) */
.product-card {
    background: var(--content-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    border: 1px solid var(--content-border);
    flex: 0 0 auto;
    cursor: pointer;
    box-shadow: var(--content-shadow);
    display: flex;
    flex-direction: column;
    width: calc(20% - 16px);
    min-width: 200px;
    max-width: calc(20% - 16px);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(229, 32, 86, 0.2);
    border-color: var(--accent);
}

.product-card .discount-badge,
.featured-badge,
.new-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.featured-badge {
    background: var(--accent);
    color: white;
    box-shadow: 0 3px 10px rgba(229, 32, 86, 0.4);
}

.new-badge {
    background: var(--warning);
    color: var(--bg-primary);
}

/* White background for legacy product images */
.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content-surface);
    font-size: 4rem;
    color: var(--accent);
    position: relative;
    overflow: hidden;
    padding: 12px;
}

.product-card:hover .product-image {
    opacity: 0.9;
}

.product-image i {
    transition: var(--transition);
}

.product-card:hover .product-image i {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--content-text);
}

.product-specs {
    color: var(--content-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    color: var(--warning);
}

.rating span {
    color: var(--content-text-secondary);
    font-size: 0.9rem;
    margin-left: 5px;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(229, 32, 86, 0.2);
}

.btn-add-cart {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: var(--accent-hover);
    box-shadow: 0 5px 15px rgba(229, 32, 86, 0.3);
}

/* Announcements carousel (home) */
.announcements-section {
    padding: 36px 0 28px;
    background: var(--content-bg);
    overflow: visible;
}

.announcements-section .storefront-section-inner {
    overflow: visible;
}

.announcements-carousel-container {
    overflow: hidden;
    padding-top: 12px;
    padding-bottom: 12px;
}

.announcements-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 8px 0 12px;
    will-change: transform;
    align-items: stretch;
}

.announcement-item {
    /* -1px: evita que asome un 4.º anuncio por redondeo al ampliar container */
    flex: 0 0 calc((100% - 2 * 20px) / 3 - 1px);
    max-width: calc((100% - 2 * 20px) / 3 - 1px);
    min-width: 0;
    box-sizing: border-box;
}

.announcement-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: visible;
    transition: box-shadow 0.3s ease;
    min-height: 220px;
    background: var(--content-card);
}

.announcement-item a:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.announcement-image {
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 340px;
    object-fit: contain;
    object-position: center center;
    display: block;
    border-radius: 12px;
    background: transparent;
}

@media (min-width: 1920px) {
    .announcement-image {
        max-height: 380px;
    }
}

@media (max-width: 1024px) {
    .announcement-item {
        flex: 0 0 calc((100% - 1 * 20px) / 2 - 1px);
        max-width: calc((100% - 1 * 20px) / 2 - 1px);
    }

    .announcement-item a {
        min-height: 200px;
    }

    .announcement-image {
        min-height: 180px;
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .announcements-section {
        padding: 20px 0 16px;
    }

    /* Full-bleed: sin márgenes laterales que generen franjas negras */
    .announcements-section .storefront-section-inner {
        padding-left: 0;
        padding-right: 0;
        max-width: none;
    }

    .announcements-section .carousel-container.announcements-carousel-container {
        padding: 0;
        max-width: none;
        margin: 0;
    }

    .announcements-carousel-container {
        padding-top: 0;
        padding-bottom: 0;
    }

    .announcements-carousel-track {
        gap: 0;
        padding: 0;
    }

    /* Móvil: 1 anuncio completo por vista, pegado al borde izquierdo */
    .announcement-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .announcement-item a {
        display: block;
        min-height: 0;
        background: transparent;
        border-radius: 0;
    }

    .announcement-image {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        object-fit: cover;
        object-position: center center;
        border-radius: 0;
        vertical-align: top;
    }

    /* Móvil: swipe; sin flechas */
    .announcements-carousel-container .carousel-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .announcements-section {
        padding: 16px 0 12px;
    }
}

/* Flechas de anuncios en desktop: translúcidas, no invasivas */
.announcements-carousel-container .carousel-btn {
    background: rgba(229, 32, 86, 0.55);
    backdrop-filter: blur(6px);
}

.announcements-carousel-container .carousel-btn:hover {
    background: rgba(229, 32, 86, 0.85);
}

/* Brands Section - Full Width */
.brands-section {
    background: var(--content-surface);
    width: 100%;
    padding: 60px 0;
    color: var(--content-text);
}

.brands-carousel-container .brands-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 10px 0;
    will-change: transform;
}

.brands-carousel-track .brand-item {
    flex: 0 0 calc((100% - 5 * 24px) / 6);
    max-width: calc((100% - 5 * 24px) / 6);
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 1399px) {
    .brands-carousel-track .brand-item {
        flex: 0 0 calc((100% - 4 * 24px) / 5);
        max-width: calc((100% - 4 * 24px) / 5);
    }
}

@media (max-width: 1199px) {
    .brands-carousel-track .brand-item {
        flex: 0 0 calc((100% - 3 * 24px) / 4);
        max-width: calc((100% - 3 * 24px) / 4);
    }
}

@media (max-width: 992px) {
    .brands-carousel-track .brand-item {
        flex: 0 0 calc((100% - 2 * 24px) / 3);
        max-width: calc((100% - 2 * 24px) / 3);
    }
}

@media (max-width: 768px) {
    .brands-carousel-track .brand-item {
        flex: 0 0 calc((100% - 1 * 24px) / 2);
        max-width: calc((100% - 1 * 24px) / 2);
    }
}

@media (max-width: 480px) {
    .brands-carousel-track .brand-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.brand-item {
    background: var(--content-card);
    padding: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--content-border);
    box-shadow: var(--content-shadow);
}

.brand-item:hover {
    background: transparent;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(229, 32, 86, 0.2);
}

.brand-logo {
    font-weight: bold;
    letter-spacing: 2px;
    opacity: 0.7;
    transition: var(--transition);
    color: var(--content-text);
}

.brand-item:hover .brand-logo {
    opacity: 1;
    color: var(--accent);
}

/* Search History - Full Width */
.search-history {
    background: var(--content-surface);
    width: 100%;
    padding: 60px 0;
    color: var(--content-text);
}

.clear-history {
    background: transparent;
    border: 1px solid var(--content-border);
    color: var(--content-text-secondary);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.clear-history:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 40px;
    width: 100%;
}

.search-tag {
    background: var(--content-card);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    transition: var(--transition);
    border: 1px solid var(--content-border);
    color: var(--content-text);
    box-shadow: var(--content-shadow);
}

.search-tag a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.search-tag a:hover {
    color: var(--accent);
}

.search-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--content-text-secondary);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
}

.search-tag-remove:hover {
    color: var(--accent);
    background: rgba(229, 32, 86, 0.08);
}

.search-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(229, 32, 86, 0.2);
}

.search-tag i {
    font-size: 0.8rem;
    opacity: 0.7;
    color: var(--content-text-secondary);
}

/* Footer - Full Width */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 20px;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid var(--accent);
    flex-shrink: 0;
}

.footer .container-fluid {
    max-width: var(--storefront-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
    box-sizing: border-box;
}

/* Storefront: mismo ancho que footer (logo, búsqueda, nav, breadcrumb, categorías, flashes) */
body.storefront .top-header .container-fluid,
body.storefront .header .header-top .container-fluid,
body.storefront .main-navbar .container-fluid,
body.storefront .breadcrumb-section .container-fluid,
body.storefront .categories-page > .container-fluid,
body.storefront .global-flash-messages .container-fluid {
    max-width: var(--storefront-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
    box-sizing: border-box;
}

/* Evitar doble padding horizontal: el contenedor ya lleva clamp como el footer */
body.storefront .header .header-content {
    padding-left: 0;
    padding-right: 0;
}

/* Address map picker (OpenStreetMap) — shared by account + checkout */
.address-map-picker {
    margin: 1.5rem 0;
}

.checkout-form-section .address-map-picker {
    margin: 1.25rem 0 0;
}

.address-map-picker__label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.address-map-picker__hint {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.address-map-picker__map {
    width: 100%;
    min-height: 280px;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-secondary);
}

.address-map-picker__actions {
    margin-top: 0.75rem;
}

.address-map-picker__locate {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .address-map-picker__map {
        min-height: 360px;
    }
}

.light-theme .address-map-picker__map {
    border-color: #e5e7eb;
}

.light-theme .footer {
    background: #0f172a;
    color: #e2e8f0;
}

.light-theme .footer-section p,
.light-theme .footer-section ul li a,
.light-theme .footer-bottom p {
    color: #94a3b8;
}

.light-theme .footer-section ul li a:hover {
    color: var(--accent);
}

.light-theme .newsletter-form input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

.light-theme .social-links a {
    color: #94a3b8;
}

.light-theme .social-links a:hover {
    color: var(--accent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
    padding: 0;
    width: 100%;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    border: 1px solid transparent;
}

.social-links a:hover {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(229, 32, 86, 0.3);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.newsletter-form input:focus {
    border-color: var(--accent);
}

.newsletter-form button {
    padding: 12px 30px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--accent-hover);
    box-shadow: 0 5px 15px rgba(229, 32, 86, 0.3);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 20px 40px 0;
}

.footer-bottom__copy {
    margin: 0;
}

.footer-bottom__payments {
    margin-left: auto;
}

/* Payment brand logos (footer + storefront) */
.payment-brand-logos {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.payment-brand-logos__logo {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    object-fit: contain;
}

.payment-brand-logos__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 40px;
    min-width: 56px;
    padding: 0 0.75rem;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.92) 48%, rgba(226, 232, 240, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.payment-brand-logos--footer .payment-brand-logos__logo {
    display: block;
    width: auto;
    height: auto;
    max-height: 20px;
    object-fit: contain;
    object-position: center;
}

.payment-brand-logos--footer .payment-brand-logos__logo--visa {
    max-width: 46px;
}

.payment-brand-logos--footer .payment-brand-logos__logo--mastercard {
    max-height: 22px;
    max-width: 34px;
}

.payment-brand-logos--footer .payment-brand-logos__logo--amex {
    max-width: 40px;
}

.payment-brand-logos--footer .payment-brand-logos__logo--yappy {
    max-height: 18px;
    max-width: 68px;
}

.payment-brand-logos__chip--visa {
    min-width: 58px;
}

.payment-brand-logos__chip--mastercard {
    min-width: 52px;
}

.payment-brand-logos__chip--amex {
    min-width: 54px;
}

.payment-brand-logos__chip--yappy {
    min-width: 76px;
    padding: 0 0.9rem;
}

.payment-brand-logos--footer {
    justify-content: flex-end;
}

/* Variantes compartidas (checkout, cuenta, etc.) */
.payment-brand-logos--light-surface {
    gap: 0.35rem;
}

.payment-brand-logos--light-surface .payment-brand-logos__logo {
    max-height: 16px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    object-position: center;
}

.payment-brand-logos--sm.payment-brand-logos--light-surface .payment-brand-logos__logo {
    max-height: 15px;
}

.payment-brand-logos--sm.payment-brand-logos--light-surface .payment-brand-logos__logo--visa {
    max-width: 42px;
}

.payment-brand-logos--sm.payment-brand-logos--light-surface .payment-brand-logos__logo--mastercard {
    max-height: 16px;
    max-width: 30px;
}

.payment-brand-logos--sm.payment-brand-logos--light-surface .payment-brand-logos__logo--amex {
    max-height: 17px;
    max-width: 36px;
}

.payment-brand-logos--uniform {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: min(100%, 15.5rem);
    max-width: 100%;
}

.payment-brand-logos--uniform .payment-brand-logos__chip {
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    padding: 0.45rem 0.55rem;
    box-sizing: border-box;
}

.payment-brand-logos--uniform .payment-brand-logos__logo {
    display: block;
    width: auto;
    max-width: 2.75rem;
    max-height: 1.125rem;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
}

.payment-brand-logos--uniform .payment-brand-logos__logo--amex {
    max-height: 1.35rem;
    max-width: 2.5rem;
}

.payment-brand-logos--uniform .payment-brand-logos__logo--mastercard {
    max-height: 1.25rem;
    max-width: 2.25rem;
}

.payment-brand-logos--uniform .payment-brand-logos__logo--visa {
    max-width: 2.75rem;
}

.light-theme .payment-brand-logos__chip {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 55%, #eef2f7 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-bottom__payments {
        margin-left: 0;
        justify-content: center;
    }

    .payment-brand-logos--footer {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
    }

    .container-fluid {
        padding: 0 30px;
    }

    .logo-image {
        height: 35px;
        max-width: 100px;
    }

    /* Top header responsive */
    .top-links {
        gap: 15px;
    }

    .top-link {
        font-size: 0.8rem;
    }

    .welcome-text {
        font-size: 0.85rem;
    }

    .theme-toggle {
        margin-left: 10px;
        padding-left: 10px;
    }

    .section-header,
    .brands-carousel-container,
    .search-tags {
        padding: 0 30px;
    }

    .footer-content {
        padding: 0;
    }

    .hero-slider {
        min-height: 400px;
        height: 400px;
        margin: 0;
        padding: 0;
        /* Maintain consistent height during slide transitions */
        transition: height 0.3s ease-in-out;
    }

    .slider-container {
        background-attachment: scroll;
        /* Mejor rendimiento en tablets */
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        padding: 60px;
    }


    .slide-content h1 {
        font-size: 2.5rem;
    }

    .product-card {
        flex: 0 0 250px;
    }
}

/* ==================== MEDIA QUERIES REFACTORIZADOS ==================== */

/* Desktop Large: altura del banner = ancho storefront × (700/1920) → imagen alineada al container */
@media (min-width: 1201px) {
    .hero-slider {
        min-height: unset;
        height: var(--hero-desktop-height); /* 525@1440 · 583@1600 · 642@1760 */
        transition: height 0.3s ease-in-out;
    }
}

/* Desktop Small (1025px - 1200px) */
@media (max-width: 1200px) and (min-width: 1025px) {

    /* Mantener estilos base de desktop - solo ajustes menores */
    .header-content {
        padding: 15px 20px;
        min-height: 70px;
    }

    .logo-image {
        height: 38px;
        max-width: 110px;
    }

    /* Hero slider height for desktop small screens */
    .hero-slider {
        min-height: 450px;
        height: 450px;
        /* Ensure smooth height transitions */
        transition: height 0.3s ease-in-out;
    }

    /* Carousel adjustments for medium screens */
    .carousel-container {
        padding: 0 75px;
    }

    .carousel-prev {
        left: 15px;
    }

    .carousel-next {
        right: 15px;
    }

    .product-card,
    .category-product-card {
        width: calc(20% - 16px);
        min-width: 190px;
        max-width: calc(20% - 16px);
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Fallback hasta que script.js mida el header (sin top-bar visible) */
    :root {
        --header-total: 130px;
    }

    /* Ocultar top-header en tablet */
    .top-header {
        display: none;
    }

    /* padding-top del body = var(--header-total); lo ajusta JS al alto real */

    /* Header pegado al tope sin top-header */
    .header {
        top: 0;
    }

    .header-content {
        gap: 15px;
        padding: 10px 16px;
    }

    /* Búsqueda compacta para tablet */
    .search-wrapper {
        max-width: 400px;
    }

    /* Ocultar texto de acciones, solo mostrar iconos */
    .header-actions .action-text {
        display: none;
    }

    .header-actions {
        gap: 15px;
    }

    /* Hero slider height for tablets */
    .hero-slider {
        min-height: 380px;
        height: 380px;
        /* Prevent height jumping during slide transitions */
        transition: height 0.3s ease-in-out;
    }

    /* Carousel styles for tablets */
    .carousel-container {
        padding: 0 70px;
    }

    .carousel-prev {
        left: 15px;
    }

    .carousel-next {
        right: 15px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .product-card,
    .category-product-card {
        width: calc(25% - 15px);
        min-width: 180px;
        max-width: calc(25% - 15px);
    }

    /* Tablet: 3 cards per row (gap 12px del .products-carousel) */
    .products-carousel .category-product-card {
        flex: 0 0 calc((100% - 24px) / 3 - 1px);
        max-width: calc((100% - 24px) / 3 - 1px);
        min-width: 0;
        width: calc((100% - 24px) / 3 - 1px);
    }

    /* Mobile Theme Toggle - Mostrar en tablet */
    .theme-toggle-mobile {
        display: flex;
        cursor: pointer;
    }

    .theme-toggle-mobile .fa-sun {
        display: none;
    }

    .theme-toggle-mobile .fa-moon {
        display: block;
    }

    .light-theme .theme-toggle-mobile .fa-sun {
        display: block;
    }

    .light-theme .theme-toggle-mobile .fa-moon {
        display: none;
    }

    /* Espaciado uniforme entre secciones - Tablet */
    .section {
        padding: 40px 0;
    }

    /* Footer responsivo - Tablet: 2 columnas */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 0;
    }
}

/* ==================== HEADER MÓVIL REFACTORIZADO ==================== */
/* Aplica a todos los móviles (≤768px) */
@media (max-width: 768px) {
    /* Fallback hasta que script.js mida el header */
    :root {
        --header-total: 110px;
    }

    /* Ocultar top-header en móviles */
    .top-header {
        display: none;
    }

    /* padding-top del body = var(--header-total); lo ajusta JS al alto real */

    /* Header pegado al tope sin top-header — z-index alto para que el drawer móvil quede sobre el hero (dots/slides) */
    .header {
        top: 0;
        height: auto;
        position: fixed;
        width: 100%;
        z-index: 10050;
        background: var(--bg-primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .header-top {
        padding: 0;
        /* Background inherited from .header — no explicit bg needed.
           In light-theme, .header stays dark (#0f172a) and .header-top inherits it. */
    }

    /* Layout Flexbox puro — sin position: absolute */
    .header-content {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 10px 12px;
        gap: 0;
    }

    /* Hamburguesa: izquierda */
    .header-content > .navbar-toggle {
        order: 0;
        display: flex;
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-size: 1.25rem;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        margin: 0;
        flex-shrink: 0;
    }

    /* Logo: centro, ocupa espacio disponible */
    .header-content > .logo {
        order: 1;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
    }

    .header-content > .logo .logo-image {
        height: 36px;
        max-width: 120px;
        object-fit: contain;
    }

    /* Iconos: derecha */
    .header-content > .header-actions {
        order: 2;
        display: flex;
        gap: 6px;
        align-items: center;
        flex-shrink: 0;
    }

    .header-actions .action-text { display: none; }

    .header-actions .action-item {
        width: 36px;
        height: 36px;
        min-width: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        font-size: 1rem;
        flex-shrink: 0;
    }

    /* Ocultar warehouse y theme-toggle en mobile header (demasiados iconos) */
    .header-actions .warehouse-selector-btn,
    .header-actions .theme-toggle-mobile {
        display: none;
    }

    /* Búsqueda: segunda fila, ancho completo */
    .header-content > .search-wrapper {
        order: 3;
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
        padding: 8px 12px 10px;
        border-top: 1px solid var(--border);
        box-sizing: border-box;
        /* SIN margin-top hardcodeado */
    }

    .search-bar { width: 100%; max-width: 100%; }

    /* main-navbar oculto en mobile — usamos mobile-nav */

    /* navbar-overlay top for ≤480px handled by JS updateNavbarPosition() */

    /* Mobile Theme Toggle - Mostrar en móvil */
    .theme-toggle-mobile {
        display: flex;
        cursor: pointer;
    }

    .theme-toggle-mobile .fa-sun {
        display: none;
    }

    .theme-toggle-mobile .fa-moon {
        display: block;
    }

    .light-theme .theme-toggle-mobile .fa-sun {
        display: block;
    }

    .light-theme .theme-toggle-mobile .fa-moon {
        display: none;
    }

    /* Reducir padding lateral en móvil (Req 3.6) */
    .container-fluid {
        padding: 0 16px;
    }

    /* Reducir padding en secciones hijas para evitar padding excesivo */
    .section-header,
    .brands-carousel-container,
    .search-tags {
        padding-left: 0;
        padding-right: 0;
    }

    /* Espaciado uniforme entre secciones - Móvil */
    .section {
        padding: 30px 0;
    }

    /* Footer responsivo - Móvil: 1 columna centrada */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0;
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }

    /* Hero slider height for mobile (moved from 481-768px block) */
    .hero-slider {
        min-height: 320px;
        height: 320px;
        transition: height 0.3s ease-in-out;
    }

    /* Breadcrumb responsive (moved from 481-768px block) */
    .breadcrumb-section {
        padding: 18px 0 8px 0;
        margin-top: 10px;
    }

    .breadcrumb {
        font-size: 0.85rem;
        gap: 6px;
    }

    /* Mobile Nav Panel */
    .main-navbar {
        display: none !important;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10051;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

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

    .mobile-nav-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: var(--bg-secondary);
        z-index: 10052;
        display: flex;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .mobile-nav.open .mobile-nav-panel {
        transform: translateX(0);
    }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }

    .mobile-nav-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    .mobile-nav-close {
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 4px;
        transition: color 0.2s ease;
    }

    .mobile-nav-close:hover {
        color: var(--accent);
    }

    .mobile-nav-links {
        list-style: none;
        margin: 0;
        padding: 8px 0;
        flex: 1;
        overflow-y: auto;
    }

    .mobile-nav-links > li:not(:first-child) {
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .mobile-nav-links li a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 18px;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        transition: background 0.2s ease, color 0.2s ease;
        border-bottom: none;
    }

    .mobile-nav-links li a:hover,
    .mobile-nav-links li a.active {
        background: rgba(229, 32, 86, 0.08);
        color: var(--accent);
    }

    .mobile-nav-links li a i {
        width: 20px;
        text-align: center;
        font-size: 1rem;
        color: var(--text-secondary);
    }

    .mobile-nav-links li a:hover i,
    .mobile-nav-links li a.active i {
        color: var(--accent);
    }

    .mobile-nav-footer {
        padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }

    .mobile-theme-switch {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .mobile-theme-label {
        color: var(--text-secondary);
        font-size: 0.85rem;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .mobile-theme-label.active {
        color: var(--accent);
    }

    .mobile-theme-label:hover {
        color: var(--accent);
    }

    .mobile-theme-sep {
        color: var(--text-secondary);
        opacity: 0.4;
    }
}

/* Mobile nav: ocultar solo en desktop (evita que una regla global anule display:block en ≤768px) */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Light theme mobile nav */
.light-theme .mobile-nav-panel {
    background: #1e293b;
}

.light-theme .mobile-nav-links li a {
    color: #e2e8f0;
}

.light-theme .mobile-nav-links li a i {
    color: #94a3b8;
}

.light-theme .mobile-nav-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.light-theme .mobile-nav-title {
    color: #e2e8f0;
}

.light-theme .mobile-nav-close {
    color: #94a3b8;
}

.light-theme .mobile-nav-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Categorías + acordeón en panel móvil */
.mobile-nav-categories-wrap {
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
    border-top: none;
    border-bottom: none;
}

.mobile-nav-section-title {
    padding: 12px 18px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.9;
}

.mobile-nav-accordions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 12px;
}

.mobile-nav-accordion-item {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.mobile-nav-accordion-item:last-child {
    margin-bottom: 0;
}

.mobile-nav-accordion-row {
    display: flex;
    align-items: stretch;
    min-height: 48px;
}

.mobile-nav-accordion-link {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px 8px 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    min-width: 0;
}

.mobile-nav-accordion-link:hover,
.mobile-nav-accordion-link:focus-visible {
    color: var(--accent);
}

.mobile-nav-accordion-toggle {
    flex-shrink: 0;
    width: 48px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease;
}

.mobile-nav-accordion-toggle:hover,
.mobile-nav-accordion-toggle:focus-visible {
    color: var(--accent);
}

.mobile-nav-accordion-toggle i {
    transition: transform 0.25s ease;
    font-size: 0.85rem;
}

.mobile-nav-accordion-item.is-open .mobile-nav-accordion-toggle i {
    transform: rotate(180deg);
}

.mobile-nav-sublist {
    list-style: none;
    margin: 0;
    padding: 0 8px 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav-accordion-item.is-open .mobile-nav-sublist {
    max-height: 80vh;
}

.mobile-nav-sublist li a {
    display: block;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.86rem;
    border-radius: 8px;
    border-left: none;
}

.mobile-nav-sublist li a:hover,
.mobile-nav-sublist li a:focus-visible {
    color: var(--accent);
    background: rgba(229, 32, 86, 0.08);
}

.mobile-nav-sublist-footer {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav-sublist-footer a {
    font-weight: 600;
    color: var(--accent) !important;
}

/* Mobile Small (≤480px) - Ajustes adicionales */
@media (max-width: 480px) {
    :root {
        --header-total: 105px;
    }

    .header-content { padding: 8px 10px; }

    .header-content > .navbar-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .header-content > .logo .logo-image {
        height: 30px;
        max-width: 100px;
    }

    .header-content > .header-actions {
        gap: 5px;
    }

    .header-actions .action-item {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .header-content > .search-wrapper {
        padding: 6px 10px 8px;
    }

    /* main-navbar top/max-height for ≤480px handled by JS updateNavbarPosition() */

    .container-fluid {
        padding: 0 16px;
    }

    .section-header,
    .brands-carousel-container,
    .search-tags,
    .footer-content {
        padding-left: 0;
        padding-right: 0;
    }

    /* Hero slider optimized for small mobile */
    .hero-slider {
        min-height: 280px;
        height: 280px;
        margin: 0;
        padding: 0;
        /* Prevent spacing issues during slide transitions */
        transition: height 0.3s ease-in-out;
    }

    .slider-container {
        background-attachment: scroll;
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
        padding: 30px 10px;
    }

    /* Slider controls optimization for mobile small */
    .slider-controls {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
    }

    .slider-controls button {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        background: rgba(229, 32, 86, 0.4);
        border: 2px solid var(--accent);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        margin: 0 5px;
    }

    .slider-controls button:hover,
    .slider-controls button:active {
        background: var(--accent);
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(229, 32, 86, 0.5);
    }

    /* Carrusel home/ofertas: 2 cards por vista (misma lógica que ≤768px) */
    .products-carousel .category-product-card {
        flex: 0 0 calc((100% - 16px) / 2 - 1px);
        max-width: calc((100% - 16px) / 2 - 1px);
        min-width: 0;
        width: calc((100% - 16px) / 2 - 1px);
    }
}

/* Extra Small Mobile (320px - 480px) */
@media (max-width: 320px) {
    .hero-slider {
        min-height: 250px;
        height: 250px;
        /* Maintain proportions on very small screens */
        transition: height 0.3s ease-in-out;
    }

    .slider-container {
        padding: 20px 5px;
    }

    .slide-content {
        padding: 20px 15px;
        max-width: calc(100% - 20px);
    }

    .slide-content h1 {
        font-size: 1.8rem;
    }

    .slide-content p {
        font-size: 1rem;
    }
}

/* ==================== ESTILOS ADICIONALES ==================== */

/* ==================== BREADCRUMB RESPONSIVE ==================== */

/* Tablets (768px - 992px) */
/* Breadcrumb responsive styles consolidated below with other breadcrumb media queries */

/* ==================== FIN BREADCRUMB ==================== */

/* ==================== NAV MENU STYLES ==================== */

/* Nav menu base styles para desktop */
.nav-menu {
    background: var(--bg-primary);
    padding: 15px 0;
    width: 100%;
    transition: var(--transition);
    display: block;
    /* Visible en desktop */
}

.menu-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
}

.menu-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.menu-list a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.menu-list a:hover:after,
.menu-list a.active:after {
    width: 100%;
}

.menu-list a:hover,
.menu-list a.active {
    color: var(--accent);
}

/* Old dropdown styles removed - using new menu system */

/* Old dropdown-menu styles removed - using new menu system */

/* ==================== NAV MENU RESPONSIVE ==================== */

/* Mobile Large (481px - 768px) y Mobile Small (â‰¤480px) */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-top: 1px solid var(--border);
    }

    .nav-menu.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

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

    .menu-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 20px;
    }

    .menu-list li {
        width: 100%;
    }

    .menu-list a {
        display: block;
        padding: 12px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Dropdown menu styles removed - using new menu system in layout */
}

/* ==================== FIN NAV MENU ==================== */
@media (max-width: 768px) {
    .slider-controls {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
    }

    .slider-controls button {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    /* Legacy carousel (sin :has): solo móvil */
    .carousel-container {
        padding: 0 20px;
    }

    .products-carousel {
        gap: 15px;
    }

    .product-card {
        flex: 0 0 calc(50% - 7.5px);
        max-width: calc(50% - 7.5px);
    }

    .product-image {
        height: 150px;
        font-size: 3rem;
    }

    .product-info {
        padding: 15px;
    }

    .product-info h3 {
        font-size: 1rem;
    }

    .product-specs {
        font-size: 0.8rem;
    }

    .price {
        font-size: 1.2rem;
    }

    .btn-add-cart {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Ajustes especÃ­ficos para pantallas pequeÃ±as */
@media (max-width: 576px) {
    .carousel-container {
        padding: 0 15px;
    }

    .products-carousel {
        gap: 12px;
    }

    .product-card {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }

    .discount-badge,
    .featured-badge,
    .new-badge {
        padding: 3px 10px;
        font-size: 0.75rem;
        top: 10px;
        right: 10px;
    }

    .product-image {
        height: 140px;
    }

    .product-info h3 {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }

    .product-specs {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }

    .rating {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .price-container {
        gap: 10px;
        margin-bottom: 10px;
    }

    .old-price {
        font-size: 0.9rem;
    }

    .price {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
        /* Padding mÃ¡s agresivo para mÃ³viles */
    }

    .container-fluid {
        padding: 0 16px;
    }

    .section-header,
    .brands-carousel-container,
    .search-tags,
    .footer-content,
    .footer-bottom {
        padding-left: 0;
        padding-right: 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .logo span {
        display: none;
    }

    .logo-image {
        height: 40px;
        max-width: 100px;
    }

    .logo {
        gap: 5px;
    }

    .hero-slider {
        min-height: 280px;
        height: 280px;
        margin: 0;
        padding: 0;
    }

    .slider-container {
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        padding: 30px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .slider-container::before {
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.2) 0%, rgba(10, 10, 10, 0.3) 100%);
    }

    .slide {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    .slide:not(.active) {
        display: none !important;
    }

    .slide.active {
        display: flex !important;
    }

    .slide-content {
        background: rgba(0, 0, 0, 0.5);
        padding: 20px;
        border-radius: 12px;
        text-align: center;
        z-index: 10;
        position: relative;
        border: 1px solid rgba(229, 32, 86, 0.4);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
        max-width: 95%;
        width: 100%;
    }

    .slide-content h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .slide-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }



    .slider-controls {
        width: calc(100% - 10px);
        left: 5px;
        right: 5px;
    }

    .slider-controls button {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    /* Carousel en mÃ³viles pequeÃ±os - sin botones */
    .carousel-container {
        padding: 0 15px;
    }

    .products-carousel {
        gap: 10px;
    }

    .product-card {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }

    .slide-content h1 {
        font-size: 1.5rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .image-placeholder {
        height: 250px;
        font-size: 5rem;
    }

    .brand-item {
        padding: 20px;
    }

    .search-tags {
        flex-direction: column;
    }

    .search-tag {
        width: fit-content;
    }

    /* Footer en una columna para móviles pequeños */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Ajustes para pantallas muy pequeÃ±as */
@media (max-width: 360px) {
    .carousel-container {
        padding: 0 10px;
    }

    .products-carousel {
        gap: 8px;
    }

    .product-card {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
    }

    .product-image {
        height: 120px;
        font-size: 2.5rem;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 0.9rem;
    }

    .product-specs {
        font-size: 0.7rem;
    }

    .btn-add-cart {
        padding: 8px;
        font-size: 0.85rem;
    }
}

/* Animaciones adicionales */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

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

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.p-5 {
    padding: 3rem;
}

/* ================================
   CATEGORIES PAGE STYLES
   ================================ */

/* === Breadcrumb (barra propia bajo el header, con altura y separación clara) === */
.breadcrumb-section {
    /* Fondo más oscuro que el header en dark, más claro en light: contrasta con la barra superior */
    background: var(--content-bg);
    padding: 22px 0 20px;
    border-bottom: 1px solid var(--content-border);
    /* Sombra suave hacia abajo: separa visualmente del contenido siguiente y refuerza la franja */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 1px 0 rgba(0, 0, 0, 0.18);
    width: 100%;
    position: relative;
    z-index: 1;
}

.light-theme .breadcrumb-section {
    background: var(--content-surface);
    box-shadow:
        inset 0 1px 0 rgba(15, 23, 42, 0.03),
        0 1px 0 rgba(15, 23, 42, 0.04);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    color: var(--content-text-secondary);
    line-height: 1.4;
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

.breadcrumb a {
    color: var(--content-text-secondary);
    text-decoration: none;
    transition: color 0.18s ease;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb a i {
    font-size: 0.85em;
    opacity: 0.85;
}

.breadcrumb .separator,
.breadcrumb .breadcrumb-separator {
    color: var(--content-text-secondary);
    opacity: 0.45;
    flex-shrink: 0;
    font-size: 0.85em;
}

.breadcrumb .current,
.breadcrumb .breadcrumb-current {
    color: var(--content-text);
    font-weight: 600;
    flex-shrink: 0;
    text-transform: capitalize;
}

/* ==================== BREADCRUMB RESPONSIVE ==================== */

/* Tablets (768px - 992px) */
@media (max-width: 992px) and (min-width: 769px) {
    .breadcrumb-section {
        padding: 18px 0 16px;
    }

    .breadcrumb {
        font-size: 0.88rem;
        gap: 8px;
    }
}

/* Mobile Small (≤480px) - Breadcrumb */
@media (max-width: 480px) {
    .breadcrumb-section {
        padding: 14px 0 12px;
    }

    .breadcrumb {
        font-size: 0.8rem;
        padding: 0 12px;
        gap: 6px;
    }

    .breadcrumb a i {
        font-size: 0.78em;
    }

    .breadcrumb .separator,
    .breadcrumb .breadcrumb-separator {
        font-size: 0.65rem;
        /* Separadores muy pequeÃ±os */
        margin: 0;
        /* Sin margen */
    }
}

/* ================================================================
   CATEGORIES LAYOUT — Sidebar refactor (sin sticky/fixed en desktop)
   Estructura: <.categories-layout>  >  <.filters-sidebar> + <.products-main>
   - Desktop (≥993px): grid 2 columnas, sidebar fluye normal (sin sticky).
   - Tablet/móvil  (≤992px): 1 columna; sidebar oculto y se abre como
     drawer overlay solo cuando se pulsa el botón "Mostrar Filtros".
   - Sin .filters-scroll, sin --header-total, sin position fixed/sticky en
     el flujo principal. La cabecera del panel y la lista hacen scroll
     natural junto con la página.
   ================================================================ */
.categories-page {
    background: var(--content-bg);
    min-height: 100vh;
    padding: 18px 0 32px;
}

.categories-page > .container-fluid {
    margin: 0 auto;
}

.categories-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* === Sidebar (desktop por defecto) === */
.filters-sidebar {
    background: var(--content-card);
    border: 1px solid var(--content-border);
    border-radius: 14px;
    box-shadow: var(--content-shadow);
    padding: 18px 20px 20px;
    width: 100%;
    align-self: start;
}

.filters-sidebar .filter-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Botón cerrar drawer (móvil) — oculto en desktop */
.mobile-filter-close {
    display: none;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--content-border);
}

.filters-header h3 {
    color: var(--content-text);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.filters-header h3 i {
    color: var(--accent);
}

.clear-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0.45rem 0.95rem;
    background: transparent;
    border: 1px solid var(--content-border);
    color: var(--content-text-secondary);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.clear-filters:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(229, 32, 86, 0.06);
}

/* Filter Groups */
.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    color: var(--content-text);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 1px solid var(--content-border);
}

.filter-group h4 > i:first-child:not(.toggle-icon),
.filter-group h4 .filter-group__icon {
    color: var(--accent);
    flex-shrink: 0;
    width: 1rem;
    margin-right: 0;
    text-align: center;
}

.filter-group h4 .filter-group__heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-width: 0;
    flex: 1;
}

.filter-group h4 .filter-group__name {
    min-width: 0;
    font-weight: 600;
    line-height: 1.35;
    text-wrap: pretty;
}

.filter-group h4 .toggle-icon {
    margin-left: auto;
    flex-shrink: 0;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: var(--content-text-secondary);
}

.filter-group.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.filter-group.collapsed .filter-content {
    display: none;
}

/* Indicador de filtros activos (solo en encabezado h4, no en el contenedor) */
.filter-group h4::after {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: 8px;
    display: none;
    flex-shrink: 0;
}

.filter-group.has-active h4::after {
    display: inline-block;
}

.filter-group--subgroup-filter.has-active h4::after {
    display: none;
}

.filter-content {
    padding-top: 12px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Search Filter */
.search-filter {
    position: relative;
    margin-bottom: 15px;
}

.search-filter input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 1px solid var(--content-border);
    border-radius: 25px;
    background: var(--content-bg);
    color: var(--content-text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-filter input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-filter i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--content-text-secondary);
    font-size: 0.85rem;
}

/* Checkbox List */
.checkbox-list {
    /* Sin altura mÃ¡xima - mostrar todos los elementos */
    overflow: visible;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    transition: var(--transition);
    color: var(--content-text);
    font-size: 0.9rem;
}

.checkbox-item:hover {
    color: var(--accent);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--content-border);
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked+.checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-item input[type="checkbox"]:checked+.checkmark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.count {
    margin-left: auto;
    color: var(--content-text-secondary);
    font-size: 0.8rem;
}

/* Price Range */
.price-range {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    /* Evita que los elementos se salgan */
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    width: 100%;
}

.price-inputs input {
    flex: 1;
    min-width: 0;
    /* Permite que el flex funcione correctamente */
    width: auto;
    max-width: calc(50% - 10px);
    /* Limita el ancho mÃ¡ximo */
    padding: 6px 8px;
    border: 1px solid var(--content-border);
    border-radius: 6px;
    background: var(--content-bg);
    color: var(--content-text);
    text-align: center;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.price-inputs span {
    color: var(--content-text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
    /* No se encoge */
    min-width: auto;
}

/* === Dual range slider (precio) === */
.range-slider {
    position: relative;
    margin: 18px 0 6px;
    height: 28px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.range-slider-dual input[type="range"]:first-of-type {
    z-index: 3;
}

.range-slider-dual input[type="range"]:last-of-type {
    z-index: 4;
}

.range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--content-border);
    border-radius: 999px;
    transform: translateY(-50%);
    z-index: 1;
    overflow: hidden;
}

/* Pseudo-elemento que se rellena entre los dos handles (controla JS via --range-fill-left / --range-fill-right) */
.range-track::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--range-fill-left, 0%);
    right: var(--range-fill-right, 0%);
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light, var(--accent)) 100%);
    border-radius: 999px;
    transition: left 0.05s linear, right 0.05s linear;
}

.range-slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 28px;
    background: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    border: none;
    margin: 0;
    padding: 0;
    pointer-events: none;
    z-index: 2;
    touch-action: pan-y;
}

/* Thumb (Webkit) */
.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: grab;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    margin-top: 0;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}

.range-slider input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.18);
    box-shadow: 0 0 0 6px rgba(229, 32, 86, 0.18), 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Thumb (Firefox) */
.range-slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: grab;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
    -moz-appearance: none;
    appearance: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.range-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.12);
}

.range-slider input[type="range"]::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.18);
    box-shadow: 0 0 0 6px rgba(229, 32, 86, 0.18), 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Tracks transparentes (usamos .range-track con ::after) */
.range-slider input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
    outline: none;
    height: 28px;
}

.range-slider input[type="range"]::-moz-range-track {
    background: transparent;
    border: none;
    outline: none;
    height: 28px;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    color: var(--content-text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
}

/* === Estado vacío "No se encontraron productos" en la grid de productos === */
.products-grid .no-results {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 56px 24px;
    background: var(--content-surface);
    border: 1px dashed var(--content-border);
    border-radius: 14px;
    color: var(--content-text);
    width: 100%;
    box-sizing: border-box;
}

.products-grid .no-results > i {
    font-size: 2.5rem;
    color: var(--accent);
    background: rgba(229, 32, 86, 0.1);
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0;
}

.products-grid .no-results h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.products-grid .no-results p {
    margin: 0;
    color: var(--content-text-secondary);
    font-size: 0.92rem;
    max-width: 460px;
}

.products-grid .no-results .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    margin-top: 6px;
    padding: 11px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(229, 32, 86, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.products-grid .no-results .btn-primary::before {
    content: "\f021";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.85rem;
}

.products-grid .no-results .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(229, 32, 86, 0.36);
    filter: brightness(1.05);
}

/* === Botón "Aplicar Precio" === */
.btn-filter-apply {
    width: 100%;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(229, 32, 86, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-filter-apply::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.78rem;
    opacity: 0.95;
}

.btn-filter-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(229, 32, 86, 0.36);
    filter: brightness(1.05);
}

.btn-filter-apply:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(229, 32, 86, 0.3);
}

.btn-filter-apply:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 32, 86, 0.35), 0 6px 14px rgba(229, 32, 86, 0.28);
}

/* Rating List */
.rating-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
    transition: var(--transition);
    color: var(--content-text);
}

.rating-item:hover {
    color: var(--accent);
}

.rating-item input[type="radio"] {
    display: none;
}

.rating-item input[type="radio"]:checked+.stars {
    color: var(--accent);
}

.stars {
    display: flex;
    gap: 2px;
    color: var(--warning);
    font-size: 0.9rem;
}

/* Products Main: padding alineado con .filters-sidebar .filter-container (tarjetas misma línea superior) */
.products-main {
    background: var(--content-card);
    border-radius: 15px;
    padding: 16px 24px 28px;
    box-shadow: var(--content-shadow);
    border: 1px solid var(--content-border);
    align-self: start;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    /* Oculto por defecto en desktop */
    margin-bottom: 20px;
}

.filter-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--content-surface);
    border: 1px solid var(--content-border);
    border-radius: 12px;
    color: var(--content-text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--content-shadow);
}

.filter-toggle-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 32, 86, 0.3);
}

.filter-toggle-btn i:first-child {
    font-size: 1.1rem;
    margin-right: 10px;
}

.filter-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.filter-toggle-btn.active .filter-arrow {
    transform: rotate(180deg);
}

.filter-toggle-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Mobile Filter Close Button */
.mobile-filter-close {
    display: none;
    /* Oculto en desktop */
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.mobile-filter-close:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.mobile-filter-close i {
    font-size: 1rem;
}

/* Results Header: una sola caja (products-main), sin tarjeta anidada */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 20px 0;
    padding: 0 0 16px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--content-border);
    border-radius: 0;
}

.results-info h1 {
    color: var(--content-text);
    font-size: 1.4rem;
    margin: 0 0 4px 0;
}

.results-count {
    color: var(--content-text-secondary);
    font-size: 0.82rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    color: var(--content-text);
    font-size: 0.9rem;
}

.sort-controls select {
    padding: 8px 15px;
    border: 1px solid var(--content-border);
    border-radius: 8px;
    background: var(--content-bg);
    color: var(--content-text);
    font-size: 0.9rem;
    cursor: pointer;
}

.results-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .results-header-actions {
        margin-left: 0;
        justify-content: space-between;
        width: 100%;
    }
}

/* Alternador cuadrícula / lista */
.view-toggle {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid var(--content-border);
    overflow: hidden;
    background: var(--content-surface);
}

.view-btn {
    width: 42px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--content-text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.view-btn:hover {
    color: var(--accent);
    background: rgba(229, 32, 86, 0.08);
}

.view-btn.active {
    background: var(--accent);
    color: #fff;
}

.view-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* === Products Grid (listados de categoría / tienda) === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.products-grid.view-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.products-grid.view-list .category-product-card {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 0;
    max-height: none;
}

.products-grid.view-list .category-product-body {
    flex: 1;
    min-width: 0;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}

.products-grid.view-list .category-product-image {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    border-radius: 16px 0 0 16px;
    border-bottom: none;
    border-right: 1px solid var(--content-border);
}

.products-grid.view-list .category-product-info {
    padding: 16px 20px 14px;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.products-grid.view-list .category-product-price {
    padding-top: 6px;
    margin-top: 8px;
}

.products-grid.view-list .category-product-specs {
    display: flex;
}

.products-grid.view-list .category-product-cta {
    width: 180px;
    min-width: 160px;
    max-width: 200px;
    border-top: none;
    border-left: 1px solid var(--content-border);
    padding: 16px;
    justify-content: center;
    align-items: stretch;
}

.products-grid.view-list .category-product-info--catalog {
    text-align: left;
    align-items: flex-start;
}

.products-grid.view-list .category-product-info--catalog h3 {
    text-align: left;
    min-height: 0;
}

.products-grid.view-list .category-product-meta {
    text-align: left;
}

.products-grid.view-list .category-product-price {
    align-items: flex-start;
}

.products-grid.view-list .category-product-price .price-main-row {
    justify-content: flex-start;
}


@media (max-width: 768px) {
    .products-grid.view-list .category-product-body {
        flex-direction: column;
    }

    .products-grid.view-list .category-product-image {
        width: 108px;
        min-width: 108px;
        max-width: 108px;
        flex-shrink: 0;
        aspect-ratio: 1 / 1;
        padding: 10px;
        border-radius: 12px 0 0 12px;
        border-right: 1px solid var(--content-border);
        border-bottom: none;
    }

    .products-grid.view-list .category-product-info {
        padding: 10px 12px 8px;
        justify-content: center;
    }

    .products-grid.view-list .category-product-info h3 {
        font-size: 0.82rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .products-grid.view-list .category-product-cta {
        width: 100%;
        max-width: none;
        min-width: 0;
        border-left: none;
        border-top: 1px solid var(--content-border);
        padding: 10px 12px 12px;
    }

    .products-grid.view-list .category-product-spec--mobile-hide {
        display: none;
    }
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* === Product Card (category + home carousels) === */
.category-product-card {
    position: relative;
    background: var(--content-card);
    border: 1px solid var(--content-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
}

.category-product-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.category-product-card[data-has-stock="0"] {
    opacity: 0.85;
}

.category-product-card[data-has-stock="0"] .category-product-image img {
    filter: grayscale(0.4);
}

.category-product-card[data-on-offer="1"] {
    border-color: rgba(229, 32, 86, 0.35);
}

.category-product-card[data-on-offer="1"]:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(229, 32, 86, 0.14);
}

.light-theme .category-product-card[data-on-offer="1"] {
    border-color: rgba(229, 32, 86, 0.28);
}

.category-product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100%;
}

.category-product-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* Image — modo oscuro: zona al tono del card; light-theme en :root (ver app.blade) */
.category-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #252525;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 18px;
    border-bottom: 1px solid var(--content-border);
    border-radius: 16px 16px 0 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.light-theme .category-product-image {
    background: #f8fafc;
    box-shadow: none;
}

.category-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

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

/* Info */
.category-product-info {
    padding: 14px 14px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

/* Catálogo (grid): título y precio centrados, jerarquía clara */
.category-product-info--catalog {
    text-align: center;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
}

.category-product-info--catalog h3 {
    text-align: center;
    width: 100%;
}

.category-product-info h3 {
    color: var(--content-text);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.category-product-meta {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--content-text-secondary);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-product-info--catalog .category-product-meta {
    text-align: center;
    width: 100%;
}

/* Prices */
.category-product-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding: 12px 0 0;
    width: 100%;
}

.category-product-price .price-main-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    width: 100%;
}

.category-product-card .price-current {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--content-text);
    letter-spacing: -0.4px;
}

.category-product-card[data-on-offer="1"] .price-current {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 900;
}

.category-product-card .price-original {
    font-size: 0.82rem;
    color: var(--content-text-secondary);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-decoration-color: rgba(156, 163, 175, 0.9);
    opacity: 0.85;
}

.category-product-card[data-on-offer="1"] .price-main-row {
    gap: 6px 10px;
}

/* Chip % OFF under price removed — discount lives in the top Oferta ribbon */
.category-product-card .price-off-chip {
    display: none;
}

.light-theme .category-product-card .price-off-chip {
    background: rgba(229, 32, 86, 0.12);
}

.category-product-promo {
    display: none;
}

.category-product-card .price-consult {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--content-text-secondary);
    font-style: italic;
}

/* Specs — solo visibles en vista lista */
.category-product-specs {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    width: 100%;
}

.category-product-spec {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--content-border);
    font-size: 0.72rem;
    line-height: 1.3;
}

.category-product-spec__name {
    color: var(--content-text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.category-product-spec__value {
    color: var(--content-text);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 12rem;
}

.light-theme .category-product-spec {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* CTA inferior — añadir al carrito */
.category-product-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 12px 14px;
    margin-top: auto;
    border-top: 1px solid var(--content-border);
}

.category-product-add-btn {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e52056 0%, #c41847 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 14px rgba(229, 32, 86, 0.28);
}

.category-product-add-btn:hover:not(:disabled):not(.category-product-add-btn--disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(229, 32, 86, 0.38);
}

.category-product-add-btn:focus-visible {
    outline: 3px solid rgba(229, 32, 86, 0.45);
    outline-offset: 2px;
}

.category-product-add-btn:disabled,
.category-product-add-btn--disabled {
    opacity: 0.72;
    cursor: not-allowed;
    background: #3a3a3a;
    box-shadow: none;
    color: #d1d5db;
}

.category-product-add-btn__label--mobile {
    display: none;
}

.category-product-add-btn__label--desktop {
    display: inline;
}

.category-product-card[data-has-stock="0"] .category-product-add-btn.card-btn-cart,
.category-product-card[data-cart-disabled="1"] .category-product-add-btn.card-btn-cart {
    display: none;
}

@media (max-width: 768px) {
    .category-product-add-btn__label--desktop {
        display: none;
    }

    .category-product-add-btn__label--mobile {
        display: inline;
    }

    .category-product-add-btn {
        font-size: 0.84rem;
        padding: 10px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-product-card,
    .category-product-card:hover,
    .category-product-image img,
    .category-product-add-btn,
    .card-action-btn {
        transition: none;
        transform: none;
    }
}

/* Badges (Category Product Cards + Product Detail) */
.product-badges {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.badge-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.2;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    width: auto;
    height: auto;
    max-width: calc(100% - 20px);
}

.badge-pill i {
    font-size: 0.68rem;
}

.badge-pill__pct {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.badge-pill--offer {
    background: linear-gradient(135deg, rgba(229, 32, 86, 0.95), rgba(190, 24, 93, 0.9));
    color: #fff;
    gap: 6px;
    z-index: 6;
}

.badge-pill--offer .badge-pill__pct {
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.badge-pill--secondary {
    left: auto;
    right: 10px;
    top: 10px;
    z-index: 5;
    padding: 4px 9px;
    font-size: 0.64rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(6, 182, 212, 0.84));
    color: #fff;
}

.badge-pill--secondary.badge-pill--featured {
    top: 42px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(234, 179, 8, 0.88));
    color: #111827;
    border-color: rgba(255, 255, 255, 0.35);
}

.product-badges--detail.product-badges--on-offer .badge-pill--offer {
    top: 12px;
    left: 12px;
}

/* Detalle: secundarios bajo Oferta (izquierda) para no tapar el zoom */
.product-badges--detail .badge-pill--secondary.badge-pill--new {
    top: 52px;
    left: 12px;
    right: auto;
}

.product-badges--detail .badge-pill--secondary.badge-pill--featured {
    top: 90px;
    left: 12px;
    right: auto;
}

.main-image:has(.product-badges--on-offer) .zoom-btn {
    z-index: 4;
}

/* Legacy discount pill kept for any remaining markup */
.badge-pill--discount {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(220, 38, 38, 0.88));
    color: #fff;
    animation: pulse-discount 2s infinite;
}

.category-product-image:has(.product-flag) .badge-pill--discount,
.main-image:has(.product-flag) .badge-pill--discount {
    top: 44px;
}

.product-flag {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.product-flag__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.product-flag--new,
.product-flag__item--new {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(6, 182, 212, 0.84));
    color: #fff;
}

.product-flag--featured,
.product-flag__item--featured {
    background: linear-gradient(135deg, rgba(229, 32, 86, 0.92), rgba(255, 107, 150, 0.86));
    color: #fff;
}

/* Oferta ribbon: same centered bar treatment as Nuevo/Destacado */
.product-flag--offer,
.product-flag__item--offer {
    background: linear-gradient(135deg, rgba(229, 32, 86, 0.95), rgba(190, 24, 93, 0.9));
    color: #fff;
}

.product-flag__pct {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.02em;
}

.product-badges--on-offer .badge-pill--secondary.badge-pill--new {
    top: 42px;
}

.product-flag--dual {
    position: relative;
    overflow: hidden;
}

.product-flag--dual .product-flag__item {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.product-flag--dual .product-flag__item--new {
    animation: productFlagShowNew 5s ease-in-out infinite;
}

.product-flag--dual .product-flag__item--featured {
    animation: productFlagShowFeatured 5s ease-in-out infinite;
}

@keyframes productFlagShowNew {
    0%,
    45% {
        opacity: 1;
        transform: translateY(0);
    }

    50%,
    95% {
        opacity: 0;
        transform: translateY(-6px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes productFlagShowFeatured {
    0%,
    45% {
        opacity: 0;
        transform: translateY(6px);
    }

    50%,
    95% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(6px);
    }
}

.light-theme .badge-pill,
.light-theme .product-flag {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.main-image:has(.product-flag) .zoom-btn {
    top: 52px;
}

@media (max-width: 768px) {
    .product-flag {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 0.66rem;
    }

    .badge-pill {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 0.64rem;
        gap: 4px;
    }

    .badge-pill--secondary {
        right: 8px;
        left: auto;
        padding: 3px 7px;
        font-size: 0.58rem;
    }

    .badge-pill--secondary.badge-pill--featured {
        top: 36px;
    }

    /* En cards estrechas del carrusel, el % basta; “Oferta” se oculta */
    .products-carousel .badge-pill--offer .badge-pill__label,
    .products-carousel .badge-pill--secondary .badge-pill__label {
        display: none;
    }

    .products-carousel .badge-pill--offer {
        gap: 4px;
    }

    .category-product-card[data-on-offer="1"] .price-current {
        font-size: 1.05rem;
    }

    .category-product-card .price-off-chip {
        font-size: 0.62rem;
        padding: 2px 7px;
    }

    .category-product-image:has(.product-flag) .badge-pill--discount,
    .main-image:has(.product-flag) .badge-pill--discount {
        top: 38px;
    }

    .main-image:has(.product-flag) .zoom-btn {
        top: 46px;
    }
}

@media (max-width: 480px) {
    .products-grid .badge-pill--offer .badge-pill__label {
        display: none;
    }

    .products-grid .badge-pill--secondary .badge-pill__label {
        display: none;
    }
}

/* Legacy badge classes kept for backward compatibility */
.category-product-card .discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.category-product-card .featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* === Card Actions Overlay === */
.card-actions-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}

@media (hover: hover) and (pointer: fine) {
    .category-product-card:hover .card-actions-overlay {
        opacity: 1;
    }
}

@media (hover: none), (pointer: coarse) {
    .card-actions-overlay {
        display: none;
    }
}

.card-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    font-size: 1rem;
}

.card-btn-wishlist {
    background: white;
    color: #333;
}

.card-btn-wishlist:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.card-btn-wishlist.active i {
    color: var(--accent);
}

.card-btn-compare {
    background: white;
    color: #333;
}

.card-btn-compare:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--content-text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--content-border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* ================================
   CATEGORIES RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1200px) {
    .categories-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 24px;
    }
}

/* === Tablet/Móvil (≤992px): drawer overlay simple === */
@media (max-width: 992px) {
    .categories-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mobile-filter-toggle {
        display: block;
    }

    /* Sidebar como drawer lateral; oculto por defecto */
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(360px, 88vw);
        max-height: 100vh;
        margin: 0;
        padding: 18px 18px 24px;
        border-radius: 0 14px 14px 0;
        border-right: 1px solid var(--content-border);
        background: var(--content-card);
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 10100;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .filters-sidebar.active {
        transform: translateX(0);
    }

    /* Backdrop generado vía body class (sobre header móvil z-index 10050) */
    body.filters-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 10090;
    }

    body.filters-open {
        overflow: hidden;
    }

    .mobile-filter-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 50%;
        background: var(--accent);
        color: #fff;
        font-size: 1rem;
        cursor: pointer;
        z-index: 2;
    }

    .products-main {
        order: 1;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .categories-page {
        padding: 14px 0 24px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-product-info {
        padding: 8px;
    }

    .category-product-info h3 {
        font-size: 0.8rem;
    }

    .category-product-card .price-current {
        font-size: 1rem;
    }

    .results-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .category-product-info h3 {
        font-size: 0.85rem;
    }
}

/* ==================== PRODUCT DETAIL PAGE ==================== */

/* Product Detail Layout */
.product-detail {
    background: var(--content-bg);
    padding: 40px 0;
    color: var(--content-text);
    overflow-x: hidden;
    /* Prevenir overflow horizontal */
    width: 100%;
    max-width: 100vw;
    /* No exceder viewport width */
}

.product-layout {
    display: grid;
    grid-template-columns: 1.15fr 2.85fr;
    gap: 40px;
    /* Gap reducido para mejor aprovechamiento */
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1920px) {
    .product-layout {
        max-width: min(1560px, var(--storefront-max-width));
    }
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.main-image {
    position: relative;
    background: var(--content-card);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--content-border);
    box-shadow: var(--content-shadow);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-left: auto;
    margin-right: auto;
    contain: layout;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Mejor para imÃ¡genes de baja resoluciÃ³n */
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.02);
}

.zoom-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.zoom-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

@keyframes pulse-discount {

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

    50% {
        transform: scale(1.05);
    }
}

/* Thumbnail Gallery Container */
.thumbnail-gallery {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.thumbnail-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 15px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    justify-content: center;
    transition: padding 0.3s ease;
}

.thumbnail-gallery.has-overflow .thumbnail-list {
    padding: 15px 55px;
    /* Espacio para las flechas */
    justify-content: flex-start;
}

.thumbnail-list::-webkit-scrollbar {
    display: none;
}

/* Thumbnail Navigation Arrows */
.thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
}

.thumbnail-gallery.has-overflow .thumbnail-nav {
    opacity: 1;
    visibility: visible;
}

.thumbnail-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.thumbnail-nav.prev {
    left: 10px;
}

.thumbnail-nav.next {
    right: 10px;
}

.thumbnail-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: var(--content-card);
    border: 2px solid var(--content-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.thumbnail.active {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(229, 32, 86, 0.3);
}

.thumbnail:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    padding: 20px 0;
}

.product-header {
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.product-title {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--content-text);
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-title-row {
    margin-bottom: 8px;
}

.product-brand-logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 1px solid var(--content-border);
    background: var(--content-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-brand-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-header .product-title {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.product-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--content-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.product-meta-rating-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--content-border);
}

.product-meta-rating-row__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    color: var(--content-text-secondary);
    font-size: 0.85rem;
    min-width: 0;
}

.product-meta-rating-row__right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-left: auto;
}

.product-meta-rating-row__right .rating-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-meta-rating-row__right .stars {
    font-size: 0.95rem;
    display: flex;
    gap: 2px;
    color: var(--warning);
}

.product-meta-rating-row__right .rating-count {
    font-size: 0.88rem;
}

.product-stock-row {
    margin-bottom: 10px;
}

.product-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--content-border);
}

.product-warehouse-band {
    background: var(--content-bg);
    padding: 8px 0 24px;
    border-top: 1px solid var(--content-border);
}

/* Separación clara respecto a las pestañas (evita aspecto “pegado”) */
.product-warehouse-band + .product-tabs {
    border-top: 1px solid var(--content-border);
    padding-top: 28px;
    padding-bottom: 32px;
}

.product-warehouse-band .warehouse-stock-card {
    margin-top: 0;
    margin-bottom: 0;
}

.warehouse-band-fallback {
    font-size: 0.9rem;
    color: var(--content-text-secondary);
    margin: 0;
    padding-top: 4px;
}

.product-warehouse-band .warehouse-total-badge--success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.light-theme .product-warehouse-band .warehouse-total-badge--success {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.35);
}

.product-warehouse-band .warehouse-total-badge--out {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.light-theme .product-warehouse-band .warehouse-total-badge--out {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.25);
}

.product-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.product-stock-pill.in-stock {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.product-stock-pill.out-of-stock {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.light-theme .product-stock-pill.in-stock {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

.product-toolbar-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.product-toolbar-rating .rating-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-toolbar-rating .stars {
    font-size: 1rem;
}

.product-toolbar-rating .rating-count {
    font-size: 0.9rem;
}

.product-purchase-panel {
    background: var(--content-surface);
    border: 1px solid var(--content-border);
    border-radius: 14px;
    padding: 18px 20px 22px;
    margin-top: 0;
}

.product-purchase-panel .product-pricing {
    padding-top: 4px;
    padding-bottom: 14px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--content-border);
}

.product-purchase-panel .product-pricing.product-pricing--glass {
    padding: 14px 16px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.12);
}

.light-theme .product-purchase-panel .product-pricing.product-pricing--glass {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 6px 20px rgba(15, 23, 42, 0.06);
}

.product-purchase-panel .price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.product-purchase-panel .price-row--offer .price-current {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.15;
}

.product-purchase-panel .price-row--offer .price-original {
    font-size: 1rem;
    margin-bottom: 0;
    opacity: 0.85;
}

.product-purchase-panel .price-savings-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.light-theme .product-purchase-panel .price-savings-pill {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.3);
}

.product-purchase-panel .price-savings-pill i {
    font-size: 0.75rem;
    opacity: 0.9;
}

.product-purchase-panel .price-savings-pill__pct {
    font-variant-numeric: tabular-nums;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
}

.light-theme .product-purchase-panel .price-savings-pill__pct {
    background: rgba(255, 255, 255, 0.65);
}

.product-purchase-panel .price-current--solo {
    margin-bottom: 0;
}

.product-purchase-panel .price-current {
    font-size: 2rem;
}

.product-trust-strip-outer {
    background: var(--content-bg);
    padding: 28px 0 36px;
    border-top: 1px solid var(--content-border);
}

.product-trust-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px 24px;
    padding: 22px 20px;
    background: var(--content-surface);
    border: 1px solid var(--content-border);
    border-radius: 14px;
}

.product-trust-strip__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.product-trust-strip__item > i {
    font-size: 1.75rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.product-trust-strip__item strong {
    display: block;
    color: var(--content-text);
    font-weight: 600;
    margin-bottom: 4px;
}

.product-trust-strip__item span {
    display: block;
    color: var(--content-text-secondary);
    font-size: 0.9rem;
    line-height: 1.35;
}

@media (min-width: 1024px) {
    .product-trust-strip {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-previous-purchase-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(229, 32, 86, 0.25);
    background: linear-gradient(135deg, rgba(229, 32, 86, 0.08), rgba(229, 32, 86, 0.03));
}

.product-previous-purchase-banner__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 32, 86, 0.12);
    color: var(--accent, #E52056);
    flex-shrink: 0;
}

.product-previous-purchase-banner__message {
    margin: 0 0 8px;
    color: var(--content-text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-previous-purchase-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
}

.product-previous-purchase-banner__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent, #E52056);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.product-previous-purchase-banner__link:hover {
    text-decoration: underline;
}

.product-previous-purchase-banner__reorder-form {
    margin: 0;
}

.product-previous-purchase-banner__reorder-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--content-border);
    background: var(--content-surface);
    color: var(--content-text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.product-previous-purchase-banner__reorder-btn:hover {
    border-color: var(--accent, #E52056);
    color: var(--accent, #E52056);
}

@media (max-width: 480px) {
    .product-previous-purchase-banner {
        flex-direction: column;
    }
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--content-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.product-brand strong {
    color: var(--accent);
}

.product-availability {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-availability.in-stock {
    color: var(--success);
}

.product-availability.out-of-stock {
    color: var(--error);
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid var(--content-border);
}

.product-rating .stars {
    display: flex;
    gap: 2px;
    color: var(--warning);
    font-size: 1.2rem;
}

.rating-score {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--content-text);
}

.rating-count {
    color: var(--content-text-secondary);
}

.write-review {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.write-review:hover {
    text-decoration: underline;
}

/* Product Pricing */
.product-pricing {
    margin-bottom: 25px;
    padding: 20px 0;
    border-bottom: 1px solid var(--content-border);
}

.price-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.price-original {
    font-size: 1.3rem;
    color: var(--content-text-secondary);
    text-decoration: line-through;
    margin-bottom: 5px;
}

.price-savings {
    font-size: 1rem;
    color: var(--success);
    font-weight: 600;
}

/* Product Description */
.product-description {
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--content-text-secondary);
}

/* Product Specs */
.product-specs {
    margin-bottom: 30px;
    background: var(--content-surface);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--content-border);
}

.product-specs h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--content-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-specs h3::before {
    content: '⚡';
    font-size: 1.1rem;
}

.product-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-specs li {
    padding: 12px 0;
    border-bottom: 1px solid var(--content-border);
    color: var(--content-text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.product-specs li:last-child {
    border-bottom: none;
}

.product-specs li::before {
    content: '▸';
    color: var(--accent);
    font-weight: bold;
    margin-top: 2px;
    flex-shrink: 0;
}

.product-specs strong {
    color: var(--content-text);
    margin-right: 5px;
}

/* Product Options */
.product-options {
    margin-bottom: 30px;
}

.product-options--linked {
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid var(--content-border);
    border-radius: 14px;
    background: var(--content-card);
}

.option-group {
    margin-bottom: 20px;
}

.product-options--linked .option-group {
    margin-bottom: 0;
}

.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--content-text);
}

.product-options--linked .option-group label {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--content-muted, var(--content-text-secondary, #9ca3af));
    margin-bottom: 14px;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ~3 cards per row on desktop; wrap instead of squeezing 4 */
.product-options-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
}

.option-btn {
    padding: 12px 20px;
    border: 2px solid var(--content-border);
    border-radius: 10px;
    background: var(--content-card);
    color: var(--content-text);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.product-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 88px;
    padding: 12px 14px;
    border: 2px solid var(--content-border);
    border-radius: 12px;
    background: var(--content-surface, #1a1a1a);
    color: var(--content-text);
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

a.product-option-card {
    cursor: pointer;
}

a.product-option-card:hover,
a.product-option-card:focus-visible {
    border-color: var(--accent);
    color: var(--content-text);
    /* Keep border visible: no translateY (overflow/clip was eating it) */
    box-shadow:
        0 0 0 1px rgba(229, 32, 86, 0.35),
        0 8px 20px rgba(229, 32, 86, 0.18);
    outline: none;
}

a.product-option-card:focus-visible {
    box-shadow:
        0 0 0 2px var(--content-card),
        0 0 0 4px var(--accent);
}

.product-option-card.is-current {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(229, 32, 86, 0.28);
    cursor: default;
    /* Current option: no hover/tooltip interaction (Amazon-style selected chip) */
    pointer-events: none;
    user-select: none;
}

.product-option-card__image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: var(--content-card);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.product-option-card.is-current .product-option-card__image {
    background: rgba(255, 255, 255, 0.14);
}

.product-option-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-option-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.product-option-card__name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-option-card__price {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--accent);
}

.product-option-card.is-current .product-option-card__price {
    color: #fff;
}

/* Floating tip (positioned by JS; never clipped by overflow) */
.product-option-floating-tip {
    position: fixed;
    z-index: 1200;
    max-width: min(320px, calc(100vw - 24px));
    padding: 10px 12px;
    border-radius: 10px;
    background: #141414;
    color: #f5f5f5;
    border: 1px solid rgba(229, 32, 86, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.product-option-floating-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.light-theme .product-option-floating-tip {
    background: #ffffff;
    color: #1a1a1a;
    border-color: rgba(229, 32, 86, 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.light-theme .product-option-card {
    background: #f6f7fb;
}

@media (prefers-reduced-motion: reduce) {
    .product-option-card,
    .product-option-floating-tip {
        transition: none;
    }
}

@media (max-width: 992px) {
    .product-options-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-option-card__image {
        width: 64px;
        height: 64px;
    }
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 32, 86, 0.2);
}

.option-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 32, 86, 0.3);
}

/* Product Quantity */
.product-quantity {
    margin-bottom: 30px;
}

.product-quantity label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--content-text);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--content-border);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    background: var(--content-surface);
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--content-text);
}

.qty-btn:hover {
    background: var(--accent);
    color: white;
}

.quantity-controls input {
    border: none;
    padding: 12px 15px;
    width: 80px;
    text-align: center;
    background: var(--content-card);
    color: var(--content-text);
    font-weight: 600;
}

.quantity-controls input:focus {
    outline: none;
    background: var(--content-surface);
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.product-actions .btn {
    flex: 1;
    min-width: 180px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 32, 86, 0.4);
}

.btn-secondary {
    background: var(--content-surface);
    color: var(--content-text);
    border: 2px solid var(--content-border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--content-text);
    border: 2px solid var(--content-border);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Product Features */
.product-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 25px;
    background: var(--content-surface);
    border-radius: 12px;
    border: 1px solid var(--content-border);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--accent);
    flex-shrink: 0;
}

.feature-item div strong {
    display: block;
    color: var(--content-text);
    font-weight: 600;
    margin-bottom: 3px;
}

.feature-item div span {
    color: var(--content-text-secondary);
    font-size: 0.9rem;
}

/* Product Tabs */
.product-tabs {
    background: var(--content-bg);
    padding: 24px 0 32px;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--content-border);
    margin-bottom: 30px;
    overflow-x: auto;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    color: var(--content-text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--accent);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tabs-content {
    min-height: 0;
}

.product-tabs .tabs-nav {
    margin-bottom: 16px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.tab-pane h3 {
    color: var(--content-text);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.tab-pane h4 {
    color: var(--content-text);
    margin: 25px 0 15px 0;
    font-size: 1.2rem;
}

.tab-pane p {
    line-height: 1.6;
    color: var(--content-text-secondary);
    margin-bottom: 15px;
}

.tab-pane ul {
    margin: 15px 0;
    padding-left: 20px;
}

.tab-pane li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--content-text-secondary);
}

/* Specifications Table */
.specs-table {
    background: var(--content-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--content-border);
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    border-bottom: 1px solid var(--content-border);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    background: var(--content-surface);
    padding: 15px 20px;
    font-weight: 600;
    color: var(--content-text);
    border-right: 1px solid var(--content-border);
}

.spec-value {
    padding: 15px 20px;
    color: var(--content-text-secondary);
    background: var(--content-card);
}

.spec-row--section {
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--content-border);
}

.product-characteristics-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent, #E52056);
    background: rgba(229, 32, 86, 0.08);
}

.product-characteristics-heading i {
    font-size: 0.85rem;
}

.spec-row--filter .spec-label {
    font-weight: 600;
}

.filter-value-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(229, 32, 86, 0.1);
    color: var(--content-text);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    word-break: break-word;
}

.light-theme .product-characteristics-heading {
    background: rgba(229, 32, 86, 0.06);
}

.light-theme .filter-value-pill {
    background: rgba(229, 32, 86, 0.08);
    color: var(--text-primary);
}

/* Reviews Section */
.reviews-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.rating-overview {
    background: var(--content-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--content-border);
    text-align: center;
}

.rating-average {
    margin-bottom: 30px;
}

.avg-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.avg-stars {
    font-size: 1.5rem;
    color: var(--warning);
    margin: 10px 0;
}

.total-reviews {
    color: var(--content-text-secondary);
    font-size: 0.9rem;
}

.rating-breakdown {
    text-align: left;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rating-bar .stars {
    min-width: 30px;
    font-size: 0.9rem;
    color: var(--content-text-secondary);
}

.rating-bar .bar {
    flex: 1;
    height: 8px;
    background: var(--content-border);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar .fill {
    height: 100%;
    background: var(--warning);
    transition: width 0.3s ease;
}

.rating-bar .count {
    min-width: 30px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--content-text-secondary);
}

/* Write Review Section */
.write-review-section {
    background: var(--content-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--content-border);
}

.write-review-section h4 {
    margin-bottom: 20px;
    color: var(--content-text);
}

.review-form .form-group {
    margin-bottom: 20px;
}

.review-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--content-text);
}

.star-rating {
    display: flex;
    gap: 5px;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.star-rating i {
    cursor: pointer;
    transition: var(--transition);
    color: var(--content-border);
}

.star-rating i:hover,
.star-rating i.active {
    color: var(--warning);
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--content-border);
    border-radius: 8px;
    background: var(--content-surface);
    color: var(--content-text);
    font-family: inherit;
    transition: var(--transition);
}

.review-form input:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.review-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.review-item {
    background: var(--content-card);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--content-border);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.review-info h5 {
    color: var(--content-text);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.review-stars {
    color: var(--warning);
    margin-bottom: 5px;
}

.review-date {
    color: var(--content-text-secondary);
    font-size: 0.85rem;
}

.review-content {
    line-height: 1.6;
    color: var(--content-text-secondary);
}

.review-title {
    font-weight: 600;
    color: var(--content-text);
    margin-bottom: 10px;
}

/* Shipping Info */
.shipping-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shipping-option {
    background: var(--content-card);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--content-border);
}

.option-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.option-header i {
    font-size: 1.5rem;
    color: var(--accent);
}

.option-header h4 {
    flex: 1;
    margin: 0;
    color: var(--content-text);
}

.option-header .price {
    font-weight: 600;
    color: var(--success);
}

.shipping-option p {
    color: var(--content-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.return-policy {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--content-border);
}

.return-policy h4 {
    margin-bottom: 15px;
    color: var(--content-text);
}

.return-policy ul {
    list-style: none;
    padding: 0;
}

.return-policy li {
    padding: 8px 0;
    color: var(--content-text-secondary);
    border-bottom: 1px solid var(--content-border);
}

.return-policy li:last-child {
    border-bottom: none;
}

/* Related Products & Recently Viewed */
.related-products,
.recently-viewed {
    background: var(--content-bg);
}

.section.related-products {
    padding: 60px 0;
}

.recently-viewed {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--content-text);
}

.related-products .products-grid,
.viewed-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Related Products Grid uses same styling as index product cards */
.related-products .products-grid .product-card {
    background: var(--content-card);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--content-border);
    cursor: pointer;
    box-shadow: var(--content-shadow);
}

.related-products .products-grid .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(229, 32, 86, 0.2);
    border-color: var(--accent);
}

/* Viewed Product Cards */
.viewed-product-card {
    background: var(--content-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--content-border);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--content-shadow);
}

.viewed-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

.viewed-product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.viewed-product-image {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}

.viewed-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.viewed-product-info {
    padding: 15px;
}

.viewed-product-info h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--content-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.viewed-product-price {
    font-weight: 600;
    color: var(--accent);
    font-size: 1.1rem;
}

/* Image Zoom Modal */
.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.zoom-modal.active {
    display: flex;
}

.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.zoom-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 2;
}

.zoom-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.zoom-close:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.zoom-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.zoom-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.zoom-nav {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    pointer-events: all;
}

.zoom-nav:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.zoom-nav.prev {
    margin-left: -25px;
}

.zoom-nav.next {
    margin-right: -25px;
}

/* ==================== RESPONSIVE DESIGN FOR PRODUCT DETAIL ==================== */

@media (max-width: 1200px) {
    .product-layout {
        grid-template-columns: 1.4fr 2.6fr;
        /* 35% galerÃ­a - 65% info en tablets */
        gap: 30px;
    }

    .product-title {
        font-size: 1.38rem;
    }

    .price-current {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
        /* Una columna en tablets pequeÃ±os */
        gap: 25px;
        padding: 0 15px;
    }

    .main-image {
        width: 100%;
        aspect-ratio: 1 / 1;
    }

    .product-actions .btn {
        min-width: 150px;
    }

    .reviews-summary {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .tabs-nav {
        flex-wrap: wrap;
        gap: 5px;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .product-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Related Products & Recently Viewed - Tablet */
    .viewed-products,
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 20px 0;
    }

    .product-layout {
        padding: 0 10px;
    }

    .product-title {
        font-size: 1.32rem;
        line-height: 1.4;
    }

    .price-current {
        font-size: 2rem;
    }

    .product-meta-rating-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-meta-rating-row__right {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .product-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-trust-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        margin: 0 auto 15px auto;
        padding: 15px;
    }

    .product-meta {
        flex-direction: column;
        gap: 10px;
    }

    .product-actions {
        flex-direction: column;
        gap: 12px;
    }

    .product-actions .btn {
        min-width: 100%;
        padding: 16px 20px;
        font-size: 1.1rem;
    }

    .product-features {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .spec-row {
        grid-template-columns: 1fr;
    }

    .spec-label {
        border-right: none;
        border-bottom: 1px solid var(--content-border);
        padding: 12px 15px;
    }

    .spec-value {
        padding: 12px 15px;
    }

    .thumbnail-gallery {
        width: 100%;
    }

    .thumbnail-list {
        justify-content: center;
        padding: 10px 0;
    }

    .thumbnail-gallery.has-overflow .thumbnail-list {
        padding: 10px 45px;
    }

    .thumbnail-nav.prev {
        left: 5px;
    }

    .thumbnail-nav.next {
        right: 5px;
    }

    .thumbnail {
        width: 70px;
        height: 70px;
    }

    .zoom-close {
        top: 20px;
        right: 20px;
    }

    .zoom-nav {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {

    /* ==================== CONTENEDORES PRINCIPALES ==================== */
    .product-detail,
    .product-detail * {
        box-sizing: border-box;
    }

    .product-detail {
        padding: 15px 0;
        /* Reducir padding vertical principal */
        overflow-x: hidden;
        max-width: 100vw;
    }

    .container-fluid {
        padding: 0 16px;
        /* Padding uniforme del contenedor en móvil */
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .product-layout {
        grid-template-columns: 1fr;
        /* Una columna en mÃ³viles */
        gap: 15px;
        /* Reducir gap entre secciones */
        padding: 0;
        /* Sin padding adicional */
        overflow-x: hidden;
        max-width: calc(100vw - 10px);
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    /* Breadcrumb styles handled in main section */

    /* ==================== PRODUCT GALLERY ==================== */
    .product-gallery {
        order: 1;
        /* GalerÃ­a primero */
        padding: 0 5px;
        /* Padding mÃ­nimo */
        margin: 0 0 15px 0;
        max-width: calc(100vw - 20px);
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .main-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        margin: 0 auto 15px auto;
        padding: 10px;
        border-radius: 10px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .main-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        box-sizing: border-box;
    }

    .thumbnail-gallery {
        max-width: 100%;
        width: calc(100% - 10px);
        margin: 0 auto;
        box-sizing: border-box;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .thumbnail-gallery::-webkit-scrollbar {
        display: none;
    }

    .thumbnail-list {
        justify-content: flex-start;
        padding: 10px 5px;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .thumbnail-list::-webkit-scrollbar {
        display: none;
    }

    .thumbnail-item {
        flex-shrink: 0;
        max-width: 70px;
        width: 70px;
        height: 70px;
        box-sizing: border-box;
    }

    .thumbnail-item img {
        max-width: 100%;
        width: 100%;
        height: 100%;
        object-fit: contain;
        box-sizing: border-box;
    }

    .thumbnail-gallery.has-overflow .thumbnail-list {
        padding: 10px 35px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        box-sizing: border-box;
    }

    .thumbnail img {
        max-width: 100%;
        width: 100%;
        height: 100%;
        object-fit: contain;
        box-sizing: border-box;
    }

    .thumbnail-nav {
        width: 28px;
        height: 28px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .thumbnail-nav.prev {
        left: 3px;
    }

    .thumbnail-nav.next {
        right: 3px;
    }

    /* ==================== PRODUCT INFO ==================== */
    .product-info {
        order: 2;
        /* Info despuÃ©s de la galerÃ­a */
        padding: 20px 15px;
        /* Reducir padding */
        background: var(--content-surface);
        border-radius: 12px;
        margin: 0;
        /* Sin margen adicional */
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .product-title {
        font-size: 1.22rem;
        /* Reducir tamaÃ±o para que quepa mejor */
        margin-bottom: 12px;
        line-height: 1.2;
        /* LÃ­nea mÃ¡s compacta */
        word-wrap: break-word;
        /* Romper palabras largas */
    }

    .product-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .product-rating {
        margin-bottom: 20px;
    }

    .product-pricing {
        margin-bottom: 20px;
    }

    .price-current {
        font-size: 1.8rem;
        /* Precio mÃ¡s compacto */
        word-wrap: break-word;
    }

    .product-description {
        margin-bottom: 20px;
        font-size: 0.9rem;
        /* Texto mÃ¡s pequeÃ±o pero legible */
        line-height: 1.5;
        /* LÃ­nea mÃ¡s compacta */
        word-wrap: break-word;
    }

    .product-specs {
        padding: 15px;
        /* Reducir padding */
        margin: 20px 0;
        /* Reducir margen */
        border-radius: 10px;
    }

    .product-specs h3 {
        font-size: 1.1rem;
        /* Reducir tamaÃ±o */
        margin-bottom: 12px;
    }

    .product-specs li {
        padding: 8px 0;
        /* Reducir padding */
        font-size: 0.85rem;
        /* Texto mÃ¡s compacto */
        word-wrap: break-word;
    }

    .product-options {
        margin-bottom: 20px;
    }

    .product-options--linked {
        margin-bottom: 14px;
        padding: 12px;
    }

    .option-group {
        margin-bottom: 15px;
    }

    .option-group label {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .option-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .product-options-track {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-option-card {
        min-height: 80px;
        padding: 10px 12px;
        gap: 12px;
    }

    .product-option-card__image {
        width: 64px;
        height: 64px;
    }

    .product-option-card__name {
        font-size: 0.88rem;
        -webkit-line-clamp: 2;
    }

    .option-btn {
        padding: 12px 8px;
        font-size: 0.8rem;
        text-align: center;
        word-wrap: break-word;
        border-radius: 8px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
    }

    .product-quantity {
        margin-bottom: 20px;
    }

    .product-quantity label {
        font-size: 0.9rem;
        /* Texto mÃ¡s compacto */
    }

    .quantity-input {
        font-size: 0.9rem;
        /* Input mÃ¡s compacto */
    }

    .product-actions {
        margin-bottom: 20px;
        gap: 10px;
    }

    .product-actions .btn {
        padding: 12px 16px;
        /* Botones mÃ¡s compactos */
        font-size: 0.9rem;
        /* Texto mÃ¡s pequeÃ±o */
        border-radius: 8px;
        word-wrap: break-word;
    }

    .product-features {
        padding: 15px;
        /* Reducir padding */
        background: var(--content-card);
        border-radius: 10px;
    }

    .feature-item {
        gap: 10px;
        padding: 10px 0;
        /* Reducir padding */
    }

    .feature-item i {
        font-size: 1.2rem;
        /* Iconos mÃ¡s pequeÃ±os */
    }

    .feature-item span {
        font-size: 0.85rem;
        /* Texto mÃ¡s compacto */
        word-wrap: break-word;
    }

    /* ==================== TABS ==================== */
    .tabs-nav {
        padding: 0 10px;
        /* Reducir padding lateral */
        gap: 3px;
    }

    .tab-btn {
        padding: 10px 12px;
        /* Botones mÃ¡s compactos */
        font-size: 0.8rem;
        /* Texto mÃ¡s pequeÃ±o */
        flex: 1;
        text-align: center;
        border-radius: 6px;
        word-wrap: break-word;
    }

    /* ==================== PRODUCTS GRID ==================== */
    .viewed-products,
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0 8px;
    }

    .viewed-product-info h4 {
        font-size: 0.9rem;
    }

    .viewed-product-price {
        font-size: 1rem;
    }

    /* ==================== PRODUCT INFO CONTAINER ==================== */
    .product-info {
        padding: 15px 5px;
        margin: 0;
        max-width: calc(100vw - 20px);
        width: calc(100% - 10px);
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    /* ==================== PRODUCT OPTIONS OPTIMIZED ==================== */
    .option-buttons {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .option-btn {
        padding: 10px 5px;
        font-size: 0.75rem;
        min-height: 40px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        text-align: center;
    }

    .product-title {
        font-size: 1.05rem;
        line-height: 1.1;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }

    .price-current {
        font-size: 1.6rem;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .product-purchase-panel .price-row--offer .price-current {
        font-size: 1.45rem;
    }

    .product-purchase-panel .price-savings-pill {
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    .product-meta {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .product-meta>* {
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* ==================== PRODUCT RATING LAYOUT ==================== */
    .product-rating {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 20px;
    }

    /* Contenedor para estrellas, score y count en la misma lÃ­nea */
    .rating-info {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .product-rating .stars {
        font-size: 1rem;
    }

    .rating-score {
        font-size: 1rem;
    }

    .rating-count {
        font-size: 0.85rem;
    }

    /* Enlace escribir reseÃ±a en lÃ­nea separada */
    .product-rating a,
    .write-review {
        font-size: 0.9rem;
        color: var(--accent);
        text-decoration: none;
        font-weight: 500;
        margin-top: 2px;
    }

    .product-rating a:hover,
    .write-review:hover {
        text-decoration: underline;
    }

    .product-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .product-actions .btn {
        padding: 14px 12px;
        font-size: 0.85rem;
        width: 100%;
        box-sizing: border-box;
        word-break: break-word;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-quantity {
        margin-bottom: 15px;
    }

    .quantity-controls {
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    /* ==================== PRODUCT SPECS CONTAINER ==================== */
    .product-specs {
        padding: 12px 8px;
        margin: 15px 0;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .product-specs ul {
        width: 100%;
        box-sizing: border-box;
        padding-left: 0;
    }

    .product-specs li {
        padding: 8px 0;
        font-size: 0.8rem;
        word-break: break-word;
        overflow-wrap: break-word;
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }

    .product-specs li::before {
        margin-top: 1px;
        flex-shrink: 0;
    }

    .spec-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
    }

    .product-specs strong {
        display: block;
        margin-bottom: 2px;
        margin-right: 0;
        font-size: 0.85rem;
        line-height: 1.2;
        font-weight: 600;
    }

    /* ==================== PRODUCT DESCRIPTION ==================== */
    .product-description {
        font-size: 0.85rem;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
        margin-bottom: 15px;
    }
}

/* ==================== MAIN NAVIGATION MENU ==================== */
.main-navbar {
    background: #1a1a1a;
    width: 100%;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-height: 50px;
    padding: 5px 0;
    display: block;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
}

button.nav-link.categories-menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #ffffff);
}

button.nav-link.categories-menu-toggle[aria-expanded="true"],
button.nav-link.categories-menu-toggle:hover {
    color: var(--accent, #E52056);
    background: rgba(229, 32, 86, 0.05);
}

/* Fullscreen categories modal — accordion list */
.categories-menu {
    display: none;
}

@media (min-width: 769px) {
    .categories-menu:not([hidden]) {
        display: block;
    }

    .categories-menu__backdrop {
        position: fixed;
        inset: 0;
        z-index: 12000;
        background:
            radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 55%),
            rgba(6, 6, 8, 0.84);
        backdrop-filter: blur(16px) saturate(1.05);
        -webkit-backdrop-filter: blur(16px) saturate(1.05);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }

    body.categories-menu-open .categories-menu__backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .categories-menu__panel {
        position: fixed;
        inset: 0;
        z-index: 12010;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: clamp(16px, 3vh, 28px) clamp(16px, 3vw, 36px);
        opacity: 0;
        transform: translateY(14px);
        pointer-events: none;
        transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    body.categories-menu-open .categories-menu__panel {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* X anclada a la esquina superior derecha del card */
    .categories-menu__close {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
        cursor: pointer;
        font-size: 1.05rem;
        transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    }

    .categories-menu__close:hover {
        background: rgba(229, 32, 86, 0.92);
        border-color: rgba(229, 32, 86, 0.95);
        transform: scale(1.04);
    }

    .categories-menu__stage {
        position: relative;
        width: min(960px, 92vw);
        /* Más alto = menos scroll en la lista; deja margen con el viewport */
        max-height: min(90vh, 920px);
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(14, 14, 16, 0.94);
        box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
        overflow: hidden;
    }

    .categories-menu__brand {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        padding: clamp(18px, 3vh, 28px) 24px 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .categories-menu__logo-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .categories-menu__logo {
        display: block;
        height: clamp(38px, 4.5vw, 48px);
        width: auto;
        max-width: 170px;
        object-fit: contain;
    }

    .categories-menu__title {
        margin: 4px 0 0;
        font-size: clamp(1.2rem, 2vw, 1.5rem);
        font-weight: 800;
        letter-spacing: -0.02em;
        color: #fff;
    }

    .categories-menu__subtitle {
        margin: 0;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.55);
    }

    .categories-menu__search {
        position: relative;
        flex-shrink: 0;
        width: min(640px, calc(100% - 40px));
        margin: 14px auto 10px;
    }

    .categories-menu__search-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.9rem;
        pointer-events: none;
    }

    .categories-menu__search-input {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
        padding: 0 16px 0 44px;
        font-size: 0.98rem;
        outline: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }

    .categories-menu__search-input::placeholder {
        color: rgba(255, 255, 255, 0.42);
    }

    .categories-menu__search-input:focus {
        border-color: rgba(229, 32, 86, 0.7);
        background: rgba(255, 255, 255, 0.09);
        box-shadow: 0 0 0 3px rgba(229, 32, 86, 0.2);
    }

    .categories-menu__empty {
        margin: 0 auto 8px;
        width: min(640px, calc(100% - 40px));
        padding: 11px 14px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px dashed rgba(255, 255, 255, 0.18);
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.88rem;
        text-align: center;
    }

    .categories-menu__scroll {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 4px 0 16px;
        scrollbar-width: thin;
        scrollbar-color: rgba(229, 32, 86, 0.55) transparent;
    }

    .categories-menu__list {
        list-style: none;
        margin: 0;
        padding: 0 14px;
        display: block;
        width: min(860px, 100%);
        margin-inline: auto;
    }

    .categories-menu__item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        background: transparent;
        border-radius: 0;
        overflow: hidden;
    }

    .categories-menu__item:last-child {
        border-bottom: none;
    }

    .categories-menu__item.is-hidden {
        display: none;
    }

    .categories-menu__item.is-open {
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        border-bottom-color: transparent;
        margin: 4px 0;
    }

    .categories-menu__row {
        display: flex;
        align-items: stretch;
        min-height: 52px;
    }

    .categories-menu__link {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px 10px 14px;
        color: #fff;
        text-decoration: none;
        min-width: 0;
        transition: background 0.15s ease;
    }

    .categories-menu__link:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .categories-menu__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.9);
        flex-shrink: 0;
        font-size: 0.9rem;
    }

    .categories-menu__item:hover .categories-menu__icon,
    .categories-menu__item.is-open .categories-menu__icon {
        border-color: rgba(229, 32, 86, 0.45);
        color: #E52056;
        background: rgba(229, 32, 86, 0.1);
    }

    .categories-menu__initial {
        font-size: 0.92rem;
        font-weight: 800;
        line-height: 1;
    }

    .categories-menu__label {
        flex: 1;
        min-width: 0;
        font-weight: 700;
        font-size: 0.9rem;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        line-height: 1.25;
    }

    .categories-menu__toggle {
        width: 48px;
        border: none;
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        background: transparent;
        color: rgba(255, 255, 255, 0.65);
        cursor: pointer;
        transition: color 0.15s ease, background 0.15s ease;
    }

    .categories-menu__toggle:hover,
    .categories-menu__item.is-open .categories-menu__toggle {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    .categories-menu__item.is-open .categories-menu__toggle i {
        transform: rotate(180deg);
    }

    .categories-menu__toggle i {
        transition: transform 0.2s ease;
    }

    /*
     * display:grid/flex anula el atributo [hidden] del UA stylesheet.
     * Cerrado por defecto; solo abre con .is-open y sin [hidden].
     */
    .categories-menu__sublist,
    .categories-menu__sublist[hidden] {
        display: none !important;
    }

    .categories-menu__item.is-open > .categories-menu__sublist:not([hidden]) {
        list-style: none;
        margin: 0;
        padding: 12px 14px 14px;
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 6px 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(0, 0, 0, 0.28);
        animation: categories-menu-sub-in 0.18s ease;
    }

    @keyframes categories-menu-sub-in {
        from {
            opacity: 0;
            transform: translateY(-4px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .categories-menu__subitem {
        margin: 0;
        min-width: 0;
    }

    .categories-menu__subitem.is-hidden {
        display: none;
    }

    .categories-menu__sublist a {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
        color: rgba(255, 255, 255, 0.82);
        text-decoration: none;
        font-size: 0.86rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    }

    .categories-menu__sub-marker {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgba(229, 32, 86, 0.8);
        flex-shrink: 0;
    }

    .categories-menu__sub-label {
        flex: 1;
        min-width: 0;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .categories-menu__sub-arrow {
        font-size: 0.65rem;
        opacity: 0;
        transform: translateX(-3px);
        color: #E52056;
        transition: opacity 0.15s ease, transform 0.15s ease;
        flex-shrink: 0;
    }

    .categories-menu__sublist a:hover,
    .categories-menu__subitem.is-match a {
        color: #fff;
        background: rgba(229, 32, 86, 0.12);
        border-color: rgba(229, 32, 86, 0.4);
        transform: translateY(-1px);
    }

    .categories-menu__sublist a:hover .categories-menu__sub-marker,
    .categories-menu__subitem.is-match .categories-menu__sub-marker {
        background: #E52056;
        box-shadow: 0 0 0 3px rgba(229, 32, 86, 0.22);
    }

    .categories-menu__sublist a:hover .categories-menu__sub-arrow,
    .categories-menu__subitem.is-match .categories-menu__sub-arrow {
        opacity: 1;
        transform: translateX(0);
    }

    .categories-menu__sublist-footer {
        grid-column: 1 / -1;
        margin-top: 4px;
        padding-top: 2px;
    }

    .categories-menu__sublist-footer a {
        justify-content: center;
        font-weight: 700;
        color: #E52056;
        background: rgba(229, 32, 86, 0.08);
        border-color: rgba(229, 32, 86, 0.28);
    }

    .categories-menu__sublist-footer a:hover {
        background: rgba(229, 32, 86, 0.18);
        border-color: rgba(229, 32, 86, 0.5);
        transform: none;
    }

    @media (max-width: 900px) {
        .categories-menu__item.is-open > .categories-menu__sublist:not([hidden]) {
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        }
    }

    .light-theme .categories-menu__backdrop {
        background:
            radial-gradient(ellipse 70% 40% at 50% 0%, rgba(15, 23, 42, 0.05), transparent 55%),
            rgba(246, 247, 251, 0.8);
    }

    .light-theme .categories-menu__stage {
        background: rgba(255, 255, 255, 0.96);
        border-color: rgba(15, 23, 42, 0.08);
    }

    .light-theme .categories-menu__brand {
        border-bottom-color: rgba(15, 23, 42, 0.06);
    }

    .light-theme .categories-menu__title {
        color: #0f172a;
    }

    .light-theme .categories-menu__subtitle {
        color: #64748b;
    }

    .light-theme .categories-menu__search-input {
        background: #f8fafc;
        color: #0f172a;
        border-color: #e2e8f0;
    }

    .light-theme .categories-menu__search-input::placeholder {
        color: #94a3b8;
    }

    .light-theme .categories-menu__search-icon {
        color: #94a3b8;
    }

    .light-theme .categories-menu__item {
        border-bottom-color: rgba(15, 23, 42, 0.07);
    }

    .light-theme .categories-menu__item.is-open {
        background: #f8fafc;
    }

    .light-theme .categories-menu__link,
    .light-theme .categories-menu__label {
        color: #0f172a;
    }

    .light-theme .categories-menu__icon {
        background: #f1f5f9;
        border-color: #e2e8f0;
        color: #334155;
    }

    .light-theme .categories-menu__item:hover .categories-menu__icon,
    .light-theme .categories-menu__item.is-open .categories-menu__icon {
        background: rgba(229, 32, 86, 0.1);
        border-color: rgba(229, 32, 86, 0.35);
        color: #E52056;
    }

    .light-theme .categories-menu__toggle {
        color: #64748b;
        border-left-color: rgba(15, 23, 42, 0.06);
    }

    .light-theme .categories-menu__sublist {
        background: #f8fafc;
        border-top-color: rgba(15, 23, 42, 0.06);
    }

    .light-theme .categories-menu__sublist a {
        color: #475569;
    }

    .light-theme .categories-menu__sublist a:hover,
    .light-theme .categories-menu__subitem.is-match a {
        color: #0f172a;
        background: rgba(15, 23, 42, 0.04);
    }

    .light-theme .categories-menu__close {
        background: rgba(255, 255, 255, 0.9);
        color: #0f172a;
        border-color: rgba(15, 23, 42, 0.1);
    }

    .light-theme .categories-menu__close:hover {
        color: #fff;
    }

    body.categories-menu-open {
        overflow: hidden;
    }

    body.categories-menu-open .header,
    body.categories-menu-open .top-header {
        pointer-events: none;
    }
}

@media (max-width: 768px) {
    .nav-item--categories-menu {
        display: none !important;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: var(--text-secondary, #ffffff);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.nav-link i:first-child {
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.nav-link .arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent, #E52056);
    background: rgba(229, 32, 86, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent, #E52056);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown Menus */
.main-navbar .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card, #252525);
    min-width: 260px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent, #E52056);
    list-style: none;
    padding: 10px 0;
    pointer-events: none;
}

.main-navbar .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.main-navbar .nav-item:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-secondary, #b0b0b0);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.dropdown-item:hover {
    color: var(--accent, #E52056);
    padding-left: 25px;
    background: rgba(255, 255, 255, 0.02);
}

.dropdown-item .count {
    font-size: 11px;
    opacity: 0.7;
}

.dropdown-footer {
    padding: 15px 20px 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 5px;
}

.dropdown-footer a {
    color: var(--accent, #E52056);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s ease;
}

.dropdown-footer a:hover {
    gap: 12px;
}

/* Mega Menu */
.mega-dropdown {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card, #252525);
    border-top: 3px solid var(--accent, #E52056);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    pointer-events: none;
}

.mega-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
}

.mega-menu-column {
    flex: 1;
    min-width: 250px;
}

.mega-menu-title {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 10px;
}

.mega-menu-list a {
    color: var(--text-secondary, #b0b0b0);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: block;
}

.mega-menu-list a:hover {
    color: var(--accent, #E52056);
    transform: translateX(5px);
}

.mega-menu-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-menu-footer a {
    color: var(--accent, #E52056);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile Toggle - Hidden by default on desktop */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
}

.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.navbar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Navbar Responsive Styles */

/* Mobile: navbar oculto por defecto, controlado por JS toggle */
@media (max-width: 768px) {
    .main-navbar {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        z-index: 999;
        overflow-y: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        min-height: 0;
        padding: 0;
    }

    .main-navbar.active {
        display: block;
    }
}

/* Desktop styles (min-width: 769px) - Ensure horizontal menu is visible */
@media (min-width: 769px) {
    .navbar-toggle,
    .header-content > .navbar-toggle {
        display: none !important;
    }

    .main-navbar {
        display: block !important;
    }

    .navbar-nav {
        display: flex !important;
        position: static !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        flex-direction: row !important;
        padding: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .main-navbar .nav-item {
        width: auto;
    }

    .main-navbar .nav-link {
        border-bottom: none;
    }

    .main-navbar .dropdown-menu {
        position: absolute;
        max-height: none;
        overflow: visible;
    }

    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Storefront desktop: menú a ancho del container, Categorías alineado al logo */
@media (min-width: 769px) {
    body.storefront .main-navbar .navbar-content {
        justify-content: flex-start;
        width: 100%;
    }

    body.storefront .main-navbar .navbar-nav {
        /* Override width: auto !important del bloque desktop general */
        width: 100% !important;
        max-width: 100%;
        justify-content: space-between !important;
        align-items: center;
        gap: 0;
        box-sizing: border-box;
        /* Aire a la derecha para que Contáctanos no pegue al borde */
        padding: 0 16px 0 0 !important;
    }

    body.storefront .main-navbar .nav-item {
        flex: 0 0 auto;
    }

    /* Separación visual Categorías → Inicio */
    body.storefront .main-navbar .nav-item--categories-menu {
        padding-right: clamp(12px, 1.2vw, 24px);
        border-right: 1px solid rgba(255, 255, 255, 0.14);
    }

    body.storefront .main-navbar .nav-item--categories-menu + .nav-item {
        padding-left: clamp(10px, 1vw, 20px);
    }

    body.storefront .main-navbar .nav-link {
        padding-left: clamp(4px, 0.55vw, 12px);
        padding-right: clamp(4px, 0.55vw, 12px);
        white-space: nowrap;
    }

    body.storefront .main-navbar .nav-item:last-child {
        margin-right: 4px;
    }
}

@media (min-width: 1600px) {
    body.storefront .main-navbar .nav-link {
        padding-left: clamp(6px, 0.7vw, 14px);
        padding-right: clamp(6px, 0.7vw, 14px);
        font-size: 13px;
    }
}

@media (min-width: 1920px) {
    body.storefront .main-navbar .navbar-nav {
        padding-right: 16px !important;
    }

    body.storefront .main-navbar .nav-item--categories-menu {
        padding-right: clamp(16px, 1.3vw, 28px);
    }

    body.storefront .main-navbar .nav-item--categories-menu + .nav-item {
        padding-left: clamp(14px, 1.1vw, 24px);
    }

    body.storefront .main-navbar .nav-link {
        padding-left: clamp(8px, 0.85vw, 16px);
        padding-right: clamp(8px, 0.85vw, 16px);
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .main-navbar .nav-link {
        padding: 15px 10px;
        font-size: 12px;
    }
}

/* Estilos complementarios del navbar mobile */
@media (max-width: 768px) {

    /* El navbar-toggle ahora está en header-content, no aquí */
    .main-navbar .navbar-toggle {
        display: none;
    }

    .main-navbar .nav-link {
        justify-content: space-between;
        font-size: 14px;
    }

    .main-navbar .nav-link::after {
        display: none;
    }

    /* Mobile Dropdowns */
    .main-navbar .dropdown-menu,
    .main-navbar .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        width: 100%;
        pointer-events: auto;
    }

    .main-navbar .nav-item.active>.dropdown-menu,
    .main-navbar .nav-item.active>.mega-menu {
        max-height: 1000px;
        padding: 10px 0;
    }

    .main-navbar .nav-item.active>.nav-link {
        color: var(--accent, #E52056);
        background: rgba(255, 255, 255, 0.05);
    }

    .main-navbar .nav-item.active>.nav-link .arrow {
        transform: rotate(180deg);
    }

    .main-navbar .dropdown-item {
        padding-left: 35px;
    }

    .main-navbar .dropdown-item:hover {
        padding-left: 40px;
    }

    .mega-menu-container {
        padding: 0 20px;
        flex-direction: column;
    }

    .mega-menu-column {
        min-width: 100%;
        margin-bottom: 20px;
    }

    .mega-menu-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .mega-menu-list a {
        padding: 8px 0;
    }
}

/* ============================================
   WAREHOUSE SELECTOR & MODAL
   ============================================ */

/* Header warehouse selector button — plano, integrado al header como la barra de búsqueda */
.warehouse-selector-btn {
    position: relative;
    cursor: pointer;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--bg-search-border, rgba(255, 255, 255, 0.12));
    background: var(--bg-primary, #252525);
    color: var(--text-secondary);
    text-decoration: none;
    box-shadow: none;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.warehouse-selector-btn:hover {
    color: var(--accent);
    border-color: rgba(229, 32, 86, 0.45);
    background: rgba(229, 32, 86, 0.08);
    box-shadow: none;
    transform: none;
    filter: none;
}

.warehouse-selector-btn:active {
    transform: none;
    background: rgba(229, 32, 86, 0.12);
}

.warehouse-selector-btn.has-warehouse {
    color: var(--text-primary);
    border-color: rgba(229, 32, 86, 0.35);
}

.warehouse-selector-btn .warehouse-selector-icon {
    color: inherit;
    font-size: 0.95rem;
    text-shadow: none;
}

.warehouse-selector-btn .warehouse-selector-chevron {
    font-size: 0.6rem;
    opacity: 0.75;
    color: inherit;
    transition: transform 0.2s ease;
}

.warehouse-selector-btn:hover .warehouse-selector-chevron {
    transform: translateY(1px);
}

.warehouse-selector-btn .action-text,
.warehouse-selector-btn .warehouse-selector-label {
    display: inline !important;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
    text-shadow: none;
}

html.light-theme .header .warehouse-selector-btn {
    color: #475569;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

html.light-theme .header .warehouse-selector-btn:hover {
    color: var(--accent);
    background: rgba(229, 32, 86, 0.06);
    border-color: rgba(229, 32, 86, 0.35);
}

html.light-theme .header .warehouse-selector-btn.has-warehouse {
    color: #0f172a;
}

/* Overlay de recarga tras seleccionar sucursal */
.warehouse-reload-overlay {
    position: fixed;
    inset: 0;
    z-index: 10070;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.warehouse-reload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 32px;
    border-radius: 16px;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid rgba(229, 32, 86, 0.35);
    color: var(--text-primary, #fff);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    max-width: 90%;
    text-align: center;
}

.warehouse-reload-box i {
    font-size: 1.75rem;
    color: var(--accent, #E52056);
}

.warehouse-reload-box p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Warehouse Modal Overlay — por encima del header fijo (10050) */
.warehouse-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10060;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.warehouse-modal-overlay.active {
    display: block;
    opacity: 1;
}

/* Warehouse Modal */
.warehouse-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 16px;
    z-index: 10061;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.warehouse-modal.active {
    display: flex;
    flex-direction: column;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.warehouse-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--accent, #E52056);
    color: #fff;
}

.warehouse-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.warehouse-modal-header h3 i {
    font-size: 1.2rem;
}

.warehouse-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s;
    flex-shrink: 0;
}

.warehouse-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

.warehouse-modal-body {
    padding: 8px 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 60vh;
    -webkit-overflow-scrolling: touch;
}

.warehouse-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.95rem;
}

/* Warehouse list items */
.warehouse-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-primary, #fff);
}

.warehouse-option:last-child {
    border-bottom: none;
}

.warehouse-option:hover {
    background: var(--bg-secondary, #1a1a1a);
}

.warehouse-option.selected {
    background: rgba(229, 32, 86, 0.1);
    border-left: 3px solid var(--accent, #E52056);
}

.warehouse-option-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-secondary, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent, #E52056);
    font-size: 1rem;
}

.warehouse-option.selected .warehouse-option-icon {
    background: var(--accent, #E52056);
    color: #fff;
}

.warehouse-option-info {
    flex: 1;
    min-width: 0;
}

.warehouse-option-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.warehouse-option-address {
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warehouse-option-check {
    color: var(--accent, #E52056);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.warehouse-option.selected .warehouse-option-check {
    opacity: 1;
}

/* Light theme adjustments */
[data-theme="light"] .warehouse-modal {
    background: #fff;
    border-color: #e2e8f0;
}

[data-theme="light"] .warehouse-option {
    border-bottom-color: #f1f5f9;
    color: #1e293b;
}

[data-theme="light"] .warehouse-option:hover {
    background: #f8fafc;
}

[data-theme="light"] .warehouse-option-icon {
    background: #f1f5f9;
}

[data-theme="light"] .warehouse-option-address {
    color: #64748b;
}

[data-theme="light"] .warehouse-modal-loading {
    color: #64748b;
}

/* Responsive — hoja inferior a pantalla completa, siempre encima del header */
@media (max-width: 768px) {
    .warehouse-modal {
        width: 100vw;
        max-width: 100%;
        max-height: min(100vh, 100dvh);
        height: min(100vh, 100dvh);
        border-radius: 16px 16px 0 0;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(105%);
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
    }

    .warehouse-modal.active {
        transform: translateY(0);
    }

    .warehouse-modal-header {
        padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 16px;
        flex-shrink: 0;
    }

    .warehouse-modal-header h3 {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .warehouse-modal-header h3 span {
        display: block;
    }

    .warehouse-modal-body {
        flex: 1;
        min-height: 0;
        max-height: none;
        padding-bottom: env(safe-area-inset-bottom, 12px);
    }

    .warehouse-option {
        padding: 14px 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .warehouse-option-icon {
        width: 40px;
        height: 40px;
    }

    .warehouse-selector-btn .action-text {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .warehouse-modal-header h3 {
        font-size: 0.9rem;
    }

    .warehouse-option-name {
        font-size: 0.9rem;
    }
}

/* ===== Global Flash Messages ===== */
.global-flash-messages {
    padding: 1rem 0 0.5rem 0;
    margin-top: 0.5rem;
}

.global-flash-messages .container-fluid {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    animation: flashSlideDown 0.35s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes flashSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-message i:first-child {
    flex-shrink: 0;
    font-size: 1.1rem;
}

.flash-message span {
    flex: 1;
}

.flash-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

.flash-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.flash-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.flash-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.light-theme .flash-success {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
    color: #15803d;
}

.light-theme .flash-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #b45309;
}

.light-theme .flash-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}

.light-theme .flash-success {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
    color: #15803d;
}

.light-theme .flash-warning {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.25);
    color: #b45309;
}

.light-theme .flash-error {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
    color: #dc2626;
}

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

body.loltec-modal-open {
    overflow: hidden;
}

.loltec-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.loltec-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.loltec-modal-dialog {
    width: 100%;
    max-width: var(--loltec-modal-max-width, 720px);
    max-height: min(90vh, 900px);
    transform: translateY(12px);
    transition: transform 0.2s ease;
}

.loltec-modal-overlay.is-open .loltec-modal-dialog {
    transform: translateY(0);
}

.loltec-modal-panel {
    background: var(--bg-card, #252525);
    border: 1px solid var(--border-color, #333);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 900px);
}

.light-theme .loltec-modal-panel {
    background: #ffffff;
    border-color: #e5e7eb;
}

.loltec-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #333);
}

.loltec-modal-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.loltec-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
    line-height: 1;
}

.loltec-modal-close:hover {
    color: var(--accent, #E52056);
    background: rgba(229, 32, 86, 0.08);
}

.loltec-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    color: var(--text-primary);
}

.loltec-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color, #333);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.review-login-hint,
.review-pending-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

@media (max-width: 576px) {
    .loltec-modal-overlay {
        padding: 0;
        align-items: stretch;
    }

    .loltec-modal-dialog {
        max-width: 100%;
        max-height: 100vh;
        min-height: 100vh;
    }

    .loltec-modal-panel {
        border-radius: 0;
        max-height: 100vh;
    }
}

/* --------------------------------------------------------------------------
   Comparar productos (página /articulos/comparar)
   -------------------------------------------------------------------------- */
.compare-page {
    padding-bottom: 3rem;
}

.compare-page-header {
    margin-bottom: 1.5rem;
}

.compare-page-header h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.compare-page-header p {
    color: var(--text-secondary);
    margin: 0.5rem 0 0;
}

.compare-page .compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    background: var(--bg-card, #252525);
}

.light-theme .compare-page .compare-table-wrap {
    background: #ffffff;
    border-color: var(--border-color, #e5e7eb);
}

.compare-page .compare-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: min(100%, 640px);
}

.compare-page .compare-table th,
.compare-page .compare-table td {
    border: 1px solid var(--border-color, #333);
    padding: 0.75rem;
    vertical-align: top;
    color: var(--text-primary);
    word-wrap: break-word;
}

.compare-page .compare-th-label,
.compare-page .compare-label {
    width: 140px;
    min-width: 120px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-secondary);
    position: sticky;
    left: 0;
    z-index: 1;
}

.light-theme .compare-page .compare-th-label,
.light-theme .compare-page .compare-label {
    background: #f3f4f6;
}

.compare-page .compare-th-product,
.compare-page .compare-table tbody td:not(.compare-label) {
    width: 220px;
    min-width: 200px;
    max-width: 240px;
}

.compare-page .compare-product-head {
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.compare-page .compare-product-img-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1;
    padding: 0.75rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border-color, #333);
}

.compare-page .compare-product-img-link img {
    object-fit: contain;
    max-height: 110px;
    width: auto;
    height: auto;
}

.compare-page .compare-product-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--text-primary);
    text-decoration: none;
}

.compare-page .compare-product-name:hover {
    color: var(--accent, #E52056);
}

.compare-page .compare-sku {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.compare-page .compare-section-row td {
    background: rgba(229, 32, 86, 0.1);
    border-color: rgba(229, 32, 86, 0.2);
    padding: 0.7rem 0.85rem;
}

.compare-page .compare-section-row .product-characteristics-heading {
    position: static;
    width: auto;
    font-weight: 800;
    gap: 8px;
    padding: 0.7rem 0.85rem;
    background: transparent;
}

.light-theme .compare-page .compare-section-row td {
    background: rgba(229, 32, 86, 0.06);
}

.compare-page .compare-filter-cell {
    text-align: center;
}

.compare-page .compare-filter-cell .filter-value-pill {
    font-size: 0.82rem;
    font-weight: 650;
    padding: 5px 11px;
    background: rgba(229, 32, 86, 0.12);
    color: var(--text-primary);
}

.compare-page .compare-filter-empty {
    color: var(--text-secondary);
    opacity: 0.55;
    font-weight: 600;
}

.filter-value-pill--match,
.compare-page .compare-filter-row--match .filter-value-pill {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.light-theme .filter-value-pill--match,
.light-theme .compare-page .compare-filter-row--match .filter-value-pill {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.compare-page .compare-price {
    margin: 0.15rem 0 0.35rem;
    font-size: 0.95rem;
}

.compare-page .compare-price .price-original {
    display: block;
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.compare-page .compare-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.compare-page .compare-remove-btn:hover {
    color: var(--accent, #E52056);
    border-color: var(--accent, #E52056);
    background: rgba(229, 32, 86, 0.08);
}

.compare-page .compare-remove-btn:focus-visible {
    outline: 2px solid var(--accent, #E52056);
    outline-offset: 2px;
}

.compare-page .compare-th-product {
    vertical-align: top;
}

.compare-page .compare-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.compare-page .compare-continue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color, #333);
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.compare-page .compare-continue-btn:hover {
    color: var(--accent, #E52056);
    border-color: var(--accent, #E52056);
    background: rgba(229, 32, 86, 0.08);
}

.compare-page .compare-continue-btn:focus-visible {
    outline: 2px solid var(--accent, #E52056);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .compare-page .compare-th-label,
    .compare-page .compare-label {
        width: 110px;
        min-width: 100px;
    }

    .compare-page .compare-th-product,
    .compare-page .compare-table tbody td:not(.compare-label) {
        width: 180px;
        min-width: 170px;
        max-width: 190px;
    }
}

/* ===== GDPR Cookie banner ===== */
.gdpr-cookie-banner {
    display: none;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: var(--content-card);
    color: var(--content-text);
    border: 1px solid var(--content-border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.gdpr-cookie-banner.is-open {
    display: flex;
}

.light-theme .gdpr-cookie-banner {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.gdpr-cookie-banner__body {
    flex: 1;
    min-width: 260px;
}

.gdpr-cookie-banner__title {
    margin: 0 0 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--content-text);
}

.gdpr-cookie-banner__text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--content-text-secondary);
    line-height: 1.5;
}

.gdpr-cookie-banner__link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.gdpr-cookie-banner__link:hover {
    text-decoration: underline;
}

.gdpr-cookie-banner__options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.gdpr-cookie-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.gdpr-cookie-checkbox__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gdpr-cookie-checkbox__box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--content-border);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content-bg);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.gdpr-cookie-checkbox__input:focus-visible + .gdpr-cookie-checkbox__box {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.gdpr-cookie-checkbox__input:checked + .gdpr-cookie-checkbox__box {
    background: var(--accent);
    border-color: var(--accent);
}

.gdpr-cookie-checkbox__input:checked + .gdpr-cookie-checkbox__box::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.gdpr-cookie-checkbox__label {
    color: var(--content-text);
    font-weight: 500;
}

.gdpr-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gdpr-cookie-banner__btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .gdpr-cookie-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .gdpr-cookie-banner__actions {
        flex-direction: column;
    }

    .gdpr-cookie-banner__btn {
        width: 100%;
        justify-content: center;
    }
}

/* -------------------------------------------------------------------------
   Página de contacto — mapa hero, glassmorphism, sucursales en grid
   ------------------------------------------------------------------------- */
/* Contacto: usa el mismo padding-top global que el storefront (script.js → --header-total).
   Sin colchón extra: evita la franja clara/oscura entre el nav y el mapa. */

.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.contact-page {
    padding: 0 0 3.5rem;
    margin-top: 0;
    background: var(--bg-primary);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Mapa full width + capas */
/* Mapa: z-index por debajo del header fijo (1000+) para no tapar menús */
#contact-map-hero.contact-map-hero,
.contact-map-hero {
    position: relative;
    z-index: 1;
    width: 100%;
    height: clamp(220px, 44vh, 460px);
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 0;
    contain: paint;
}

/* Capa estática: sin parallax/transform (evita flicker del iframe de Maps al scroll). */
.contact-map-hero__frame {
    position: absolute;
    inset: 0;
}

.contact-map-hero__iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: 0;
}

.contact-map-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(0, 0, 0, 0.55) 100%
    );
    pointer-events: none;
}

.contact-map-hero__gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 90% 60% at 50% 100%,
        rgba(229, 32, 86, 0.18) 0%,
        transparent 65%
    );
    pointer-events: none;
    mix-blend-mode: screen;
}

.contact-map-hero__external {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-map-hero__external:hover {
    background: rgba(229, 32, 86, 0.55);
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .contact-map-hero__external {
        bottom: 0.65rem;
        right: 0.65rem;
        font-size: 0.72rem;
        padding: 0.45rem 0.75rem;
    }
}

/* Glass panels */
.contact-glass {
    background: rgba(37, 37, 37, 0.58);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    max-width: 100%;
    box-sizing: border-box;
}

.contact-glass--tight {
    padding: 1rem 1.15rem;
}

.contact-page__intro {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.25rem 1rem 1.75rem;
    text-align: center;
}

.contact-page__title {
    font-size: clamp(1.65rem, 4.2vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 0.85rem;
    line-height: 1.15;
}

.contact-page__lead {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.contact-page__stores {
    scroll-margin-top: calc(var(--header-total, 200px) + 1rem);
    align-self: start;
}

.contact-page__layout {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    width: 100%;
    box-sizing: border-box;
}

.contact-page__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.contact-page__grid > * {
    min-width: 0;
}

@media (min-width: 1100px) {
    .contact-page__grid {
        /* Más ancho para el formulario (teléfonos con bandera necesitan espacio) */
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
        gap: 2.25rem;
        /* stretch haría la tarjeta del formulario tan alta como la columna de tiendas → hueco vacío */
        align-items: start;
    }
}

.contact-page__form-wrap {
    padding: 1.5rem 1.35rem 1.65rem;
    align-self: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-page__form-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.35rem;
}

.contact-page__form-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(229, 32, 86, 0.35) 0%, rgba(229, 32, 86, 0.08) 100%);
    border: 1px solid rgba(229, 32, 86, 0.35);
    color: var(--accent-light);
    font-size: 1.15rem;
}

.contact-page__form-wrap h2.contact-page__h2,
.contact-page__stores h2.contact-page__h2 {
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    text-align: left;
    letter-spacing: -0.02em;
}

.contact-page__form-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.45;
}

.contact-page__name-row,
.contact-page__phones-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

/* Nombre/apellido: dos columnas desde tablet */
@media (min-width: 768px) {
    .contact-page__name-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* Teléfonos: una columna hasta desktop ancho (evita solapamiento del selector ITI) */
@media (min-width: 1100px) {
    .contact-page__phones-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .contact-page__intro {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    .contact-page__form-wrap {
        padding: 1.15rem 0.85rem 1.35rem;
    }

    .contact-page__form-head {
        gap: 0.75rem;
    }
}

/* Validación: aviso general + mensajes por campo */
/* Importante: sin esto, display:flex gana al atributo [hidden] y el aviso se ve al cargar */
.contact-form-alert[hidden] {
    display: none !important;
}

.contact-form-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 1rem;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-form-alert .fa-circle-exclamation {
    flex-shrink: 0;
    margin-top: 0.12rem;
    color: var(--accent-light);
}

.contact-form-alert--danger {
    background: rgba(229, 32, 86, 0.12);
    border: 1px solid rgba(229, 32, 86, 0.35);
    color: #fecaca;
}

.light-theme .contact-form-alert--danger {
    background: rgba(229, 32, 86, 0.07);
    border-color: rgba(229, 32, 86, 0.25);
    color: #9f1239;
}

/* Variante success: flash de envío correcto, inline en la tarjeta del formulario */
.contact-form-alert--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.contact-form-alert--success .fa-circle-check {
    flex-shrink: 0;
    margin-top: 0.12rem;
    color: #4ade80;
}

.light-theme .contact-form-alert--success {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.3);
    color: #166534;
}

.light-theme .contact-form-alert--success .fa-circle-check {
    color: #16a34a;
}

/* Botón de cierre del flash */
.contact-form-alert__close {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.contact-form-alert__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.light-theme .contact-form-alert__close:hover {
    background: rgba(15, 23, 42, 0.06);
}

/* Entrada animada del flash inline */
.contact-page__flash {
    align-items: center;
    margin-bottom: 1.25rem;
    animation: contactFlashIn 0.35s ease both;
}

@keyframes contactFlashIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-page__flash {
        animation: none;
    }
}

.contact-field__error {
    display: none;
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--accent-light);
}

.contact-field__error.is-visible {
    display: block;
}

.contact-field--error .contact-field__control .contact-field__input,
.contact-field--error .contact-field__control .contact-field__textarea {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(229, 32, 86, 0.2);
}

.contact-field--turnstile {
    margin-bottom: 0;
}

.contact-field--turnstile .auth-turnstile-wrap {
    margin-bottom: 0.35rem;
}

.contact-page__form-wrap .auth-title {
    display: none;
}

.contact-page .form-group input,
.contact-page .form-group textarea,
.contact-page .contact-field__input,
.contact-page .contact-field__textarea {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.1);
}

.light-theme .contact-page .form-group input,
.light-theme .contact-page .form-group textarea,
.light-theme .contact-page .contact-field__input,
.light-theme .contact-page .contact-field__textarea {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(15, 23, 42, 0.12);
}

/* Campos con icono */
.contact-field__label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}

.contact-field__optional {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.9;
}

.contact-page .form-group.contact-field {
    width: 100%;
    min-width: 0;
}

.contact-page .auth-form.contact-page__form {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.contact-field__control {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.contact-field__control--textarea {
    align-items: stretch;
}

.contact-field__icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    color: var(--accent);
    opacity: 0.9;
    font-size: 0.95rem;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.contact-field__icon--textarea {
    top: 14px;
    align-self: flex-start;
}

/*
   auth.css va después de styles.css y aplica .form-group input { padding: 0.75rem }
   (gana a .contact-field__input). Usamos selectores más específicos + :focus-within.
*/
.contact-field__input,
.contact-field__textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        padding 0.2s ease;
    box-sizing: border-box;
}

.contact-field__textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.contact-field__input:focus,
.contact-field__textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 32, 86, 0.15);
}

/* Gana a .form-group input/textarea de auth.css
   (los campos con intl-tel-input se excluyen: la librería gestiona su propio padding) */
body.page-contact.storefront .contact-page .auth-form .form-group.contact-field:not(.contact-field--iti) input.contact-field__input {
    padding: 0.75rem 0.85rem 0.75rem 3rem !important;
}

body.page-contact.storefront .contact-page .auth-form .form-group.contact-field textarea.contact-field__textarea {
    padding: 2.35rem 0.85rem 0.75rem 3rem !important;
    min-height: 120px;
}

/* Al escribir: icono se oculta y el padding se libera para el texto */
body.page-contact.storefront .contact-page .auth-form .form-group.contact-field:not(.contact-field--iti) .contact-field__control:focus-within input.contact-field__input {
    padding: 0.75rem 0.85rem !important;
}

body.page-contact.storefront .contact-page .auth-form .form-group.contact-field .contact-field__control--textarea:focus-within textarea.contact-field__textarea {
    padding: 0.85rem 0.85rem 0.75rem !important;
}

body.page-contact.storefront .contact-page .auth-form .form-group.contact-field .contact-field__control:focus-within .contact-field__icon {
    opacity: 0;
    transform: scale(0.85);
    visibility: hidden;
}

.light-theme body.page-contact.storefront .contact-page .auth-form .form-group.contact-field input.contact-field__input,
.light-theme body.page-contact.storefront .contact-page .auth-form .form-group.contact-field textarea.contact-field__textarea {
    background: rgba(255, 255, 255, 0.65) !important;
}

/* ============================================================
   Teléfonos con banderitas (intl-tel-input) — tema oscuro/claro
   ============================================================ */

/* Variables de la librería: heredan el design system (dark por defecto) */
.contact-page .iti,
.iti--container {
    --iti-border-color: rgba(255, 255, 255, 0.1);
    --iti-dialcode-color: rgba(255, 255, 255, 0.55);
    --iti-dropdown-bg: #252525;
    --iti-arrow-color: rgba(255, 255, 255, 0.65);
    --iti-hover-color: rgba(229, 32, 86, 0.14);
}

.light-theme .contact-page .iti,
.light-theme .iti--container {
    --iti-border-color: rgba(15, 23, 42, 0.12);
    --iti-dialcode-color: rgba(15, 23, 42, 0.5);
    --iti-dropdown-bg: #ffffff;
    --iti-arrow-color: rgba(15, 23, 42, 0.55);
    --iti-hover-color: rgba(229, 32, 86, 0.08);
}

/* El wrapper .iti debe ocupar todo el control */
.contact-field--iti .contact-field__control .iti {
    width: 100%;
    min-width: 0;
}

/* Con la bandera dentro del input, el icono FA sobra */
.contact-field--iti .contact-field__icon {
    display: none;
}

/* Sin padding-left fijo: intl-tel-input ajusta el espacio del código de país */
body.page-contact.storefront .contact-page .auth-form .form-group.contact-field.contact-field--iti input.contact-field__input {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-right: 0.85rem;
}

/* Botón de país seleccionado: integrado al input con separador sutil */
.contact-page .iti__country-container {
    z-index: 2;
}

.contact-page .iti__selected-country {
    border-radius: 10px 0 0 10px;
    background: transparent;
    transition: background 0.2s ease;
}

.contact-page .iti__selected-country-primary {
    padding-left: 0.85rem;
    padding-right: 0.4rem;
    gap: 0.15rem;
    border-radius: 10px 0 0 10px;
}

.contact-page .iti__selected-dial-code {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--iti-dialcode-color);
}

.contact-page .iti--allow-dropdown .iti__country-container:hover,
.contact-page .iti--allow-dropdown .iti__country-container:hover button {
    background: rgba(229, 32, 86, 0.1);
}

.contact-page .iti__arrow {
    transition: transform 0.2s ease;
}

/* Dropdown de países (inline, desktop) */
.contact-page .iti__dropdown-content {
    border: 1px solid var(--iti-border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.25);
    margin-top: 6px;
}

.light-theme .contact-page .iti__dropdown-content {
    box-shadow:
        0 12px 32px rgba(15, 23, 42, 0.14),
        0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Buscador de países */
.contact-page .iti__search-input,
.iti--container .iti__search-input {
    background: rgba(0, 0, 0, 0.25);
    border: none;
    border-bottom: 1px solid var(--iti-border-color);
    color: var(--text-primary, #fff);
    font-family: inherit;
    font-size: 0.92rem;
    padding: 0.7rem 0.85rem;
}

.light-theme .contact-page .iti__search-input,
.light-theme .iti--container .iti__search-input {
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
}

.contact-page .iti__search-input:focus,
.iti--container .iti__search-input:focus {
    outline: none;
    border-bottom-color: var(--accent, #E52056);
}

/* Lista y opciones */
.contact-page .iti__country-list,
.iti--container .iti__country-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 32, 86, 0.5) transparent;
}

.contact-page .iti__country,
.iti--container .iti__country {
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    transition: background 0.15s ease;
}

.contact-page .iti__country.iti__highlight,
.iti--container .iti__country.iti__highlight {
    background: var(--iti-hover-color);
}

.contact-page .iti__dial-code,
.iti--container .iti__dial-code {
    color: var(--iti-dialcode-color);
}

/* Popup fullscreen (móvil): se monta en <body>, fuera de .contact-page */
.iti--fullscreen-popup.iti--container {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.iti--fullscreen-popup .iti__dropdown-content {
    background: var(--iti-dropdown-bg);
    border: 1px solid var(--iti-border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.light-theme .iti--fullscreen-popup.iti--container {
    background: rgba(246, 247, 251, 0.85);
}

/* Estado de error: cubrir también el wrapper iti */
.contact-field--error.contact-field--iti .iti .contact-field__input {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(229, 32, 86, 0.2);
}

/* Focus ring moderno con glow del accent en los campos con bandera */
.contact-field--iti .contact-field__control:focus-within .iti {
    border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(229, 32, 86, 0.15);
}

/* Botón de envío: hover más vivo (micro-interacción) */
.contact-page__submit {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.contact-page__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(229, 32, 86, 0.35);
}

.contact-page__submit:active {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .contact-page__submit,
    .contact-page__submit:hover {
        transform: none;
        transition: none;
    }
}

.contact-page__form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.25rem;
}

.contact-page__form-actions .auth-turnstile-wrap {
    margin: 0;
}

.contact-page__form-footer {
    margin: 0;
    padding-top: 0.85rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.light-theme .contact-page__form-footer {
    border-top-color: rgba(15, 23, 42, 0.08);
}

.contact-page__submit {
    margin-top: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    font-size: 0.88rem;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-radius: 12px;
}

.contact-page__stores-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.contact-page__stores-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(229, 32, 86, 0.28) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-light);
    font-size: 1.2rem;
}

.contact-page__web-sales-line {
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.contact-page__inline-icon {
    color: var(--accent);
    opacity: 0.95;
}

.contact-page__web-sales-line a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.contact-page__web-sales-line a:hover {
    text-decoration: underline;
}

/* Grid de sucursales */
.contact-store-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .contact-store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.1rem;
    }
}

@media (min-width: 1100px) {
    .contact-store-grid {
        grid-template-columns: 1fr;
    }
}

.contact-store-card {
    padding: 1.15rem 1.2rem 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-store-card:hover {
    transform: translateY(-2px);
    border-color: rgba(229, 32, 86, 0.28);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(229, 32, 86, 0.12);
}

.contact-store-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.contact-store-card__badge {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 32, 86, 0.18);
    color: var(--accent-light);
    font-size: 0.95rem;
}

.contact-store-card__name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.contact-store-card__details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.contact-store-card__row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.contact-store-card__ico {
    flex-shrink: 0;
    width: 22px;
    text-align: center;
    color: var(--accent);
    margin-top: 0.12rem;
    opacity: 0.95;
}

.contact-store-card__text {
    flex: 1;
    min-width: 0;
}

.contact-store-card__link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.contact-store-card__link:hover {
    text-decoration: underline;
}

/* Tema claro */
.light-theme .contact-glass {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.light-theme .contact-map-hero__iframe {
    filter: none;
}

.light-theme .contact-map-hero__overlay {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(15, 23, 42, 0.12) 100%
    );
}

.light-theme .contact-map-hero__gradient {
    background: radial-gradient(
        ellipse 90% 60% at 50% 100%,
        rgba(229, 32, 86, 0.12) 0%,
        transparent 65%
    );
    mix-blend-mode: multiply;
}

.light-theme .contact-page {
    background: var(--bg-primary);
}

/* ── Páginas informativas (footer / secciones) ── */
.info-page {
    padding: 1.5rem 0 3rem;
    background: var(--bg-primary);
}

.info-page__hero {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
}

.info-page__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.info-page__breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.info-page__breadcrumb a:hover {
    text-decoration: underline;
}

.info-page__breadcrumb-sep {
    opacity: 0.55;
}

.info-page__title {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.info-page__body {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.info-page__card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.page-content {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    word-wrap: break-word;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
    color: var(--text-primary);
    margin: 1.75rem 0 0.85rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.page-content h1:first-child,
.page-content h2:first-child,
.page-content h3:first-child,
.page-content h4:first-child {
    margin-top: 0;
}

.page-content h1 { font-size: 1.75rem; }
.page-content h2 { font-size: 1.45rem; }
.page-content h3 { font-size: 1.2rem; }
.page-content h4 { font-size: 1.05rem; }

.page-content p {
    margin: 0 0 1rem;
}

.page-content ul,
.page-content ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.page-content li {
    margin-bottom: 0.45rem;
}

.page-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.page-content th,
.page-content td {
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.75rem;
    text-align: left;
}

.page-content th {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.page-content blockquote {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--accent);
    background: var(--bg-secondary);
    border-radius: 0 10px 10px 0;
}

.page-content strong,
.page-content b {
    color: var(--text-primary);
}

.light-theme .info-page__card {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .info-page {
        padding-top: 1rem;
    }

    .info-page__card {
        border-radius: 12px;
        padding: 1.1rem;
    }
}