:root {
    --bg-void: #ffffff;
    --bg-panel: #ffffff;
    --bg-surface: #f0f0f0;
    --border: #d1d5db;
    --accent: #4f8cff;
    --accent-dark: #0a1b36;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --font-main: 'Segoe UI', Roboto, sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-main);
}

/* BARRA DE ANUNCIOS SUPERIOR */
.top-bar {
    background-color: var(--accent-dark);
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity var(--transition);
}

.top-bar a:hover {
    opacity: 0.85;
}

/* NAVBAR PRINCIPAL */
#main-navbar {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    height: 76px;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Necesario para que search-drawer (position:absolute) se posicione relativo al header */
    overflow: visible;
}

.container-nav {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
#main-navbar .logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.logo {
    text-decoration: none !important;
    border-bottom: none !important;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .logo-img {
        height: 28px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 24px;
    }
}

/* MENÚ CENTRAL */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-item>a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}

.nav-item:hover>a {
    color: #6b7280;
    background-color: var(--bg-surface);
}

.nav-item .ic-arrow {
    font-size: 10px;
    transition: transform var(--transition);
}

.nav-item:hover .ic-arrow {
    transform: rotate(180deg);
    color: var(--accent);
}

/* MENÚS DESPLEGABLES (DROPDOWNS) */
.dropdown-content {
    position: absolute;
    top: calc(100% - 10px);
    left: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 200px;
    padding: 8px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all var(--transition);
}

.nav-item:hover .dropdown-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    top: calc(100% - 12px);
}

.dropdown-content a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    display: block;
    transition: all var(--transition);
}

.dropdown-content a:hover {
    color: var(--text-primary);
    background-color: #e5e7eb;
    padding-left: 20px;
}

/* ACCIONES DERECHAS */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    height: 38px;
    min-width: 38px;
    padding: 0 12px;
    border-radius: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
}

.action-btn:hover {
    color: #fff;
    background-color: var(--bg-surface);
}

.user-display-name {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-main);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-display-name:empty {
    display: none;
}

/* BOLSA DE COMPRAS */
.cart-icon-wrap {
    position: relative;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.cart-icon-wrap:hover {
    color: #fff;
    background-color: var(--bg-surface);
}

.cart-icon-wrap #cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #f59e0b;
    /* El mismo naranja de notificación */
    color: #000;
    font-size: 10px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════
   ESTILOS DEL SLIDER (HERO CAROUSEL)
═══════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════
   ESTILOS DEL SLIDER - FOTO COMO FONDO COMPLETO
═══════════════════════════════════════════════════ */
.slider-container {
    position: relative;
    width: 100%;
    height: 600px;
    /* ← Le subimos la altura para que respire la foto cuadrada */
    background-color: #070f1e;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Cada diapositiva ahora maneja su propio fondo */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;

    /* CAMBIOS CLAVE PARA ACHICAR LA IMAGEN Y QUE SE VEA COMPLETA */
    background-size: cover;
    /* Reduce la imagen para que quepa entera sin cortarse */
    background-position: left bottom;
    /* Mueve la foto a la derecha para que no se monte con el texto */
    background-repeat: no-repeat;
    /* Evita que la foto se duplique si sobra espacio */
    background-color: #0d0f14;
    /* Color oscuro de respaldo para los bordes vacíos */
}


/* La cortina oscura para que las letras no se pierdan */
.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 11, 14, 0.95) 35%, rgba(10, 11, 14, 0.2) 100%);
    z-index: 2;
}

/* El texto flotando arriba del todo */
.slide-content {
    max-width: 600px;
    position: relative;
    z-index: 3;
    transform: translateY(30px);
    transition: transform 0.6s ease-in-out 0.2s;
}

.slide.active {
    opacity: 1;
    pointer-events: all;
    z-index: 2;
}

/* El texto se posiciona por encima de la capa oscura */
.slide-content {
    max-width: 600px;
    position: relative;
    z-index: 3;
    transform: translateY(30px);
    transition: transform 0.6s ease-in-out 0.2s;
}

.slide.active .slide-content {
    transform: translateY(0);
}

.slide-badge {
    background-color: var(--accent-dark);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(79, 140, 255, 0.2);
}

