:root{
    --verde:#6cab36;
    --verde-dark:#3f7420;
    --verde-light:#83c441;
    --fondo:#f6f8f3;
    --blanco:#ffffff;
    --texto:#1f251f;
    --gris:#6f776f;
    --borde:#e2e8dc;
    --shadow:0 14px 35px rgba(38,70,28,.08);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:var(--fondo);
    color:var(--texto);
    overflow-x:hidden;
}

a{
    text-decoration:none;
    color:inherit;
}

img{
    max-width:100%;
    display:block;
}

/* TOPBAR */

.topbar{
    min-height:44px;
    padding:10px 7%;
    background:#eeeeee;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    font-size:13px;
    letter-spacing:.5px;
    color:#303830;
    text-transform:uppercase;
}

/* HEADER */

.main-header{
    min-height:120px;
    padding:18px 7%;
    background:white;
    display:grid;
    grid-template-columns:240px 1fr 240px;
    align-items:center;
    gap:28px;
    border-bottom:1px solid var(--borde);
}

.brand img{
    max-height:82px;
    width:auto;
}

.main-nav{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:34px;
}

.main-nav a{
    font-size:14px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.5px;
    color:var(--texto);
    transition:.25s;
}

.main-nav a:hover{
    color:var(--verde-dark);
}

.help-box{
    background:var(--verde);
    color:white;
    padding:16px 22px;
    border-radius:999px;
    box-shadow:0 12px 28px rgba(108,171,54,.25);
}

.help-box strong{
    display:block;
    font-size:14px;
}

.help-box span{
    font-size:12px;
    opacity:.9;
}

/* CART COUNT */

.cart-link{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:6px;
}

#cartCount{
    position:absolute;
    top:-16px;
    right:-18px;
    min-width:22px;
    height:22px;
    border-radius:999px;
    background:var(--verde);
    color:white;
    font-size:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    transition:.25s;
}

#cartCount.bump{
    transform:scale(1.25);
}

.cart-link.bump-cart{
    animation:bump .3s ease;
}

@keyframes bump{
    0%{transform:scale(1)}
    50%{transform:scale(1.15)}
    100%{transform:scale(1)}
}

/* SEARCH */

.search-bar{
    display:grid;
    grid-template-columns:280px 1fr;
    background:var(--verde-dark);
    padding:0 7%;
    min-height:68px;
}

.category-btn{
    background:var(--verde-light);
    color:white;
    display:flex;
    align-items:center;
    padding:0 24px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:1px;
}

.search-form{
    display:flex;
    align-items:center;
    padding-left:30px;
}

.search-form input{
    width:100%;
    height:46px;
    border:none;
    outline:none;
    border-radius:999px 0 0 999px;
    padding:0 24px;
    font-size:15px;
}

.search-form button{
    height:46px;
    border:none;
    padding:0 30px;
    background:#202020;
    color:white;
    border-radius:0 999px 999px 0;
    font-weight:900;
    cursor:pointer;
}

/* HERO */

.store-hero{
    padding:26px 7% 36px;
    display:grid;
    grid-template-columns:280px 1fr 260px;
    gap:22px;
    background:
        linear-gradient(rgba(255,255,255,.84),rgba(255,255,255,.84)),
        url('../img/fondo-tienda.jpg');
    background-size:cover;
    background-position:center;
}

.sidebar-cats{
    background:white;
    border:1px solid var(--borde);
    box-shadow:var(--shadow);
}

.sidebar-cats h3{
    background:var(--verde-light);
    color:white;
    padding:18px 22px;
    text-transform:uppercase;
    letter-spacing:1px;
    font-size:15px;
}

.sidebar-cats a{
    display:block;
    padding:16px 22px;
    border-bottom:1px solid var(--borde);
    font-size:15px;
    color:var(--texto);
    transition:.25s;
}

.sidebar-cats a:hover{
    color:var(--verde-dark);
    background:#f4faef;
}

.hero-slider{
    min-height:340px;
    position:relative;
    overflow:hidden;
    background:#dfead7;
    box-shadow:var(--shadow);
}

.hero-video{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
}

.hero-layer{
    position:absolute;
    inset:0;
    background:
    linear-gradient(
        90deg,
        rgba(255,255,255,.92),
        rgba(255,255,255,.65),
        rgba(255,255,255,.25)
    );
}

