/* =================================================================
   VALE SAFETY — INDEX
   ================================================================= */
:root {
    --marino:  #001a33;
    --naranja: #f37021;
    --amarillo:#ffb800;
    --negro:   #0a0e1a;
    --crema:   #f7f5f0;
}

body { background-color: var(--crema); }

/* =================================================================
   FRANJA DE SEGURIDAD
   ================================================================= */
.franja-seguridad {
    width: 100%;
    height: 12px;
    background: repeating-linear-gradient(
        135deg,
        var(--negro) 0px, var(--negro) 45px,
        var(--amarillo) 45px, var(--amarillo) 90px
    );
}

/* =================================================================
   01. BANNER
   ================================================================= */
.banner-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--negro);
}
.slider { width: 100%; position: relative; min-height: 150px; }
/* Por defecto, ningún slide oculto recibe clics */
.slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none; /* <-- NUEVO: Evita clics en slides ocultos */
}

/* Solo el slide activo puede recibir clics */
.slide.active { 
    opacity: 1; 
    pointer-events: auto; /* <-- NUEVO: Habilita los clics solo en el banner visible */
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.slide img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

.slider::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,26,51,0.05) 0%, rgba(0,26,51,0.4) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Flechas del banner: transparentes, solo ícono + hover naranja */
.prev, .next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    width: 48px; height: 48px;
    cursor: pointer;
    font-size: 22px;
    z-index: 10;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.prev:hover, .next:hover {
    color: var(--naranja);
    transform: translateY(-50%) scale(1.15);
}
.prev { left: 20px; }
.next { right: 20px; }
.slider:not(:hover) .prev,
.slider:not(:hover) .next { opacity: 0; }

.dots-container {
    position: absolute;
    bottom: 22px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px;
    z-index: 3;
}
.dot {
    width: 8px; height: 8px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}
.dot.active { background: var(--naranja); width: 26px; border-radius: 8px; }

/* =================================================================
   02. TÍTULOS DE SECCIÓN
   ================================================================= */
.section-title-cat,
.section-title-prod {
    max-width: 1200px;
    margin: 0 auto 28px;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--marino);
}
.section-title-cat::before,
.section-title-prod::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: var(--naranja);
    border-radius: 3px;
    margin-bottom: 10px;
}
.section-title-container {
    max-width: 1200px;
    margin: 0 auto 28px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.section-title-container .section-title-prod { margin: 0; padding: 0; }

/* =================================================================
   03. CARRUSEL DE CATEGORÍAS
   ================================================================= */
.categories-carousel-section {
    width: 100%;
    background: #ffffff;
    padding: 52px 0;
}
.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex; align-items: center;
    padding: 0 40px;
}
.categories-wrapper { width: 100%; overflow: hidden; }
.categories-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
}

.category-item {
    flex: 0 0 25%;
    display: flex; flex-direction: column; align-items: center;
    padding: 10px;
    cursor: pointer;
}
/* Asegura que el link ocupe todo el espacio pero no rompa el flexbox */
.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-decoration: none; /* Quita el subrayado */
    color: inherit;        /* Mantiene el color original */
}

/* IMPORTANTE: Mueve los estados de :hover del .category-item al .category-link */
.category-link:hover .category-circle {
    border-color: var(--naranja);
    background: #fff8f4;
    box-shadow: 0 6px 18px rgba(243,112,33,0.15);
}
.category-link:hover .category-circle img { transform: scale(1.1); }
.category-link:hover span { color: var(--naranja); }
.category-circle {
    width: 104px; height: 104px;
    border-radius: 50%;
    border: 1.5px solid #e5e9f0;
    display: flex; align-items: center; justify-content: center;
    background: var(--crema);
    margin-bottom: 12px;
    transition: all 0.25s ease;
    overflow: hidden; 
    position: relative;
}
.category-circle img { width: 140%; object-fit: contain; transition: transform 0.25s ease; display: block; }
.category-item span {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    transition: color 0.2s;
}
.category-item:hover .category-circle {
    border-color: var(--naranja);
    background: #fff8f4;
    box-shadow: 0 6px 18px rgba(243,112,33,0.15);
}
.category-item:hover .category-circle img { transform: scale(1.1); }
.category-item:hover span { color: var(--naranja); }