.slide-content h2 {
    font-size: 46px;
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.slide-content h2 .highlight {
    color: var(--accent);
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-subtitle {
    background-color: rgba(37, 42, 56, 0.6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    backdrop-filter: blur(4px);
}

.slide-features {
    list-style: none;
    margin-bottom: 35px;
}

.slide-features li {
    font-size: 14px;
    color: #b4b9cc;
    /* Un gris más claro para que resalte sobre la foto */
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slide-features li i {
    color: var(--accent);
    font-size: 13px;
}

.slide-btn {
    display: inline-block;
    padding: 14px 36px;
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(79, 140, 255, 0.3);
}

.slide-btn:hover {
    background-color: #3a7aee;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 140, 255, 0.4);
}

/* Eliminamos los estilos del contenedor .slide-image viejo porque ya no lo usamos */
.slide-image {
    display: none;
}

/* FLECHAS Y DOTS CONTINUAN IGUAL */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(24, 27, 34, 0.5);
    border: 1px solid var(--border);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 100;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
}

.slider-arrow:hover {
    background-color: var(--accent);
    border-color: var(--accent);
}

.slider-arrow.prev {
    left: 30px;
}

.slider-arrow.next {
    right: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.dot-indicator {
    width: 8px;
    height: 8px;
    background-color: #3b4252;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
}

.dot-indicator.active {
    background-color: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════
   ESTILOS DE CATEGORÍAS
═══════════════════════════════════════════════════ */
.categories-section {
    padding: 60px 24px;
    background-color: var(--bg-void);
}

.container-cat {
    max-width: 1200px;
    margin: 0 auto;
}


.section-title {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 30px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.cat-card {
    background: linear-gradient(145deg, var(--bg-panel), var(--bg-surface));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(79, 140, 255, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cat-card i {
    font-size: 36px;
    color: var(--accent);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.cat-card span {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    z-index: 1;
}

/* Efecto al pasar el mouse */
.cat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 25px rgba(79, 140, 255, 0.15);
    transform: translateY(-6px);
}

.cat-card:hover::before {
    opacity: 1;
}

.cat-card:hover i {
    transform: scale(1.15) rotate(-3deg);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 40px;
    text-align: center;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE DESIGN (Adaptación a pantallas)
═══════════════════════════════════════════════════ */

/* 1. TABLETS (Pantallas menores a 1024px) */
@media (max-width: 1024px) {
    .container-nav {
        padding: 0 16px;
    }

    .nav-menu {
        gap: 0;
    }

    .nav-item>a {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* 2. CELULARES (Pantallas menores a 768px) */
@media (max-width: 768px) {

    /* Ocultamos el menú principal y el top-bar para liberar espacio */
    .top-bar,
    .nav-menu {
        display: none;
    }

    /* Ajustamos el banner principal */
    .slider-container {
        height: 400px;
    }

    .slide {
        padding: 0 5%;
    }

    .slide-content h2 {
        font-size: 28px;
    }

    /* La cuadrícula de categorías pasa a 2 columnas */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* 3. CELULARES PEQUEÑOS (Pantallas menores a 480px) */
@media (max-width: 480px) {

    /* El banner se hace más pequeño aún */
    .slider-container {
        height: 350px;
    }

    .slide-content {
        max-width: 100%;
        text-align: center;
    }

    .slide-features {
        display: none;
    }

    /* Quitamos detalles para que no se vea lleno */

    /* Las categorías quedan en 1 sola columna vertical */
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════
   MENÚ MÓVIL — HAMBURGUESA
═══════════════════════════════════════════════════ */

/* Botón hamburguesa — oculto en desktop, visible en móvil */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.hamburger:hover {
    color: var(--accent);
    background-color: var(--bg-surface);
}

/* Fondo oscuro semi-transparente */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    display: block;
}

/* Panel lateral del menú móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: 70px;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════════════
   RED DE SEGURIDAD — evita que el menú móvil (o partes
   sueltas de él) se muestren en escritorio, sin importar
   dónde haya quedado ubicado el HTML en el DOM.
═══════════════════════════════════════════════════ */
@media (min-width: 769px) {

    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-nav,
    .mobile-nav-item,
    .mobile-nav-link,
    .mobile-nav-toggle,
    .mobile-nav-sub,
    .mobile-nested-item,
    .mobile-nested-toggle,
    .mobile-nested-sub,
    .hamburger {
        display: none !important;
    }
}

.mobile-menu.active {
    right: 0;
}

/* Botón cerrar (X) */
.close-menu {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.close-menu:hover {
    color: var(--accent);
    background-color: var(--bg-surface);
}

/* Contenedor de navegación dentro del panel */
.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

/* Cada item (con o sin submenú) */
.mobile-nav-item {
    border-bottom: 1px solid var(--border);
}

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

/* Enlace simple (sin submenú) */
.mobile-nav-link {
    display: block;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition);
}

.mobile-nav-link:hover {
    color: var(--accent);
    background-color: var(--bg-surface);
    padding-left: 30px;
}

/* Botón de categorías con submenú (acordeón) */
.mobile-nav-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-main);
}

.mobile-nav-toggle:hover {
    color: var(--accent);
    background-color: var(--bg-surface);
}

.mobile-nav-toggle i {
    font-size: 11px;
    transition: transform var(--transition);
}

.mobile-nav-item.open .mobile-nav-toggle i {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Submenú acordeón (oculto por defecto) */
.mobile-nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background-color: var(--bg-surface);
}

.mobile-nav-item.open .mobile-nav-sub {
    max-height: 800px;
    overflow-y: auto;
}

.mobile-nav-sub a {
    display: block;
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
    border-top: 1px solid var(--border);
}

.mobile-nav-sub a:hover {
    color: var(--accent);
    padding-left: 44px;
}

/* Mostrar hamburguesa solo en móvil */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

.nested-menu summary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
    white-space: nowrap;
    /* Obliga al texto a mantenerse estrictamente en una sola línea */
}

.nested-menu summary::-webkit-details-marker {
    display: none;
}

.nested-menu summary:hover {
    background-color: #f1f1f1;
    /* Ajusta al hover de tu menú */
}

.submenu-content {
    display: flex;
    flex-direction: column;
    background-color: #fafafa;
    width: 100%;
    box-sizing: border-box;
}

.submenu-content a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px 10px 30px !important;
    font-size: 12px;
    color: #6b7280;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;

}

.submenu-content a:hover {
    background-color: #e5e7eb;
    color: #555;
}

.nav-item:hover .nested-menu:not([open]) summary .ic-arrow {
    transform: rotate(0deg) !important;
}

.nested-menu[open] summary .ic-arrow {
    transform: rotate(180deg) !important;
}

/* ═══════════════════════════════════════════════════
   SUBMENÚS ANIDADOS EN MENÚ MÓVIL
═══════════════════════════════════════════════════ */

.mobile-nested-item {
    border-top: 1px solid var(--border);
}

.mobile-nested-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 36px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-main);
}

.mobile-nested-toggle:hover {
    color: var(--accent);
    background-color: rgba(79, 140, 255, 0.1);
}

.mobile-nested-toggle i {
    font-size: 10px;
    transition: transform var(--transition);
}

.mobile-nested-item.open .mobile-nested-toggle i {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Submenú anidado (oculto por defecto) */
.mobile-nested-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background-color: rgba(0, 0, 0, 0.02);
}

.mobile-nested-item.open .mobile-nested-sub {
    max-height: 500px;
    overflow-y: auto;
}

.mobile-nested-sub a {
    display: block;
    padding: 10px 48px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
    border-top: 1px solid var(--border);
}

.mobile-nested-sub a:first-child {
    border-top: none;
}

.mobile-nested-sub a:hover {
    color: var(--accent);
    padding-left: 54px;
    background-color: rgba(79, 140, 255, 0.08);
}

/* Enlace directo dentro del sub (sin sub-sub) */
.mobile-nav-sub-link {
    display: block;
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-top: 1px solid var(--border);
    transition: all var(--transition);
}

.mobile-nav-sub-link:hover {
    color: var(--accent);
    padding-left: 44px;
    background-color: var(--bg-surface);
}

/* Esto hace que la flecha gire automáticamente sin JS cuando el usuario hace clic */
.nested-menu[open] summary .ic-arrow {
    transform: rotate(180deg);
}

/* Opcional: Para quitar el triangulito que pone el navegador por defecto */
.nested-menu summary {
    list-style: none;
    /* En algunos navegadores */
    cursor: pointer;
}

.nested-menu summary::-webkit-details-marker {
    display: none;
    /* Oculta el marcador nativo de Chrome/Safari */
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    font-size: 2.5rem;
    color: var(--text-color);
    /* O el color que uses para tus textos */
    font-weight: 700;
    margin-bottom: 20px;
}

.sort-bar {
    display: flex;
    justify-content: center;
    /* Esto centra todo el bloque */
    align-items: center;
    gap: 700px;
    /* Espacio moderado entre el grupo de Filtros y el grupo de Orden */
    padding: 15px 0;
    margin-bottom: 30px;
    font-family: roboto, sans-serif;
    max-width: 900px;
    /* Limita el ancho para que no se vea tan separado */
    margin-left: auto;
    /* Centra el contenedor en la pantalla */
    margin-right: auto;
}

.filter-controls,
.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Espacio más pequeño entre elementos dentro del mismo grupo */
}

.sort-bar select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
    font-size: 0.85rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    /* Alinea verticalmente el texto y el menú */
    gap: 8px;
    /* Espacio entre el texto y el menú */
    white-space: nowrap;
    /* Evita que "Ordenar por" se rompa en dos líneas */
}

.sort-controls label {
    color: #6b7280 !important;
    /* Color de la letra */
    font-family: roboto, sans-serif !important;
    /* Cambia aquí tu fuente */
    font-size: 14px !important;
    margin: 0 !important;
}

.sort-controls label,
.filter-controls span {
    color: #6b7280;
    /* Usa un gris oscuro en lugar de negro puro para que se vea más profesional */
    /* Puedes usar nombres (red, blue), hex (#ff0000) o rgb */
}

#sort-select {
    border: none !important;
    /* Elimina el borde */
    background-color: transparent !important;
    /* Elimina el fondo gris */
    color: #6b7280 !important;
    /* Color del texto */
    font-family: roboto, sans-serif !important;
    /* Cambia aquí tu fuente */
    font-size: 14px !important;
    font-weight: normal !important;
    cursor: pointer !important;
    appearance: none !important;
    /* Quita el estilo nativo del sistema */
    padding: 2px 5px !important;
    outline: none !important;
}

#sort-select::-ms-expand {
    display: none;
}

/* Opcional: Si quieres que cambie de color al pasar el mouse por encima */
#sort-select:hover {
    color: #6b7280;


}

/* =========================================
   CARRITO LATERAL (SIDEBAR)
   ========================================= */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    /* Oculto por la derecha */
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

/* Clases para activar el carrito con JS */
.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 5px;
}

