@font-face {
    font-family: 'Poly';
    src: url('../Fonts/Poly.ttf') format('truetype');
}


/* Estilos para el carrusel */
.carousel {
    position: relative;
    height: 80vh;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-overlay {
    background: rgba(26, 86, 50, 0.85);
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.timer-container {
    position: relative;
    width: 30px;
    height: 30px;
    margin: 0 5px;
    cursor: pointer;
}

.timer-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

.timer-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    clip: rect(0, 15px, 30px, 0);
    background: #ffc107;
    transform: rotate(0deg);
}

.timer-overlay {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    background: #1a5632;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.timer-container.active .timer-circle {
    background: rgba(255, 255, 255, 0.6);
}

.timer-container.active .timer-overlay {
    background: #ffc107;
    color: #1a5632;
}

@keyframes progress {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.timer-container.active .timer-progress {
    animation: progress 6s linear forwards;
}

/* Estilos generales */
.transition-slow {
    transition: all 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg-pattern {
    background-image: radial-gradient(#e0f2e9 1px, transparent 1px);
    background-size: 20px 20px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #1a5632 0%, #4caf50 100%);
}

.custom-checkbox {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    display: block;
    margin-bottom: 10px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 50%;
    border: 2px solid #1a5632;
}

.custom-checkbox:hover input~.checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked~.checkmark {
    background-color: #4caf50;
    border-color: #4caf50;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

.filter-modal {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.filter-modal.open {
    transform: translateY(0);
}

.backdrop {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}

.backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Estilo para secciones con desplazamiento suave */
html {
    scroll-behavior: smooth;
}

.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Estilo para enlaces activos */
.nav-link.active {
    color: #1a5632;
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1a5632;
}

/* Estilos para la página de productos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch; /* ESTO obliga a que todas midan lo mismo */
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;         /* Agrega esto */
    flex-direction: column; /* Agrega esto */
    height: 100%;          /* Agrega esto */
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 300px;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    object-position: center 50%;

}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 25px;
    flex-grow: 1;          /* Esto hace que la info rellene el espacio */
    display: flex;         /* Para controlar el orden interno */
    flex-direction: column;
}

.product-category {
    background: #4caf50;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    position: absolute;
    top: 15px;
    right: 15px;
    text-transform: uppercase;
    font-weight: 600;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1a5632;
    font-weight: 700;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.5;         /* Da espacio entre líneas para que sea legible */
    text-align: justify;      /* Alinea el texto por ambos lados (izq y der) */
    hyphens: none;            /* PROHIBE que las palabras se corten con guiones */
    word-break: keep-all;     /* Asegura que las palabras se mantengan completas */
    margin-bottom: 20px;
    height: auto !important;
    flex-grow: 1;             /* Mantiene los nutrientes alineados al fondo */
}

.nutrient-tag {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 5px 8px 0;
    border-radius: 15px;
    font-size: 0.8rem;
    background-color: #e8f5e9;
    color: #1a5632;
    font-weight: 500;
}

.back-btn {
    position: fixed;
    top: 25px;
    left: 25px;
    background: #1a5632;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #134326;
    transform: scale(1.05);
}

.page-title {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(to right, #1a5632, #2c7744);
    color: white;
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-title p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.filters {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.filter-btn {
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
}

.filter-btn.active,
.filter-btn:hover {
    background: #1a5632;
    color: white;
    border-color: #1a5632;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
    padding: 0 20px;
}

.search-container input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.search-container i {
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.2rem;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a5632;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(150%);
    transition: transform 0.5s ease;
}

.notification.show {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .page-title p {
        font-size: 1rem;
    }
}

/* ================================================
   ESTILOS PARA EL MODAL DE PRODUCTO
   ================================================ */

.product-modal {
    position: fixed; /* Se queda fijo en la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000; /* Se asegura que esté por encima de todo */
    display: flex;
    align-items: center; /* Centra verticalmente */
    justify-content: center; /* Centra horizontalmente */
    opacity: 0;
    visibility: hidden; /* Empieza oculto */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Animación suave */
}

/* Clase que usará el JS para mostrar el modal */
.product-modal.visible {
    opacity: 1;
    visibility: visible;
}

.product-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 15, 0.7); /* Un fondo oscuro semitransparente */
    backdrop-filter: blur(5px); /* Efecto de desenfoque para el fondo */
}

.product-modal-content {
    position: relative;
    background: white;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 900px; /* Ancho máximo para no ser demasiado grande en pantallas gigantes */
    max-height: 90vh; /* Alto máximo para dejar espacio en los bordes */
    overflow-y: auto; /* Permite scroll si el contenido es muy largo */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95); /* Empieza un poco más pequeño para efecto de zoom */
    transition: transform 0.3s ease;
}

/* El modal se agranda al aparecer */
.product-modal.visible .product-modal-content {
    transform: scale(1);
}

.product-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f1f1;
    color: #555;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.product-modal-close-btn:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.product-modal-image {
    background-color: #f9fbf8; /*  */
    border-radius: 10px;
    overflow: hidden; /* Muy importante para que la imagen recortada no se salga */
    /* Se eliminan: padding, display, align-items, justify-content */
}

.product-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esta es la propiedad mágica que hace que la imagen cubra todo */
}



/* =======================================================
   ESTILOS PARA LOS BOTONES DE DESCARGA MODERNOS
   ======================================================= */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Espacio entre el icono y el texto */
    padding: 12px 24px;
    background-color: #f0f8f1; /* Un color de fondo suave */
    color: #2c3e50; /* Color de texto oscuro */
    border: 2px solid #eee0e3; /* Un borde sutil */
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background-color: #e0e7ee;
    border-color: #cbd5e1;
    transform: translateY(-2px); /* Efecto de levitación */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Sombra suave */
}

.download-btn i {
    font-size: 1.1em;
    color: #1a5632; /* Usa tu color primario para el icono */
}
/* ==================================================
   MEJORAS DE DISEÑO Y RESPONSIVIDAD PARA EL MODAL
   ================================================== */

/* 1. Mejoras Tipográficas */
.product-modal-content h2 {
    font-size: 2.5rem; /* Hacemos el título más grande */
}

.product-modal-content p {
    line-height: 1.7; /* Aumentamos el espacio entre líneas para mejor lectura */
}

/* 3. Micro-animaciones */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInZoom {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Aplicamos las animaciones cuando el modal se hace visible */
.product-modal.visible .product-modal-image {
    animation: fadeInZoom 0.5s ease-out forwards;
}

.product-modal.visible .product-modal-content > div > div:last-child {
    /* Seleccionamos el contenedor de la información (el segundo div del grid) */
    animation: fadeInSlideUp 0.5s ease-out 0.1s forwards;
    /* El 0.1s es un pequeño retraso para que empiece después de la imagen */
    opacity: 0; /* Lo empezamos invisible para que la animación funcione */
}


/* 2. Optimización para Móviles */
@media (max-width: 768px) {
    .product-modal-content {
        /* En móviles, el padding es más pequeño */
        padding: 20px;
        /* Permitimos que ocupe casi toda la pantalla */
        width: 95%;
        max-height: 85vh;
    }

    .product-modal-content .grid {
        /* El grid de 2 columnas se convierte en 1 columna */
        grid-template-columns: 1fr;
    }

    .product-modal-content h2 {
        /* Ajustamos el tamaño del título para móviles */
        font-size: 2rem;
    }

    .download-btn {
        /* Hacemos que los botones ocupen todo el ancho para que sean fáciles de tocar */
        width: 100%;
        justify-content: center;
    }
}
/* =====================================
   DEFINICIÓN Y APLICACIÓN FUENTE REVEL
   ===================================== */

/* 1. Declaramos la fuente 'Revel' que está en la carpeta 'Fonts' */
@font-face {
    font-family: 'Revel';
    src: url('../Fonts/Revel.ttf') format('truetype');
}

/* 2. Le decimos al título del modal que use esa fuente */
.product-modal-content h2 {
    font-size: 2.5rem; 
    font-family: 'Revel', sans-serif; /* ¡Aquí la aplicamos! */
}

/* =======================================================
   ESTILOS INTERACTIVOS PARA TARJETAS DE SERVICIOS
   ======================================================= */

/* Contenedor de la tarjeta de servicio */
.service-card {
    background: rgba(255, 255, 255, 0.1); /* Fondo semi-transparente que ya tenías */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem; /* 16px */
    padding: 1.5rem; /* 24px */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Transición suave para todos los efectos */
    position: relative; /* Necesario para el borde animado */
    overflow: hidden; /* Oculta lo que se salga del borde redondeado */
}

/* Efectos al pasar el ratón (hover) */
.service-card:hover {
    transform: translateY(-10px); /* Levanta la tarjeta */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); /* Sombra más pronunciada */
    border-color: rgba(255, 193, 7, 0.5); /* Color del borde de acento */
}

/* Contenedor del icono para la animación */
.service-card .icon-container {
    font-size: 2.5rem; /* 40px */
    color: #ffc107; /* Color de acento */
    margin-bottom: 1rem; /* 16px */
    transition: transform 0.3s ease;
}

/* Animación del icono al pasar el ratón por la tarjeta */
.service-card:hover .icon-container {
    transform: scale(1.1) rotate(-5deg); /* El icono crece un poco y rota */
}

/* Título de la tarjeta */
.service-card h3 {
    font-size: 1.25rem; /* 20px */
    font-weight: bold;
    margin-bottom: 0.75rem; /* 12px */
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: #ffc107; /* El título cambia al color de acento */
}

/* Borde animado (efecto de barrido) */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Empieza fuera de la vista a la izquierda */
    width: 100%;
    height: 3px; /* Grosor del borde */
    background: #ffc107; /* Color de acento */
    transition: left 0.5s ease-out;
}

