:root {
  --bg: #fcfbf8;
  --fg: #3a2e24;
  --muted: #7a6d60;
  --line: #e7e1d8;
  --card: #fff;
  --green: #4f7a36;
  --green-d: #3f6229;
  --green-l: #eef4e7;
  --brown: #3a2e24;
  --amber: #f59e0b;
  --amber-d: #d97f06;
  --red: #c2392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(58, 46, 36, .06), 0 4px 14px rgba(58, 46, 36, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 .5em; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.green { color: var(--green); font-weight: 600; }
.pre { white-space: pre-line; }

/* topo */
.topbar { background: var(--brown); color: #f1ebe1; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 16px; text-align: center; }
.header { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.header-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { background: #fff; border-radius: 8px; padding: 2px; }
.search { flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; background: #fff; border-radius: 10px; padding: 0 12px; color: var(--muted); }
.search input { border: 0; outline: 0; padding: 10px; width: 100%; font: inherit; color: var(--fg); background: transparent; }
.header-actions { display: flex; gap: 14px; }
.header-actions a { color: #fff; position: relative; display: flex; padding: 6px; }
.cart-link b { position: absolute; top: -2px; right: -4px; background: var(--amber); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.subnav { background: var(--green-d); }
.subnav .wrap { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.subnav a { color: #e8f1de; font-size: 14px; padding: 9px 0; white-space: nowrap; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 12px 20px; font: 600 15px/1 Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none !important; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-d); }
.btn-buy { background: var(--amber); color: #fff; font-size: 16px; padding: 16px 20px; }
.btn-buy:hover { background: var(--amber-d); }
.btn-ghost { background: #fff; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-small { padding: 8px 12px; font-size: 13px; background: var(--green); color: #fff; }
.block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; padding: 4px; }
.link-btn.light { color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* home */
.hero { background: linear-gradient(120deg, var(--green-l), #f6efe3); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding-block: 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--green); margin: 0 0 8px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.02em; }
.hero p { font-size: 17px; max-width: 52ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-img { display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.hero-img img { max-height: 300px; width: auto; filter: drop-shadow(0 12px 16px rgba(0,0,0,.15)); }
.hero-img img:nth-child(2) { max-height: 260px; }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.perks div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; }
.perks span { color: var(--muted); font-size: 13px; }
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head h2 { font-size: 24px; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cat { display: flex; align-items: center; gap: 16px; padding: 16px; color: var(--fg); overflow: hidden; }
.cat:hover { text-decoration: none; border-color: var(--green); }
.cat img { width: 110px; height: 110px; object-fit: contain; }
.cat h3 { font-size: 19px; margin: 0 0 4px; }
.cat span { color: var(--muted); font-size: 14px; }

/* listagem */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; color: var(--fg); transition: transform .15s, box-shadow .15s; }
.product-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(58,46,36,.1); }
.product-card:hover h3 { color: var(--green); }
.pc-img { aspect-ratio: 1; background: #fff; position: relative; max-width: 100%; }
.pc-img img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }
.pc-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); }
.pc-body h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; min-height: 2.4em; }
.pc-body s { color: var(--muted); font-size: 12px; }
.pc-body strong { font-size: 19px; }
.pc-body small { color: var(--muted); font-size: 12px; }
.list-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding-block: 32px; }
.list-layout > section { min-width: 0; }
.filters { display: flex; flex-direction: column; gap: 8px; }
.filters h2 { font-size: 17px; }
.filters a { color: var(--muted); }
.filters a.active { color: var(--green); font-weight: 700; }
.page-title { font-size: clamp(24px, 3vw, 30px); margin: 28px 0 8px; }
.list-layout .page-title { margin-top: 0; }
.empty { padding: 32px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* produto */
.crumbs { font-size: 13px; color: var(--muted); padding-top: 20px; }
.crumbs a { color: var(--muted); }
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 16px; }
.pdp > * { min-width: 0; }
.pdp-img { position: relative; aspect-ratio: 1; max-width: 100%; }
.pdp-img img { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); object-fit: contain; }
.pdp-info h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; }
.buybox { padding: 22px; margin-top: 16px; display: flex; flex-direction: column; gap: 6px; background: #faf7f1; }
.buybox s { color: var(--muted); }
.badge-off { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.price-big { font-size: 36px; font-weight: 800; color: var(--green); line-height: 1.1; }
.buy-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.qty-label { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qty button { background: none; border: 0; width: 36px; height: 38px; font-size: 18px; cursor: pointer; color: var(--fg); }
.qty input { width: 44px; text-align: center; border: 0; font: 600 15px Inter, sans-serif; outline: 0; -moz-appearance: textfield; background: transparent; color: var(--fg); }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pdp-perks { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.label-box { padding: 28px; margin-top: 32px; }
.label-box h2 { font-size: 22px; }
.label-box h3 { font-size: 16px; margin-top: 20px; }
.label-box p { margin: 0 0 8px; }
.table-scroll { overflow-x: auto; }
.nutri { border-collapse: collapse; min-width: 380px; width: 100%; max-width: 560px; font-size: 14px; }
.nutri th, .nutri td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.nutri th { background: var(--green-l); }
.warn { font-size: 12.5px; background: #fbf6ea; border: 1px solid #efe2c4; padding: 12px; border-radius: 10px; margin-top: 18px !important; }

/* carrinho / checkout */
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; padding-bottom: 24px; }
.two-col > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cart-lines { padding: 8px 18px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 72px; height: 72px; object-fit: contain; }
.cl-info { display: flex; flex-direction: column; min-width: 0; }
.cl-info a { color: var(--fg); }
.cl-qty { display: flex; flex-direction: column; align-items: center; }
.cl-total { min-width: 90px; text-align: right; }
.summary { padding: 20px; position: sticky; top: 120px; display: flex; flex-direction: column; gap: 10px; }
.summary h2 { font-size: 19px; }
.row { display: flex; justify-content: space-between; gap: 10px; }
.row.total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; }
.sum-line { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: 14px; padding: 6px 0; }
.sum-line img { width: 44px; height: 44px; object-fit: contain; }
.form-card { padding: 22px; }
.form-card h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.step { background: var(--green); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 14px; }
.span2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.field input, .field select, .field textarea { font: 400 15px Inter, system-ui, sans-serif; color: var(--fg); padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green-l); border-color: var(--green); }
.pay-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.pay-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.pay-opt:has(input:checked) { border-color: var(--green); background: var(--green-l); }
.pay-opt span { display: flex; flex-direction: column; }
.pay-opt small { color: var(--muted); font-size: 12px; }
.pay-opt input { accent-color: var(--green); margin-top: 3px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.check input { accent-color: var(--green); margin-top: 3px; }
.alert { background: #fdecea; color: #8e2a1f; border: 1px solid #f5c6c0; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.success { padding: 24px; margin-top: 28px; margin-bottom: 16px; background: var(--green-l); border-color: #cfe0bd; }
.success h1 { color: var(--green-d); font-size: 26px; }
.timeline { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.timeline li { font-size: 12.5px; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.timeline li.done { border-color: var(--green); color: var(--fg); font-weight: 600; }
.status-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eee; color: #555; vertical-align: middle; }
.status-pill.bad, .s-cancelado, .s-reembolsado { background: #fdecea; color: #8e2a1f; }
.s-aguardando_pagamento { background: #fff4dc; color: #8a5a00; }
.s-pago { background: #e6f0ff; color: #1d4f9c; }
.s-enviado { background: #efe8ff; color: #5b3aa6; }
.s-entregue { background: var(--green-l); color: var(--green-d); }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.contact-cards .card { padding: 14px; display: flex; flex-direction: column; font-size: 14px; overflow-wrap: anywhere; }
.contact-cards span { color: var(--muted); }
.prose section { margin-top: 22px; }
.prose h2 { font-size: 18px; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 20px; }
.legal { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 36px; }

/* rodapé */
.footer { background: #1f1913; color: #cbbfb1; margin-top: 56px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; padding-block: 40px 24px; }
.footer h3 { color: #fff; font-size: 15px; margin: 0 0 10px; }
.footer a { display: block; color: #cbbfb1; padding: 3px 0; }
.footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; }
.footer-brand img { background: #fff; border-radius: 8px; padding: 2px; }
.footer-legal { border-top: 1px solid #3a3027; padding-block: 18px 28px; font-size: 12px; color: #9a8d7f; }

/* admin */
.admin { background: #f6f4ef; }
.admin-bar { background: var(--brown); color: #fff; }
.admin-bar-in { display: flex; align-items: center; gap: 24px; height: 56px; }
.admin-bar nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.admin-bar nav a { color: #e9e2d6; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.admin-bar nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.admin-bar .brand { font-size: 16px; }
.admin-main { padding-bottom: 40px; }
.flash { background: var(--green-l); border: 1px solid #cfe0bd; color: var(--green-d); padding: 10px 14px; border-radius: 10px; margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stats .card { padding: 14px 16px; display: flex; flex-direction: column; }
.stats span { color: var(--muted); font-size: 13px; }
.stats b { font-size: 22px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--fg); font-size: 13px; }
.tabs a.active { background: var(--green); border-color: var(--green); color: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.prod-cell { display: flex; align-items: center; gap: 10px; }
.prod-cell img { width: 40px; height: 40px; object-fit: contain; }
.prod-form { display: grid; grid-template-columns: 110px 110px 80px 50px 60px auto; gap: 8px; align-items: center; }
.prod-form input:not([type=checkbox]) { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; width: 100%; }
.prod-form input[type=checkbox] { accent-color: var(--green); width: 18px; height: 18px; justify-self: center; }
.products-table th:nth-child(n+2) { width: 1%; }
.history { padding-left: 18px; margin: 0; }
.ticket-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ticket-head .muted { margin-left: auto; }
.ticket-msg { background: #faf7f1; padding: 12px; border-radius: 10px; }
.ticket-form { display: flex; gap: 8px; }
.ticket-form input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; min-width: 0; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; }
.login-card img { margin: 0 auto; }

/* responsivo */
@media (max-width: 900px) {
  .hero-in, .pdp, .two-col { grid-template-columns: 1fr; }
  .hero-img { order: -1; } .hero-img img { max-height: 200px; } .hero-img img:nth-child(2) { max-height: 170px; }
  .perks, .stats { grid-template-columns: 1fr 1fr; }
  .list-layout { grid-template-columns: 1fr; gap: 12px; }
  .filters { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; } .filters h2 { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .summary { position: static; }
  .pdp-img { aspect-ratio: auto; height: 340px; }
}
@media (max-width: 600px) {
  .header-in { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; }
  .header-actions { margin-left: auto; }
  .brand span { font-size: 17px; }
  .cats, .form-grid, .pay-options, .contact-cards, .footer-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .cat img { width: 80px; height: 80px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pc-body { padding: 10px 12px 14px; } .pc-body strong { font-size: 17px; }
  .cart-line { grid-template-columns: 56px 1fr; } .cart-line img { width: 56px; height: 56px; }
  .cl-qty { grid-column: 2; flex-direction: row; gap: 10px; } .cl-total { grid-column: 2; text-align: left; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .ticket-form { flex-direction: column; }
}