.cart-item-info p {
    color: #3b82f6;
    font-weight: bold;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 5px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #0f172a;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

.checkout-btn:hover {
    background: #3b82f6;
}

/* Estilos para el overlay (fondo oscurecido) */

/* ═══════════════════════════════════════════════════
   CATÁLOGO — SECCIÓN
═══════════════════════════════════════════════════ */
.catalog-section {
    padding: 60px 24px 80px;
    background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
}

/* ── TABS ── */
.catalog-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.catalog-tab {
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
}

.catalog-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.catalog-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 140, 255, .35);
}

.tab-count {
    background: rgba(255, 255, 255, .25);
    border-radius: 50px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
}

.catalog-tab:not(.active) .tab-count {
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
}

@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 9px;
    }
}

@media (max-width: 800px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (max-width: 540px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }
}

@media (max-width: 340px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ── PÁGINAS DE CATEGORÍA: productos más grandes ──────────────
   Aplica solo cuando el grid tiene data-category (monocontrol,
   AguaFria, Extensible, Duchas*) — el index NO tiene este atributo.
   ──────────────────────────────────────────────────────────── */
.product-grid[data-category] {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1280px;
}

@media (max-width: 1400px) {
    .product-grid[data-category] {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

@media (max-width: 1100px) {
    .product-grid[data-category] {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 800px) {
    .product-grid[data-category] {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 540px) {
    .product-grid[data-category] {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 340px) {
    .product-grid[data-category] {
        grid-template-columns: 1fr;
    }
}

/* Tarjeta más grande en páginas de categoría */
.product-grid[data-category] .product-card-img-wrap {
    aspect-ratio: 4/3;
}

.product-grid[data-category] .product-card-body {
    padding: 14px 16px 16px;
    gap: 6px;
}

.product-grid[data-category] .product-card-title {
    font-size: 14px;
}

.product-grid[data-category] .product-card-price {
    font-size: 16px;
}

.product-grid[data-category] .product-category-tag {
    font-size: 10px;
}

.product-grid[data-category] .card-ref {
    font-size: 11px;
    padding: 3px 9px;
}

.product-grid[data-category] .card-add-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.product-grid[data-category] .card-acabado {
    font-size: 12px;
}

.product-grid[data-category] .acabado-dot {
    width: 10px;
    height: 10px;
}

.grid-empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ── TARJETA ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

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

.product-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    animation: fadeInUp 0.45s ease both;
    transition: transform 0.28s cubic-bezier(.4, 0, .2, 1),
        box-shadow 0.28s cubic-bezier(.4, 0, .2, 1),
        border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(79, 140, 255, .14), 0 4px 12px rgba(0, 0, 0, .06);
    border-color: rgba(79, 140, 255, .35);
}

/* Shimmer layer */
.card-shimmer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 10px;
    transition: background 0.15s;
    z-index: 2;
}

/* Image wrap */
.product-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f5f9;
}

.product-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
    transition: transform 0.45s cubic-bezier(.4, 0, .2, 1);
}

.product-card:hover .product-card-img-wrap img {
    transform: scale(1.05);
}

/* Overlay on hover */
.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 27, 54, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
    backdrop-filter: blur(2px);
}

.product-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay-btn {
    background: #fff;
    color: var(--accent);
    border: none;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 22px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-overlay-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* Ref badge */
.card-ref {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(15, 23, 42, .7);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50px;
    letter-spacing: .5px;
    backdrop-filter: blur(4px);
}

/* Body */
.product-card-body {
    padding: 7px 9px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.product-category-tag {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: var(--accent);
}

.product-card-title {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-acabado {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-secondary);
}

.acabado-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .1);
    flex-shrink: 0;
}

.card-stock-low {
    font-size: 8.5px;
    font-weight: 700;
    color: #ef4444;
    background: #fef2f2;
    padding: 1px 6px;
    border-radius: 50px;
    width: fit-content;
}

.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.product-card-price {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
}

.card-add-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.card-add-btn:hover {
    background: #3a7aee;
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════
   MODAL DE DETALLE DE PRODUCTO
═══════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 17, 40, .7);
    backdrop-filter: blur(6px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn .22s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 940px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn .28s cubic-bezier(.34, 1.56, .64, 1);
    padding: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    z-index: 10;
}

.modal-close:hover {
    background: #ef4444;
    color: #fff;
}

.modal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 0 18px;
    font-family: var(--font-main);
    transition: gap .2s;
}

.modal-back-btn:hover {
    gap: 12px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 680px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 16px;
        border-radius: 14px;
    }
}

/* Gallery */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-main-img {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 4/3;
}

.modal-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .18s;
}

.gallery-arr {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, .6);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background .2s;
    z-index: 2;
}

.gallery-arr:hover {
    background: var(--accent);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gal-counter {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(15, 23, 42, .65);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.modal-thumbs {
    display: flex;
    gap: 8px;
}

.modal-thumb {
    width: 64px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .2s;
    flex-shrink: 0;
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumb.active {
    border-color: var(--accent);
}

.modal-thumb:hover {
    border-color: rgba(79, 140, 255, .5);
}

/* Details */
.modal-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-prod-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0;
}

.modal-price-tag {
    font-size: 2rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -1px;
}

.modal-specs {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row span {
    color: var(--text-secondary);
}

.spec-row strong {
    color: #0f172a;
    font-weight: 700;
}

.spec-warn {
    color: #ef4444 !important;
}

.modal-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

/* Qty row */
.modal-qty-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.modal-qty-row label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.qty-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: var(--bg-surface);
    border: none;
    width: 36px;
    height: 36px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    color: #0f172a;
}

.qty-btn:hover {
    background: #e2e8f0;
}

#cantidad-input {
    width: 48px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    height: 36px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    outline: none;
    background: #fff;
}

.qty-hint {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Add to cart btn */
.modal-btn-add {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1d4ed8 0%, var(--accent) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-main);
    transition: all .25s;
    box-shadow: 0 6px 20px rgba(79, 140, 255, .35);
    letter-spacing: .3px;
}

.modal-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(79, 140, 255, .45);
}

