/* ----------- RESETS -------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
}

/* --------- BOTONES ---------- */
.btn {
    display: inline-block;

    padding: 15px 30px;

    background-color: #D9B382;
    color: #3A2E2A;

    text-decoration: none;
    font-weight: bold;

    border-radius: 8px;

    transition: transform 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}


/* -------------- LOGO ---------- */
.logo h2{
    font-family: "Playfair Display", serif;
}

/* -------------- SCROLL -------------*/
html {
    scroll-behavior: smooth;
}

/* ---------------- NAVBAR ---------------- */

header{

    position:fixed;

    top:0;

    left:0;

    width:100%;

    z-index:1000;

}

header.scrolled {
    background-color: rgba(47, 36, 31, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 60px;
}

.logo h2 {
    color: white;
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 500;

    transition: 0.3s;
}

nav a:hover {
    color: #D9B382;
}


/* ---------------- MENU HAMBURGUESA ----------------------*/
.menu-toggle {
    display: none;

    font-size: 2rem;
    color: white;

    cursor: pointer;

    z-index: 1001;
}

/* ---------------- PRODUCTOS ---------------- */

#productos {
    padding: 80px 10%;
    background-color: #F5F1EA;
}

#productos h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    display:flex;

    flex-direction:column;

    background-color: white;

    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 5px 15px rgba(0,0,0,0.1);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
    
    cursor:pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow:0 12px 30px rgba(0,0,0,.15);
}

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

