/* ==========================================================================
   1. VARIABLES Y BASE
   ========================================================================== */
:root {
    --burgundy: #6b1414;
    --gold: #b8935a;
    --cream: #f8f6f2;
    --white: #ffffff;
    --text: #333333;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--cream);
    color: var(--text);
    line-height: 1.6;
}

/* ==========================================================================
   2. HEADER Y NAVEGACIÓN
   ========================================================================== */
.navbar {
    background: var(--white);
    height: 90px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.main-logo {
    height: 60px !important;
    /* Tamaño fijo para evitar desproporción */
    width: auto;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--burgundy);
    font-weight: 900;
    line-height: 1;
}

.slogan {
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--gold);
    font-weight: 700;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--gold);
}

.wa-pill {
    background: #25D366;
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-pill img {
    height: 18px;
    filter: brightness(0) invert(1);
}

/* ==========================================================================
   3. CENTRADO DEL BOTÓN VOLVER Y TÍTULO
   ========================================================================== */

/* Esto centra el bloque completo */
.seccion-coleccion {
    text-align: center;
    padding: 50px 20px;
}

/* Esto centra el botón "Volver al Catálogo" */
.enlace-atras {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Esto centra el título de la colección */
.titulo-minimalista {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--burgundy);
    margin: 0 auto;
}

/* ==========================================================================
   3. GRID Y BOTÓN (CORREGIDO)
   ========================================================================== */
.btn-ver-mas {
    /* Clase corregida para que coincida con tu HTML */
    background: var(--gold);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 15px;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-ver-mas:hover {
    background: var(--burgundy);
}

/* ==========================================================================
   AJUSTE DE TAMAÑO: TARJETA PROPORCIONAL Y CENTRADA
   ========================================================================== */

/* 1. La tarjeta: QUITAMOS alturas fijas */
.product-item {
    display: flex;
    flex-direction: column;
    height: auto !important;
    /* Que la caja solo mida lo que mide su contenido */
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
}

/* 2. La imagen: Reducimos su tamaño para que la caja sea más corta */
.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Esto la hace cuadrada y más pequeña */
    max-height: 300px;
    /* LIMITA aquí el largo de la foto */
    overflow: hidden;
}

.foto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Recorta los bordes para llenar el cuadrado sin deformar */
    opacity: 0;
    transition: opacity 0.8s ease;
}

.foto.active {
    opacity: 1;
}


/* ==========================================================================
   CONFIGURACIÓN DE LAS 4 COLUMNAS (Usando tus clases reales)
   ========================================================================== */

/* 1. EL CONTENEDOR (Lo que envuelve a los articles) */
.product-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    /* Aquí se crean las 4 columnas */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 2. LA TARJETA (Asegura que no se deforme) */
.product-item {
    width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 3. LA IMAGEN (Cuadrada y proporcional para que la vela se vea bien) */
.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Mantiene la proporción 1 a 1 */
    overflow: hidden;
}

.foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Evita que la vela se estire o se vea aplastada */
    position: absolute;
    top: 0;
    left: 0;
}

/* --- RESPONSIVO: CELULAR --- */
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columnas en tablet */
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr !important;
        /* 1 columna en celular */
    }
}


/* ==========================================================================
   ESTILOS UNIFICADOS: GRID, CARRUSEL Y EFECTO DIFUMINADO (LUMARA)
   ========================================================================== */

/* 1. EL CONTENEDOR DE LAS 4 COLUMNAS */
.product-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    /* 4 Columnas en PC */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 2. LA TARJETA (Compacta y alineada) */
.product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Hace que todas las tarjetas de la fila midan lo mismo */
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    /* Necesario para que el "Ver más" no se salga */
}

/* 3. CONTENEDOR DE IMAGEN (Cuadrado y base del efecto) */
.image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* Mantiene proporción 1:1 (Cuadrado) */
    background: #000;
    overflow: hidden;
}

.carrusel-fotos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: filter 0.5s ease;
}

.foto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Centra la vela sin deformarla */
    opacity: 0;
    transition: opacity 0.8s ease;
}

.foto.active {
    opacity: 1;
    z-index: 2;
}


/* 4. CAPA DE DESCRIPCIÓN (back-content) - ESTILO PREMIUM */
.back-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 28, 28, 0.9); /* Un toque más opaco para legibilidad */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Reducido un poco para dar aire al contenido */
    color: #fdfdfd !important;
    text-align: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Título interno de la descripción */
.back-content::before {
    content: "DETALLES";
    display: block;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--gold, #d4af37);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 5px;
    width: 60%; /* Línea decorativa centrada */
}