/* Flechas categorías: transparentes, solo ícono */
.cat-arrow {
    position: absolute;
    top: 44%; transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #b0bac5;
    width: 36px; height: 36px;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.cat-arrow:hover { color: var(--naranja); transform: translateY(-50%) scale(1.2); }
.prev-cat { left: 0; }
.next-cat { right: 0; }
.cat-arrow.disabled { opacity: 0.2; cursor: default; pointer-events: none; }

/* =================================================================
   MOVIL - CARRUSEL DE CATEGORÍAS
   ================================================================= */
/* --- ESTILOS EXCLUSIVOS PARA CELULAR (3 categorías por fila) --- */
@media (max-width: 600px) {
    /* Asegura que la sección no tenga rellenos excesivos */
    .categories-carousel-section {
        padding: 20px 0;
    }

    /* Ajusta el contenedor para dar espacio a las flechas laterales */
    .categories-container {
        padding: 0 30px; 
    }

    /* IMPORTANTE: FUERZA 3 ELEMENTOS POR FILA (33.333% de ancho c/u) */
    .category-item {
        flex: 0 0 25%;
        padding: 3px; /* Espacio pequeño entre ítems */
    }

    /* CÍRCULOS MÁS PEQUEÑOS (aprox. 65px) */
    .category-circle {
        width: 55px;
        height: 55px;
        margin-bottom: 5px; /* Espacio reducido entre círculo y texto */
    }

    /* IMÁGENES DENTRO DEL CÍRCULO */
    .category-circle img {
        width: 145%; /* Ajusta el zoom de la imagen */
    }

    /* TEXTO MUCHO MÁS PEQUEÑO Y COMPACTO (9px) */
    .category-item span {
        font-size: 8.5px;
        line-height: 1.2;
        letter-spacing: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Permite máximo 2 líneas si el texto es largo */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* FLECHAS DE NAVEGACIÓN MÁS PEQUEÑAS Y AJUSTADAS */
    .cat-arrow {
        width: 24px;
        height: 24px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.7); /* Fondo semitransparente para visibilidad */
        border-radius: 50%;
        color: #64748b;
    }
    
    .prev-cat { left: 2px; }
    .next-cat { right: 2px; }
}
/* =================================================================
   04. CARRUSEL DE PRODUCTOS
   ================================================================= */
.products-carousel-section {
    width: 100%;
    background: var(--crema, #fcfbf9);
    padding: 52px 0;
}

.products-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.products-wrapper { 
    width: 100%; 
    overflow: hidden; 
}

.products-track { 
    display: flex; 
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1); 
}

.product-item { 
    flex: 0 0 25%; 
    padding: 0 10px; 
    box-sizing: border-box; 
    display: flex;
}

/* =================================================================
   TARJETA INDIVIDUAL (Sincronizada con la vista de tienda)
   ================================================================= */
.vale-producto-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eaecf0;
    border-bottom: 3px solid transparent;
    padding: 20px 20px 15px 20px;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    transition: all 0.25s ease;
    justify-content: space-between;
}