.modal-btn-add:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   BURBUJA POST-CARRITO
═══════════════════════════════════════════════════ */
.post-cart-bubble {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(.96);
    transition: opacity .3s, transform .3s cubic-bezier(.34, 1.56, .64, 1);
    pointer-events: none;
}

.post-cart-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.bubble-inner {
    background: rgba(15, 23, 42, .92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    padding: 24px 28px;
    min-width: 300px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.bubble-icon {
    font-size: 2.2rem;
    color: #22c55e;
    animation: bounceIn .5s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes bounceIn {
    from {
        transform: scale(.5);
    }

    to {
        transform: scale(1);
    }
}

.bubble-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.bubble-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, .65);
    margin: 0;
}

.bubble-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
}

.bubble-btn-sec,
.bubble-btn-pri {
    border: none;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-main);
    transition: all .2s;
}

.bubble-btn-sec {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .15);
}

.bubble-btn-sec:hover {
    background: rgba(255, 255, 255, .18);
}

.bubble-btn-pri {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 140, 255, .4);
}

.bubble-btn-pri:hover {
    background: #3a7aee;
    transform: translateY(-1px);
}

/* Carrito vacío */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: #94a3b8;
    text-align: center;
}

.cart-empty i {
    font-size: 3rem;
    color: #cbd5e1;
}

.cart-empty p {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.cart-empty small {
    font-size: .82rem;
}

@media (max-width: 480px) {
    .post-cart-bubble {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .bubble-inner {
        min-width: unset;
    }
}

/* =====================================================
   FOOTER E-COMMERCE — compartido por index.html y producto.html
   ===================================================== */
.site-footer {
    background: #0d1117;
    color: #9ca3af;
    font-size: 14px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.footer-top {
    padding: 64px 24px 48px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -.5px;
}

.footer-logo i {
    color: #4f8cff;
    margin-right: 4px;
}

.footer-logo .dot {
    color: #a78bfa;
}

.footer-tagline {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 13px;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    font-size: 15px;
    transition: all .25s;
}

.footer-socials a:hover {
    background: #4f8cff;
    color: #fff;
    border-color: #4f8cff;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
}

.footer-col ul li a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: color .25s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.contact-list {
    gap: 14px !important;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}

.contact-list li i {
    color: #4f8cff;
    font-size: 15px;
    margin-top: 2px;
    width: 16px;
    flex-shrink: 0;
}

.contact-list li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color .25s;
}

.contact-list li a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 20px 24px;
    background: rgba(0, 0, 0, .3);
}

.footer-bottom-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copy {
    font-size: 12px;
    color: #4b5563;
}

.footer-payment {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #4b5563;
}

.footer-payment i {
    font-size: 22px;
    color: #6b7280;
    transition: color .25s;
}

.footer-payment i:hover {
    color: #fff;
}

@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: unset;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   MODAL DE CHECKOUT (DATOS DE ENVÍO)
   ========================================= */
.checkout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 12px;
    z-index: 10002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.checkout-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3b82f6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkout-submit-btn {
    width: 100%;
    padding: 15px;
    background: #25D366;
    /* Color de WhatsApp */
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.checkout-submit-btn:hover {
    background: #1ebc5a;
}

/* =========================================
   BOTÓN DE UBICACIÓN EN NAVBAR
   ========================================= */
.loc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-family: var(--font-main);
    white-space: nowrap;
    height: 42px;
}

.loc-btn:hover {
    background: #f8fafc;
    border-color: var(--accent);
    color: var(--accent);
}

.loc-btn:hover .loc-btn-city {
    color: var(--accent);
}

.loc-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.loc-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.loc-btn-label {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    margin: 0;
}

.loc-btn-city {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.22s;
}

/* Ocultar texto en móvil, solo ícono */
@media (max-width: 768px) {
    .loc-btn-text {
        display: none;
    }

    .loc-btn {
        padding: 6px 8px;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
}

/* =========================================
   OVERLAY Y MODAL DE UBICACIÓN
   ========================================= */
.loc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.45);
    backdrop-filter: blur(3px);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loc-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loc-modal {
    position: fixed;
    top: 86px;
    /* justo debajo del navbar */
    right: 24px;
    width: 360px;
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(10, 27, 54, 0.15), 0 4px 16px rgba(10, 27, 54, 0.08);
    z-index: 9001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px) scale(0.97);
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.loc-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* Flecha decorativa apuntando hacia el botón */
.loc-modal::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 60px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-top: 1px solid #e8edf5;
    border-left: 1px solid #e8edf5;
    transform: rotate(45deg);
    border-radius: 2px;
}

.loc-modal-inner {
    padding: 24px;
}

.loc-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.loc-modal-sub {
    font-size: 12.5px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Grupos del formulario */
.loc-form-group {
    margin-bottom: 14px;
}

.loc-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.loc-required {
    color: var(--accent);
}

.loc-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.loc-select-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
    z-index: 1;
}

.loc-select {
    width: 100%;
    padding: 11px 36px 11px 34px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    background: #f8fafc;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: var(--font-main);
    outline: none;
    /* Flecha custom a la derecha */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.loc-select:focus {
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}

.loc-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spinner de carga dentro del select */
.loc-loading-msg {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.loc-loading-msg i {
    animation: loc-spin 1s linear infinite;
}

@keyframes loc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hint de info */
.loc-hint {
    font-size: 11.5px;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 16px 0 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.loc-hint i {
    color: var(--accent);
    font-size: 12px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Fila de botones */
.loc-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.loc-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 10px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.loc-btn-secondary {
    background: #f1f5f9;
    color: #374151;
    border: 1.5px solid #e2e8f0;
}

.loc-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.loc-btn-secondary:active {
    transform: scale(0.97);
}

.loc-btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 140, 255, 0.3);
}

.loc-btn-primary:hover {
    background: #3a7aee;
    box-shadow: 0 6px 20px rgba(79, 140, 255, 0.4);
    transform: translateY(-1px);
}

.loc-btn-primary:active {
    transform: scale(0.97) translateY(0);
}

/* Toast de confirmación */
.loc-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: #fff;
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.loc-toast i {
    color: #4ade80;
}

.loc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive: modal full width en móvil */
@media (max-width: 480px) {
    .loc-modal {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
    }

    .loc-modal::before {
        display: none;
    }
}

/* =========================================
   SEARCH DRAWER — CORTINA BUSCADOR
   ========================================= */
/* =========================================
   SEARCH — BUSCADOR DROPDOWN COMPACTO
   =========================================
   INSTRUCCIONES: Reemplaza el bloque existente
   "SEARCH DRAWER — CORTINA BUSCADOR" hasta el
   final de .search-overlay en tu styles.css
   con este bloque completo.
   ========================================= */

/* ---- SEARCH DRAWER (barra dentro del navbar) ---- */
.search-drawer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    gap: 12px;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.4s cubic-bezier(0.77, 0, 0.175, 1),
        visibility 0s linear 0.4s;
    visibility: hidden;
    pointer-events: none;
    overflow: visible;
    isolation: isolate;
}

.search-drawer.active {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    pointer-events: all;
    transition: clip-path 0.4s cubic-bezier(0.77, 0, 0.175, 1),
        visibility 0s linear 0s;
}

/* ---- CONTENEDOR INTERNO (solo ancla el input) ---- */
.search-inner {
    position: static;
    /* ← ya no ancla el dropdown */
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
}

/* ---- INPUT WRAPPER ---- */
.search-input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    background: #f5f6f8;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
    background: #ffffff;
}

