/* ======================================================= */
/* === ESTILOS COMPLETOS PARA HERO Y CÁPSULA DE BÚSQUEDA === */
/* ======================================================= */

/* 0. AJUSTE HERO PARA DAR ESPACIO */
/* Esta es la regla clave que corrige el espaciado. */


/* 1. La cápsula principal de búsqueda y filtros */
.interactive-search-pod {
    max-width: 800px;
    margin: 2rem auto 0 auto; /* Quitamos el margen inferior para que el padding del hero controle el espacio */
    padding: 1.5rem;
    position: relative;
    z-index: 10;

    /* Efecto "Glassmorphism" */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body.dark-mode .interactive-search-pod {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 2. Barra de búsqueda */
.product-search {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    border-radius: 50px;
    padding: 12px 20px;
    transition: all 0.4s ease-in-out;
    width: 250px; 
    margin: 0 auto 1.5rem auto;
    position: relative;
    overflow: hidden;
    box-sizing: border-box; 
}

.product-search.expanded {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.product-search:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.product-search__input {
    border: none; outline: none; flex-grow: 1; padding: 3px 10px;
    font-size: 1rem; background: transparent; color: #fff;
    box-sizing: border-box; 
}
.product-search__icon { color: #fff; margin-right: 10px; font-size: 1.1rem; }

/* Placeholder animado */
.product-search__input::placeholder { color: transparent; }
.product-search__placeholder-animation {
    position: absolute; left: 55px; top: 50%; transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem; pointer-events: none; white-space: nowrap;
    transition: opacity 0.3s ease-in-out;
}
.product-search:focus-within .product-search__placeholder-animation,
.product-search__input:not([value=""]) + .product-search__placeholder-animation {
    opacity: 0;
}

/* 3. Filtros de lista (select) */
.pod-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pod-filters__select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em;
}

.pod-filters__select:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(0, 0, 0, 0.3);
}

.pod-filters__select:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px var(--color-primario-transparente, rgba(0, 150, 136, 0.3));
}

.pod-filters__select option {
    background-color: #2c2c2e;
    color: #fff;
}

/* ============================================= */
/* ===         VERSIÓN MÓVIL (TELÉFONO)      === */
/* ============================================= */
@media (max-width: 768px) {
    /* Ajustamos el espacio del hero en móvil */
    .hero-productos {
        padding-top: 3rem;
        padding-bottom: 6rem;
    }

    .interactive-search-pod {
        margin-top: 1rem;
        padding: 1.2rem;
        border-radius: 16px;
    }

    .product-search {
        width: 100%;
    }
    
    .pod-filters {
        grid-template-columns: 1fr;
    }
}

/* ============================================= */
/* ===         CONTADOR DE OFERTAS           === */
/* ============================================= */

.titulo-con-contador {
    text-align: center;
    margin-bottom: 2rem;
}

.titulo-con-contador .titulo-seccion {
    margin-bottom: 1rem;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1rem; /* Espacio entre los bloques */
    font-family: 'Nunito', sans-serif;
}

.countdown-timer__block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-superficie);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 60px;
    box-shadow: var(--sombra-caja);
    border: 1px solid var(--color-fondo);
}

body.dark-mode .countdown-timer__block {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
}

.countdown-timer__number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primario);
    line-height: 1;
}

.countdown-timer__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-texto-secundario);
    text-transform: uppercase;
}

/* También eliminamos la animación de la etiqueta que ya no existe */
.tag-tiempo-limitado {
    display: none;
}

/* ============================================= */
/* ===        SECCIÓN RESULTADOS BÚSQUEDA    === */
/* ============================================= */

#search-results-content {
    position: relative; /* <--- AGREGAR ESTO */
    padding-top:1rem;
    padding-bottom: 3rem;
    animation: fadeIn 0.5s ease-in-out;
}

.search-results-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* Animación de entrada suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AJUSTE PARA QUE LAS TARJETAS MANTENGAN SU TAMAÑO */

.grid-productos-destacados {
    /* Esta propiedad centra la(s) tarjeta(s) cuando hay espacio de sobra en la fila */
    justify-content: center;
}

.producto-card {
    /* Establecemos un ancho máximo para que la tarjeta nunca se estire más de la cuenta */
    max-width: 350px; /* Puedes ajustar este valor si lo prefieres un poco más grande o pequeño */
    
    /* Nos aseguramos de que siga siendo responsiva y ocupe el 100% de su columna asignada */
    width: 100%; 
}


/* ============================================= */
/* ===   ESTILOS PARA RESULTADOS AGRUPADOS   === */
/* ============================================= */

/* Contenedor principal de la cuadrícula de resultados */
#search-results-grid {
    display: grid !important;
    /* Esto crea columnas automáticas de mínimo 260px. 
       Si caben 3, pone 3. Si caben 4, pone 4. */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 2rem !important; /* Espacio entre tarjetas */
    width: 100%;
    flex-direction: row !important; /* Anulamos el flex-direction: column anterior */
}
@media (min-width: 769px) and (max-width: 1100px) {
    #search-results-grid {
        /* Forzamos 3 columnas en pantallas medianas si auto-fill falla */
        grid-template-columns: repeat(3, 1fr) !important; 
    }
}

/* Aseguramos que la tarjeta ocupe toda su celda */
.producto-card-simple {
    width: 100% !important;
    margin: 0 !important; /* Quitamos márgenes que puedan centrarla y hacerla pequeña */
}
/* Título para el grupo de Apartado (ej. "Promociones") */
.apartado-title {
    grid-column: 1 / -1; /* Ocupa toda la fila */
    font-size: 1.8rem;
    color: var(--color-texto-principal);
    margin: 2.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primario);
}

/* Título para el grupo de Marca */
.marca-title {
    grid-column: 1 / -1; /* Ocupa toda la fila */
    font-size: 1.2rem;
    color: var(--color-texto-secundario);
    margin: 1.5rem 0 1rem 0;
}

/* Estilos para la paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}
.page-link {
    border: 1px solid #ccc;
    background: var(--color-superficie);
    color: var(--color-texto-secundario);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.page-link:hover {
    border-color: var(--color-primario);
    color: var(--color-primario);
}
.page-link.active {
    background-color: var(--color-primario);
    color: #fff;
    border-color: var(--color-primario);
}
.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}



/* ======================================================= */
/* === ESTILOS PARA RESULTADOS EN CARRUSEL DINÁMICO === */
/* ======================================================= */



/* Contenedor para cada grupo (ej. "Promociones") */
.results-group-container {
    width: 100%;
    margin-top: 2rem;
}

/* Título para el grupo de Apartado */
.apartado-title {
    font-size: 1.8rem;
    color: var(--color-texto-principal);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primario);
}

/* Título para el grupo de Marca */
.marca-title {
    font-size: 1.2rem;
    color: var(--color-texto-secundario);
    margin: 0 0 1.5rem 0;
}

/* Estilo para el contenedor de cada carrusel */
.results-swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 0 5px; /* Pequeño padding para que las sombras no se corten */
}

.results-swiper .swiper-slide {
    width: auto; /* El ancho lo define Swiper */
    height: auto; /* La altura se ajusta al contenido */
    padding-bottom: 1rem; /* Espacio para la sombra */
}

/* Ajuste a las tarjetas para que se vean bien en el carrusel */
.results-swiper .producto-card {
    width: 280px; /* Ancho fijo para las tarjetas en el carrusel */
    margin: 0 auto;
    box-shadow: var(--sombra-caja);
    transition: transform 0.3s, box-shadow 0.3s;
}