.description {
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Contenedor de lista para controlar el scroll interno */
.details-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.details-list p {
    margin: 0;
    font-size: 0.8rem;
}

/* Ajuste específico para el párrafo de AROMAS (el último) */
.details-list p:last-child {
    max-height: 70px; /* Altura máxima controlada */
    overflow-y: auto; /* Scroll si hay muchos aromas */
    padding: 0 5px;
    text-align: center;
}

/* Detalle decorativo antes de cada dato */
.details-list p::before {
    content: "✦ ";
    color: var(--gold, #d4af37);
    font-size: 0.7rem;
    margin-right: 5px;
}

/* --- Estilo de la barra de scroll para no romper la estética --- */
.details-list p:last-child::-webkit-scrollbar {
    width: 3px;
}
.details-list p:last-child::-webkit-scrollbar-thumb {
    background: var(--gold, #d4af37);
    border-radius: 10px;
}

/* Activación del efecto */
.product-item.active .back-content {
    opacity: 1;
    visibility: visible;
}

.product-item.active .carrusel-fotos {
    filter: blur(8px) brightness(0.5);
}




/* 5. BLOQUE DE INFORMACIÓN (Blanco y compacto) */
.product-info-block {
    padding: 11px !important;
    /* Espacio reducido */
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Empuja el botón al final */
    gap: 5px;
}

/* Alineación de nombres */
.product-info-block h3 {
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    min-height: 2.5em;
    /* Asegura que nombres cortos y largos ocupen lo mismo */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #333;
}

/* Precio */
.product-info-block p {
    margin: 0 0 10px 0 !important;
    font-weight: bold;
    color: #666;
}

/* Botón siempre al mismo nivel */
.btn-ver-mas {
    margin-top: auto;
    /* Truco final para alinear todos los botones abajo */
    align-self: center;
}

/* ==========================================================================
   SOLUCIÓN UNIFICADA: RESPONSIVO (MÓVIL Y TABLET)
   ========================================================================== */

/* 1. TABLETS (Pantallas medianas) */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

/* 2. CELULARES (UNA SOBRE OTRA) */
@media (max-width: 768px) {

    /* Ocultamos lo innecesario */
    .nav-links {
        display: none;
    }

    .modal-content {
        width: 95%;
    }

    .carousel-container {
        height: 250px;
    }

    /* FORZAMOS UNA COLUMNA EN EL GRID */
    section.product-grid-section .product-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 35px !important;
        /* Espacio para que no se vean pegadas */
        padding: 15px !important;
    }

    /* Aseguramos que la vela ocupe el ancho correcto */
    .product-item {
        width: 100% !important;
        max-width: 380px !important;
        /* Evita que se vea gigante en pantallas un poco más anchas */
    }

    /* Ajuste de títulos para que no se corten */
    .titulo-principal {
        font-size: 2.2rem;
    }
}

/* --- AJUSTE PARA EL FORMULARIO DINÁMICO --- */

/* Suavizado de los items de subcategoría */
.subcategoria-item {
    background: #ffffff !important;
    /* Blanco puro para limpieza */
    border-left: 5px solid var(--gold) !important;
    /* Usamos tu variable de oro */
    border-radius: 15px !important;
    /* Curvas más suaves */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    /* Sombra sutil, no acartonada */
    padding: 20px !important;
    margin-bottom: 25px !important;
}

/* Títulos de las categorías (RECORDATORIOS, CORPORATIVO) */
.subcategoria-item label {
    letter-spacing: 1px;
    margin-bottom: 15px !important;
    color: var(--burgundy) !important;
    /* Tu color vino para contraste elegante */
}

/* Estilizar los select e inputs para que no parezcan de Windows viejo */
.subcategoria-item select,
.subcategoria-item input {
    border: 1px solid #eee !important;
    background-color: #fdfdfd !important;
    border-radius: 10px !important;
    /* Bordes redondeados */
    padding: 12px !important;
    font-size: 14px !important;
    color: #555;
    transition: all 0.3s ease;
}

/* Efecto al hacer clic o pasar el mouse */
.subcategoria-item select:focus,
.subcategoria-item input:focus {
    outline: none;
    border-color: var(--gold) !important;
    box-shadow: 0 0 8px rgba(184, 147, 90, 0.2) !important;
    background-color: #fff !important;
}

/* 1. CORRECCIÓN DEL CONTENEDOR (Para que nada se salga) */
.subcategoria-item>div {
    display: grid !important;
    grid-template-columns: 1fr 1fr 80px !important;
    /* Mantenemos tus 3 columnas originales */
    gap: 12px !important;
    align-items: center !important;
}

/* 2. REPARACIÓN DEL INPUT DE CANTIDAD */
.subcategoria-item input[type="number"] {
    width: 100% !important;
    min-width: 60px !important;
    padding: 10px !important;
    text-align: center;
}

/* 3. RESPONSIVE (CELULARES) - Aquí es donde se ponen uno encima de otro */
@media (max-width: 768px) {
    .subcategoria-item>div {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }

    .subcategoria-item select,
    .subcategoria-item input {
        width: 100% !important;
        margin-bottom: 5px;
    }
}

/* 1. Centra todo el contenido de la sección */
.hero-coleccion {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 2. Estilo y centrado del botón "Volver al Catálogo" */
.link-retroceso {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 30px;
    transition: 0.3s;
}

.link-retroceso:hover {
    color: var(--burgundy);
}

/* 3. Estilo de los textos */
.titulo-principal {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--burgundy);
    margin-bottom: 15px;
}

.separador-dorado {
    width: 60px;
    height: 3px;
    background-color: var(--gold);
    margin: 0 auto 20px;
    /* Centra el separador */
}

.subtitulo-descripcion {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}



/* Actualización de los Cabeceros de Tarjeta (Alineación con Logos) */
.card-header {
    display: flex;
    justify-content: flex-start;
    /* Alineación a la izquierda */
    align-items: center;
    gap: 15px;
    /* Espacio entre el logo y el nombre del banco */
    margin-bottom: 15px;
    padding-left: 10px;
    /* Separación del borde lateral */
}

/* Estilo para los logos de los bancos */
.bank-logo-img {
    height: 35px;
    /* Tamaño del logo */
    width: auto;
    max-width: 60px;
    /* Para que Bancolombia no se vea gigante */
    object-fit: contain;
}


/* ==========================================================================
   6. FOOTER (image_b9f680)
   ========================================================================== */
.footer-lumara {
    background: var(--white);
    padding: 80px 5% 30px;
    border-top: 1px solid #eee;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    font-family: 'Playfair Display', serif;
    color: var(--burgundy);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
}

.social-row {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-item {
    width: 40px;
    height: 40px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-item img {
    width: 20px;
    filter: brightness(0) invert(1);
}

.footer-credits {
    text-align: center;
    margin-top: 60px;
    font-size: 0.8rem;
    color: #999;
}