/* 1. Botones de Filtro (Indispensable para la nueva lógica) */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--verde-primario);
    background: transparent;
    color: var(--verde-primario);
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--verde-primario);
    color: var(--blanco);
}

/* 2. Grid y Tarjetas de Productos */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: var(--blanco);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    cursor: pointer;
    border: 1px solid #eee;
    /* --- NUEVO PARA EFECTO BRILLO --- */
    position: relative;
    overflow: hidden;
}

/* --- EFECTO BRILLO (RAYO DE LUZ) --- */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    z-index: 1;
    pointer-events: none;
}

.card:hover::before {
    left: 150%;
    transition: all 0.7s ease;
}

.card:hover { 
    transform: translateY(-8px); 
    border-color: var(--dorado); 
}

.card img { 
    max-width: 100%; 
    height: 200px; 
    object-fit: contain; 
    margin-bottom: 15px; 
}

/* 3. Ventana Emergente (Modal) Mejorada */
.modal {
    display: none; /* Se activa con JS */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background-color: #ffffff !important;
    width: 100%;
    max-width: 800px;
    border-radius: 15px;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--verde-primario);
    line-height: 1;
}

.modal-flex { 
    display: flex; 
    gap: 30px; 
    align-items: center; 
}

.modal-flex img { 
    width: 40%; 
    border-radius: 10px; 
}

.modal-info h2 { color: var(--verde-primario);}
.tag { 
    display: inline-block; 
    background: var(--dorado); 
    color: white; 
    padding: 4px 12px; 
    border-radius: 5px; 
    font-size: 0.8rem; 
    margin-bottom: 15px; 
}

.btn-wa-modal {
    display: inline-block;
    margin-top: 20px;
    background: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

/* Responsivo para celulares */
@media (max-width: 768px) {
    .modal-flex { flex-direction: column; text-align: center; }
    .modal-flex img { width: 70%; }
}

.modal-info .ica-box {
    background: #ffffff;
    border-left: 4px solid var(--verde-primario);
    padding: 10px;
    margin: 15px;
    margin-top: -55px;
    margin-left: 0;
    padding-left: 0;
    text-align: left;
}

.modal-info ul {
    margin-left: 20px;
    margin-bottom: 15px;
}


/* Navegación activa */
.main-nav ul li a {
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    transition: 0.3s;
}

.main-nav ul li a:hover {
    background: var(--verde-vida);
    color: var(--dorado-cosecha);
}

/* Botones de Filtro en Productos */
.filter-btn {
    border: 2px solid var(--verde-bosque);
    background: white;
    color: var(--verde-bosque);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--verde-bosque);
    color: white;
}

/* Botón de WhatsApp - Color oficial WhatsApp con toque Fertycrecer */
.btn-whatsapp, .btn-wa-modal {
    background: #25d366;
    color: white !important;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: scale(1.05);
}

/* --- ESTABILIZADORES PARA EVITAR EL BUG DE MOVIMIENTO --- */

/* Contenedor de imagen para que no varíe el tamaño */
.card .img-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #fdfdfd;
    border-radius: 8px;
    overflow: hidden;
}

.card img { 
    max-height: 100%; 
    max-width: 100%;
    object-fit: contain; 
    transition: transform 0.3s;
}

.card:hover img {
    transform: scale(1.1);
}

/* Evitar saltos de scroll en el grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    align-items: start;
    min-height: 500px; /* Esto evita que la página "salte" al cargar */
}

.active-nav {
    color: #bfa34b !important; /* Tu color dorado */
    font-weight: bold;
    border-bottom: 2px solid #bfa34b;
}