.card img {
    width: 100%;
    height: 220px;
    transition: transform 0.4s ease;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card h3 {
    margin-bottom: 10px;
}

/* --------- BADGES ---------- */
.producto-badges{

    display:flex;

    flex-wrap:wrap;

    gap:.5rem;

    margin-top:.8rem;

}

.badge{

    display:inline-flex;

    align-items:center;

    gap:.35rem;

    padding:.28rem .65rem;

    border-radius:999px;

    font-size:.75rem;

    font-weight:600;

    user-select:none;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}

.badge:hover{

    transform:translateY(-2px);

}

.badge-vegano{

    background:#EDF8F0;
    border:1px solid #CDE8D3;
    color:#2E7D32;

}

.badge-sintacc{

    background:#FFF8E5;
    border:1px solid #F2E2A7;
    color:#A66A00;

}

.badge-sinlactosa{

    background:#EAF4FF;
    border:1px solid #C7DFF7;
    color:#1565C0;

}

.badge i{

    font-size:.8rem;

}

.producto-badges{
    margin: 1rem 0;
}


/* ---------------- FOOTER ---------------- */

footer {
    background-color: #2F241F;
    color: white;
}

.footer-container {
    padding: 40px 10%;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 20px;

    text-align: center;
}

.footer-container h3 {
    font-size: 1.8rem;
    font-family: "Playfair Display", serif;
}

.footer-links,
.footer-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.footer-links a,
.footer-social a {
    color: white;
    text-decoration: none;

    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-social a:hover {
    color: #D9B382;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);

    padding: 20px;

    text-align: center;
}

.developer-credit {
    margin-top: 10px;

    font-size: 0.9rem;

    opacity: 0.8;
}

.developer-credit a {
    color: #D9B382;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.developer-credit a:hover {
    border-bottom: 1px solid #D9B382;
}

/* --------------- ANIMACIONES --------------------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/*------------- MODAL ------------*/

.modal{

    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 2rem;

    background: rgba(0,0,0,.65);

    opacity: 0;
    visibility: hidden;

    transition: opacity .25s ease;

    z-index: 2000;

}

.modal.abierto{

    opacity: 1;
    visibility: visible;

}

/*============================*/

.modal-contenido{
    position: relative;
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(0, 1fr); /* antes: minmax(330px,330px) */
    width: min(1000px, 95vw);
    height: min(650px, 90vh);
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
}

.modal-imagen{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/*============================*/

.modal-info{

    display: flex;
    flex-direction: column;

    padding: 2.5rem;

    overflow-y: auto;

    min-width: 0;
}

/*============================*/

.modal-header{

    margin-bottom: 2rem;

}

.modal-categoria{

    display: inline-block;

    margin-bottom: .7rem;

    color: #8B5E3C;

    font-size: .8rem;

    font-weight: 600;

    letter-spacing: .15rem;

    text-transform: uppercase;

}

.modal-titulo{

    margin-bottom: 1rem;

    font-family: "Playfair Display", serif;

    font-size: 2.3rem;

    color: #3A2E2A;

    line-height: 1.2;

}

#modal-badges{

    display: flex;

    flex-wrap: wrap;

    gap: .5rem;

}

/*============================*/

.modal-seccion{

    padding: 1.4rem 0;

    border-top: 1px solid #ece6df;

}

.modal-seccion:first-of-type{

    border-top: none;

    padding-top: 0;

}

.modal-descripcion{

    line-height: 1.8;

    color: #666;

}

.modal-subtitulo{

    margin-bottom: .9rem;

    display: flex;

    align-items: center;

    gap: .6rem;

    color: #3A2E2A;

    font-size: 1rem;

}

.modal-subtitulo i{

    color: #8B5E3C;

}

.modal-lista{

    padding-left: 1.2rem;

    display: flex;

    flex-direction: column;

    gap: .5rem;

    color: #666;

}

.modal-recomendacion{

    padding-left: 1rem;

    border-left: 4px solid #D9B382;

    font-style: italic;

    color: #555;

    line-height: 1.7;

}

/*============================*/

.modal-footer{
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #ece6df;
}

.modal-precio{
    font-size: 2.4rem;
    font-weight: 700;
    color: #8B5E3C; 
}

.modal-precio-label{
    display: block;
    font-size: .75rem;
    letter-spacing: .1rem;
    text-transform: uppercase;
    color: #999;
    margin-bottom: .3rem;
}

/*============================*/

.modal-cerrar{

    position: absolute;

    top: 1rem;
    right: 1rem;

    width: 42px;
    height: 42px;

    border: none;

    border-radius: 50%;

    background: rgba(255,255,255,.95);

    box-shadow: 0 5px 18px rgba(0,0,0,.15);

    cursor: pointer;

    z-index: 10;

    transition: .2s;

}

.modal-cerrar:hover{

    transform: scale(1.08);

}

/*============================*/

.modal-info::-webkit-scrollbar{

    width: 8px;

}

.modal-info::-webkit-scrollbar-thumb{

    background: #d6d0c8;

    border-radius: 999px;

}

/* WPP ICONO */
.whatsapp-float{

    opacity:0;

    visibility:hidden;

    transform:translateY(20px);

    position:fixed;

    right:35px;

    bottom:35px;

    width:64px;

    height:64px;

    border-radius:50%;

    background:#25D366;

    color:white;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:2rem;

    text-decoration:none;

    box-shadow:0 10px 28px rgba(37,211,102,.35);

    transition:
        opacity .3s,
        transform .3s,
        visibility .3s;

    z-index:999;

}

.whatsapp-float.visible{

    opacity:1;

    visibility:visible;

    transform:translateY(0);

}

.whatsapp-float:hover{

    transform:translateY(-4px) scale(1.08);

    box-shadow:0 12px 30px rgba(0,0,0,.3);

}

.whatsapp-float:active{

    transform:scale(.95);

}

/* ---------------- TABLETS ---------------- */

@media (max-width: 1024px) {

    /* NAV */

    nav {
        padding: 20px 30px;
    }

    nav ul {
        gap: 20px;
    }

    /* PRODUCTOS */

    .card {
        width: 300px;
    }

    /* MODAL */

    .modal-contenido{
        grid-template-columns: minmax(260px, 280px) minmax(0, 1fr);
        width: min(700px, 90vw);
        height: min(520px, 85vh);
    }

    .modal-titulo{
        font-size: 2rem;
    }

    .modal-precio{
        font-size: 2rem;
    }

}

/* ---------------- MOVILES ---------------- */

@media (max-width: 768px) {

    /* NAV */

    nav{

        padding:20px;

        display:flex;

        justify-content:space-between;

        align-items:center;

    }

    .menu-toggle{

        display:block;

        font-size:2rem;

        cursor:pointer;

        z-index:1001;

    }

    .nav-links{

        position:fixed;

        top:72px;

        left:0;

        width:100%;

        display:flex;

        flex-direction:column;

        align-items:center;

        gap:20px;

        background-color: rgba(47, 36, 31, 0.95);

        backdrop-filter: blur(8px);

        max-height:0;

        overflow:hidden;

        padding:0;

        transition:max-height .35s ease,padding .35s ease;

        z-index:999;

    }

    .nav-links.active{

        max-height:500px;

        padding:25px 0;

    }

    /* BOTONES */

    .btn {
        padding: 12px 24px;
    }

    /* FOOTER */

    .footer-links,
    .footer-social {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .card {
        width: 100%;
        max-width: 450px;
    }

    /* WPP */

    .whatsapp-float{

        width:56px;

        height:56px;

        font-size:1.8rem;

        right:18px;

        bottom:18px;

    }

    /* MODAL */

    .modal{
        padding: 1rem;
        align-items: center; 
    }

    .modal-contenido{
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        width: 100%;
        max-width: 420px;
        height: auto;
        max-height: 80vh;
        border-radius: 18px; /* redondeado en las 4 esquinas */
    }

    .modal-imagen{
        width: 100%;
        aspect-ratio: 4 / 3; /* la misma proporción de tus fotos nuevas */
        height: auto;
    }

    .modal-info{
        padding: 1.3rem;
        overflow-y: auto;
    }

    .modal-header{
        margin-bottom: 1rem;
    }

    .modal-titulo{
        font-size: 1.4rem;
    }

    .modal-descripcion{
        font-size: .9rem;
        line-height: 1.6;
    }

    .modal-seccion{
        padding: 1rem 0;
    }

    .modal-precio{
        font-size: 1.6rem;
    }

    .modal-cerrar{
        top: .7rem;
        right: .7rem;
        width: 36px;
        height: 36px;
    }

}

/* ---------------- CELULARES CHICOS ---------------- */

@media (max-width: 480px) {

    /* NAV */

    .logo h2 {
        font-size: 1.5rem;
    }

    nav ul {
        gap: 10px;
    }

    nav a {
        font-size: 0.85rem;
    }

    /* HERO */

    #hero {
        padding-top: 60px;
        min-height: 600px;
    }

    .hero-content h1 {
        font-size: 1.7rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    /* TITULOS DE SECCION */

    #productos h2,
    #especialidad h2,
    #contacto h2,
    #sucursales h2,
    .historia-content h2 {
        font-size: 2rem;
    }

    /* FOOTER */

    .footer-links,
    .footer-social {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .footer-links a,
    .footer-social a{

        font-size:.95rem;

    }

    .footer-container {
        gap: 12px;
        padding: 25px 20px;
    }

    .footer-container h3 {
        font-size: 1.5rem;
    }

     /* MODAL */

    .modal{
        padding: .7rem;
    }

    .modal-contenido{
        max-width: 340px;
        max-height: 75vh;
    }

    .modal-imagen{
        height: 130px;
    }

    .modal-info{
        padding: 1rem;
    }

    .modal-header{
        margin-bottom: .7rem;
    }

    .modal-titulo{
        font-size: 1.2rem;
    }

    .modal-categoria{
        font-size: .7rem;
    }

    .modal-descripcion{
        font-size: .85rem;
    }

    .modal-seccion{
        padding: .7rem 0;
    }

    .modal-subtitulo{
        font-size: .9rem;
    }

    .modal-recomendacion{
        font-size: .85rem;
    }

    .modal-precio{
        font-size: 1.4rem;
    }

    .modal-precio-label{
        font-size: .65rem;
    }

    .modal-cerrar{
        top: .5rem;
        right: .5rem;
        width: 32px;
        height: 32px;
    }

}