.results-swiper .producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Estilo para las flechas de navegación del carrusel */
.results-swiper .swiper-button-next,
.results-swiper .swiper-button-prev {
    color: var(--color-primario);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: var(--sombra-caja);
    opacity: 0; /* Ocultas por defecto */
    transition: opacity 0.3s;
}
body.dark-mode .results-swiper .swiper-button-next,
body.dark-mode .results-swiper .swiper-button-prev {
    background-color: rgba(40, 40, 40, 0.8);
}

.results-swiper:hover .swiper-button-next,
.results-swiper:hover .swiper-button-prev {
    opacity: 1; /* Se muestran al pasar el cursor sobre el carrusel */
}

.results-swiper .swiper-button-next::after,
.results-swiper .swiper-button-prev::after {
    font-size: 1rem;
    font-weight: bold;
}


/* ======================================================= */
/* === ESTILOS PARA VISTA "SIN RESULTADOS" MEJORADA === */
/* ======================================================= */

.no-results-container {
    text-align: center;
    padding: 3rem 1rem;
    border-bottom: 1px solid var(--color-fondo);
    margin-bottom: 2rem;
}
body.dark-mode .no-results-container {
    border-bottom-color: #333;
}

.no-results-container img {
    max-width: 350px;
    margin-bottom: 1.5rem;
}

.suggestions-container {
    padding: 1rem 0;
}

/* ======================================================= */
/* === ESTILOS CORREGIDOS PARA SUGERENCIAS DE BÚSQUEDA === */
/* ======================================================= */

/* Hacemos que la barra de búsqueda sea el punto de referencia para el menú */
.product-search {
    position: relative;
}

/* Contenedor de las sugerencias */
.search-suggestions-container {
    display: none;
    position: absolute;
    top: 115%; /* Lo posicionamos un poco por debajo de la barra (100%) */
    left: 0;
    width: 100%; /* Ocupa el mismo ancho que la barra de búsqueda */
    z-index: 100;
    
    /* Mantenemos el estilo de vidrio pero un poco más opaco para legibilidad */
    background: rgba(30, 30, 40, 0.7); /* Fondo más oscuro y sólido */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    max-height: 400px;
    overflow-y: auto;
}

.search-suggestions-container.visible {
    display: block;
}

/* Cada producto sugerido (sin cambios) */
.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Estilos de la imagen y texto (sin cambios) */
.suggestion-item__image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}
.suggestion-item__info {
    display: flex;
    flex-direction: column;
}
.suggestion-item__name {
    font-weight: 600;
    color: #fff;
    margin: 0;
}
.suggestion-item__family {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}


/* ======================================================= */
/* === ESTILOS FINALES PARA CÁPSULA DE BÚSQUEDA COMPLETA === */
/* ======================================================= */

