/* =====================================
   BIOTRANSFORMO - CSS LIMPIO Y ORGANIZADO
===================================== */

/* RESET */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

html{font-size:16px;}

body{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    background:#edf3e8;
    color:#333;
    overflow-x:hidden;
}

main{flex:1;}

img,video,iframe{
    max-width:100%;
    height:auto;
    display:block;
}

/* HEADER */
header{
    display:flex;
    align-items:center;
    gap:20px;
    padding:10px 20px;
    background:#fff;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    position:sticky;
    top:0;
    z-index:1000;
}
/* ================= MENU HAMBURGUESA ================= */

.menu-toggle{
    font-size:32px;
    color:#1d5c2b;
    cursor:pointer;
    z-index:1100;
}

/* ================= LOGO ================= */

.logo{
    display:flex;
    align-items:center;
}

.logo img{
    height:80px;
    width:auto;
    max-width:100%;
    display:block;
}

/* ================= MENU LATERAL ================= */

#menu{
    position:fixed;
    top:0;
    left:-300px;
    width:280px;
    height:100vh;
    background:#fff;
    box-shadow:5px 0 15px rgba(0,0,0,.2);
    transition:left .4s ease;
    z-index:1001;
}

#menu.activo{
    left:0;
}

#menu ul{
    list-style:none;
    padding-top:80px;
}

#menu ul li{
    border-bottom:1px solid #ececec;
}

#menu ul li a{
    display:block;
    padding:18px 25px;
    text-decoration:none;
    color:#333;
    font-size:18px;
    font-weight:600;
    transition:.3s;
}

#menu ul li a:hover{
    background:#f4f4f4;
    padding-left:35px;
}

/* ================= OVERLAY ================= */

.overlay{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.5);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:999;
}

.overlay.activo{
    opacity:1;
    visibility:visible;
}

/* ================= ACCIONES ================= */

.acciones{
    display:flex;
    align-items:center;
    gap:12px;
    margin-left:auto;
}

/* ================= BUSCADOR ================= */

.buscar{
    position:relative;
}

.buscar input{
    width:220px;
    padding:10px 40px 10px 15px;
    border:2px solid #7baa4b;
    border-radius:25px;
    outline:none;
}

.buscar i{
    position:absolute;
    right:15px;
    top:12px;
    color:#2c5e32;
}

/* ================= BOTONES ================= */

.btn-login,
.btn-registro,
.btn-carrito{
    text-decoration:none;
    padding:10px 18px;
    border-radius:25px;
    font-weight:bold;
    transition:.3s;
}

.btn-login{
    background:#1d5c2b;
    color:white;
}

.btn-login:hover{
    background:#143d1c;
}

.btn-registro{
    background:#7baa4b;
    color:white;
}

.btn-registro:hover{
    background:#5f8937;
}

.btn-carrito{
    background:#7baa4b;
    color:white;
}

.btn-carrito:hover{
    background:#143d1c;
}

/* CARRUSEL */
.carrusel{
    width:100%;
    overflow:hidden;
    padding:30px 0;
    margin:20px auto 40px;
}

.slider{
    display:flex;
    gap:20px;
    width:max-content;
    animation:scroll 25s linear infinite;
}

.slider:hover{animation-play-state:paused;}

.slide{
    width:300px;
    height:250px;
    flex-shrink:0;
    overflow:hidden;
    border-radius:15px;
    box-shadow:0 4px 15px rgba(0,0,0,.15);
}

.slide img{
    width:100%;
    height:100%;
    object-fit:cover;
}

@keyframes scroll{
    from{transform:translateX(0);}
    to{transform:translateX(-1920px);}
}

/* PRODUCTOS */
.productos-grid{
    width:95%;
    max-width:1400px;
    margin:40px auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:30px;
}

.producto-card{
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    display:flex;
    flex-direction:column;
    transition:.3s;
}

.producto-card:hover{transform:translateY(-8px);}

.producto-card img{
    width:100%;
    height:260px;
    object-fit:cover;
}

.producto-card h3{
    padding:20px 20px 10px;
    color:#1d5c2b;
}

.producto-card p{
    padding:0 20px;
    flex-grow:1;
}

.producto-card button{
    margin:20px;
    padding:14px;
    border:none;
    border-radius:10px;
    background:#1d5c2b;
    color:#fff;
}

/* FORMULARIOS */
.container{
    width:90%;
    max-width:1200px;
    margin:auto;
}

.form-container{
    width:400px;
    background:#fff;
    padding:40px;
    border-radius:20px;
}

/* CARRITO */
.carrito-layout{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:30px;
}