.hero-content{
    position:relative;
    z-index:2;
    max-width:640px;
    padding:50px;
}

.hero-content span{
    color:var(--verde-dark);
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:2px;
}

.hero-content h1{
    font-size:42px;
    line-height:1;
    letter-spacing:-1px;
    margin:16px 0;
}

.hero-content p{
    color:var(--gris);
    font-size:16px;
    line-height:1.7;
    margin-bottom:26px;
}

.btn-primary{
    display:inline-flex;
    background:var(--verde);
    color:white;
    padding:14px 24px;
    border-radius:999px;
    font-weight:900;
    transition:.25s;
}

.btn-primary:hover{
    transform:translateY(-3px);
}

.promo-card{
    background:white;
    padding:26px;
    border:1px solid var(--borde);
    box-shadow:var(--shadow);
}

.promo-card span{
    color:var(--verde-dark);
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:1px;
}

.promo-card h3{
    font-size:28px;
    line-height:1;
    margin:16px 0;
}

.promo-card p{
    color:var(--gris);
    line-height:1.7;
    margin-bottom:22px;
}

.promo-card a{
    display:inline-flex;
    background:var(--texto);
    color:white;
    padding:13px 22px;
    border-radius:999px;
    font-weight:900;
}

/* FEATURES */

.features{
    padding:0 7% 42px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
    background:white;
}

.features div{
    display:flex;
    flex-direction:column;
    gap:6px;
    padding:28px 0;
}

.features strong{
    font-size:19px;
}

.features span{
    color:var(--gris);
}

/* PRODUCTS */

.productos-section{
    padding:62px 7% 85px;
    background:white;
}

.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    margin-bottom:32px;
    border-bottom:1px solid var(--borde);
}

.section-head h2{
    font-size:30px;
    text-transform:uppercase;
    padding-bottom:16px;
    border-bottom:3px solid var(--verde);
    color:var(--texto);
}

.productos-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}

.product-card{
    background:white;
    border:1px solid var(--borde);
    border-radius:18px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    transition:.25s;
    box-shadow:0 6px 18px rgba(0,0,0,.04);
    height:100%;
}

.product-card:hover{
    transform:translateY(-4px);
    box-shadow:0 14px 28px rgba(0,0,0,.08);
}

.product-image{
    width:100%;
    height:230px;
    background:#f8faf6;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.product-card:hover .product-image img{
    transform:scale(1.03);
}

.no-img{
    width:100%;
    height:100%;
    background:#f7faf4;
    color:var(--gris);
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
}

.product-body{
    padding:18px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.cat{
    color:var(--verde-dark);
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:1.2px;
    margin-bottom:10px;
}

.product-body h3{
    font-size:18px;
    line-height:1.25;
    margin-bottom:12px;
    min-height:48px;
    color:var(--texto);
}

.product-body p{
    display:none;
}

.price{
    display:block;
    margin-top:8px;
    font-size:30px;
    font-weight:900;
    color:var(--texto);
    line-height:1;
}

.box-price{
    margin-top:8px;
    color:#4d564d;
    font-size:14px;
    font-weight:700;
}

.product-detail-btn{
    display:inline-flex;
    margin:12px 0 4px;
    color:var(--verde-dark);
    font-weight:900;
    font-size:14px;
}

.buy-form{
    margin-top:auto;
    padding-top:18px;
    display:grid;
    grid-template-columns:90px 74px 1fr;
    gap:8px;
}

.buy-form select,
.buy-form input{
    height:44px;
    border:1px solid var(--borde);
    border-radius:12px;
    padding:0 10px;
    font-size:13px;
    font-weight:800;
    outline:none;
    background:white;
}

.buy-form input{
    text-align:center;
}

.buy-form button{
    height:44px;
    border:none;
    background:var(--verde);
    color:white;
    border-radius:12px;
    font-weight:900;
    font-size:14px;
    cursor:pointer;
    transition:.25s;
}

.buy-form button:hover{
    background:var(--verde-dark);
}

/* MAYORISTA */

.mayorista-box{
    margin:0 7% 80px;
    padding:52px;
    background:var(--verde-dark);
    color:white;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:40px;
}

.mayorista-box span{
    color:#dff4d0;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:2px;
}

.mayorista-box h2{
    font-size:40px;
    margin:12px 0;
}

.mayorista-box p{
    color:rgba(255,255,255,.84);
    max-width:720px;
    line-height:1.7;
}

.mayorista-box a{
    background:white;
    color:var(--verde-dark);
    padding:16px 26px;
    border-radius:999px;
    font-weight:900;
    white-space:nowrap;
}

/* FOOTER */

.footer{
    background:#1f251f;
    color:white;
    padding:45px 7%;
    display:flex;
    justify-content:space-between;
    gap:40px;
}

.footer p{
    color:rgba(255,255,255,.72);
    margin-top:8px;
}

/* WHATSAPP */

.whatsapp-float{
    position:fixed;
    right:24px;
    bottom:24px;
    width:64px;
    height:64px;
    border-radius:50%;
    background:#25D366;
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9997;
    box-shadow:0 14px 34px rgba(37,211,102,.35);
    transition:.25s;
}

.whatsapp-float:hover{
    transform:scale(1.08);
}

.whatsapp-float img{
    width:36px;
    height:36px;
}

/* TOAST */

.cart-toast{
    position:fixed;
    right:24px;
    bottom:105px;
    background:white;
    color:#1f251f;
    padding:16px 22px;
    border-radius:16px;
    font-weight:900;
    z-index:99999;
    box-shadow:0 18px 45px rgba(0,0,0,.18);
    border-left:5px solid var(--verde);
    opacity:0;
    transform:translateY(15px);
    pointer-events:none;
    transition:.25s;
}

.cart-toast.show{
    opacity:1;
    transform:translateY(0);
}

/* MINI CART */

.mini-cart-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    backdrop-filter:blur(3px);
    z-index:9998;
    opacity:0;
    pointer-events:none;
    transition:.3s;
}