/* 1. La cápsula principal */
.interactive-search-pod {
    /* ... Tus estilos para la cápsula no cambian ... */
    max-width: 800px;
    margin: 2rem auto 4rem auto;
    padding: 1.5rem;
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* 2. Barra de búsqueda (con estado inicial pequeño) */
.product-search {
    position: relative; /* Clave para posicionar sugerencias */
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    border-radius: 50px;
    padding: 12px 20px;
    transition: all 0.4s ease-in-out;
    width: 250px; /* Ancho inicial pequeño */
    margin: 0 auto 1.5rem auto;
    overflow: visible; /* Permitir que las sugerencias se vean */
    box-sizing: border-box; 
}

/* Estado expandido */
.product-search.expanded {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.product-search:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

/* Input, ícono y botón 'X' (ajustados para el fondo oscuro) */
.product-search__input {
    border: none; outline: none; flex-grow: 1; padding: 3px 10px;
    font-size: 1rem; background: transparent; color: #fff;
}
.product-search__icon { color: #fff; margin-right: 10px; font-size: 1.1rem; }
.product-search__clear {
    /* ... estilos del botón 'X' ... */
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: rgba(255, 255, 255, 0.7);
    font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 5px;
    display: none; transition: color 0.3s;
}
.product-search__clear:hover { color: #fff; }
.product-search__clear.visible { display: block; }


/* Animación de placeholder */
.product-search__input::placeholder { color: transparent; }
.product-search__placeholder-animation {
    position: absolute; left: 55px; top: 50%; transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem; pointer-events: none; white-space: nowrap;
    transition: opacity 0.3s ease-in-out;
}
.product-search.expanded .product-search__placeholder-animation,
.product-search__input:not([value=""]) + .product-search__placeholder-animation {
    opacity: 0;
}

/* 3. Contenedor de sugerencias (corregido) */
.search-suggestions-container {
    display: none;
    position: absolute;
    top: 115%;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
}
.search-suggestions-container.visible { display: block; }

/* Items de sugerencias */
.suggestion-item {
    display: flex; align-items: center; padding: 10px 15px;
    cursor: pointer; transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background-color: rgba(255, 255, 255, 0.1); }
.suggestion-item__image { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; margin-right: 15px; }
.suggestion-item__info { display: flex; flex-direction: column; }
.suggestion-item__name { font-weight: 600; color: #fff; margin: 0; }
.suggestion-item__family { font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); margin: 0; }


/* 4. Filtros de lista (sin cambios) */
.pod-filters {
    /* ... tus estilos para .pod-filters ... */
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.pod-filters__select {
    /* ... tus estilos para .pod-filters__select ... */
    appearance: none; -webkit-appearance: none; width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem; font-size: 0.95rem; border-radius: 12px;
    cursor: pointer; transition: all 0.3s ease; background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1.5em;
}

/* ======================================================= */
/* === ANIMACIÓN DE HERO (VERSIÓN FINAL Y FLUIDA) === */
/* ======================================================= */

/* Corregimos el fondo para que no haga "zoom" */
.hero-productos .slide-bg-image {
    background-attachment: fixed; /* Fija la imagen de fondo para evitar el efecto zoom al cambiar el tamaño del contenedor */
}

/* Estado inicial del hero */
.hero-productos {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 370px;
    padding: 4rem 1rem 8rem 1rem;
    position: relative; /* Añadimos position relative para controlar hijos absolutos */
    
    /* Transición más completa para una animación suave en ambas direcciones */
    transition: min-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-productos .slide-content-feature {
    transition: opacity 0.4s ease, transform 0.4s ease;
}


/* --- El estado ACTIVO de la búsqueda (MÁS COMPACTO) --- */

.hero-productos.search-active {
    min-height: 250px; /* Reducimos aún más la altura mínima */
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.hero-productos.search-active .slide-content-feature {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.hero-productos.search-active .interactive-search-pod {
    margin-top: 0;
    /* Centramos verticalmente la cápsula en el espacio reducido */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; /* Ajustamos el ancho para que no toque los bordes */
}



/* ======================================================= */
/* ===     DISEÑO MEJORADO PARA SECCIONES DE RESULTADOS     === */
/* ======================================================= */

/* Contenedor principal de CADA grupo de resultados */
.results-group-container {
    background-color: var(--color-superficie);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--color-fondo);
}
body.dark-mode .results-group-container {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
}

/* El nuevo encabezado de sección */
.apartado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.apartado-header__title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* El ícono representativo */
.apartado-header__icon {
    font-size: 1.5rem;
    color: var(--color-primario);
    background-color: var(--color-primario-transparente, rgba(0, 150, 136, 0.1));
    padding: 10px;
    border-radius: 10px;
}

/* Título de Apartado (le quitamos el borde) */
.apartado-title {
    font-size: 1.6rem;
    color: var(--color-texto-principal);
    margin: 0;
    padding: 0;
    border-bottom: none; /* Quitamos la línea de abajo */
}

/* Enlace "Ver todo" */
.apartado-header__ver-todo {
    text-decoration: none;
    color: var(--color-primario);
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.apartado-header__ver-todo:hover {
    transform: translateX(3px);
}

/* ======================================================= */
/* ===      VERSIÓN MÓVIL PARA SECCIONES DE RESULTADOS     === */
/* ======================================================= */
@media (max-width: 768px) {

    /* Hacemos el contenedor de cada grupo un poco más compacto */
    .results-group-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Ajustamos el encabezado para que no ocupe tanto espacio vertical */
    .apartado-header {
        margin-bottom: 1rem;
        gap: 0.75rem; /* Reducimos el espacio entre el ícono y el título */
    }

    /* Hacemos el ícono un poco más pequeño */
    .apartado-header__icon {
        font-size: 1.2rem;
        padding: 8px;
        border-radius: 8px;
    }

    /* Reducimos el tamaño del título para que quepa mejor */
    .apartado-title {
        font-size: 1.3rem;
    }

    /* Hacemos las flechas del carrusel siempre visibles y un poco más pequeñas en móvil, 
       ya que no existe el efecto "hover" con el dedo. */
    .results-swiper .swiper-button-next,
    .results-swiper .swiper-button-prev {
        opacity: 1; /* Siempre visibles */
        width: 35px;
        height: 35px;
    }

    .results-swiper .swiper-button-next::after,
    .results-swiper .swiper-button-prev::after {
        font-size: 0.8rem; /* Icono de flecha más pequeño */
    }

    /* Ajuste para la tarjeta dentro del carrusel en móvil */
    .results-swiper .producto-card {
        width: 250px; /* Un poco más angosta para dar más aire en pantallas pequeñas */
    }

    /* Ajustamos el contenedor de "Sin Resultados" */
    .no-results-container img {
        max-width: 200px;
    }
}




/* ======================================================= */
/* === TARJETAS PEQUEÑAS PARA CARRUSELES DE LA PÁGINA === */
/* ======================================================= */

.carrusel-mas-vendidos .producto-card,
.carrusel-todos-productos .producto-card {
    width: 280px; /* Ancho más compacto */
}

.carrusel-mas-vendidos .producto-card .producto-card-titulo,
.carrusel-todos-productos .producto-card .producto-card-titulo {
    font-size: 1.1rem; /* Título un poco más pequeño */
}

.carrusel-mas-vendidos .producto-card .producto-card-desc,
.carrusel-todos-productos .producto-card .producto-card-desc {
    font-size: 0.85rem; /* Descripción más pequeña */
}

.carrusel-mas-vendidos .producto-card .producto-card-precio,
.carrusel-todos-productos .producto-card .producto-card-precio {
    font-size: 1.3rem; /* Precio más pequeño */
}




/* ======================================================= */
/* ====== NUEVOS ESTILOS PARA VISTA DE CATÁLOGO (Adasa Style) ====== */
/* ======================================================= */

/* En productos.css */
.titulo-catalogo {
    font-family: 'Poppins', sans-serif; 
    font-weight: 800; 
    font-size: 2.5rem; 
    color: var(--color-texto-principal); 
    margin: 0; /* Aseguramos que el título no tenga margen superior */
}
.results-title-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-bottom: 1rem; 
    border-bottom: 1px solid var(--color-fondo);
}
body.dark-mode .results-title-header {
    border-bottom: 1px solid #444;
}
.results-title-header h1 {
    font-family: 'Poppins', sans-serif; 
    font-weight: 800; 
    font-size: 2rem; 
    color: var(--color-texto-principal); 
    margin: 0;
}
.results-title-header h2 {
    /* ESTA REGLA NO EXISTE y debe ser agregada para evitar el desbordamiento. */
    /* El elemento con el conteo de resultados debe ser un hijo de .results-title-header */
    font-size: 1.1rem; /* Ajusta el tamaño para que se vea como un subtítulo */
    font-weight: 600;
    color: var(--color-texto-secundario);
    margin: 0;
}
.pod-filters__select { /* Estilo para el select de ordenación */
     padding: 0.5rem 1rem; 
     border-radius: 4px; 
     border: 1px solid #ccc; 
     background-color: var(--color-superficie); 
     color: var(--color-texto-principal);
}
.results-title-header .pod-filters__select {
    color: var(--color-texto-principal);
    background-color: var(--color-fondo);
    border-color: var(--color-fondo);
}
body.dark-mode .results-title-header .pod-filters__select {
    color: var(--color-texto-principal);
    background-color: #333;
    border-color: #555;
}

/* 1. LAYOUT PRINCIPAL (Cuadrícula con Sidebar) */
.results-container-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    /* Reducimos el margen superior aquí también si es necesario */
    margin-top: 1.5rem; /* Reducido de 2rem para compactar */
}
.productos-resultados {
    /* La columna principal de resultados debe ser un contenedor de flujo normal */
    /* Asegúrate de que no tenga reglas que lo hagan comportarse como un grid o flex que interfiera */
    display: block; /* O display: flex; flex-direction: column; */
}

.productos-resultados .results-header {
    /* Aseguramos que la cabecera no tenga márgenes que la saquen de la cuadrícula. */
    margin-top: 0;
    margin-bottom: 2rem;
}

.productos-resultados #results-count {
    /* Estilo del conteo de resultados para que se vea bien */
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-texto-secundario);
    margin: 0;
    /* Evitamos que el texto se rompa */
    white-space: nowrap; 
}
/* --- Modificar Reglas de Sidebar en productos.css --- */
.sidebar-filtros {
    padding: 1.5rem;
    background-color: var(--color-superficie);
    border-radius: 8px;
    box-shadow: var(--sombra-caja);
    left: -90px;
    /* CRÍTICO: Configuración para hacerlo fijo y con scroll */
    position: sticky; 
    top: 10px; 
    max-height: 80vh; 
    overflow-y: auto; 
    
    /* CRÍTICO: Asegura que el sidebar estático en desktop sea visible */
    display: block !important; 
    width: 250px; /* Ancho fijo para desktop */
}
.sidebar-filtros h3 { 
    font-family: 'Poppins', sans-serif; 
    font-weight: 700; 
    font-size: 1.1rem; 
    color: var(--color-texto-principal); 
    margin-top: 0; 
    margin-bottom: 1rem;
}
.sidebar-filtros h3.color-primario {
     color: var(--color-primario); 
}
.filter-group-link { list-style: none; padding: 0; }
.filter-group-link a { 
    display: block; 
    padding: 8px 0; 
    color: var(--color-texto-secundario); 
    text-decoration: none; 
    font-size: 0.95rem; 
    border-bottom: 1px solid var(--color-fondo); 
    transition: color 0.2s;
}
.filter-group-link a:hover { color: var(--color-primario); }
body.dark-mode .filter-group-link a {
    border-bottom: 1px solid #333;
}


/* 3. CUADRÍCULA DE TARJETAS (Adasa) */

body.dark-mode .producto-card-simple {
     border: 1px solid #333;
}
.producto-card-simple:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    border-color: var(--color-primario);
}
.producto-card-simple img { 
    width: 90%; 
    height: 150px; /* Le damos una altura fija */
    object-fit: contain; 
    margin: 0.5rem 0; 
}
.producto-card-simple h3 { 
    font-size: 1rem; 
    color: var(--color-texto-principal); 
    min-height: 2.5rem;
    margin: 0.5rem 0; 
    font-weight: 600; 
    flex-grow: 1; /* Para empujar el botón hacia abajo */
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.producto-card-simple .boton-cotizar { 
    width: 100%; 
    margin-top: 1rem; 
    padding: 10px; 
}
.producto-card-simple-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}


/* Responsividad Móvil (Ocultamos sidebar en móvil) */
@media (max-width: 992px) {
    .results-container-layout {
        grid-template-columns: 1fr;
    }
   
    .producto-card-simple img {
        height: 120px;
    }
}


/* Añadir a productos.css */
.producto-card-simple-info {
    margin-top: 0.5rem;
    text-align: center;
    width: 100%;
}
.producto-card-simple-precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primario);
    display: block; /* Para que cada uno ocupe su propia línea si es necesario */
}
.producto-card-simple-sku {
    font-size: 0.85rem;
    color: var(--color-texto-secundario);
    display: block;
    margin-top: 0.2rem;
}


/* --- ESTILOS PARA PAGINACIÓN --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 0.5rem;
    grid-column: 1 / -1; 
    /* Agregamos flex-wrap para asegurar que, si hay muchos botones, se envuelvan */
    flex-wrap: wrap; 
}