.search-input-wrapper::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--text-secondary);
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 13px 0;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
}

#search-input::placeholder {
    color: #adb5bd;
}

#close-search {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 6px;
    transition: color 0.2s, background 0.2s;
}

#close-search:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

/* ---- DROPDOWN DE SUGERENCIAS ---- */
/*
  position: fixed anclado al BORDE INFERIOR del navbar.
  top: 100% del navbar (sticky top:0, height:76px) = 76px desde el top de la ventana.
  Se centra horizontalmente con left:50% + translateX(-50%).
*/
#search-suggestions {
    position: fixed;
    top: 76px;
    /* = altura de #main-navbar; ajusta si tienes top-bar visible: 76+38=114px */
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    width: 860px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14),
        0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 1999;
    /* debajo del search-drawer (2000) pero encima de todo lo demás */
    overflow: hidden;

    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

#search-suggestions.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

/* Cabecera "Sugerencias" */
.suggestions-header {
    padding: 18px 24px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1px;
    border-bottom: 1px solid #f0f0f0;
}

/* Grid 2 columnas */
.suggestions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px 24px 24px;
    max-height: 440px;
    overflow-y: auto;
}

/* Cada tarjeta */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    color: var(--text-primary);
    font-family: var(--font-main);
    text-decoration: none;
}

.suggestion-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(79, 140, 255, 0.1);
    background: #fafbff;
}

.suggestion-item img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 8px;
    background: #f5f6f8;
    padding: 8px;
    flex-shrink: 0;
}

.suggestion-item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.suggestion-item-ref {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.suggestion-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 2px;
}

/* Sin resultados */
.suggestions-empty {
    padding: 32px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
}

/* ---- OVERLAY OSCURO ---- */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 27, 54, 0.52);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1499;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

/* =========================================
   MENÚ DESPLEGABLE DE USUARIO
   ========================================= */
.user-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 220px;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-weight: 700;
}

.drop-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transition: 0.2s;
    font-family: var(--font-main);
}

.drop-btn:last-child {
    margin-bottom: 0;
}

.drop-login {
    background: #0a1b36;
    color: #fff;
    border: 1px solid #0a1b36;
}

.drop-logout {
    background: #ffffff;
    color: #c0392b;
    border: 1px solid #c0392b;
    display: none;
}

.drop-logout:hover {
    background: #c0392b;
    color: #fff;
}

.drop-login:hover {
    background: #1a2d4e;
}

.drop-register {
    background: #fff;
    color: #0a1b36;
    border: 1px solid #0a1b36;
}

.drop-register:hover {
    background: #f9f9f9;
}

/* =========================================
   MODAL DE AUTENTICACIÓN (LOGIN / REGISTRO)
   ========================================= */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: #fff;
    width: 850px;
    max-width: 95vw;
    height: 450px;
    display: flex;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-overlay.active .auth-modal {
    transform: scale(1) translateY(0);
}

.auth-image {
    width: 50%;
    height: 100%;
    flex-shrink: 0;
}

.auth-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-form-container {
    width: 50%;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.auth-form-container h2 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1f2937;
}

.auth-form-container p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.auth-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s, background 0.3s;
    font-family: var(--font-main);
}

.auth-option:hover {
    border-color: #000;
    background: #fafafa;
}

.auth-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    outline: none;
    font-size: 14px;
    font-family: var(--font-main);
    transition: border-color 0.2s;
}

.auth-input:focus {
    border-color: #000;
}

/* ── Validación en tiempo real: contraseña ── */
.auth-input--error {
    border-color: #d32f2f !important;
}

.auth-input--ok {
    border-color: #2e7d32 !important;
}

.password-hint {
    display: none;
    font-size: 12px;
    margin-top: -10px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.password-hint.visible {
    display: block;
    color: #d32f2f;
}

.auth-btn-submit {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    font-family: var(--font-main);
    transition: background 0.2s;
}

.auth-btn-submit:hover {
    background: #333;
}

.close-auth {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000;
    z-index: 10;
    line-height: 1;
}

.close-auth:hover {
    color: #555;
}

/* Responsive: modal auth en móvil */
@media (max-width: 640px) {
    .auth-modal {
        height: auto;
        flex-direction: column;
    }

    .auth-image {
        width: 100%;
        height: 180px;
    }

    .auth-form-container {
        width: 100%;
        padding: 30px 24px;
    }
}


/* --- ESTILO PARA EL BOTÓN VOLVER --- */
.auth-link-back {
    background: transparent;
    border: none;
    color: #71717a;
    /* Un gris sofisticado y suave */
    font-size: 0.85rem;
    /* Un poco más pequeño que el texto normal */
    cursor: pointer;
    margin-top: 15px;
    padding: 8px;
    width: 100%;

    /* Centrado perfecto */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Espacio sutil entre la flecha y la palabra */

    /* Transiciones suaves para el hover */
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse por encima */
.auth-link-back:hover {
    color: #1a1a1a;
    /* Se oscurece para indicar que es clickeable */
    transform: translateX(-4px);
    /* Pequeño y elegante movimiento hacia la izquierda */
}

/* =========================================
   LOGO-LINK (para cuando el logo sea un <a>)
   ========================================= */
.logo-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.logo-link:hover,
.logo-link:visited,
.logo-link:active {
    color: inherit;
}

/* =========================================
   FIX Z-INDEX SUBMENÚS (SIEMPRE CLICKABLES)
   ========================================= */
.submenu-content a,
.mobile-nav-sub a {
    position: relative;
    z-index: 9999;
    display: block;
    pointer-events: auto;
}

/* Esto evita que cualquier elemento se salga de la pantalla horizontalmente */
html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* =========================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================= */
.wa-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    /* Animación de entrada */
    animation: wa-entry 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes wa-entry {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }

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

/* El círculo verde */
.wa-float-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.25s ease;
    flex-shrink: 0;
}

.wa-float-btn img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
}

/* Pulso verde animado detrás del botón */
.wa-float-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.35);
    animation: wa-pulse 2.2s ease-out infinite;
    z-index: -1;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    70% {
        transform: scale(1.5);
        opacity: 0;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.wa-float:hover .wa-float-btn {
    transform: scale(1.1);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
}

/* Tooltip (etiqueta "Escríbenos") */
.wa-float-label {
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-main);
    padding: 8px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.wa-float:hover .wa-float-label {
    opacity: 1;
    transform: translateX(0);
}

/* En móvil: ocultar el tooltip para no invadir espacio */
@media (max-width: 480px) {
    .wa-float {
        bottom: 20px;
        right: 20px;
    }

    .wa-float-btn {
        width: 52px;
        height: 52px;
    }

    .wa-float-btn img {
        width: 32px;
        height: 32px;
    }

    .wa-float-label {
        display: none;
    }
}

#auth-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1f2937;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: var(--font-main, sans-serif);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 99999;
    max-width: 90vw;
    text-align: center;
}

