:root {
  --green: #0f8f5f;
  --green-dark: #0a6d49;
  --green-soft: #e7f6ef;
  --whats: #25d366;
  --whats-dark: #1ebe5b;
  --ink: #1b2a24;
  --muted: #5d6b64;
  --line: #e1e8e4;
  --bg: #f7faf8;
  --card: #ffffff;
  --red: #c0392b;
  --amber-bg: #fff8e1;
  --amber: #e0a800;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(16, 60, 40, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--green-dark); }
button { font: inherit; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

/* Promo */
.promo { background: var(--green-dark); color: #fff; text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .02em; padding: 7px 12px; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--green-dark); text-decoration: none; white-space: nowrap; }
.logo__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--green); color: #fff; }
.search { flex: 1; min-width: 0; }
.search input { width: 100%; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 1rem; background: var(--bg); }
.search input:focus { outline: 2px solid var(--green); background: #fff; }
.actions { display: flex; gap: 4px; }
.act { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 4px 8px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-decoration: none; cursor: pointer; }
.act:hover { background: var(--green-soft); }
.act__ico { font-size: 1.3rem; line-height: 1.2; }
.act__txt { font-size: .72rem; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { position: absolute; top: 0; right: 6px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--green); color: #fff; font-size: .7rem; }
.badge[data-zero="true"] { display: none; }

.catnav { border-top: 1px solid var(--line); background: #fff; }
.catnav__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav__inner::-webkit-scrollbar { display: none; }
.catnav button { flex: none; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink); font-size: .92rem; font-weight: 600; cursor: pointer; }
.catnav button:hover { color: var(--green-dark); }
.catnav button[aria-current="true"] { border-bottom-color: var(--green); color: var(--green-dark); }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; font-size: 1rem; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer; transition: background .15s, transform .05s; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); }
.btn--white { background: #fff; color: var(--green-dark); }
.btn--white:hover { background: var(--green-soft); }
.btn--line { background: #fff; border-color: var(--green); color: var(--green-dark); padding: 9px 20px; }
.btn--line:hover { background: var(--green-soft); }
.btn--whats { width: 100%; background: var(--whats); color: #073b1a; }
.btn--whats:hover:not(:disabled) { background: var(--whats-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Banner */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0; padding: 32px 36px; border-radius: 18px; background: linear-gradient(135deg, var(--green) 0%, #14b377 100%); color: #fff; }
.banner h1 { margin: 0 0 8px; font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1.2; }
.banner p { margin: 0 0 18px; max-width: 520px; opacity: .95; }
.banner__art { font-size: clamp(2.5rem, 8vw, 5rem); letter-spacing: 8px; }

/* Listagem */
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 8px; scroll-margin-top: 130px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; }
.list-head { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.count { margin: 0; margin-right: auto; font-size: .95rem; color: var(--muted); }
.sort { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.sort select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; color: var(--ink); }
.show-filters { display: none; }
.layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }

.filters { display: grid; gap: 12px; }
.fbox { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; }
.fbox h3 { margin: 0 0 8px; font-size: .95rem; }
.fbox label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .9rem; cursor: pointer; }
.fbox small { margin-left: auto; color: var(--muted); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: .8rem; font-weight: 600; }
.link-btn { border: 0; background: none; color: var(--green-dark); text-decoration: underline; font-size: .8rem; cursor: pointer; padding: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card__img { position: relative; overflow: hidden; display: grid; place-items: center; height: 150px; background: var(--green-soft); font-size: 3.4rem; border: 0; cursor: pointer; }
.card__img img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 10px; object-fit: contain; }
.card__img:has(img) { background: #fff; }
.ilus { position: absolute; left: 0; right: 0; bottom: 3px; font-size: .62rem; line-height: 1; color: var(--muted); text-align: center; }
.fav { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fff; color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.fav.on { color: var(--red); }
.rx { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--amber-bg); border: 1px solid var(--amber); color: #7a5b00; font-size: .7rem; font-weight: 700; }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.card__brand { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.card__name { margin: 0; font-size: .95rem; line-height: 1.3; }
.card__price { margin-top: auto; padding-top: 8px; font-size: 1.2rem; font-weight: 800; color: var(--green-dark); }
.card__pix { font-size: .75rem; color: var(--muted); }
.card__buy { margin-top: 8px; padding: 10px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.card__buy:hover { background: var(--green-dark); }
a.card__buy { display: block; text-align: center; text-decoration: none; font-size: .88rem; }
.card__more { margin-top: 6px; border: 0; background: none; color: var(--green-dark); font-size: .85rem; text-decoration: underline; cursor: pointer; }
.more { text-align: center; margin: 20px 0 4px; }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
.notice { margin: 28px 0 40px; padding: 14px 16px; border-left: 4px solid var(--amber); border-radius: 8px; background: var(--amber-bg); font-size: .9rem; }

/* Conta */
.page-title { margin: 24px 0 12px; font-size: 1.6rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tabs a, .tabs button { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .95rem; text-decoration: none; cursor: pointer; }
.tabs a[aria-current="true"] { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.tabs__out { margin-left: auto; color: var(--red) !important; }
.panel { max-width: 640px; margin-bottom: 40px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel--wide { max-width: none; background: none; border: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order { margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.order__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.order ul { margin: 0 0 10px; padding-left: 18px; font-size: .92rem; }
.order__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Footer */
.footer { background: #12352a; color: #d5e8df; padding: 32px 0 16px; margin-top: 24px; }
.footer a { color: #fff; }
.footer h3 { margin: 0 0 6px; font-size: 1rem; color: #fff; }
.footer p { margin: 0; }
.footer__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.footer__copy { margin-top: 24px; text-align: center; font-size: .8rem; opacity: .7; }

/* Sacola */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-direction: column; width: min(430px, 100%); background: #fff; box-shadow: -4px 0 24px rgba(0, 0, 0, .15); transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
.drawer.open { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-size: 1.2rem; }
.icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); cursor: pointer; }
.drawer__body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.drawer__foot { padding: 12px 18px 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer__foot small { color: var(--muted); text-align: center; }
.sum { display: grid; gap: 2px; font-size: .92rem; }
.sum div { display: flex; justify-content: space-between; }
.sum .sum__total { margin-top: 4px; font-size: 1.15rem; font-weight: 800; }
.ship { margin-bottom: 12px; font-size: .85rem; }
.ship__bar { height: 8px; margin-top: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ship__bar i { display: block; height: 100%; background: var(--green); transition: width .25s; }

.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-item__name { font-weight: 600; font-size: .93rem; }
.cart-item__price { text-align: right; font-weight: 700; }
.cart-item small { color: #7a5b00; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.qty span { min-width: 24px; text-align: center; font-weight: 600; }
.cart-item__remove { border: 0; background: none; color: var(--red); font-size: .8rem; cursor: pointer; text-align: right; }

.checkout, .stack { display: grid; gap: 12px; }
.checkout { margin-top: 16px; }
label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
input:not([type="radio"]):not([type="checkbox"]), textarea, select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--green); }
input[readonly] { background: var(--bg); color: var(--muted); }
fieldset { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 6px; padding: 0; font-size: .9rem; font-weight: 600; }
.radio { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.sub { margin: 6px 0 0; font-size: 1rem; }
.cep-status { margin: -4px 0 0; font-size: .82rem; }
.row--city { grid-template-columns: minmax(0, 1fr) 90px; }
.row > label { min-width: 0; }
.row input { width: 100%; min-width: 0; }
.form-error { margin: 0; color: var(--red); font-size: .9rem; }

/* Modais */
.modal { max-height: calc(100vh - 32px); overflow-y: auto; width: min(440px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); color: var(--ink); }
.modal::backdrop { background: rgba(0, 0, 0, .5); }
.modal h2 { margin: 0 0 6px; }
.modal__close { position: absolute; top: 10px; right: 10px; margin: 0; }
.modal__close button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg); cursor: pointer; }
.modal--product { width: min(520px, calc(100% - 32px)); }
.pd__img { position: relative; display: grid; place-items: center; height: 240px; margin: 8px 0 14px; border-radius: 12px; background: var(--green-soft); font-size: 5rem; overflow: hidden; }
.pd__img img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 12px; object-fit: contain; }
.pd__img:has(img) { background: #fff; }
.pd h2 { font-size: 1.15rem; margin-bottom: 4px; }
.pd__price { margin: 12px 0; font-size: 1.5rem; font-weight: 800; color: var(--green-dark); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; background: #12352a; color: #fff; font-size: .92rem; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }

.float-whats { position: fixed; right: 18px; bottom: 18px; z-index: 15; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--whats); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.float-whats:hover { background: var(--whats-dark); }

@media (max-width: 800px) {
  .topbar__inner { flex-wrap: wrap; gap: 8px; }
  .search { order: 3; flex-basis: 100%; }
  .actions { margin-left: auto; }
  .layout { grid-template-columns: 1fr; }
  .filters { display: none; }
  .filters.open { display: grid; }
  .show-filters { display: inline-block; }
  .banner { padding: 22px; }
  .banner__art { display: none; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card__img { height: 120px; font-size: 2.6rem; }
  .row { grid-template-columns: 1fr; }
  .row.row--city { grid-template-columns: minmax(0, 1fr) 90px; }
  .list-head { flex-wrap: wrap; }
}