.pagination-link {
    text-decoration: none;
    color: var(--color-texto-principal);
    background-color: var(--color-superficie);
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 600;
    flex-grow: 0; 
    flex-shrink: 0;
    
    white-space: nowrap; /* Evita que el texto se rompa */

}

.pagination-link:hover:not(.active):not(.disabled) {
    background-color: var(--color-fondo);
    color: var(--color-primario);
    border-color: var(--color-primario);
}

.pagination-link.active {
    background-color: var(--color-primario);
    color: white;
    border-color: var(--color-primario);
    cursor: default;
}

.pagination-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}


/* --- Estilos para Checkboxes de Filtro --- */
.filter-checkbox-label {
    display: flex;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-texto-principal);
    transition: color 0.2s;
}

.filter-checkbox-label:hover {
    color: var(--color-primario);
}

.filter-checkbox-input {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: var(--color-primario); /* Color del checkbox al seleccionarse */
}

/* Ocultar el separador para los ítems de filtro si usas UL/LI */
.filter-group-link li {
    border-bottom: 1px solid var(--color-fondo);
}
.filter-group-link li:last-child {
    border-bottom: none;
}
.filter-group-link a {
    /* Eliminar estilos de borde inferior del <a> anterior */
    border-bottom: none;
    padding: 0;
}


/* --- Estilos para Botón Ver Más --- */
.toggle-filter-btn-container {
    list-style: none;
    padding: 10px 0;
    text-align: center;
    border-bottom: 1px solid var(--color-fondo);
}
.toggle-filter-btn {
    font-size: 0.9rem;
    color: var(--color-primario) !important;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.toggle-filter-btn:hover {
    opacity: 0.8;
}

/* Contenido oculto */
.ver-mas-content {
    /* El display: none inicial lo maneja JS */
}

/* Asegurar que las listas dentro del ver-mas se vean como LIs normales */
.ver-mas-content li {
    list-style: none;
    padding: 0;
}

/* --- Estilos para la Nueva Estructura de Acordeón de Familias --- */

.family-accordion-list {
    /* Resetea cualquier estilo UL/LI que interfiera */
    padding-left: 0;
}

.family-item {
    list-style: none;
    border-bottom: 1px solid var(--color-fondo);
}

.family-item:last-child {
    border-bottom: none;
}

.family-label {
    /* CRÍTICO: Usar Flexbox para alineación */
    display: flex;
    align-items: center; /* Alinea verticalmente los ítems (checkbox, texto, icono) */
    
    /* Permite que el contenido se extienda */
    width: 100%; 
    padding: 10px 0; 
    position: relative;
    cursor: pointer; /* Indica que toda el área es clickeable */
    
    font-weight: 700;
    color: var(--color-texto-principal);
    font-size: 0.95rem;
}

.family-label input[type="checkbox"] {
    margin-right: 8px; /* Espacio entre el checkbox y el texto */
    flex-shrink: 0; /* Evita que se encoja */
    width: 16px;
    height: 16px;
}
.family-toggle-icon {
    /* Mueve el ícono al extremo derecho y asegura que el texto tenga espacio para crecer */
    margin-left: auto; /* Empuja la flecha a la derecha */
    margin-right: 5px; /* Pequeño margen a la derecha */
    flex-shrink: 0; /* Evita que el ícono sea afectado por el crecimiento del texto */
    font-size: 0.8rem;
    color: var(--color-primario);
    transition: transform 0.3s;
    pointer-events: all; /* Asegura que la flecha sea el objetivo del click */
}

/* Rotar la flecha cuando está activo */
.family-toggle-icon.active {
    transform: rotate(180deg);
}

/* Lista de Subfamilias */
/* La lista de Subfamilias */
.subfamily-list {
    list-style: none;
    /* CRÍTICO: Aumentar la indentación para separar de la Familia Principal */
    padding-left: 20px; 
    padding-top: 5px;
    padding-bottom: 5px;
    margin-top: 0;
    margin-bottom: 0;
    background-color: var(--color-fondo); /* Fondo sutil para distinguir el grupo */
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* La etiqueta de las Subfamilias */
.subfamily-list .filter-checkbox-label {
    /* Ajusta el padding para que no sea tan grande como la Familia Padre */
    padding: 6px 0; 
    font-weight: 400;
}

/* El ícono de la flecha debe posicionarse para no interferir con el checkbox */

/* --- Estilo para los puntos suspensivos de la paginación --- */
.pagination-dots {
    color: var(--color-texto-secundario);
    padding: 8px 5px;
    font-weight: 600;
}

/* --- Estilo para el botón Limpiar Filtros --- */
.boton-limpiar-filtros {
    width: 100%;
    margin-top: 1.5rem;
    padding: 10px;
    background-color: #f8f8f8; /* Color suave */
    color: var(--color-secundario);
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.boton-limpiar-filtros:hover {
    background-color: var(--color-primario);
    color: white;
}


/* CSS para el Overlay y el Spinner */
.loader-overlay {
    display: none; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* CAMBIO CLAVE: Posición fija para cubrir toda la ventana */
    position: fixed; 
    top: 0;
    left: 0;
    
    /* Aseguramos que cubra toda la ventana */
    width: 100vw; 
    height: 100vh; 
    
    /* Estética */
    background-color: rgba(255, 255, 255, 0.9); /* Fondo más opaco */
    z-index: 9999; /* Z-index muy alto para estar SIEMPRE encima de todo */
}

.spinner {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid var(--color-primario, #007bff); /* Blue/Primary color */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* --- NUEVOS ESTILOS PARA LA TARJETA COMPACTA DEL CARRUSEL --- */

/* 1. Contenedor de Imagen (Asegura que no se corte) */
.producto-card-imagen-fit {
    padding: 10px; 
    background-color: var(--color-fondo); /* Fondo claro para destacar la imagen */
    /* Nueva altura mínima y ajuste para contener la imagen */
    min-height: 180px; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Evita desbordamiento si la imagen es gigante */
}

.producto-card-imagen-fit img {
    /* La clave: 'contain' para que se vea completa, sin estirar y sin cortar */
    width: 100%;
    height: 100%;
    object-fit: contain; 
    max-height: 180px; /* Limita la altura de la imagen real */
    transition: transform 0.3s ease;
}

.producto-card:hover .producto-card-imagen-fit img {
    transform: scale(1.05); /* Zoom sutil */
}

/* 2. Contenido Compacto (Eliminamos el crecimiento del texto) */
.producto-card-contenido-compacto {
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.producto-card-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0; /* Menos margen inferior */
    line-height: 1.3;
    /* Quitamos el truncado de varias líneas que ya no necesitamos */
    display: block; 
    white-space: normal;
    overflow: visible;
}

/* 3. Fila de Precio y SKU */
.producto-card-info-row {
    display: flex;
    align-items: baseline; /* Alinea texto por la base */
    gap: 10px;
    margin-bottom: 0.75rem;
}
.producto-card-precio {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primario);
    line-height: 1;
}
.producto-card-sku-carrusel {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    margin-left: auto; /* Empuja el SKU a la derecha */
}
.precio-anterior-card {
    font-size: 0.8rem;
    color: #dc3545; /* Rojo para el precio tachado */
    text-decoration: line-through;
    margin-right: -5px; /* Superpone un poco el tachado al precio final */
}

/* 4. Pie de Tarjeta (Familia + Botón) */
.producto-card-pie-nuevo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-fondo);
}
.producto-card-familia {
    color: var(--color-texto-secundario);
    font-size: 0.85rem;
    font-weight: 600;
}
.boton-ver-mas-card {
    background: none;
    border: none;
    color: var(--color-primario);
    font-weight: 700;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.boton-ver-mas-card:hover {
    background-color: var(--color-fondo);
}


/* --- ESTILOS PARA TARJETA DE RESULTADOS SIMPLES (crearCardAdasa) --- */

.producto-card-simple-titulo {
    font-size: 1.1rem; 
    margin: 0.5rem 0; 
    font-weight: 700; 
    line-height: 1.3;
    color: var(--color-texto-principal);
}
.producto-card-imagen-fit-simple {
    width: 100%; 
    height: 150px; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    margin-bottom: 0.5rem;
}
.producto-card-imagen-fit-simple img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.producto-card-simple-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 5px;
    margin-bottom: 0.75rem;
}
.producto-card-simple-precio {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primario);
}
.producto-card-simple-sku {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
}

.producto-card-simple-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-fondo);
    margin-top: auto; /* Empuja al final */
}