#auth-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =========================================
   ESTILOS DE LA PÁGINA DE PAGO (pago.css)
   ========================================= */

.pago-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 60vh;
}

.pago-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.pago-back:hover {
    color: #0f172a;
}

/* --- INDICADOR DE PASOS --- */
.pago-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1rem;
}

.pago-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
}

.pago-step.active {
    color: #0f172a;
}

.pago-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.pago-step.active .pago-step-circle {
    background-color: #0f172a;
    color: #ffffff;
}

.pago-step-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.pago-step-line {
    height: 2px;
    width: 60px;
    background-color: #e2e8f0;
    margin-bottom: 1.5rem;
}

.pago-title {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 2rem;
}

/* --- GRID PRINCIPAL --- */
.pago-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

/* --- CAJAS COMUNES --- */
.pago-products-box,
.pago-summary-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.pago-products-header,
.pago-summary-header {
    padding: 1.25rem 1.5rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#pago-items {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- RESUMEN DE COMPRA --- */
.pago-summary-body {
    padding: 1.5rem;
}

.pago-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #475569;
}

.pago-summary-row strong {
    color: #0f172a;
}

.pago-summary-note {
    font-size: 0.8rem;
    color: #64748b;
    margin: 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.pago-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

/* --- CUPÓN --- */
.pago-cupon {
    margin-bottom: 1.5rem;
}

.pago-cupon label {
    display: block;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.pago-cupon-row {
    display: flex;
    gap: 0.5rem;
}

.pago-cupon-row input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    font-family: inherit;
}

.pago-cupon-row input:focus {
    border-color: #0f172a;
}

.pago-cupon-row button {
    background-color: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 0 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pago-cupon-row button:hover {
    background-color: #e2e8f0;
}

/* --- BOTÓN WHATSAPP --- */
.pago-btn-iniciar {
    width: 100%;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.pago-btn-iniciar:hover {
    background-color: #1ea952;
}

/* --- ESTADO VACÍO --- */
.pago-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.pago-empty i.fa-bag-shopping {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.pago-empty p {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.pago-empty small {
    display: block;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.pago-empty a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #0f172a;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.pago-empty a:hover {
    background-color: #1e293b;
}

/* --- ESTILOS DE LOS ITEMS INYECTADOS POR JS --- */
.pago-item-card {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.pago-item-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pago-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.pago-item-details {
    flex: 1;
}

.pago-item-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.pago-item-ref {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.pago-item-price {
    font-weight: 600;
    color: #0f172a;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .pago-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .pago-steps {
        gap: 0.5rem;
    }

    .pago-step-line {
        width: 30px;
    }

    .pago-content {
        padding: 1rem;
    }

    .pago-item-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   GRIVENZA — MOBILE RESPONSIVE FIXES
   Agrega este archivo DESPUÉS de styles.css y productos.css
   <link rel="stylesheet" href="../src/css/mobile-fixes.css">
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   1. PREVENIR SCROLL HORIZONTAL EN TODO EL SITIO
   ───────────────────────────────────────────────────────────────── */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    min-width: 0;
    /* Evita que flex/grid items desborden su contenedor */
}

/* ─────────────────────────────────────────────────────────────────
   2. NAVBAR — FIX HAMBURGUESA + LAYOUT MÓVIL
   ───────────────────────────────────────────────────────────────── */

/* El contenedor del nav no puede desbordar */
#main-navbar {
    overflow: visible;
    width: 100%;
    max-width: 100vw;
}

.container-nav {
    width: 100%;
    max-width: 1400px;
    padding: 0 16px;
    overflow: visible;
}

/* Hamburguesa: oculta en desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    position: relative;
}

/* ─────────────────────────────────────────────────────────────────
   3. SORT-BAR & FILTROS — ARREGLO DEL GAP MASIVO
   ───────────────────────────────────────────────────────────────── */
.sort-bar {
    display: flex;
    justify-content: space-between;
    /* en lugar de center + gap:700px */
    align-items: center;
    gap: 16px;
    /* gap razonable */
    padding: 12px 16px;
    margin-bottom: 24px;
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
}

.filter-controls,
.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────────
   4. CONTENT WRAPPER — EVITAR DESBORDE
   ───────────────────────────────────────────────────────────────── */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
}

/* ─────────────────────────────────────────────────────────────────
   5. SLIDER / HERO — ADAPTAR A MÓVIL
   ───────────────────────────────────────────────────────────────── */
.slider-container {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.slide {
    padding: 0 5%;
}

/* ─────────────────────────────────────────────────────────────────
   6. PRODUCT GRID — width handled by main definition
   ───────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────
   7. SEARCH SUGGESTIONS — NO DESBORDAR EN MÓVIL
   ───────────────────────────────────────────────────────────────── */
#search-suggestions {
    max-width: calc(100vw - 24px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
}

#search-suggestions.visible {
    transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────────────────────────
   8. FOOTER — PREVENIR DESBORDE
   ───────────────────────────────────────────────────────────────── */
.site-footer {
    width: 100%;
    overflow-x: hidden;
}

.footer-inner {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════
   MEDIA QUERIES
   ═══════════════════════════════════════════════════════════════════ */

/* ── TABLETS (≤ 1024px) ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .container-nav {
        padding: 0 16px;
    }

    .nav-menu {
        gap: 0;
    }

    .nav-item>a {
        padding: 10px 8px;
        font-size: 13px;
    }

    .sort-bar {
        gap: 12px;
        padding: 12px 12px;
    }
}

/* ── MÓVIL (≤ 768px) ────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* — Navbar — */
    .top-bar {
        display: none;
        /* Ocultar top-bar para liberar espacio */
    }

    .nav-menu {
        display: none !important;
        /* Ocultar menú desktop */
    }

    /* HAMBURGUESA: siempre visible y bien posicionada */
    .hamburger,
    #btn-hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        z-index: 1001;
    }

    .container-nav {
        padding: 0 12px;
        gap: 8px;
    }

    /* Acciones del navbar no se apilan */
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    /* El logo no ocupa todo el espacio */
    #main-navbar .logo {
        font-size: 17px;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* — Slider / Hero — */
    .slider-container {
        height: 380px;
    }

    .slide {
        padding: 0 5%;
        background-size: cover;
        background-position: center;
    }

    .slide::before {
        background: linear-gradient(180deg, rgba(10, 11, 14, 0.85) 0%, rgba(10, 11, 14, 0.5) 100%);
    }

    .slide-content {
        max-width: 100%;
        text-align: left;
    }

    .slide-content h2 {
        font-size: 26px;
        letter-spacing: -0.5px;
    }

    .slide-badge {
        font-size: 10px;
        padding: 4px 10px;
    }

    .slide-subtitle {
        font-size: 13px;
    }

    /* — Categorías — */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* — Sort-bar / Filtros — */
    .sort-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
        width: 100%;
        margin-bottom: 16px;
    }

    .filter-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sort-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .sort-bar select,
    #sort-select {
        width: auto;
        max-width: 180px;
    }

    /* — Product Grid — responsive handled by main grid definition above — */

    /* — Content Wrapper — */
    .content-wrapper {
        padding: 16px 12px;
    }

    .page-title {
        font-size: 1.6rem;
    }

    /* — Auth Modal — */
    .auth-modal {
        height: auto;
        flex-direction: column;
        max-width: 95vw;
    }

    .auth-image {
        width: 100%;
        height: 160px;
    }

    .auth-form-container {
        width: 100%;
        padding: 24px 20px;
    }

    /* — Search suggestions — */
    #search-suggestions {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        border-radius: 10px;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 16px 18px;
    }

    /* — Producto hero — */
    .prod-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .prod-gallery {
        position: static;
    }

    .prod-name {
        font-size: 22px;
    }

    .prod-price {
        font-size: 28px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .prod-buy-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-add-cart {
        min-width: unset;
        width: 100%;
    }

    /* — Related grid — */
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* — Footer — */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-brand {
        grid-column: unset;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    /* — Post-cart bubble — */
    .post-cart-bubble {
        right: 12px;
        left: 12px;
        bottom: 20px;
    }

    .bubble-inner {
        min-width: unset;
        padding: 20px 18px;
    }

    /* — Pago grid — */
    .pago-grid {
        grid-template-columns: 1fr;
    }

    .pago-content {
        padding: 16px 12px;
    }

    /* — Location modal — */
    .loc-modal {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
    }

    .loc-modal::before {
        display: none;
    }

    /* — Loc button — */
    .loc-btn-text {
        display: none;
    }

    .loc-btn {
        padding: 6px 8px;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
}

/* ── MÓVIL PEQUEÑO (≤ 480px) ────────────────────────────────────── */
@media (max-width: 480px) {

    /* — Navbar — */
    .container-nav {
        padding: 0 10px;
    }

    #main-navbar .logo {
        font-size: 15px;
    }

    .nav-actions {
        gap: 4px;
    }

    .action-btn {
        padding: 0 8px;
        min-width: 34px;
        height: 34px;
        font-size: 14px;
    }

    /* — Slider — */
    .slider-container {
        height: 320px;
    }

    .slide-content h2 {
        font-size: 21px;
    }

    .slide-features {
        display: none;
    }

    .slide-btn {
        padding: 11px 24px;
        font-size: 12px;
    }

    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .slider-arrow.prev {
        left: 10px;
    }

    .slider-arrow.next {
        right: 10px;
    }

    /* — Categorías — */
    .categories-section {
        padding: 36px 12px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cat-card {
        padding: 20px 12px;
        gap: 10px;
    }

    .cat-card i {
        font-size: 26px;
    }

    .cat-card span {
        font-size: 12px;
    }

    /* — Catalog tabs — */
    .catalog-tabs {
        gap: 6px;
        margin-bottom: 24px;
    }

    .catalog-tab {
        font-size: 12px;
        padding: 8px 14px;
    }

    /* — Product grid: responsive handled by main definition — */

    /* — Sort-bar — */
    .sort-bar {
        padding: 10px;
    }

    .filter-controls span {
        font-size: 13px;
    }

    /* — Catalog section — */
    .catalog-section {
        padding: 32px 12px 48px;
    }

    /* — WhatsApp float — */
    .wa-float {
        bottom: 16px;
        right: 16px;
    }

    .wa-float-btn {
        width: 52px;
        height: 52px;
    }

    .wa-float-btn img {
        width: 30px;
        height: 30px;
    }

    .wa-float-label {
        display: none;
    }

    /* — Post-cart bubble — */
    .post-cart-bubble {
        right: 8px;
        left: 8px;
        bottom: 16px;
    }

    /* — Pago steps — */
    .pago-steps {
        gap: 4px;
    }

    .pago-step-line {
        width: 20px;
    }

    .pago-step-label {
        font-size: 11px;
    }

    .pago-step-circle {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* — Auth modal — */
    .auth-image {
        height: 120px;
    }

    .auth-form-container {
        padding: 20px 16px;
    }

    .auth-form-container h2 {
        font-size: 20px;
    }

    /* — Producto relacionados — */
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rel-card-body h3 {
        font-size: 13px;
    }

    .rel-card-price {
        font-size: 14px;
    }

    /* — Checkout modal — */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* — Footer — */
    .footer-top {
        padding: 40px 16px 32px;
    }

    .footer-inner {
        gap: 24px;
    }
}

/* ── LANDSCAPE MÓVIL (orientación horizontal) ───────────────────── */
@media (max-width: 768px) and (orientation: landscape) {

    .slider-container {
        height: 240px;
    }

    .slide-content h2 {
        font-size: 20px;
    }

    .slide-features {
        display: none;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* product-grid landscape: handled by main responsive definition */

    .auth-modal {
        flex-direction: row;
        height: 90vh;
    }

    .auth-image {
        width: 40%;
        height: 100%;
    }

    .auth-form-container {
        width: 60%;
        padding: 20px 24px;
        overflow-y: auto;
    }
}

/* ── TABLET LANDSCAPE (768px – 1024px) ─────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {

    /* product-grid tablet: handled by main responsive definition */

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sort-bar {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .pago-grid {
        grid-template-columns: 1fr 340px;
    }
}

/* ═══════════════════════════════════════════════════
   FILTRAR Y ORDENAR — SIDEBAR VERTICAL IZQUIERDO
   ═══════════════════════════════════════════════════ */

/* ── Layout wrapper: sidebar izquierdo + grid derecho ── */
.catalog-layout-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
}

/* ── Overlay del sidebar ── */
.filter-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1200;
    backdrop-filter: blur(2px);
}

.filter-sidebar-overlay.active {
    display: block;
}

/* ── Botón de abrir filtros (alineado con los productos) ── */
.mobile-filter-btn-wrap {
    display: flex;
    max-width: 1280px;
    /* Ancho máximo igual al grid de categorías */
    margin: 0 auto 24px auto;
    padding: 0 16px;
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
}

.mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.mobile-filter-btn .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.mobile-filter-btn .btn-icon-close {
    display: none;
}

.mobile-filter-btn:hover {
    border-color: var(--accent, #4f8cff);
    color: var(--accent, #4f8cff);
    background: rgba(79, 140, 255, 0.05);
}

.mobile-filter-btn.active {
    background: var(--accent, #4f8cff);
    border-color: var(--accent, #4f8cff);
    color: #ffffff;
}

.mobile-filter-btn.active .btn-icon-open {
    display: none;
}

.mobile-filter-btn.active .btn-icon-close {
    display: block;
}

/* Punto naranja si hay filtro activo */
.mobile-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    position: absolute;
    top: 7px;
    right: 7px;
    display: none;
}

.mobile-filter-dot.visible {
    display: block;
}

/* ── SIDEBAR PANEL (vertical, a la izquierda) ── */
.mobile-filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 300px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Header del sidebar */
.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.filter-panel-header-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-panel-header-title i {
    color: var(--accent, #4f8cff);
    font-size: 14px;
}

.filter-panel-close-x {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.filter-panel-close-x:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Cuerpo scrollable del sidebar */
.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Animación de entrada */
@keyframes mf-slideLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

/* Etiqueta de sección */
.panel-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    font-family: var(--font-main);
    margin-bottom: 10px;
}

/* Select de orden dentro del panel */
.panel-sort-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-main);
    color: var(--text-primary);
    background: #f9fafb;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    outline: none;
    transition: border-color 0.2s;
}

.panel-sort-select:focus {
    border-color: var(--accent, #4f8cff);
    background-color: #ffffff;
}

/* Tabs de categoría dentro del panel */
.panel-filter-tabs {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.panel-filter-tabs .catalog-tab {
    text-align: left;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-filter-tabs .catalog-tab:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.panel-filter-tabs .catalog-tab.active {
    background: var(--accent, #4f8cff);
    border-color: var(--accent, #4f8cff);
    color: #ffffff;
}

.panel-filter-tabs .catalog-tab .tab-count {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 400;
}

/* Divisor horizontal entre secciones del panel */
.panel-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0 -20px;
}

/* Contenedor de cada sección de filtro */
.panel-filter-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─────────────────────────────────────────────────
   SLIDER DUAL DE PRECIO (range)
   ───────────────────────────────────────────────── */
.price-slider-wrapper {
    padding: 8px 0 4px;
}

.price-slider-track {
    position: relative;
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 16px 0 8px;
}

.price-slider-range {
    position: absolute;
    height: 100%;
    background: var(--accent, #4f8cff);
    border-radius: 4px;
    pointer-events: none;
}

/* Inputs range superpuestos */
.price-slider-inputs {
    position: relative;
    height: 0;
}

.price-range-input {
    position: absolute;
    top: -16px;
    width: 100%;
    height: 4px;
    background: none;
    outline: none;
    appearance: none;
    pointer-events: none;
    margin: 0;
}

.price-range-input::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid var(--accent, #4f8cff);
    box-shadow: 0 2px 8px rgba(79, 140, 255, 0.25);
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.15s, box-shadow 0.15s;
}

.price-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid var(--accent, #4f8cff);
    box-shadow: 0 2px 8px rgba(79, 140, 255, 0.25);
    cursor: pointer;
    pointer-events: all;
}

.price-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.18);
    box-shadow: 0 2px 12px rgba(79, 140, 255, 0.4);
}

/* Labels de valor mínimo y máximo */
.price-slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    gap: 8px;
}

.price-slider-value {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    font-family: var(--font-main);
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 10px;
    min-width: 80px;
    text-align: center;
}

.price-slider-sep {
    font-size: 13px;
    color: #d1d5db;
    flex-shrink: 0;
}

/* ── Pills de color ──────────────────────────── */
.panel-color-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.panel-color-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    font-size: 12px;
    font-family: var(--font-main);
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
    user-select: none;
}

.panel-color-pill:hover {
    border-color: var(--accent, #4f8cff);
    background: rgba(79, 140, 255, 0.06);
    color: var(--accent, #4f8cff);
}

.panel-color-pill.active {
    background: var(--accent, #4f8cff);
    border-color: var(--accent, #4f8cff);
    color: #ffffff;
}

/* ── Switches de disponibilidad ──────────────── */
.panel-availability {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 3px 0;
}

.panel-switch-label {
    font-size: 14px;
    font-family: var(--font-main);
    color: var(--text-primary, #111827);
    font-weight: 500;
}

.panel-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.panel-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.panel-switch-thumb {
    position: absolute;
    inset: 0;
    background: #e5e7eb;
    border-radius: 22px;
    transition: background 0.2s;
    cursor: pointer;
}

.panel-switch-thumb::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.panel-switch-input:checked+.panel-switch-thumb {
    background: var(--accent, #4f8cff);
}

.panel-switch-input:checked+.panel-switch-thumb::after {
    transform: translateX(18px);
}

.panel-switch-input:focus-visible+.panel-switch-thumb {
    outline: 2px solid #4f8cff;
    outline-offset: 2px;
}

/* ── Footer de acciones (sticky abajo) ── */
.panel-actions-footer {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    padding: 14px 20px;
    display: flex;
    gap: 8px;
}

.panel-clear-btn {
    flex: 1;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.panel-clear-btn:hover {
    border-color: #9ca3af;
    color: #374151;
}

.panel-apply-btn {
    flex: 2;
    background: var(--accent, #4f8cff);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.panel-apply-btn:hover {
    background: #3b7de8;
}

.panel-apply-btn:active {
    transform: scale(0.97);
}

/* ── El botón "Cerrar filtros" (texto) ya no se necesita: usa la X del header ── */
.panel-close-btn {
    display: none;
}

/* ── Ocultar panel-section-label--filtrar (redundante con header) ── */
.panel-section-label--filtrar {
    display: none;
}

/* ── Media queries ── */

/* Desktop: botón compacto en sort-bar */
@media (min-width: 769px) {
    .mobile-filter-btn-wrap {
        display: flex;
        align-items: center;
        margin-bottom: 24px;
    }

    .mobile-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    .sort-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .catalog-tabs {
        display: flex !important;
        max-height: none !important;
        opacity: 1 !important;
        margin-bottom: 40px !important;
        overflow: visible !important;
    }
}

/* Móvil: botón a ancho completo, ocultar tabs desktop */
@media (max-width: 768px) {
    .mobile-filter-btn-wrap {
        display: flex;
        width: 100%;
        margin-bottom: 16px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .mobile-filter-btn {
        width: 100%;
        justify-content: center;
    }

    .catalog-tabs {
        display: none !important;
    }

    .mobile-filter-panel {
        width: 85vw;
        max-width: 320px;
    }
}

/* Scroll suave en móvil si el panel es muy largo */
@media (max-width: 768px) {
    .mobile-filter-panel {
        max-height: 80vh;
        overflow-y: auto;
    }
}


.legal-header {
    background-color: var(--accent-dark, #0a1b36);
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
    border-radius: 0 0 16px 16px;
    margin-bottom: 40px;
}

.legal-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 10px;
    font-weight: 700;
}

.legal-header p {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 24px;
    color: var(--text-primary, #333);
    line-height: 1.8;
    font-size: 1.05rem;
    font-family: var(--font-main, 'Segoe UI', Roboto, sans-serif);
}

.legal-content section {
    margin-bottom: 40px;
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 8px 24px -12px rgba(10, 27, 54, 0.15);
    border: 1px solid var(--border, #d1d5db);
}

.legal-content h2 {
    font-size: 1.4rem;
    color: var(--accent-dark, #0a1b36);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border, #e0e0e0);
    font-weight: 700;
}

.legal-content h3 {
    font-size: 1.1rem;
    color: var(--accent-dark, #0a1b36);
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-content p {
    margin-bottom: 16px;
    text-align: justify;
    color: var(--text-secondary, #4b5563);
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 16px;
    padding-left: 1.4rem;
    color: var(--text-secondary, #4b5563);
}

.legal-content li {
    margin-bottom: 10px;
}

.legal-content strong {
    color: var(--accent-dark, #0a1b36);
    font-weight: 600;
}

.legal-content a {
    color: var(--accent-blue, #4f8cff);
    text-decoration: underline;
}

@media (max-width: 600px) {
    .legal-content section {
        padding: 24px 16px;
    }
}