.service-card:hover::after {
    left: 0; /* El borde se desliza hasta su posición */
}

/* =======================================================
   ESTILOS PARA LAS TARJETAS EN LA PÁGINA DE PRODUCTOS
   ======================================================= */

#productos-page .product-image {
    height: auto; /* Anulamos la altura fija para que no interfiera */
    aspect-ratio: 4 / 3; /* Hacemos que el contenedor sea un cuadrado (1:1). Puedes probar 4 / 3 si prefieres un rectángulo. */
}

/* AJUSTES PARA CELULAR (RUBEN) */
@media (max-width: 768px) {
    /* Reducimos la altura total para que no empuje el contenido hacia abajo */
    .carousel {
        height: 65vh !important; 
    }

    /* Evitamos que el flex-center amontone todo sobre las flechas */
    .carousel-overlay {
        align-items: flex-start; /* Alinea el texto hacia arriba */
        padding-top: 15%;        /* Da espacio desde el header */
    }

    /* Hacemos que los títulos no sean tan gigantes en celular */
    .carousel-overlay h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }

    .carousel-overlay p {
        font-size: 1rem !important;
        padding: 0 10px;
    }

    /* Reducimos el tamaño de las flechas para que no choquen con el texto */
    .carousel-control {
        width: 40px;
        height: 40px;
        top: 45%; /* Las subimos un poco */
    }

    /* Bajamos un poco el botón de WhatsApp para que no tape el botón de "Ver Productos" */
    a[href^="https://wa.me"] {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}