.producto-card-familia-simple {
    color: var(--color-texto-secundario);
    font-size: 0.85rem;
    font-weight: 600;
}
.boton-ver-mas-card-simple {
    background: var(--color-primario);
    border: none;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s, transform 0.2s;
}
.boton-ver-mas-card-simple:hover {
    background-color: var(--color-primario-hover);
    transform: translateY(-1px);
}


/* ======================================================= */
/* === ESTILOS PARA TARJETAS DE CARRUSEL ÚNICAS (dh-promo-card) === */
/* ======================================================= */

.dh-promo-card {
    /* 1. Contenedor Base */
    background-color: var(--color-superficie);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    
    position: relative; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 400px;
    /* ANCHO CLAVE para que quepan varias tarjetas */
    width: 260px; 
    margin: 0 auto; 
}

.dh-promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 2. Imagen (Asegura que se vea completa) */
.dh-promo-card__imagen-contenedor {
    padding: 10px; 
    background-color: var(--color-fondo); 
    min-height: 180px; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}

.dh-promo-card__imagen-contenedor img {
    /* La clave: 'contain' para que se vea completa y no cortada */
    width: 100%;
    height: 100%;
    object-fit: contain; 
    max-height: 160px;
}

/* 3. Contenido y Título */
.dh-promo-card__contenido {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}
.dh-promo-card__titulo {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

/* 4. Fila de Precio y SKU */
.dh-promo-card__info-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 0.75rem;
}
.dh-promo-card__precio {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primario);
    line-height: 1;
}
.dh-promo-card__sku {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    margin-left: auto; /* Empuja el SKU a la derecha */
}
.dh-promo-card__precio-anterior {
    font-size: 0.8rem;
    color: #dc3545;
    text-decoration: line-through;
    margin-right: -5px;
}

/* 5. Pie de Tarjeta (Familia + Botón) */
.dh-promo-card__pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-fondo);
    margin-top: auto;
}
.dh-promo-card__familia {
    color: var(--color-texto-secundario);
    font-size: 0.85rem;
    font-weight: 600;
}
.dh-promo-card__btn-ver-mas {
    background: none;
    border: none;
    color: var(--color-primario);
    font-weight: 700;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.dh-promo-card__btn-ver-mas:hover {
    background-color: var(--color-fondo);
}

/* 6. Badge de Oferta */
.dh-promo-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}
/* AÑADIR A productos.css */
/* CRÍTICO: Sobrescribir la regla global que rompe Swiper */
.swiper-wrapper .swiper-slide {
    width: auto !important;
}

/* AÑADIR A index.css o productos.css */
/* Estilo para la descripción del carrusel (dh-promo-card) */
.dh-promo-card__descripcion {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    margin: 0 0 0.5rem 0;
    /* Truncado a una sola línea para que no ocupe demasiado espacio */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estilo para la descripción de los resultados (producto-card-simple) */
.producto-card-simple__descripcion {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    margin: 0.2rem 0 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ¡CRÍTICO! AÑADE ESTO A productos.css */
/* Esto obliga a cada diapositiva a tomar solo el ancho de su contenido (la tarjeta dh-promo-card: 260px) */
.swiper-wrapper .swiper-slide {
    width: auto !important;
}

/* AÑADIR A productos.css */

.hero-buttons-wrapper {
    /* 1. Usar Flexbox para controlar la alineación */
    display: flex;
    /* 2. Empujar el contenido a la derecha */
    justify-content: flex-end;
    /* 3. Asegurar que ocupe el ancho máximo para la alineación */
    width: 100%;
    max-width: 800px; /* Usar el mismo max-width que tu cápsula de búsqueda */
    margin: 1rem auto 0 auto; /* Centrar el contenedor con margen superior */
}

/* Regla para asegurar que el botón de regreso use el ancho completo del contenedor
   cuando esté visible para mantener la alineación a la derecha si es el único visible */
#back-to-home-btn {
    /* Si este botón se vuelve visible, queremos que ocupe todo el ancho
       del wrapper y se alinee a la izquierda (por defecto de Flex) */
    width: 100%;
    text-align: center;
}

/* ======================================================= */
/* === MEJORA DE DISEÑO: BOTÓN "VER TODOS LOS PRODUCTOS" (ID: #show-catalog-btn) === */
/* ======================================================= */

#show-catalog-btn {
    /* 1. Reset y Layout */
    display: block; /* Ocupa todo el ancho disponible */
    width: 100%;
    margin-top: 1rem; /* Espacio superior */
    
    /* 2. Estilo Base (Glassmorphism integrado) */
    padding: 14px 25px; /* Más aire interno */
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px; /* Bordes suaves */

    /* COLORES: Usamos un color que contraste con el fondo oscuro y refleje la marca (turquesa) */
    background-color: var(--color-primario); /* Tu color principal */
    color: #fff; /* Texto blanco */
    border: 2px solid transparent; /* Inicialmente sin borde visible */
    
    /* 3. Animación y Sombra (Para darle vida) */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(var(--color-primario-rgb), 0.5); /* Sombra suave turquesa */
}