.vale-producto-card:hover {
    box-shadow: 0 12px 28px rgba(0,26,51,0.09);
    transform: translateY(-3px);
    border-bottom-color: var(--naranja, #f37021);
}

/* CONTENEDOR IMAGEN */
.vale-prod-img-container {
    position: relative;
    width: 100%;
    height: 180px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.vale-producto-link-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vale-img-principal,
.vale-prod-img-container img:not(.vale-prod-marca-tag) {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.13s ease;
}

.vale-producto-card:hover .vale-prod-img-container img:not(.vale-prod-marca-tag) {
    transform: scale(1.05);
}

.vale-prod-marca-tag {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 60px !important;
    max-height: 40px !important;
    object-fit: contain;
    background: transparent;
    padding: 3px 5px;
    border-radius: 4px;
    border: 1px solid transparent;
    z-index: 2;
}

/* INFORMACIÓN DEL PRODUCTO */
.vale-prod-info { 
    padding: 5px 0; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.vale-prod-marca-texto {
    font-size: 11px;
    text-transform: uppercase;
    color: #6B7A90;
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
    letter-spacing: 0.5px;
}

.vale-prod-titulo { 
    font-size: 13px; 
    font-weight: 500;
    color: var(--marino, #001e3d); 
    margin: 0 0 8px 0; 
    line-height: 1.35;
    height: 36px; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
}

/* PRECIOS - ESTRUCTURA DE DOS NIVELES */
.vale-prod-precios-contenedor,
.vale-prod-precio-box {
    display: flex;
    flex-direction: column;
    margin: 4px 0 10px 0;
    gap: 2px;
}

.vale-prod-fila-superior {
    display: flex;
    align-items: center;
    min-height: 16px;
}

.vale-prod-fila-inferior {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vale-prod-precio-oferta {
    font-size: 17px;
    font-weight: 800;
    color: var(--marino, #001e3d);
    margin: 0;
}

.vale-prod-precio-original,
.vale-prod-precio-antes {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
    margin: 0;
}

.vale-prod-badge-descuento,
.vale-prod-descuento-tag {
    background-color: var(--naranja, #f37021);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* FOOTER DE COLORES */
.vale-prod-footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    min-height: 24px;
    padding-top: 10px;
}

.vale-producto-card.sin-colores .vale-prod-footer-card {
    justify-content: center;
}

.vale-prod-colores {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.vale-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #dde3eb;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.vale-color-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #94a3b8;
}

.vale-color-dot.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--naranja, #f37021);
}

.vale-color-dot-mas {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #e2e8f0;
}

/* BOTONES DE ACCIÓN INFERIORES */
.vale-prod-botones-accion { 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    margin-top: 12px;
}

.vale-btn-ver-mas {
    flex: 1;
    background: var(--naranja, #f37021); 
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 0.4px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.22s;
}

.vale-btn-ver-mas:hover { 
    background: var(--marino, #001e3d); 
}

.vale-btn-carrito {
    width: 38px; 
    height: 38px;
    background: var(--marino, #001e3d); 
    border: none; 
    color: #fff;
    font-size: 13px; 
    border-radius: 6px;
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.22s;
}

.vale-btn-carrito:hover { 
    background: var(--amarillo, #ffc107); 
    color: var(--negro, #000); 
}

/* FLECHAS DEL CARRUSEL */
.prod-arrow {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%);
    background: transparent;
    border: none; 
    color: #b0bac5;
    width: 36px; 
    height: 36px;
    font-size: 17px; 
    cursor: pointer; 
    z-index: 5;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.prod-arrow:hover { color: var(--naranja, #f37021); transform: translateY(-50%) scale(1.2); }
.prev-prod { left: 0; }
.next-prod { right: 0; }

/* BOTÓN "VER MÁS" CABECERA */
.btn-ver-mas-header {
    background: transparent;
    color: var(--naranja, #f37021);
    border: 1.5px solid var(--naranja, #f37021);
    padding: 8px 20px;
    font-size: 12px; 
    font-weight: 600; 
    letter-spacing: 0.3px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.22s ease;
}
.btn-ver-mas-header:hover { background: var(--naranja, #f37021); color: #fff; }

/* Espaciado general por defecto para los títulos de las secciones */
.section-title-prod {
    font-size: 24px;
    color: var(--marino, #001e3d);
    font-weight: 700;
    margin: 0 0 20px 0; /* Asegura el espacio vertical entre el título y el carrusel */
    padding-left: 40px; /* Alineado con el padding de las tarjetas */
}

/* Si está dentro del contenedor flex, quitamos el padding extra para que respete el contenedor */
.section-title-container .section-title-prod {
    padding-left: 0 !important;
    margin: 0 !important;
}
/* =================================================================
   ESTILOS PARA MÓVIL - VERSIÓN ULTRA COMPACTA (3 productos/fila)
   ================================================================= */
@media (max-width: 768px) {
    /* CORRECCIÓN DE POSICIÓN DE LOS TÍTULOS Y SECCIONES EN MÓVIL */
    .section-title-container {
        max-width: 100% !important;
        padding: 0 10px !important; /* Alineado exacto con el padding de las tarjetas móviles */
        margin: 0 auto 10px auto !important;
    }

    .section-title-prod {
        font-size: 16px !important; /* Tamaño proporcional para celular */
        padding-left: 0 !important;   /* Elimina cualquier espacio adelantado */
        margin: 0 !important;
    }

    /* Ajuste para el contenedor general del carrusel en móvil */
    .products-container {
        padding: 0 10px !important;
    }
    /* Contenedor general más ajustado */
    .products-container {
        padding: 0 10px;
    }

    /* Forzamos 3 columnas y reducimos el espacio entre ellas a mínimo */
    .product-item {
        flex: 0 0 33.3333%;
        padding: 0 2px;
    }

    /* TARJETA: Eliminamos prácticamente todos los márgenes internos */
    .vale-producto-card {
        padding: 4px 4px 2px 4px; /* Arriba - Der - Abajo - Izq */
        border-radius: 8px;
        gap: 1px; /* Espacio casi nulo entre elementos internos */
        border-bottom: 2px solid transparent; /* Borde inferior más fino */
    }

    /* 1. IMAGEN: Achicada drásticamente */
    .vale-prod-img-container {
        height: 75px; /* Reducido de 85px a 75px */
        margin-bottom: 2px; /* Espacio mínimo debajo de la imagen */
        border-radius: 6px;
    }

    .vale-prod-img-container img:not(.vale-prod-marca-tag) {
        max-width: 95%;
        max-height: 95%;
    }

    /* TAG MARCA (Esquinero): Ajustado al nuevo tamaño de imagen */
    .vale-prod-marca-tag {
        max-width: 40px !important;
        max-height: 25px !important;
        padding: 1px;
    }

    /* 2. TEXTO SUPERIOR: Tus tamaños originales intactos */
    .vale-prod-info {
        padding: 0; /* Eliminamos el padding interno del bloque de texto */
    }

    /* Espacio mayor entre marca y título también en móvil */
    .vale-prod-marca-texto {
        font-size: 7px;
        margin-bottom: 5px !important; /* <--- Espacio mayor en móvil (antes estaba en 0px) */
        line-height: 1;
    }

    .vale-prod-titulo {
        font-size: 9.5px;
        height: 24px;
        margin-bottom: 1px;
        line-height: 1.2;
        -webkit-line-clamp: 2;
    }

    /* PRECIOS: Compactados */
    .vale-prod-precios-contenedor {
        margin: 1px 0 2px 0; /* Margen reducido alrededor del precio */
        gap: 0px;
    }

    .vale-prod-fila-superior {
        min-height: 10px; /* Espacio para precio original */
    }

    .vale-prod-precio-oferta {
        font-size: 10.5px; /* Precio más pequeño */
        font-weight: 900;
    }

    .vale-prod-precio-original {
        font-size: 8px;
    }

    .vale-prod-badge-descuento {
        font-size: 7px;
        padding: 1px 2px;
        margin-left: 3px;
    }

    /* =================================================================
       ZONA DE COLORES Y BOTÓN "VER MÁS" EN UNA SOLA LÍNEA
       ================================================================= */
    .vale-prod-footer-card {
        min-height: 20px; 
        padding-top: 2px;
        padding-bottom: 2px;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important; /* Colores izquierda, Botón derecha */
        align-items: center !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .vale-producto-card.sin-colores .vale-prod-footer-card {
        justify-content: center !important;
    }

    .vale-prod-colores {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 4px !important; 
        width: auto !important;
        overflow: visible !important; 
    }

    .vale-color-dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px;
        border-radius: 50%;
        border: 1px solid #fff;
        box-shadow: 0 0 0 1px #cbd5e1; 
        box-sizing: content-box;
    }

    /* Círculo activo con anillo naranja limpio */
    .vale-color-dot.active {
        border: 1px solid #fff;
        box-shadow: 0 0 0 1.5px var(--naranja, #f37021) !important; 
    }

    .vale-color-dot-mas {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px;
        font-size: 5px;
        border: 0.5px solid #cbd5e1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* CORRECCIÓN DEL BOTÓN "VER MÁS" PARA MÓVIL */
    .vale-prod-botones-accion {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Adaptamos tu clase de botón para que quepa en miniatura sin salirse */
    .vale-prod-botones-accion .btn-ver-mas-header {
        background: transparent !important;
        color: var(--naranja, #f37021) !important;
        border: 1px solid var(--naranja, #f37021) !important;
        padding: 1px 4px !important; /* Reducido drásticamente para móvil */
        font-size: 6.5px !important;  /* Letra compacta pero legible */
        font-weight: 600 !important; 
        letter-spacing: 0px !important;
        border-radius: 3px !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        line-height: 1 !important;
    }
}
/* =================================================================
   06. GALERÍA DE LÍNEAS
   ================================================================= */
.gallery-brands-section { width: 100%; background: #fff; padding: 56px 0; }
.gallery-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 16px;
}
.gallery-item { width: 100%; height: 100%; }

/* Sin fondo, sin borde, sin padding — la imagen llena todo */
.gallery-card {
    position: relative;
    border-radius: 14px;
    height: 100%;
    overflow: hidden;
    display: block;
}

.gallery-image-wrapper {
    width: 100%;
    height: 100%;
    display: block;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-image-wrapper img { transform: scale(1.05); }

/* Gradiente oscuro en la parte inferior para dar contraste al botón */
.gallery-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,18,36,0) 45%, rgba(0,18,36,0.58) 100%);
    opacity: 0;
    transition: opacity 0.32s ease;
    pointer-events: none;
}
.gallery-card:hover::after { opacity: 1; }

/* Botón ahora es overlay sobre la imagen, aparece en hover */
.gallery-footer-action {
    position: absolute;
    bottom: 18px;
    left: 18px;
    z-index: 2;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.gallery-card:hover .gallery-footer-action {
    opacity: 1;
    transform: translateY(0);
}

.btn-gallery-action {
    display: inline-block;
    background: #fff;
    color: var(--marino);
    padding: 10px 20px;
    font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
    border-radius: 7px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    transition: background 0.22s, color 0.22s;
}
.btn-gallery-action:hover { background: var(--naranja); color: #fff; }

.item-large-left  { grid-column: span 2; grid-row: span 1; }
.item-top-right   { grid-column: 3; grid-row: 1; }
.item-bottom-left { grid-column: 1; }
.item-bottom-center { grid-column: 2; }
.item-sidebar-right { grid-column: 3; grid-row: 2; }

/* =================================================================
   ADAPTACIÓN MÓVIL
   ================================================================= */
@media (max-width: 768px) {
    .gallery-brands-section { 
        padding: 24px 0; 
    }

    /* Título y botón "Ver catálogo" obligados en la misma línea */
    .section-title-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        padding: 0 12px !important;
        margin-bottom: 25px !important; /* Espacio limpio entre el título y las fotos */
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .section-title-prod {
        font-size: 14px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .btn-ver-mas-header {
        padding: 6px 10px !important;
        font-size: 9px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .gallery-grid-container {
        max-width: 100%;
        padding: 0 10px;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-rows: minmax(110px, auto) !important;
        gap: 6px !important;
    }

    .item-large-left { grid-column: 1 / span 2 !important; grid-row: 1 !important; }
    .item-top-right { grid-column: 3 !important; grid-row: 1 !important; }
    .item-bottom-left { grid-column: 1 !important; grid-row: 2 !important; }
    .item-bottom-center { grid-column: 2 !important; grid-row: 2 !important; }
    .item-sidebar-right { grid-column: 3 !important; grid-row: 2 !important; }

    .gallery-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .gallery-footer-action {
        bottom: 8px !important;
        left: 8px !important;
        z-index: 2 !important;
        opacity: 0.95 !important; 
        transform: translateY(0) !important;
    }

    .gallery-card::after { 
        opacity: 0.8 !important; 
    }

    /* BOTÓN INTERNO EN MÓVIL: Letra pequeña, en una línea, blanco por defecto */
    .btn-gallery-action {
        display: inline-block !important;
        white-space: nowrap !important;
        padding: 4px 7px !important;
        font-size: 7px !important;
        font-weight: 800 !important;
        letter-spacing: 0.2px !important;
        border-radius: 4px !important;
        background: #fff !important;
        color: var(--marino) !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
    }

    /* Al tocar o hacer hover en móvil cambia a naranja con texto blanco */
    .btn-gallery-action:active, 
    .btn-gallery-action:hover {
        background: var(--naranja) !important;
        color: #fff !important;
    }
}
/* =================================================================
   07. MARCAS RESPALDADAS
   ================================================================= */
.brands-backed-section { width: 100%; background: white; padding: 44px 0; }
.brands-carousel-container-main {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex; align-items: center;
    padding: 0 40px;
}
.brands-wrapper-window { width: 100%; overflow: hidden; }
.brands-display-grid { display: flex; width: 100%; transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1); }
.brand-logotype-card {
    flex: 0 0 25%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    padding: 18px 0;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    margin: 0 6px;
    border: 1px solid #eaecf0;
    transition: border-color 0.22s, box-shadow 0.22s;
}

/* Hacemos que el enlace ocupe todo el espacio de la tarjeta y centre su contenido */
.brand-logotype-card a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.brand-logotype-card:hover {
    border-color: #c0cad4;
    box-shadow: 0 4px 14px rgba(0,26,51,0.06);
}
.brand-logotype-card img {
    width: 54%; 
    height: auto; 
    object-fit: contain;
    filter: grayscale(35%);
    transition: filter 0.25s, transform 0.25s;
    /* Eliminamos el align-items: center de aquí porque no aplica a imágenes */
}

.brand-logotype-card:hover img { 
    filter: grayscale(0%); 
    transform: scale(1.06); 
}

/* Flechas marcas: transparentes */
.brands-arrow-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: transparent;
    border: none; color: #b0bac5;
    width: 36px; height: 36px;
    font-size: 15px; cursor: pointer; z-index: 5;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.brands-arrow-btn:hover { color: var(--naranja); transform: translateY(-50%) scale(1.2); }
.prev-brands { left: 0; }
.next-brands { right: 0; }

/* =================================================================
   ADAPTACIÓN MÓVIL: CARRUSEL DE MARCAS (3 visibles)
   ================================================================= */
@media (max-width: 768px) {
    .brands-backed-section {
        padding: 30px 0;
    }

    .brands-carousel-container-main {
        padding: 0 25px; /* Espacio para que las flechas laterales no se salgan de la pantalla */
    }

    /* Hace que cada tarjeta ocupe un tercio exacto de la pantalla (3 visibles) */
    .brand-logotype-card {
        flex: 0 0 33.333% !important;
        padding: 12px 4px !important;
        margin: 0 3px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* Forzamos que el enlace ocupe todo el espacio de la tarjeta en móvil y centre la imagen */
    .brand-logotype-card a {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
    }

    .brand-logotype-card img {
        width: 70% !important; /* Logotipo un poco más visible en pantallas pequeñas */
        height: auto !important;
        object-fit: contain !important;
        filter: grayscale(0%); /* En móvil se aprecian mejor a color */
    }

    /* Tamaño y visibilidad de las flechas en móvil */
    .brands-arrow-btn {
        width: 28px;
        height: 28px;
        font-size: 13px;
        color: #718096;
    }
    .prev-brands { left: -2px; }
    .next-brands { right: -2px; }
}
/* =================================================================
   08. BENEFICIOS - NUEVO DISEÑO MODERNO
   ================================================================= */
.benefits-features-section { 
    width: 100%; 
    padding: 60px 0; 
}

.benefits-grid-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.benefit-card-box {
    background: #ffffff;
    border: 1px solid #e2e8f0; /* Borde sutil en lugar de fondo pesado */
    border-radius: 16px;
    padding: 20px 15px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card-box:hover {
    transform: translateY(-8px);
    border-color: var(--amarillo); /* El borde inferior toma el color de marca al hacer hover */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.benefit-icon-wrapper {
    height: 45px;
    width: 45px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    margin-bottom: 12px;
    background: #f1f5f9; /* Fondo ligero para el icono */
    border-radius: 50%;
}

/* Quitamos el filtro invertido para que se vean los iconos originales si son negros/colores */
.benefit-icon-wrapper img { 
    max-width: 60%; 
    max-height: 60%; 
    object-fit: contain; 
    filter: brightness(0) invert(1);
    filter: brightness(0) saturate(100%) invert(18%) sepia(21%) saturate(2852%) hue-rotate(185deg) brightness(92%) contrast(101%);
}

.benefit-card-title {
    color: #1e293b; /* Color oscuro profesional */
    font-size: 13px; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin: 0;
}

/* =================================================================
   ADAPTACIÓN MÓVIL: SECCIÓN DE BENEFICIOS (2x2)
   ================================================================= */
@media (max-width: 768px) {
    .benefits-features-section {
        padding: 30px 0 !important;
    }

    .benefits-grid-container {
        max-width: 100% !important;
        padding: 0 12px !important;
        /* Cambia de 4 columnas a 2 columnas exactas */
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .benefit-card-box {
        padding: 16px 10px !important;
        border-radius: 12px !important;
    }

    .benefit-icon-wrapper {
        height: 38px !important;
        width: 38px !important;
        margin-bottom: 8px !important;
    }

    .benefit-card-title {
        font-size: 11px !important; /* Texto adaptado para que encaje bien en dos columnas */
        letter-spacing: 0.3px !important;
        line-height: 1.3 !important;
    }
}
/* =================================================================
   CARRITO LATERAL
   ================================================================= */
.cart-item-row { display: flex; align-items: center; gap: 15px; padding: 10px; width: 100%; box-sizing: border-box; }
.cart-item-img { width: 80px; height: 80px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-details { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }

/* =================================================================
   RESPONSIVE GENERAL
   ================================================================= */
@media (max-width: 992px) {
    .section-title-cat, .section-title-prod { font-size: 24px; padding: 0 24px; }
    .section-title-container { padding: 0 24px; }
    .gallery-grid-container { padding: 0 24px; gap: 14px; }
}

@media (max-width: 768px) {
    .slider { height: 250px; }
    .prev, .next { opacity: 1 !important; font-size: 18px; }
    .franja-seguridad { height: 6px; }
    .benefits-features-section { padding: 36px 0; }
    .section-title-cat, .section-title-prod { font-size: 20px; padding: 0 16px; margin-bottom: 18px; }
    .section-title-cat::before, .section-title-prod::before { width: 32px; height: 4px; margin-bottom: 8px; }
    .section-title-container { padding: 0 16px; margin-bottom: 18px; }
    .benefits-grid-container { padding: 0 16px; gap: 12px; }
}

@media (max-width: 480px) {
    .slider { height: 200px; }
    .section-title-cat, .section-title-prod { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .slide, .products-track { transition: none !important; }
}

/* Por defecto en PC: Ocultamos el banner móvil y mostramos el slider normal */
.mobile-banner-wrapper {
    display: none;
}

/* =================================================================
   ADAPTACIÓN MÓVIL: Slider de banners móvil + Franja abajo
   ================================================================= */
@media (max-width: 768px) {
    .franja-seguridad {
        display: none !important;
    }

    /* 1. Ocultamos por completo el slider de la PC en celulares */
    .desktop-slider {
        display: none !important;
    }

    /* 2. Mostramos el contenedor general móvil */
    .mobile-banner-wrapper {
        display: block !important;
        width: 100%;
        background-color: var(--negro);
        position: relative;
    }

    /* 3. Estilos del carrusel móvil (Modificados para llenar todo el ancho y mostrarla completa) */
    .mobile-slider {
        width: 100%;
        position: relative;
        overflow: hidden;
        background-color: var(--negro);
        /* Eliminamos cualquier altura fija para que crezca con la imagen */
        height: auto !important; 
    }

    .mobile-slide {
        position: relative; /* Cambiamos a relative para que fluya normalmente */
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        transition: opacity 0.8s ease-in-out;
        pointer-events: none;
        /* Aseguramos que el slide no colapse */
        height: auto !important;
        /* Escondemos las slides inactivas para que no se encimen */
        display: none; 
    }

    .mobile-slide.active {
        opacity: 1;
        display: block; /* Mostramos solo la activa */
        pointer-events: auto;
    }

    .mobile-slide a {
        display: block;
        width: 100%;
        height: auto; /* Permitimos que el enlace tenga la altura de la img */
    }

    /* Solución clave para que la imagen acapare todo el ancho y se vea completa */
    .mobile-banner-img {
        width: 100% !important;     /* Ocupa el 100% del ancho de la pantalla */
        height: auto !important;    /* El alto se ajusta automáticamente para no cortar la img */
        display: block !important;
        
        /* ESTA ES LA OPCIÓN 1 (Recomendada): Muestra la imagen completa, 
           pero puede dejar espacios en blanco abajo si la imagen es corta, 
           o estirarse mucho si la imagen es muy alta. */
        object-fit: fill !important; 
        
        /* ESTA ES LA OPCIÓN 2 (Si la imagen es muy alta y quieres que cubra 
           todo sin importar que se corte un poco de los lados): */
        /* object-fit: cover !important; */
        
        max-height: none !important; /* Quitamos el límite de altura para que se vea normal */
    }

    .mobile-prev, .mobile-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0,0,0,0.35);
        border: none;
        color: #fff;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 13px;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
    }

    .mobile-prev:active, .mobile-next:active { background: rgba(0,0,0,0.55); }

    .mobile-prev { left: 10px; }
    .mobile-next { right: 10px; }

    .mobile-banner-img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
    }

    /* 4. Estilos de la franja de seguridad fija abajo */
    .mobile-security-bar {
        background-color: var(--naranja);
        color: #ffffff;
        padding: 10px 15px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        font-size: 13px;
        font-weight: 600;
        text-align: center;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
        width: 100%;
    }
}