/* ============================================================
   Hymed x H360 — identidade visual
   Verde Hymed #2E6D5C · Menta #8FC8B5 · Dourado H360 #E0A04A
   ============================================================ */
:root {
  --green: #2e6d5c;
  --green-700: #245748;
  --green-900: #0f1f1a;
  --mint: #8fc8b5;
  --mint-100: #e6f3ee;
  --mint-50: #f3f9f6;
  --gold: #e0a04a;
  --gold-600: #c9832c;
  --ink: #1b2b26;
  --muted: #5d6f69;
  --line: #dbe7e2;
  --bg: #f6faf8;
  --card: #ffffff;
  --danger: #c0392b;
  --warn: #b7791f;
  --ok: #2e7d4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 31, 26, .06), 0 6px 20px rgba(15, 31, 26, .06);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-top: 20px; padding-bottom: 48px; outline: none; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo { height: 38px; width: auto; }
.brand__x { color: var(--gold); font-weight: 800; }
.brand__h360 { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
.brand__mname { font-weight: 800; color: var(--green); font-size: 15px; line-height: 1.1; max-width: 160px; }
[hidden] { display: none !important; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--mint-50); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 14px; height: 44px; max-width: 560px; width: 100%; justify-self: center;
}
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 109, 92, .15); }
.search svg { width: 18px; fill: var(--muted); flex: none; }
.search input { border: 0; background: transparent; outline: none; width: 100%; height: 100%; font-size: 15px; }
.topbar__actions { display: flex; gap: 6px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--green);
  font-weight: 600; font-size: 14px;
}
.icon-btn:hover { background: var(--mint-100); }
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }
.badge {
  position: absolute; top: 2px; left: 26px;
  background: var(--gold); color: #fff; font-size: 11px; font-weight: 800;
  min-width: 19px; height: 19px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px;
}