/* Efecto Hover: Más brillo y un pequeño levantamiento */
#show-catalog-btn:hover {
    background-color: var(--color-primario-hover); /* Un tono ligeramente más oscuro o brillante */
    border-color: #fff; /* Borde blanco sutil para un efecto "glow" */
    transform: translateY(-3px) scale(1.01); /* Levanta el botón ligeramente */
    box-shadow: 0 8px 25px rgba(var(--color-primario-rgb), 0.7); /* Sombra más intensa */
}

/* Modo Oscuro: Asegurar que el texto se vea bien */
body.dark-mode #show-catalog-btn {
    background-color: var(--color-primario);
    color: #fff;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    #show-catalog-btn {
        padding: 12px 15px;
        font-size: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(var(--color-primario-rgb), 0.4);
    }
}


/* ======================================================= */
/* === MEJORA DE DISEÑO Y ANIMACIÓN DEL BOTÓN COTIZAR === */
/* ======================================================= */

/* Estilo Base del Botón (dh-promo-card__btn-cotizar-simple) */




/* ======================================================= */
/* === MEJORA DE ESPACIADO Y REJILLA DE RESULTADOS === */
/* ======================================================= */

/* Contenedor principal de la cuadrícula de tarjetas */

/* Tarjeta individual (producto-card-simple) */


/* ======================================================= */
/* === MEJORA DE DISEÑO Y ANIMACIÓN DEL BOTÓN COTIZAR === */
/* ======================================================= */




/* productos.css - Líneas ~1200 (o busca .dh-promo-card__btn-cotizar-simple) */
/* ======================================================= */
/* === MEJORA DE DISEÑO Y ANIMACIÓN DEL BOTÓN COTIZAR === */
/* ======================================================= */
.dh-promo-card__btn-cotizar {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    
    /* Diseño principal - Turquesa y Sólido */
    background-color: var(--color-primario); 
    color: #fff !important; /* Texto blanco forzado */
    border: 2px solid var(--color-primario); 
    border-radius: 6px;
    
    /* Animación y Sombra */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Sombra sutil por defecto */
    
    margin-left: auto; 
}

.dh-promo-card__btn-cotizar:hover {
    background-color: var(--color-superficie); /* Fondo blanco en hover */
    color: var(--color-primario) !important; /* Texto primario en hover */
    border-color: var(--color-primario);
    
    /* Efecto de elevación */
    transform: translateY(-3px) scale(1.03); 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* Sombra más fuerte */
}

/* Aplicamos el mismo estilo al botón en los carruseles (si usas esta clase) */
.dh-promo-card__btn-cotizar {
    /* Mantenemos el mismo estilo base */
    @extend .dh-promo-card__btn-cotizar-simple;
}
/* Ajuste de Contenido Interno */

/* Título */
.producto-card-simple-titulo {
    font-size: 1.2rem; /* Ligeramente más grande */
    font-weight: 700;
    margin: 0.5rem 0 0.2rem 0; /* Menos margen inferior */
}

/* Descripción */
.producto-card-simple__descripcion {
    /* Le damos un poco más de espacio al crecer */
    margin: 0.2rem 0 0.75rem 0; 
}

/* Pie (Familia y Botón) */
.producto-card-simple-pie {
    padding-top: 1rem; /* Más espacio entre la info y el pie */
}


/* productos.css - Nueva sección de estilos para el botón simple */
/* ======================================================= */
/* === ESTILOS CORREGIDOS DEL BOTÓN COTIZAR (Clase: .boton-cotizar-simple) === */
/* ======================================================= */

.boton-cotizar-simple {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none; /* Quita el subrayado del link */
    text-align: center;
    
    /* Diseño principal - Turquesa y Sólido */
    background-color: var(--color-primario); 
    color: #fff !important; /* Texto blanco forzado */
    border: 2px solid var(--color-primario); 
    border-radius: 6px;
    
    /* Animación y Sombra */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Sombra sutil por defecto */
    
    margin-left: auto; 
}

.boton-cotizar-simple:hover {
    background-color: var(--color-superficie); /* Fondo blanco en hover */
    color: var(--color-primario) !important; /* Texto primario en hover */
    border-color: var(--color-primario);
    
    /* Efecto de elevación */
    transform: translateY(-3px) scale(1.03); 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* Sombra más fuerte */
}

/* Nota: Eliminamos la sintaxis @extend no válida del archivo CSS final. */



/* productos.css - Nueva regla para alinear los botones del Hero */
.hero-buttons-wrapper {
    /* Usar Flexbox para controlar la alineación */
    display: flex;
    /* Empujar el contenido a la derecha */
    justify-content: flex-end; /* <-- Clave para mover a la derecha */
    /* Asegurar que ocupe el ancho máximo para la alineación */
    width: 100%;
    max-width: 800px; /* Usar el mismo max-width que tu cápsula de búsqueda */
    margin: 1rem auto 0 auto; /* Centrar el contenedor con margen superior */
}

/* Forzar el botón a la derecha solo en PC si hay espacio */
#back-to-home-btn {
    /* Alineación de Flex ya lo hará moverse a la derecha */
    margin-left: 1rem; /* Pequeño espacio a la izquierda para separarlo si hay otros elementos */
}

/* ======================================================= */
/* === AJUSTES GENERALES PARA MÓVILES Y TABLETAS (<= 992px) === */
/* ======================================================= */

@media (max-width: 992px) {
    
    /* 1. LAYOUT PRINCIPAL: Sidebar oculto, Tarjetas a 100% */
    .results-container-layout {
        /* Desactiva el diseño de dos columnas */
        grid-template-columns: 1fr;
        gap: 1.5rem; /* Menos espacio entre secciones */
        margin-top: 1.5rem;
    }
    
    /* Ocultamos el Sidebar por defecto y lo haremos aparecer con un botón (ver más abajo) */
   .sidebar-filtros {
        display: block !important; /* Asegurar que exista */
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        
        /* CORRECCIÓN CLAVE: */
        z-index: 2001 !important; /* Nivel MÁS alto que el overlay (2001 > 2000) */
        background-color: #ffffff; /* Fondo blanco sólido OBLIGATORIO */
        
        transform: translateX(-100%); /* Oculto a la izquierda */
        transition: transform 0.3s ease-in-out;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        overflow-y: auto; /* Permite scroll si hay muchos filtros */
    }
    
    .sidebar-filtros.visible {
        transform: translateX(0);
    }

    /* 2. BARRA DE BÚSQUEDA Y BOTONES DEL HERO */
    .hero-productos {
        padding-top: 1rem;
        padding-bottom: 2rem; /* Más compacto */
    }
    .interactive-search-pod {
        padding: 1rem;
        border-radius: 16px;
    }
    .pod-filters {
        /* Los filtros de la cápsula (selects) se apilan verticalmente */
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding-top: 1rem;
    }
    
    /* 3. ALINEACIÓN DE BOTONES DEL HERO */
    .hero-buttons-wrapper {
        padding: 0 1rem;
        flex-direction: column; /* Apila los botones si hay más de uno */
        gap: 0.75rem;
        margin-top: 0.5rem;
    }
    #show-catalog-btn, #back-to-home-btn {
        width: 100%;
        margin: 0 !important;
        font-size: 0.95rem;
    }
    
    /* 4. RESULTADOS DE BÚSQUEDA (Cuadrícula) */
 .results-grid-cards {
        /* Forzamos 2 columnas exactas */
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 10px; /* Espacio pequeño entre tarjetas */
        padding: 0 5px;
    }

    /* 5. DISEÑO DE TARJETA (MUY COMPACTO) */
  .producto-card-simple {
        height: 100%; /* Altura completa */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .producto-card-imagen-fit-simple {
        height: 120px; /* Altura fija para la imagen */
        padding: 5px;
    }
    
    .producto-card-imagen-fit-simple img {
        max-height: 100%;
        width: auto;
    }
    
    .producto-card-simple-titulo {
        font-size: 0.9rem;
        margin: 5px 0;
        /* Limitar a 2 líneas para que no descuadre */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .producto-card-simple__descripcion,
    .producto-card-familia-simple {
        display: none; /* Ocultamos descripción y familia para ahorrar espacio */
    }

    /* Fila de Precio/SKU (Ahora solo queda Precio/SKU) */
    .producto-card-simple-info {
        flex-direction: column; /* Apilamos precio y SKU */
        align-items: flex-start;
        padding: 0;
    }
   .producto-card-simple-precio {
        font-size: 1rem;
    }
    .producto-card-simple-sku {
        font-size: 0.8rem;
        margin-top: 0;
    }

    /* Pie: Solo queda el botón */
    .producto-card-simple-pie {
        padding-top: 0.5rem;
        border-top: none; /* Quitamos la línea divisoria */
        justify-content: center; /* Centramos el botón si es el único elemento */
    }

    /* Botón (más pequeño y ancho completo) */
    .boton-cotizar-simple {
        padding: 5px 10px;
        font-size: 0.8rem;
        width: 100%;
    }
}


/* ======================================================= */
/* === BOTÓN FLOTANTE PARA FILTROS (Solo en Móviles) === */
/* ======================================================= */

.toggle-sidebar-float-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    background-color: var(--color-primario);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none; /* Oculto por defecto, visible solo en móvil */
    transition: transform 0.3s ease;
}