.carrito-item{
    display:flex;
    gap:20px;
    padding:20px;
    background:#fff;
    border-radius:20px;
}

.cantidad-control{
    display:inline-flex;
    align-items:center;
    border:1px solid #ddd;
    border-radius:25px;
    overflow:hidden;
}

/* FORO */
.foro-container{
    width:90%;
    max-width:1200px;
    margin:40px auto;
}

.tema{
    background:#fff;
    padding:20px;
    border-radius:15px;
    box-shadow:0 3px 10px rgba(0,0,0,.1);
    margin-bottom:20px;
}

.comentario{
    background:#f5f5f5;
    padding:12px;
    border-radius:10px;
    margin-bottom:10px;
}

.btn-publicar{
    background:linear-gradient(135deg,#4caf50,#2e7d32);
    color:#fff;
    border:none;
    padding:12px 25px;
    border-radius:10px;
}

/* BOTÓN FLOTANTE */

#chat-toggle{

    position: fixed;
    bottom: 20px;
    right: 20px;

    width: 60px;
    height: 60px;

    border-radius: 50%;

    background: #4CAF50;

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;

    cursor: pointer;

    box-shadow: 0 4px 15px rgba(0,0,0,.3);

    z-index: 9999;
}

/* CHAT */

#chatbot{

    position: fixed;

    bottom: 90px;
    right: 20px;

    width: 320px;
    height: 450px;

    background: white;

    border-radius: 15px;

    overflow: hidden;

    box-shadow: 0 5px 20px rgba(0,0,0,.25);

    z-index: 9999;
}

.chat-minimizado{
    display: none;
}

#chat-header{

    background: #4CAF50;

    color: white;

    padding: 12px;

    display: flex;

    justify-content: space-between;
    align-items: center;
}

#chat-header button{

    border: none;

    background: transparent;

    color: white;

    font-size: 20px;

    cursor: pointer;
}

#chat-body{

    height: 320px;

    overflow-y: auto;

    padding: 10px;
}

#chat-footer{

    display: flex;

    padding: 10px;

    gap: 5px;
}

#chat-footer input{

    flex: 1;

    padding: 8px;
}

#chat-footer button{

    background: #4CAF50;

    color: white;

    border: none;

    padding: 8px 15px;

    cursor: pointer;
}

.user{

    background: #DCF8C6;

    padding: 8px;

    border-radius: 10px;

    margin: 5px 0;

    text-align: right;
}

.bot{

    background: #F1F1F1;

    padding: 8px;

    border-radius: 10px;

    margin: 5px 0;
}


/* FOOTER */
footer{
    background:#7baa4b;
    color:#fff;
    padding:25px 40px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:auto;
}

.redes{
    display:flex;
    gap:15px;
}

.redes a{
    color:#fff;
    font-size:28px;
}

/* ================= TABLETS ================= */

@media(max-width:1024px){

    .logo img{
        height:65px;
    }

    .buscar input{
        width:160px;
    }

    .btn-login,
    .btn-registro,
    .btn-carrito{
        padding:8px 12px;
        font-size:14px;
    }

    .productos-grid{
        grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    }
}

/* ================= MOVILES ================= */

@media(max-width:768px){

    header{
        flex-direction:row;
        align-items:center;
        justify-content:space-between;
        padding:10px;
        gap:10px;
    }

    .logo img{
        height:55px;
    }

    .acciones{
        display:flex;
        align-items:center;
        gap:6px;
        margin-left:auto;
        flex-wrap:nowrap;
    }

    /* Ocultar solo buscador */
    .buscar{
        display:none;
    }

    .btn-login,
    .btn-registro,
    .btn-carrito{
        padding:6px 10px;
        font-size:12px;
        white-space:nowrap;
    }

    .slide{
        width:220px;
        height:180px;
    }

    .productos-grid,
    .carrito-layout{
        grid-template-columns:1fr;
    }

    footer{
        flex-direction:column;
        text-align:center;
        gap:15px;
    }

    #chatbot{
        width:95%;
        max-width:350px;
        right:10px;
        left:10px;
        margin:auto;
    }
}

/* ================= CELULARES PEQUEÑOS ================= */

@media(max-width:680px){

    .logo img{
        height:80px;
    }

    .btn-login,
    .btn-registro,
    .btn-carrito{
        padding:5px 8px;
        font-size:11px;
    }

    .slide{
        width:180px;
        height:140px;
    }

    #chat-toggle{
        width:50px;
        height:50px;
        font-size:24px;
    }

    #chatbot{
        height:75vh;
    }
}