:root{
    --green-900:#064e3b;
    --green-700:#15803d;
    --green-500:#22c55e;
    --green-100:#dcfce7;
    --beige:#f5f1e8;
    --surface:#ffffff;
    --bg:#f8fafc;
    --text:#0f172a;
    --muted:#64748b;
    --shadow:0 12px 40px rgba(15,23,42,.08);
    --radius:20px;
    --tap:44px;
    --bottom-nav-h:64px;
    --sticky-bar-h:76px;
}

/* =========================================================
   Base / reset (mobile-first: tudo abaixo é o layout mobile;
   media queries só ADICIONAM regras pra telas maiores)
   ========================================================= */
*{box-sizing:border-box}
body.site-shell{margin:0;font-family:'Inter',sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none}
.site-container,.container{width:min(1200px, calc(100% - 32px));margin:0 auto}
.site-page{background:#f8faf6;min-height:100vh}
.site-section{padding:28px 0}
.top-strip{display:none}

/* =========================================================
   Header
   ========================================================= */
.site-header{background:#fff;box-shadow:0 1px 0 rgba(15,23,42,.06);position:sticky;top:0;z-index:1000}
.header-top{
    display:grid;
    grid-template-columns:auto 1fr auto;
    grid-template-areas:"menu logo cart" "search search search";
    align-items:center;
    gap:10px 12px;
    padding:12px 0;
}
.hamburger-btn{
    grid-area:menu;
    width:var(--tap);height:var(--tap);
    display:grid;place-items:center;
    border:0;background:transparent;color:var(--text);font-size:1.4rem;border-radius:12px;
}
.hamburger-btn:active{background:#f1f5f9}
.brand{grid-area:logo;justify-self:center;display:flex;align-items:center;color:var(--text)}
.brand-logo{height:40px;display:flex;align-items:center;overflow:hidden}
.brand-logo img{height:100%;width:auto;object-fit:contain}
.header-actions{grid-area:cart;display:flex;justify-content:flex-end}
.action-link{position:relative;display:grid;place-items:center;width:var(--tap);height:var(--tap);color:var(--text);font-size:1.35rem;border-radius:12px}
.action-link:active{background:#f1f5f9}
.cart-link strong{
    position:absolute;top:2px;right:2px;
    display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 4px;
    border-radius:999px;background:var(--green-700);color:#fff;font-size:.65rem;font-weight:700;line-height:1;
}
.header-search-row{grid-area:search}
.site-search{display:flex;height:48px;border-radius:14px;overflow:hidden;border:1px solid #e2e8f0;background:#fff}
.site-search input{flex:1;min-width:0;border:0;padding:0 14px;outline:0;font-size:1rem}
.site-search button{width:52px;border:0;background:var(--green-700);color:#fff;font-size:1.05rem}

/* nav horizontal tradicional: só existe em telas grandes */
.site-nav{display:none}
.nav-row{display:flex;align-items:center;gap:24px;padding:12px 0}
.categories-btn{background:rgba(0,0,0,.12);border:0;color:#fff;padding:14px 18px;border-radius:16px;font-weight:700;min-width:245px;text-align:left}
.nav-links{display:flex;flex-wrap:wrap;gap:28px}
.nav-links a{color:#fff;font-weight:500}

/* =========================================================
   Drawer mobile de categorias
   ========================================================= */
.mobile-drawer{position:fixed;inset:0;z-index:2000;visibility:hidden}
.mobile-drawer.is-open{visibility:visible}
.mobile-drawer-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.5);opacity:0;transition:opacity .2s ease}
.mobile-drawer.is-open .mobile-drawer-backdrop{opacity:1}
.mobile-drawer-panel{
    position:absolute;top:0;left:0;bottom:0;width:min(320px,84vw);
    background:#fff;box-shadow:0 0 40px rgba(0,0,0,.2);
    transform:translateX(-100%);transition:transform .22s ease;
    display:flex;flex-direction:column;
}
.mobile-drawer.is-open .mobile-drawer-panel{transform:translateX(0)}
.mobile-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:18px 18px;border-bottom:1px solid #e5e7eb}
.mobile-drawer-header strong{font-size:1.05rem;color:var(--green-900)}
.mobile-drawer-close{width:var(--tap);height:var(--tap);border:0;background:#f1f5f9;border-radius:12px;display:grid;place-items:center;font-size:1.1rem}
.mobile-drawer-links{overflow-y:auto;padding:10px}
.mobile-drawer-links a{
    display:flex;align-items:center;gap:14px;padding:13px 12px;border-radius:12px;color:var(--text);font-weight:600;min-height:var(--tap);
}
.mobile-drawer-links a:active{background:#f1f5f9}
.mobile-drawer-links a i{font-size:1.2rem;color:var(--green-700);width:22px;text-align:center}
.mobile-drawer-links hr{border:0;border-top:1px solid #e5e7eb;margin:8px 4px}

/* =========================================================
   Barra inferior fixa (mobile-only)
   ========================================================= */
.bottom-nav{
    position:fixed;left:0;right:0;bottom:0;z-index:900;
    display:flex;background:#fff;border-top:1px solid #e5e7eb;
    box-shadow:0 -8px 24px rgba(15,23,42,.06);
    height:var(--bottom-nav-h);
    padding-bottom:env(safe-area-inset-bottom);
}
.bottom-nav-item{
    flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    border:0;background:transparent;color:var(--muted);font-size:.7rem;font-weight:600;position:relative;
}
.bottom-nav-item i{font-size:1.3rem}
.bottom-nav-item.active{color:var(--green-700)}
.bottom-nav-item.cart-link{position:relative}
.bottom-nav-item.cart-link strong{
    position:absolute;top:2px;right:calc(50% - 22px);
    display:inline-grid;place-items:center;min-width:16px;height:16px;padding:0 3px;
    border-radius:999px;background:var(--green-700);color:#fff;font-size:.6rem;font-weight:700;line-height:1;
}
body.has-bottom-nav{padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom))}

/* =========================================================
   Hero
   ========================================================= */
.hero-section{padding:16px 0 0}
.hero-card{border-radius:22px;overflow:hidden;background:linear-gradient(135deg,#fbfbf8,#eef7e8);position:relative}
.hero-copy{position:relative;z-index:2;padding:26px 20px 22px}
.hero-badge{display:inline-flex;padding:7px 12px;border-radius:999px;background:var(--green-100);color:var(--green-900);font-weight:700;font-size:.82rem;margin-bottom:14px}
.hero-copy h1{font-size:1.9rem;line-height:1.12;font-weight:800;margin-bottom:12px}
.hero-copy p{font-size:1rem;color:var(--muted);margin-bottom:0}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0 0}
.btn-primary-natural,.btn-outline-natural{padding:13px 20px;border-radius:14px;font-weight:700;min-height:var(--tap);display:inline-flex;align-items:center;justify-content:center}
.btn-primary-natural{background:var(--green-700);color:#fff}
.btn-outline-natural{border:1px solid var(--green-700);color:var(--green-700);background:#fff}
.hero-visual{margin-top:18px;border-radius:18px;overflow:hidden;height:200px}
.hero-visual img{width:100%;height:100%;object-fit:cover;display:block}

/* =========================================================
   Selos de confiança
   ========================================================= */
.benefits-section{padding:20px 0 6px}
.benefits-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.benefit-card{background:#fff;border-radius:16px;box-shadow:var(--shadow);padding:14px;display:flex;flex-direction:column;gap:6px}
.benefit-card i{font-size:1.3rem;color:var(--green-700)}
.benefit-card strong{font-size:.88rem;line-height:1.25}
.benefit-card span{color:var(--muted);font-size:.78rem;line-height:1.3}

.section-heading{margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.section-heading h2{font-weight:800;font-size:1.25rem;margin:0}

/* =========================================================
   Categorias — carrossel mobile / grid desktop
   ========================================================= */
.categories-section,.products-section{padding:20px 0}
.category-scroll{
    display:flex;gap:10px;overflow-x:auto;padding:2px 2px 10px;
    scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
}
.category-scroll::-webkit-scrollbar{height:0}
.category-chip-btn{
    scroll-snap-align:start;flex:0 0 auto;
    display:inline-flex;align-items:center;gap:8px;
    padding:10px 16px;border-radius:999px;border:1px solid #bbf7d0;background:#fff;color:#166534;
    font-weight:600;font-size:.88rem;white-space:nowrap;min-height:var(--tap);
}
.category-chip-btn i{font-size:1rem}
.category-chip-btn.active{background:var(--green-700);border-color:var(--green-700);color:#fff}
.category-grid{display:none}

/* =========================================================
   Card de produto (reutilizado em Home / Categoria / Produtos)
   ========================================================= */
.product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.product-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
.product-card-media{position:relative;background:#f8fafc;aspect-ratio:1/1}
.product-card-media img{width:100%;height:100%;object-fit:contain;display:block}
.product-card-body{padding:12px;display:flex;flex-direction:column;gap:4px;flex:1}
.product-card-category{font-size:.72rem;color:var(--green-700);font-weight:700;text-transform:uppercase;letter-spacing:.02em}
.product-card-title{font-size:.9rem;font-weight:700;color:#111827;line-height:1.3;min-height:2.6em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-card-price{font-size:1.05rem;font-weight:800;color:#14532d;margin-top:2px}
.product-card-price-old{font-size:.78rem;color:var(--muted);text-decoration:line-through}
.product-card-actions{margin-top:auto;padding-top:8px;display:flex;gap:8px}
.btn-add-cart{
    flex:1;min-height:var(--tap);border:0;border-radius:12px;background:var(--green-700);color:#fff;
    font-weight:700;font-size:.85rem;display:flex;align-items:center;justify-content:center;gap:6px;
}
.btn-add-cart[disabled]{background:#cbd5e1;color:#64748b}

/* =========================================================
   Newsletter (rodapé)
   ========================================================= */
.newsletter-section{background:var(--green-900);color:#fff;padding:28px 0}
.newsletter-inner{text-align:center}
.newsletter-inner h3{font-weight:800;font-size:1.15rem;margin-bottom:6px}
.newsletter-inner p{color:#bbf7d0;font-size:.9rem;margin-bottom:16px}
.newsletter-form{display:flex;flex-direction:column;gap:10px;max-width:420px;margin:0 auto}
.newsletter-form input{height:var(--tap);border-radius:12px;border:0;padding:0 14px;font-size:.95rem}
.newsletter-form button{height:var(--tap);border-radius:12px;border:0;background:var(--green-500);color:var(--green-900);font-weight:800}

/* =========================================================
   Miolo de página / breadcrumb / chips de categoria
   ========================================================= */
.site-page-header{background:linear-gradient(135deg,#ecfdf5,#fefce8);border-radius:18px;padding:20px;margin:16px 0;box-shadow:var(--shadow)}
.site-page-title{font-size:1.4rem;color:#14532d;margin-bottom:6px}
.site-page-subtitle{color:#64748b;margin-bottom:0;font-size:.9rem}
.breadcrumb-wrap{color:#64748b;font-size:.82rem;margin-bottom:10px}
.breadcrumb-wrap a{color:#166534}
.category-chips{display:flex;flex-wrap:nowrap;gap:10px;margin:16px 0;overflow-x:auto;padding-bottom:6px;-webkit-overflow-scrolling:touch}
.category-chip{border:1px solid #bbf7d0;background:#fff;color:#166534;border-radius:999px;padding:10px 16px;text-decoration:none;font-weight:600;flex:0 0 auto;min-height:var(--tap);display:inline-flex;align-items:center;white-space:nowrap}
.category-chip.active{background:#15803d;color:#fff}
.empty-state{background:#fff;border:1px dashed #bbf7d0;border-radius:18px;padding:32px 20px;text-align:center;color:#64748b}

/* =========================================================
   Página de produto
   ========================================================= */
.product-gallery{position:relative;border-radius:18px;overflow:hidden;background:#fff;border:1px solid #e5e7eb}
.product-gallery img{width:100%;aspect-ratio:1/1;object-fit:contain;display:block}
.product-gallery-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px}
.product-gallery-dots span{width:7px;height:7px;border-radius:50%;background:rgba(15,23,42,.25)}
.product-gallery-dots span.active{background:var(--green-700)}
.product-title-block{padding-top:16px}
.product-title-block h1{font-size:1.35rem;font-weight:800;margin:6px 0}
.qty-stepper{display:inline-flex;align-items:stretch;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}
.qty-stepper button{width:var(--tap);height:var(--tap);border:0;background:#f8fafc;color:var(--green-900);font-size:1.15rem;font-weight:700}
.qty-stepper button:active{background:#e5e7eb}
.qty-stepper input{width:48px;border:0;border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;text-align:center;font-weight:700;font-size:1rem}
.favorite-btn{width:var(--tap);height:var(--tap);border-radius:12px;border:1px solid #e2e8f0;background:#fff;display:grid;place-items:center;color:var(--muted);font-size:1.15rem}
.favorite-btn.is-active{color:#dc2626;border-color:#fecaca;background:#fef2f2}
.product-info-section{border-top:1px solid #e5e7eb;padding-top:16px;margin-top:20px}
.product-info-section h2{font-size:1rem;font-weight:800;margin-bottom:8px}
.product-info-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #f1f5f9;font-size:.88rem}
.product-info-row span:first-child{color:var(--muted)}

/* =========================================================
   Barra de ação fixa (produto / carrinho)
   ========================================================= */
.sticky-action-bar{
    position:fixed;left:0;right:0;z-index:950;
    bottom:var(--bottom-nav-h);
    background:#fff;border-top:1px solid #e5e7eb;box-shadow:0 -8px 24px rgba(15,23,42,.08);
    padding:10px max(16px, calc((100vw - 1200px)/2 + 16px));
    padding-bottom:calc(10px + env(safe-area-inset-bottom));
    display:flex;align-items:center;gap:12px;
}
.sticky-action-total{display:flex;flex-direction:column;line-height:1.2}
.sticky-action-total small{color:var(--muted);font-size:.72rem}
.sticky-action-total strong{font-size:1.15rem;color:#14532d}
.sticky-action-bar .btn-primary-natural{flex:1;min-height:48px}
body.has-sticky-bar{padding-bottom:calc(var(--sticky-bar-h) + var(--bottom-nav-h) + env(safe-area-inset-bottom))}

/* =========================================================
   Carrinho
   ========================================================= */
.cart-item{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #f1f5f9}
.cart-item-media{width:64px;height:64px;flex:0 0 auto;border-radius:12px;overflow:hidden;background:#f8fafc;border:1px solid #e5e7eb}
.cart-item-media img{width:100%;height:100%;object-fit:contain}
.cart-item-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.cart-item-top{display:flex;justify-content:space-between;gap:10px}
.cart-item-name{font-weight:700;font-size:.9rem;color:#111827}
.cart-item-category{font-size:.75rem;color:var(--muted)}
.cart-item-remove{border:0;background:transparent;color:#dc2626;font-size:1.05rem;width:var(--tap);height:var(--tap);display:grid;place-items:center;flex:0 0 auto}
.cart-item-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cart-item-price{font-weight:800;color:#14532d;font-size:.95rem}
.qty-stepper.compact button{width:36px;height:36px;font-size:1rem}
.qty-stepper.compact input{width:36px;height:36px;font-size:.9rem}
.cart-summary-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:16px;margin-top:16px}
.cart-summary-row{display:flex;justify-content:space-between;padding:6px 0;font-size:.9rem;color:var(--muted)}
.cart-summary-row.total{border-top:1px solid #e5e7eb;margin-top:6px;padding-top:12px;font-size:1.05rem;font-weight:800;color:#14532d}
.coupon-field{display:flex;gap:8px;margin-top:10px}
.coupon-field input{flex:1;height:44px;border-radius:10px;border:1px solid #e2e8f0;padding:0 12px}
.coupon-field button{height:44px;padding:0 16px;border-radius:10px;border:1px solid var(--green-700);color:var(--green-700);background:#fff;font-weight:700}
.coupon-note{font-size:.75rem;color:var(--muted);margin-top:6px}

/* =========================================================
   Rodapé
   ========================================================= */
.site-footer{background:#fff;border-top:1px solid #e5e7eb;padding:28px 0}
.footer-grid{display:grid;grid-template-columns:1fr;gap:24px}
.footer-grid h4{font-size:1rem;font-weight:800;margin-bottom:12px;color:#14532d}
.footer-grid a,.footer-grid p{display:block;color:#64748b;margin-bottom:10px}
.footer-brand img{max-width:180px;height:auto}
.footer-social{display:flex;gap:10px;margin-top:8px}
.footer-social a{width:38px;height:38px;border-radius:12px;background:#f1f5f9;display:grid;place-items:center;color:#14532d}

.tracking-timeline{display:flex;flex-direction:column;gap:14px;margin-top:18px}
.tracking-step{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;border-radius:18px;background:#f8fafc;border:1px solid #e5e7eb}
.tracking-step.active{background:#ecfdf5;border-color:#bbf7d0}
.tracking-dot{width:14px;height:14px;border-radius:50%;background:#cbd5e1;margin-top:4px;flex:0 0 auto}
.tracking-step.active .tracking-dot{background:#15803d}

/* =========================================================
   MIN-WIDTH: tablet (>=768px)
   ========================================================= */
@media (min-width:768px){
    .benefits-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
    .product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
    .footer-grid{grid-template-columns:1fr 1fr}
}

/* =========================================================
   MIN-WIDTH: desktop (>=1200px) — aqui o mobile-only vira
   invisível e o layout tradicional de topo assume
   ========================================================= */
@media (min-width:1200px){
    .top-strip{display:block;background:var(--green-900);color:#fff;font-size:.95rem;padding:8px 0}
    .strip-item{display:flex;align-items:center;gap:8px}

    .hamburger-btn,.mobile-drawer,.bottom-nav{display:none}
    body.has-bottom-nav{padding-bottom:0}

    .header-top{
        grid-template-columns:260px minmax(0,1fr) auto;
        grid-template-areas:"logo search cart";
        padding:16px 0;
    }
    .brand{justify-self:start}
    .brand-logo{height:64px;width:226px}
    .site-search{height:54px;border-radius:18px}
    .header-actions{gap:8px}
    .action-link{width:auto;height:auto;font-size:1.3rem}
    .cart-link strong{position:static;margin-left:6px;min-width:22px;height:22px;font-size:.75rem}

    .site-nav{display:block;background:linear-gradient(90deg,var(--green-900),var(--green-700));color:#fff}

    .hero-section{padding:28px 0 12px}
    .hero-card{min-height:420px;border-radius:28px;box-shadow:var(--shadow);display:grid;grid-template-columns:1.2fr .8fr}
    .hero-copy{padding:56px 56px 56px;max-width:620px}
    .hero-copy h1{font-size:clamp(2.5rem,4vw,4.7rem);line-height:1.02}
    .hero-copy p{font-size:1.2rem}
    .hero-visual{position:absolute;inset:0;margin:0;height:auto;border-radius:28px}
    .hero-visual img{border-radius:28px}
    .hero-card::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 32%, rgba(255,255,255,.10) 58%, rgba(255,255,255,0) 100%);z-index:1}

    .category-scroll{display:none}
    .category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
    .category-card{padding:22px 14px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--text);text-align:center;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow)}
    .category-card i{font-size:1.8rem;color:var(--green-700)}

    .product-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
    .product-card:hover{box-shadow:0 10px 30px rgba(15,23,42,.08)}

    .site-page-header{padding:36px;margin:32px 0;border-radius:24px}
    .site-page-title{font-size:32px}
    .site-page-subtitle{font-size:1rem}

    .sticky-action-bar{bottom:0}
    body.has-sticky-bar{padding-bottom:calc(var(--sticky-bar-h) + 24px)}

    .footer-grid{grid-template-columns:1.4fr 1fr 1fr 1fr}
    .footer-brand img{max-width:220px}

    .newsletter-inner{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:24px}
    .newsletter-form{margin:0;flex-direction:row}
    .newsletter-form input{flex:1;min-width:260px}
}

@media (min-width:1200px) and (max-width:1439.98px){
    .product-grid.grid-5{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (min-width:1440px){
    .product-grid.grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}
}

/* =========================================================
   AJAX global
   ========================================================= */
.ajax-loading main,
.ajax-loading .page-wrap {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease-in-out;
}
body.ajax-loading::after {
    content: 'Carregando...';
    position: fixed;
    right: 22px;
    bottom: calc(var(--bottom-nav-h) + 22px);
    z-index: 99999;
    background: #064e3b;
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
}
.ajax-toast {
    position: fixed;
    right: 16px;
    left: 16px;
    top: 16px;
    z-index: 100000;
    max-width: 420px;
    margin: 0 auto;
    padding: 12px 16px;
    border-radius: 14px;
    color: #fff;
    background: #15803d;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .25);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: .2s ease;
    text-align: center;
}
.ajax-toast[data-type="error"] { background: #dc2626; }
.ajax-toast.show { opacity: 1; transform: translateY(0); }
@media (min-width:1200px){
    .ajax-toast{left:auto;right:22px;top:22px;margin:0}
}