.toggle-sidebar-float-btn:hover {
    transform: scale(1.05);
    background-color: var(--color-primario-hover);
}

.toggle-sidebar-float-btn i {
    margin-right: 8px;
}


/* Hacemos que el botón flotante se muestre en móviles */
@media (max-width: 992px) {
    .toggle-sidebar-float-btn {
        display: inline-block; 
        /* Aseguramos que no interfiera con el botón de WhatsApp si está activado */
        bottom: 90px;
    }
}

/* productos.css - Nueva Regla para el Overlay Móvil */





/* ======================================================= */
/* === AJUSTES Y REFUERZO DE PANELES MÓVILES (productos.css) === */
/* ======================================================= */

/* 1. Estilos para el botón de cerrar la barra lateral en móvil */
.sidebar-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-texto-secundario);
    cursor: pointer;
    z-index: 1001; /* Asegura que esté por encima de los filtros */
    line-height: 1;
    padding: 10px;
    transition: color 0.3s;
}
.sidebar-close-btn:hover {
    color: var(--color-primario);
}


#sidebar-overlay {
    /* Forzamos que esté oculto al cargar la página */
    display: none; 
    
    /* Propiedades para cuando JS lo active */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998 !important; /* Debajo del sidebar */
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(2px); /* Efecto borroso opcional */
}

/* 2. Regla CRÍTICA para bloquear el scroll del body */
body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 992px) {

    
  .sidebar-filtros.visible {
        transform: translateX(0) !important; /* Lo trae a la vista */
    }
    body.dark-mode .sidebar-filtros {
        background-color: #1e1e1e; /* Fondo oscuro sólido */
    }
}

/* 2. REFUERZO DEL SIDEBAR EN MÓVIL (Reglas clave para el deslizamiento) */
@media (max-width: 992px) {
    
    /* Reafirma la configuración de la ventana deslizable */
  
    
  

    /* 3. Botón Flotante (Refuerzo de posición) */
    .toggle-sidebar-float-btn {
        display: inline-block; 
        bottom: 90px;
        left: 20px; /* Asegura que esté en la izquierda */
        z-index: 999;
    }
    
    /* 4. Overlay Oscuro (Efecto Modal) */
    /* Este pseudo-elemento actúa como la capa oscura detrás del panel */
    .sidebar-filtros.visible::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1; 
    }

    /* productos.css - Nueva Regla para el Overlay Móvil */

/* productos.css - Nueva Regla para el Overlay Móvil */




/* La clase "visible" en JS ahora controla el display del overlay */
/* NO SE NECESITA REGLA ADICIONAL AQUÍ */

/* La clase "visible" en JS ahora controla el display del overlay */
/* NO SE NECESITA REGLA ADICIONAL AQUÍ */


/* 5. Estilo clave para deshabilitar el scroll de la página al abrir el panel */
/* Esta clase debe ser agregada al <body> con JavaScript */
body.sidebar-open {
    overflow: hidden;
}

}

/* 5. Estilo clave para deshabilitar el scroll de la página al abrir el panel */
/* Esta clase debe ser agregada al <body> con JavaScript (ya está en el JS que te di) */
body.sidebar-open {
    overflow: hidden;
}

/* 1. Por defecto, ocultar el sidebar estático */
#sidebar-filtros-estatico {
    display: none !important;
}

@media (max-width: 992px) {

    /* Ajustamos el sidebar para dejar espacio al footer fijo */
    #sidebar-filtros-estatico {
        padding-bottom: 80px !important; /* Espacio para que el contenido no quede tapado por el botón */
    }

    /* Contenedor del botón (Sticky Footer) */
    .sidebar-footer-movil {
        position: absolute; /* O 'fixed' si prefieres, pero absolute respecto al sidebar funciona mejor con scroll */
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        padding: 15px 20px;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.1); /* Sombra hacia arriba */
        border-top: 1px solid #eee;
        z-index: 20005;
        box-sizing: border-box;
        
        /* Truco para que se quede fijo visualmente si usas scroll dentro del sidebar */
        position: sticky;
    }

    /* El Botón "Aplicar" */
    .boton-aplicar-filtros {
        width: 100%;
        background-color: var(--color-primario);
        color: #fff;
        border: none;
        padding: 14px;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(var(--color-primario-rgb), 0.3);
        transition: background-color 0.3s;
    }

    .boton-aplicar-filtros:active {
        transform: scale(0.98);
        background-color: var(--color-primario-hover);
    }
}
/* 2. Mostrar el sidebar estático SOLO en pantallas grandes */
@media (min-width: 993px) {
    /* 3. El layout de resultados debe estar visible para que el sidebar se muestre */
    #search-results-content.visible .results-container-layout #sidebar-filtros-estatico {
        display: block !important; /* Forzar visibilidad */
        position: sticky; /* Mantenemos el scroll fijo */
    }
}

/* Contenedor principal de la fila de filtros */
.pod-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between; /* Separa los grupos */
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Grupo de selectores (Izquierda) */
.pod-filters__group {
    display: flex;
    gap: 1rem;
    flex-grow: 1; /* Ocupa el espacio disponible */
}

/* Estilo de los selects individuales */
.pod-filters__select {
    flex: 1; /* Se distribuyen equitativamente */
    min-width: 150px; /* Evita que se hagan muy pequeños */
    
    /* Tus estilos existentes... */
    appearance: none; -webkit-appearance: none;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.95rem; border-radius: 12px;
    cursor: pointer; transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1.5em;
}

/* Botón a la derecha */