@media (max-width: 760px) {
  .topbar__inner { grid-template-columns: 1fr auto; gap: 10px; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; height: 42px; }
  .brand__logo { height: 30px; }
  .brand__h360 { height: 36px; max-width: 120px; }
  .brand__mname { font-size: 13px; max-width: 120px; }
  .icon-btn__label { display: none; }
  .icon-btn { padding: 8px; }
  .badge { left: 22px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 20px; color: #fff; padding: 28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(224, 160, 74, .18), transparent 45%),
    radial-gradient(circle at 10% 110%, rgba(143, 200, 181, .25), transparent 50%),
    linear-gradient(135deg, var(--green-900), #163a30 55%, var(--green));
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center;
}
.hero__eyebrow { letter-spacing: .3em; font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; margin: 0 0 8px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(22px, 3.2vw, 34px); font-weight: 700; line-height: 1.15; }
.hero h1 strong { color: var(--mint); }
.hero p { margin: 0; color: #d6e8e1; }
.hero__offer { display: flex; align-items: center; justify-content: center; gap: 6px; }
.hero__big {
  font-size: clamp(72px, 10vw, 120px); font-weight: 900; line-height: .85; letter-spacing: -.04em;
  background: linear-gradient(180deg, #f3c675, var(--gold) 55%, var(--gold-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__pct { display: flex; flex-direction: column; font-weight: 900; line-height: .9; }
.hero__pct span:first-child { color: var(--gold); font-size: clamp(36px, 5vw, 56px); }
.hero__pct span:last-child { font-size: clamp(26px, 3.6vw, 40px); }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip-dark {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
}
.chip-dark--coupon { border: 1.5px dashed var(--gold); color: #fff; }
.chip-dark--coupon b { color: var(--gold); letter-spacing: .05em; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .hero__offer { justify-content: flex-start; order: -1; }
}

/* ---------- Status banner ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radius); padding: 14px 16px; margin: 16px 0;
  background: var(--mint-100); border: 1px solid #cfe5dc; font-size: 14px;
}
.notice--warn { background: #fff7e8; border-color: #f2dcb3; }
.notice--danger { background: #fdecea; border-color: #f5c6c0; }
.notice b { display: block; margin-bottom: 2px; }
.notice .btn { margin-top: 8px; }

/* ---------- Categorias ---------- */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cat:hover { border-color: var(--mint); }
.cat[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 14px 0 12px; }
.list-head h2 { margin: 0; font-size: 18px; }
.list-head small { color: var(--muted); }
.list-head select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; font-size: 13px; }

/* ---------- Grid de produtos ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card__img {
  position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center;
  padding: 12px; border: 0; cursor: pointer; border-bottom: 1px solid var(--line);
}
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card__img .ph { width: 40%; opacity: .35; }
.tag-off {
  position: absolute; top: 8px; left: 8px; background: var(--gold); color: #fff;
  font-size: 11px; font-weight: 800; padding: 4px 7px; border-radius: 6px;
}
.card__body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__brand { font-size: 11px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .06em; min-height: 14px; }
.card__name {
  font-size: 13.5px; font-weight: 600; margin: 0; cursor: pointer; background: none; border: 0; padding: 0; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.9em;
}
.price { margin-top: auto; }
.price__old { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.price__new { font-size: 19px; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.price__new small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.price__ask { font-size: 14px; font-weight: 700; color: var(--gold-600); }
.card__actions { padding: 0 12px 12px; }
.stock { font-size: 12px; font-weight: 700; color: var(--green); }
.stock--low { color: #b7791f; }
.stock--out { color: var(--danger); }
.pd .stock { margin-top: 6px; font-size: 14px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; font-size: 14px;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .05s;
  background: var(--green); color: #fff; min-height: 44px;
}
.btn:hover { background: var(--green-700); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--gold { background: var(--gold); color: #1d1408; }
.btn--gold:hover { background: var(--gold-600); color: #fff; }
.btn--ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn--ghost:hover { background: var(--mint-100); }
.btn--wa { background: #1fa855; }
.btn--wa:hover { background: #178a45; }
.btn--sm { padding: 7px 12px; min-height: 36px; font-size: 13px; }
.btn--link { background: none; color: var(--green); padding: 0; min-height: 0; text-decoration: underline; }
.btn--link:hover { background: none; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 36px; height: 38px; border: 0; background: var(--mint-50); cursor: pointer; font-size: 18px; font-weight: 700; color: var(--green); }
.qty button:hover { background: var(--mint-100); }
.qty input { width: 44px; height: 38px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty--card { display: flex; width: 100%; border-color: var(--green); }
.qty--card button { flex: none; width: 44px; height: 36px; background: var(--green); color: #fff; }
.qty--card button:hover { background: var(--green-700); }
.qty--card input { flex: 1; min-width: 0; height: 36px; font-size: 15px; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- Painéis / formulários ---------- */
.page-title { font-size: 24px; margin: 6px 0 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.narrow { max-width: 520px; margin: 0 auto; }

.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row--3 { grid-template-columns: 140px 1fr 110px; }
@media (max-width: 560px) { .form-row, .form-row--3 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; }
.field small { color: var(--muted); font-size: 12px; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; min-height: 44px; font-size: 15px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 109, 92, .15); }
.file-drop {
  border: 1.5px dashed var(--mint); border-radius: 12px; padding: 16px; text-align: center; background: var(--mint-50);
  cursor: pointer; font-size: 14px;
}
.file-drop input { display: none; }
.file-drop b { color: var(--green); }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 0; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.tabs { display: flex; gap: 4px; background: var(--mint-100); padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.tabs a { flex: 1; text-align: center; padding: 10px; border-radius: 9px; font-weight: 700; text-decoration: none; color: var(--muted); font-size: 14px; }
.tabs a[aria-current="page"] { background: #fff; color: var(--green); box-shadow: var(--shadow); }

/* ---------- Carrinho ---------- */
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; 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; border: 1px solid var(--line); border-radius: 10px; padding: 6px; object-fit: contain; background: #fff; }
.cart-line__name { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.cart-line__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cart-line__total { font-weight: 800; color: var(--green); text-align: right; white-space: nowrap; }
.cart-line__remove { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }

.summary { display: grid; gap: 8px; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 8px; }
.summary .discount { color: var(--gold-600); font-weight: 700; }
.summary .total { font-size: 19px; font-weight: 800; color: var(--green); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.free-bar { margin: 12px 0 4px; }
.free-bar__track { height: 8px; background: var(--mint-100); border-radius: 999px; overflow: hidden; }
.free-bar__fill { height: 100%; background: linear-gradient(90deg, var(--mint), var(--green)); border-radius: inherit; transition: width .3s; }
.free-bar p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.free-bar p b { color: var(--green); }
.stack { display: grid; gap: 10px; }

/* ---------- Frete ---------- */
.ship-opt {
  display: grid; grid-template-columns: auto 44px 1fr auto; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer;
}
.ship-opt:has(input:checked) { border-color: var(--green); background: var(--mint-50); box-shadow: 0 0 0 2px rgba(46, 109, 92, .15); }
.ship-opt img { width: 44px; height: 28px; object-fit: contain; }
.ship-opt input { accent-color: var(--green); width: 18px; height: 18px; }
.ship-opt__name { font-weight: 600; font-size: 14px; }
.ship-opt__days { font-size: 12px; color: var(--muted); }
.ship-opt__price { font-weight: 800; color: var(--green); white-space: nowrap; text-align: right; }
.ship-opt__price s { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }

/* ---------- Status ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--mint-100); color: var(--green); }
.pill--warn { background: #fff1d6; color: #8a5a10; }
.pill--danger { background: #fde2df; color: #a12a1d; }
.pill--ok { background: #dcf3e5; color: #1f6b3d; }
.order { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; }
.order + .order { margin-top: 10px; }
.order__head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Pix ---------- */
.pix { border: 1.5px solid var(--mint); background: var(--mint-50); border-radius: var(--radius); padding: 18px; margin: 16px 0; display: grid; gap: 12px; }
.pix h3 { margin: 0; font-size: 18px; color: var(--green); }
.pix__steps { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.pix__qr { width: 220px; height: 220px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--line); image-rendering: pixelated; }
.pix textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; resize: none; word-break: break-all; }
.pix__live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 4px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (max-width: 480px) { .pix__qr { display: none; } } /* no celular, o copia e cola é o caminho */

/* ---------- Modal produto ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 31, 26, .55); }
.modal__panel {
  position: relative; background: #fff; border-radius: 18px; width: min(920px, 100%); max-height: calc(100vh - 32px);
  overflow: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.modal__close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: var(--mint-50); border-radius: 50%; font-size: 24px; cursor: pointer; color: var(--green); z-index: 1; }
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .pd { grid-template-columns: 1fr; } .modal { padding: 0; place-items: end stretch; } .modal__panel { border-radius: 18px 18px 0 0; max-height: 92vh; padding: 20px 16px; } }
.pd__main { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; place-items: center; }
.pd__main img { width: 100%; height: 100%; object-fit: contain; }
.pd__thumbs { display: flex; gap: 8px; margin-top: 10px; }
.pd__thumbs button { width: 60px; height: 60px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: #fff; cursor: pointer; }
.pd__thumbs button[aria-current="true"] { border-color: var(--green); box-shadow: 0 0 0 2px rgba(46, 109, 92, .2); }
.pd__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd h2 { font-size: 20px; margin: 4px 0 12px; padding-right: 36px; }
.pd .price__new { font-size: 28px; }
.pd__desc { font-size: 14px; color: var(--muted); white-space: pre-line; margin-top: 16px; max-height: 220px; overflow: auto; }
.pd__buy { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pd__buy .btn { flex: 1; min-width: 160px; }

/* ---------- WhatsApp FAB / toast ---------- */
.wa-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.wa-fab svg { width: 30px; height: 30px; fill: #fff; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 60;
  background: var(--green-900); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  transition: transform .25s, opacity .25s, visibility .25s; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Footer ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 28px 0 90px; font-size: 13px; color: var(--muted); }
.footer__inner { display: grid; gap: 10px; justify-items: center; text-align: center; }
.footer__brands { display: flex; align-items: center; gap: 14px; }
.footer__logo { height: 44px; width: auto; }
.footer__logo--h360 { height: 52px; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer__links a { font-weight: 700; text-decoration: none; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty img { width: 64px; margin: 0 auto 12px; opacity: .5; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--mint-100); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
