@font-face { font-family: 'Chivo'; src: url('/fonts/Chivo.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --orange: #D36C00;
  --orange-dark: #A95500;
  --pink: #DB8E7F;
  --pink-soft: #E2B7AC;
  --olive: #7C8046;
  --cream: #FFF8F0;
  --cream-2: #F7EBDD;
  --ink: #3A2A22;
  --ink-soft: #7A6657;
  --line: #EBDCCB;
  --card: #FFFFFF;
  --ok: #7C8046;
  --warn: #E0951A;
  --danger: #C2412D;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(120, 70, 20, .10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Chivo', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--cream); color: var(--ink); line-height: 1.45; padding-bottom: 96px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
button { font: inherit; color: inherit; cursor: pointer; }
.link { background: none; border: 0; padding: 0; color: var(--orange-dark); text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }

.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 248, 240, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { height: 44px; width: auto; }
.pill { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: var(--cream-2); }
.pill.open { background: #E9EBD3; color: #4F5326; }
.pill.closed, .pill.suspended { background: #F6DAD3; color: #8A2E1E; }
.demo-banner { background: var(--ink); color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; }

/* hero / countdown */
.hero { margin-top: 18px; border-radius: 28px; padding: 24px 20px; color: #fff; background: linear-gradient(135deg, var(--orange) 0%, #E58A2B 60%, var(--pink) 130%); box-shadow: var(--shadow); position: relative; overflow: hidden; animation: rise .5s ease both; }
.hero.closed { background: linear-gradient(135deg, #6E5A4C, #9A8272); }
.hero.suspended { background: linear-gradient(135deg, #8A2E1E, #C2412D); }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.hero h1 { font-size: clamp(22px, 5vw, 32px); font-weight: 800; position: relative; }
.hero p { margin: 8px 0 0; font-size: clamp(15px, 3.6vw, 18px); position: relative; }
.count { margin-top: 14px; display: flex; gap: 8px; position: relative; flex-wrap: wrap; }
.count .u { background: rgba(255, 255, 255, .2); border-radius: 14px; padding: 8px 12px; min-width: 66px; text-align: center; }
.count .u b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.count .u span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.when { margin-top: 14px; font-size: 14px; background: rgba(0, 0, 0, .15); border-radius: 12px; padding: 8px 12px; position: relative; display: inline-block; }
.notice { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--ink-soft); }

.sec-title { margin: 28px 0 12px; font-size: 22px; font-weight: 800; }
.sec-sub { margin: -6px 0 14px; color: var(--ink-soft); font-size: 14px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: rise .5s ease both; border: 1px solid var(--line); }
.card .ph { aspect-ratio: 4 / 3; background: var(--cream-2) center/cover; position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .ph img { transform: scale(1.04); }
.card .ph.noimg { display: grid; place-items: center; }
.card .ph.noimg img { width: 40%; height: auto; opacity: .6; object-fit: contain; }
.card.soldout .ph img { filter: grayscale(.9) brightness(.9); }
.tag { position: absolute; left: 12px; top: 12px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 5px 10px; border-radius: 99px; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.card .desc { color: var(--ink-soft); font-size: 14px; margin: 0; flex: 1; }
.price { font-size: 22px; font-weight: 800; color: var(--orange-dark); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* barra de disponibilidade */
.cap { margin-top: 2px; }
.cap-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; }
.bar { height: 12px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--ok); transition: width .6s ease, background-color .3s; }
.bar.warn i { background: var(--warn); }
.bar.hot i { background: var(--danger); }
.bar.full i { background: var(--danger); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 6px, transparent 6px 12px); }
.cap-msg { margin-top: 6px; font-size: 13px; font-weight: 700; }
.cap-msg.hot { color: var(--danger); }
.cap-msg.warn { color: #9A6008; }
.cap-msg.ok { color: #5E6234; }
.cap-msg.full { color: var(--danger); letter-spacing: .08em; }

/* botões */
.btn { border: 0; border-radius: 16px; padding: 14px 18px; font-weight: 800; font-size: 16px; min-height: 52px; transition: transform .1s, filter .2s, background-color .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--cream-2); color: var(--ink); }
.btn-wa { background: #1FA855; color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { background: #E4D8CB; color: #9B8A7B; cursor: not-allowed; filter: none; }
.btn:focus-visible, .step button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .link:focus-visible { outline: 3px solid #1B6FD6; outline-offset: 2px; }
.step { display: flex; align-items: center; background: var(--cream-2); border-radius: 16px; overflow: hidden; }
.step button { width: 52px; height: 52px; border: 0; background: transparent; font-size: 26px; font-weight: 800; color: var(--orange-dark); }
.step button[disabled] { color: #C9B9A9; cursor: not-allowed; }
.step output { min-width: 40px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.card .step { width: 100%; justify-content: space-between; }

/* barra do carrinho */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--cream) 60%, transparent); animation: up .3s ease both; }
.cartbar .btn { display: flex; align-items: center; justify-content: space-between; max-width: 520px; margin: 0 auto; box-shadow: 0 8px 24px rgba(211, 108, 0, .4); }
.cb-count { background: #fff; color: var(--orange-dark); border-radius: 99px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(40, 20, 10, .5); z-index: 40; animation: fade .2s both; }
.sheet { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--cream); border-radius: 28px 28px 0 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); animation: up .3s ease both; max-width: 640px; margin: 0 auto; overscroll-behavior: contain; }
@media (min-width: 700px) { .sheet { bottom: 4vh; border-radius: 28px; } }
.sheet h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.sheet .x { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cream-2); font-size: 22px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line .nm { font-weight: 700; }
.line .sub { color: var(--ink-soft); font-size: 13px; }
.line .step button { width: 44px; height: 44px; }
.line .rm { background: none; border: 0; color: var(--danger); font-size: 13px; text-decoration: underline; padding: 4px 0; text-align: left; }
.totals { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; padding: 16px 0 8px; }
.alert { background: #FBE9E4; border: 1px solid #F0C3B8; color: #7C2A1B; border-radius: 14px; padding: 12px 14px; font-size: 14px; margin: 10px 0; }
.alert.info { background: #EEF0DB; border-color: #D5D9AE; color: #4F5326; }

/* formulário */
.field { margin: 12px 0; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.field label small { font-weight: 400; color: var(--ink-soft); }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); }
textarea { min-height: 76px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 14px 0; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; }
.addr { background: #fff; border: 1.5px dashed var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; }

/* confirmação */
.ok-hero { text-align: center; padding: 8px 0 4px; }
.ok-hero .big { width: 72px; height: 72px; border-radius: 50%; background: var(--olive); color: #fff; display: grid; place-items: center; font-size: 40px; margin: 0 auto 10px; animation: pop .5s ease both; }
.code { font-size: 32px; font-weight: 800; color: var(--orange-dark); letter-spacing: .04em; }
.sum { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: 14px 0; font-size: 15px; }
.sum dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.sum dt { color: var(--ink-soft); }
.sum dd { margin: 0; font-weight: 600; }
.sum ul { margin: 6px 0 0; padding-left: 18px; }
.actions { display: grid; gap: 10px; margin-top: 12px; }

.foot { text-align: center; padding: 36px 16px 20px; color: var(--ink-soft); }
.foot img { margin: 0 auto 8px; }
.foot p { margin: 4px 0; }
.small { font-size: 13px; }
.loading, .empty { text-align: center; padding: 60px 0; color: var(--ink-soft); }
.toasts { position: fixed; left: 0; right: 0; top: 74px; z-index: 80; display: grid; gap: 8px; justify-items: center; padding: 0 16px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; max-width: 480px; box-shadow: var(--shadow); animation: rise .3s both; pointer-events: auto; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
[hidden] { display: none !important; }