@media (max-width: 992px) {
    
    /* 1. OCULTAR FILTROS SUPERIORES EN MÓVIL */
    /* Ocultamos el grupo de selects, pero dejamos el botón "Ver todos" si lo deseas, 
       o puedes ocultar todo el contenedor .pod-filters si prefieres */
    .pod-filters__group {
        display: none !important;
    }
    
    /* Ajustamos el contenedor para que no deje un hueco enorme */
    .pod-filters {
        padding-top: 0;
        border-top: none;
        justify-content: center; /* Centra el botón que quede */
    }

    /* 2. ARREGLAR SIDEBAR (PANTALLA NEGRA) */
    /* El problema es el z-index y la posición. Aseguramos que esté ENCIMA del overlay */


 

    /* El fondo oscuro (Overlay) */
    #sidebar-overlay {
        z-index: 2000 !important; /* Nivel alto */
        background-color: rgba(0, 0, 0, 0.7); /* Oscuro semi-transparente */
    }
}








/* ======================================================= */
/* === MODAL DE VISTA RÁPIDA DE PRODUCTO (NUEVOS ESTILOS) === */
/* ======================================================= */

/* 1. Overlay (Fondo Oscuro) */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Oscuro y opaco */
    z-index: 5000; /* Alto z-index para estar sobre todo */
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    
    /* Animación de opacidad para entrada/salida */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.product-modal-overlay.visible {
    opacity: 1;
}

/* 2. Contenido del Modal (La caja blanca o oscura) */
.product-modal-content {
    background-color: var(--color-superficie);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    width: 95%; 
    max-width: 900px; 
    
    /* CORRECCIÓN: Quitamos el scrollbar forzado. El cuerpo del BODY es el que debe tener scroll. */
    max-height: none; /* Quitamos la restricción de altura máxima */
    overflow-y: hidden; /* <--- ¡ESTO LO ELIMINA! */
    
    /* Animación de entrada: sube y aparece */
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.product-modal-overlay.visible .product-modal-content {
    transform: scale(1);
}

/* 3. Bloqueo de Scroll del Cuerpo */
body.modal-open {
    overflow: hidden;
}

/* 4. Botón de Cerrar (X) */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--color-texto-principal);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5002;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background-color: var(--color-primario);
    color: #fff;
    transform: rotate(90deg);
}

/* Modo Oscuro para el Modal */
body.dark-mode .product-modal-content {
    background-color: #1e1e1e;
}
body.dark-mode .modal-close-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-texto-principal);
}


/* 5. Estilos de Contenido (GRID Responsivo) */
.modal-product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* 2 columnas: Imagen (más pequeña) y Detalles */
    gap: 2rem;
    padding: 3rem;
    padding-top: 1.5rem; /* Ajuste para el botón de cerrar */
}

/* 6. Contenedor de Imagen */
.modal-image-container {
    padding: 1rem;
    background-color: var(--color-fondo);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}
.modal-image-container:hover img {
    transform: scale(1.02);
}


/* 7. Contenedor de Info */
.modal-info-container {
    padding-top: 1rem;
}
.modal-titulo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-texto-principal);
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.modal-descripcion {
    color: var(--color-texto-secundario);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-price-sku {
    border-top: 1px solid var(--color-fondo);
    padding-top: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.modal-precio {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-primario);
    margin-bottom: 0.25rem;
}
.modal-sku {
    font-size: 0.9rem;
    color: #888;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.modal-tags span {
    background-color: var(--color-fondo);
    color: var(--color-texto-secundario);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
body.dark-mode .modal-tags span {
    background-color: #2c2c2c;
    color: #ccc;
}



.modal-boton-cotizar:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}

.modal-cotizar-info {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
}
.modal-cotizar-info a {
    color: var(--color-primario);
    text-decoration: underline;
}


/* 9. Responsividad del Modal (Móvil) */
@media (max-width: 768px) {
    .modal-product-detail-grid {
        /* Apilamos Imagen y Detalles */
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        padding-top: 1.5rem;
        gap: 1rem;
    }
    
    .modal-titulo {
        font-size: 1.5rem;
    }
    
    .modal-precio {
        font-size: 2rem;
    }
    
    .modal-boton-cotizar {
        font-size: 1rem;
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .modal-image-container {
        height: 250px;
    }
    .product-modal-content {
        max-height: 90vh; 
        overflow-y: auto; /* Dejamos el scroll solo si la altura excede el 90% de la ventana en PC */
    }
}

/* ======================================================= */
/* === ESTILO ESPECÍFICO DEL BOTÓN 'SOLICITAR COTIZACIÓN' EN EL MODAL === */
/* ======================================================= */

.modal-boton-cotizar {
    /* 1. Reset de Estilos Base */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espacio entre el ícono y el texto */
    width: 90%;
    
    /* 2. Diseño de Marca (WhatsApp) */
    background-color: #25D366; /* Verde de WhatsApp */
    color: white !important; /* Texto blanco forzado */
    border: 2px solid #25D366; 
    border-radius: 10px; /* Bordes suaves */
    
    /* 3. Tipografía y Tamaño */
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    
    /* 4. Animación y Sombra */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); /* Sombra que lo levanta */
}

/* Efecto Hover: Cambia de color sutilmente y se levanta */
.modal-boton-cotizar:hover {
    background-color: #128C7E; /* Verde más oscuro de WhatsApp */
    border-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6); /* Sombra más fuerte al levantar */
}

/* 5. Ajuste para PC (Redirección a Contacto.php) */

/* El JS añade un ícono diferente ('fa-solid fa-file-lines') y cambia el texto */
/* Aplicamos un diseño más "Formal" o Secundario para el modo PC */
.modal-boton-cotizar:not(.desktop-contact) {
    /* Aseguramos que el botón de WhatsApp puro se vea bien, pero no usamos esta regla porque el JS ya lo cambia */
}

/* Sobrescribimos el diseño de WhatsApp si el JS detecta modo escritorio
   y le ha cambiado el contenido a "Solicitar Cotización" */
.modal-boton-cotizar:has(.fa-file-lines) {
    /* Diseño Secundario/Formal para redirección a contacto.php */
    background-color: var(--color-primario);
    border-color: var(--color-primario);
    color: white !important;
    box-shadow: 0 4px 15px rgba(var(--color-primario-rgb), 0.4);
}

.modal-boton-cotizar:has(.fa-file-lines):hover {
    background-color: var(--color-superficie);
    color: var(--color-primario) !important;
    border-color: var(--color-primario);
}

/* ==================================== */
/* === ESTILO DEL BADGE PARA TARJETA SIMPLE === */
/* ==================================== */
.producto-card-simple {
    position: relative; /* Esencial para posicionar el badge */
    overflow: hidden; /* Para que el badge diagonal se corte en la esquina */
}

.producto-card-simple__badge {
    position: absolute;
    top: 35px; /* Ajusta la altura desde arriba */
    right: 169px;
    z-index: 10;
    
    /* Apariencia del texto */
    text-align: center;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.5;
    color: white; /* Color del texto */
    
    /* Color de fondo y tamaño */
    background-color: #e74c3c; /* Rojo fuerte de promoción */
    padding: 2px 30px;
    width: 200px; 

    /* La magia de la diagonal */
    transform: rotate(45deg); 
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.etiqueta-promocion {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: red;
    color: white;
    font-weight: 700;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    z-index: 20;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}
/* Aseguramos que las cards sean el contenedor de la etiqueta */
.producto-card-simple,
.dh-promo-card {
    position: relative;
}

/* Etiqueta ¡EN PROMOCIÓN! para cuadrícula y carrusel */
.producto-card-simple__badge,
.dh-promo-card__badge {
    position: absolute;
    top: 35px;
    left: 169px;
    background-color: #e53935; /* rojo */
    color: #ffffff;            /* texto blanco */
    font-weight: 700;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    z-index: 10;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    text-transform: uppercase;
}