.mini-cart-overlay.show{
    opacity:1;
    pointer-events:auto;
}

.mini-cart{
    position:fixed;
    top:0;
    right:-440px;
    width:100%;
    max-width:430px;
    height:100vh;
    background:white;
    z-index:9999;
    box-shadow:-12px 0 40px rgba(0,0,0,.18);
    transition:.35s ease;
    display:flex;
    flex-direction:column;
}

.mini-cart.show{
    right:0;
}

.mini-cart-head{
    padding:24px;
    border-bottom:1px solid var(--borde);
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.mini-cart-head h3{
    font-size:26px;
}

.mini-cart-head button{
    width:42px;
    height:42px;
    border:none;
    border-radius:50%;
    background:#f4f7f1;
    font-size:24px;
    cursor:pointer;
}

.mini-cart-body{
    padding:22px;
    overflow-y:auto;
    flex:1;
}

.mini-item{
    display:grid;
    grid-template-columns:70px 1fr auto;
    gap:14px;
    padding:16px 0;
    border-bottom:1px solid #eef2ea;
}

.mini-img img{
    width:70px;
    height:70px;
    object-fit:cover;
    border-radius:14px;
    background:#eef3ea;
}

.mini-info strong{
    display:block;
    font-size:15px;
    margin-bottom:5px;
}

.mini-info span{
    color:var(--gris);
    font-size:13px;
}

.mini-info small{
    display:block;
    color:var(--verde);
    font-weight:900;
    margin-top:5px;
}

.mini-qty{
    margin-top:10px;
    display:flex;
    align-items:center;
    gap:8px;
}

.mini-qty button{
    width:30px;
    height:30px;
    border:1px solid var(--borde);
    background:white;
    cursor:pointer;
    font-weight:900;
}

.mini-price{
    text-align:right;
}

.mini-price button{
    margin-top:10px;
    border:none;
    background:transparent;
    color:#d00000;
    cursor:pointer;
    font-weight:800;
}

.mini-total{
    margin-top:20px;
    padding-top:20px;
    border-top:2px solid var(--borde);
    display:flex;
    justify-content:space-between;
    font-size:22px;
    font-weight:900;
}

.mini-total-number{
    animation:subtotalPulse .35s ease;
}

@keyframes subtotalPulse{
    0%{transform:scale(1);color:#1f251f}
    50%{transform:scale(1.08);color:var(--verde)}
    100%{transform:scale(1);color:#1f251f}
}

.mini-actions{
    display:grid;
    gap:12px;
    margin-top:22px;
}

.mini-actions a,
.mini-empty a{
    height:54px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    text-decoration:none;
}

.mini-primary{
    background:var(--verde);
    color:white;
}

.mini-secondary,
.mini-empty a{
    background:#1f251f;
    color:white;
}

.mini-empty{
    text-align:center;
    padding:50px 20px;
}

.mini-empty p{
    color:var(--gris);
    margin:10px 0 20px;
}

.mini-progress{
    background:#eef7e7;
    border:1px solid #d8ebcb;
    border-radius:18px;
    padding:15px;
    margin-top:18px;
}

.mini-progress strong{
    display:block;
    color:var(--verde-dark);
    margin-bottom:5px;
}

.mini-progress span{
    color:var(--gris);
    font-size:13px;
}

.mini-recommend{
    margin-top:24px;
    padding-top:20px;
    border-top:1px solid var(--borde);
}

.mini-recommend h4{
    font-size:16px;
    margin-bottom:12px;
}

.mini-recommend-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
}

.mini-recommend-grid a{
    background:#f4f7f1;
    color:#1f251f;
    padding:12px 14px;
    border-radius:14px;
    font-weight:900;
    text-decoration:none;
    transition:.25s;
}

.mini-recommend-grid a:hover{
    background:var(--verde);
    color:white;
}

/* FLY EFFECT */

.fly-img{
    position:fixed;
    width:70px;
    height:70px;
    object-fit:cover;
    border-radius:16px;
    z-index:999999;
    pointer-events:none;
    box-shadow:0 16px 35px rgba(0,0,0,.25);
    transition:all .75s cubic-bezier(.22,1,.36,1);
}

/* RESPONSIVE */

@media(max-width:1200px){

    .productos-grid{
        grid-template-columns:repeat(3,1fr);
    }

    .store-hero{
        grid-template-columns:260px 1fr;
    }

    .promo-card{
        grid-column:1 / -1;
    }

    .main-header{
        grid-template-columns:220px 1fr;
    }

    .help-box{
        display:none;
    }
}

@media(max-width:900px){

    .productos-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .topbar{
        flex-direction:column;
        text-align:center;
    }

    .main-header{
        height:auto;
        padding:22px 5%;
        grid-template-columns:1fr;
        text-align:center;
    }

    .brand img{
        margin:auto;
        max-height:74px;
    }

    .main-nav{
        flex-wrap:wrap;
        gap:18px;
    }

    .search-bar{
        grid-template-columns:1fr;
        padding:0;
    }

    .category-btn{
        padding:18px 5%;
    }

    .search-form{
        padding:16px 5%;
    }

    .store-hero{
        grid-template-columns:1fr;
        padding:22px 5%;
    }

    .hero-content{
        padding:38px 28px;
    }

    .hero-content h1{
        font-size:34px;
    }

    .features{
        grid-template-columns:1fr;
        padding:0 5% 30px;
    }

    .productos-section{
        padding:50px 5%;
    }

    .mayorista-box{
        margin:0 5% 60px;
        flex-direction:column;
        align-items:flex-start;
        padding:38px 28px;
    }

    .mayorista-box h2{
        font-size:32px;
    }

    .footer{
        flex-direction:column;
        padding:38px 5%;
    }
}

@media(max-width:600px){

    .productos-grid{
        grid-template-columns:1fr;
    }

    .product-image{
        height:240px;
    }

    .product-body h3{
        font-size:17px;
        min-height:auto;
    }

    .price{
        font-size:28px;
    }

    .buy-form{
        grid-template-columns:1fr;
    }

    .buy-form select,
    .buy-form input,
    .buy-form button{
        height:42px;
    }

    .cart-toast{
        bottom:90px;
        left:16px;
        right:16px;
        text-align:center;
    }

    .mini-cart{
        max-width:100%;
        right:-100%;
    }

    .mini-cart.show{
        right:0;
    }

    .mini-cart-head{
        padding:20px;
    }

    .mini-cart-body{
        padding:18px;
        padding-bottom:110px;
    }

    .mini-item{
        grid-template-columns:64px 1fr;
        position:relative;
    }

    .mini-price{
        grid-column:1 / -1;
        text-align:left;
        display:flex;
        justify-content:space-between;
        align-items:center;
    }

    .mini-actions{
        position:sticky;
        bottom:0;
        background:white;
        padding-top:14px;
        padding-bottom:14px;
    }

    .whatsapp-float{
        width:58px;
        height:58px;
        right:16px;
        bottom:16px;
    }

    .whatsapp-float img{
        width:32px;
        height:32px;
    }
}