/* =====================================================================
   F GARCIA - visual da loja
   Para mudar as cores da loja, altere as variáveis abaixo.
   ===================================================================== */
:root {
  --bg: #FBF8F4;
  --surface: #FFFFFF;
  --ink: #221C19;
  --muted: #6F665F;
  --line: #E8E0D7;
  --accent: #6E2A35;       /* vinho: botões principais */
  --accent-ink: #FFFFFF;
  --accent-soft: #F5E9EA;
  --gold: #A07A3C;         /* detalhes */
  --ok: #2F6B4A; --ok-soft: #E6F1EA;
  --warn: #8A5A12; --warn-soft: #FBF0DC;
  --bad: #9B2C2C; --bad-soft: #FBEAEA;
  --radius: 12px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
h3 { font-size: 1rem; font-family: var(--sans); font-weight: 600; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.empty h1 { color: var(--ink); }

.demo-bar { background: var(--ink); color: #fff; text-align: center; font-size: .82rem; padding: 6px 12px; }

/* ---------- cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251, 248, 244, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { font-family: var(--serif); font-size: 1.6rem; text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.search { flex: 1; max-width: 460px; margin-left: auto; }
.search input { width: 100%; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0 18px; outline: none; }
.search input:focus { border-color: var(--ink); }
.cart-btn { position: relative; border: 0; background: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.cart-btn:hover { background: var(--accent-soft); }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; text-decoration: none; font-size: .9rem; padding: 6px 14px; border-radius: 999px; border: 1px solid transparent; color: var(--muted); }
.chips a:hover { color: var(--ink); }
.chips a.active { border-color: var(--ink); color: var(--ink); }
.chips .chip-promo { color: var(--accent); font-weight: 500; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; font-weight: 500; font-size: .95rem; transition: background .15s, color .15s, transform .1s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; background: transparent; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #561F29; border-color: #561F29; }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-block { width: 100%; }
.grow { flex: 1; }
.icon-btn { border: 0; background: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.icon-btn:hover { background: var(--accent-soft); }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .8rem; }

/* ---------- início ---------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--gold); margin: 0 0 10px; font-weight: 600; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 14em; }
.hero-sub { color: var(--muted); max-width: 34em; margin: 0 0 24px; }
.hero-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hero-perks:empty { display: none; }
.hero-perks li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; color: var(--muted); }
.hero-perks strong { color: var(--ink); font-weight: 600; }
.section { padding: 36px 0 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h1, .section-head h2 { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 0 14px; }
.crumbs { font-size: .85rem; color: var(--muted); padding: 18px 0 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- vitrine ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 18px; }
.card { display: flex; flex-direction: column; }
.card-img { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #F1ECE6; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.03); }
.card.is-out .card-img img { opacity: .55; filter: grayscale(.4); }
.card-body { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; flex: 1; }
.card-body .btn { margin-top: auto; }
.card-title { text-decoration: none; font-size: .95rem; line-height: 1.35; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title:hover { text-decoration: underline; }
.brand-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; text-decoration: none; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 10px; }
.price { font-weight: 600; font-size: 1.05rem; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .85rem; }
.price-row.big .price { font-size: 1.7rem; font-family: var(--serif); font-weight: 500; }
.price-row.big .price-old { font-size: 1rem; }
.installments { display: block; color: var(--muted); font-size: .9rem; margin-top: -6px; }
.badge { position: absolute; top: 10px; left: 10px; font-size: .72rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.badge-promo { background: var(--accent); color: #fff; }
.badge-low { background: var(--warn-soft); color: var(--warn); left: auto; right: 10px; }
.badge-out { background: var(--ink); color: #fff; left: auto; right: 10px; }

/* ---------- produto ---------- */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 12px 0 24px; }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #F1ECE6; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.thumbs button { flex: none; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.thumbs button.active { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info { display: flex; flex-direction: column; gap: 12px; }
.product-info h1 { margin: 0; }
.promo-until { color: var(--accent); font-size: .9rem; margin: 0; }
.stock-line { margin: 0; font-size: .9rem; color: var(--ok); }
.stock-line.warn { color: var(--warn); }
.stock-line.bad { color: var(--bad); }
.buy-row { display: flex; gap: 10px; }
.desc { border-top: 1px solid var(--line); padding-top: 16px; color: #433A35; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { border: 0; background: none; width: 32px; height: 32px; cursor: pointer; font-size: 1.1rem; border-radius: 50%; }
.qty span { min-width: 24px; text-align: center; font-weight: 500; }
.qty-lg button { width: 44px; height: 44px; }

/* ---------- carrinho ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(34, 28, 25, .35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); z-index: 50; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0, 0, 0, .08); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; }
.cart-list { list-style: none; margin: 0; padding: 8px 20px; overflow-y: auto; flex: 1; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: #F1ECE6; }
.ci-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ci-info a { text-decoration: none; font-size: .92rem; line-height: 1.3; }
.ci-info .qty { align-self: flex-start; }
.ci-price { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-weight: 600; font-size: .95rem; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--surface); }
.drawer .empty { padding: 60px 20px; }
.row-between { display: flex; justify-content: space-between; gap: 12px; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }

/* ---------- checkout ---------- */
.page-title { margin: 6px 0 20px; }
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; padding-bottom: 40px; }
.co-main { display: grid; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; }
fieldset.panel { display: grid; gap: 14px; }
legend { font-family: var(--serif); font-size: 1.2rem; padding: 0; float: left; width: 100%; margin-bottom: 4px; }
legend + * { clear: both; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
label small { color: var(--muted); font-weight: 400; }
input:not([type=radio]):not([type=checkbox]), select, textarea { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: #fff; outline: none; font-size: 1rem; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-wide { grid-template-columns: 3fr 1fr; }
.options { display: grid; gap: 10px; }
.option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.option span { display: grid; gap: 2px; }
.option small { color: var(--muted); font-weight: 400; font-size: .84rem; }
.opt-price { font-style: normal; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.address { display: grid; gap: 12px; }
.co-side { position: sticky; top: 130px; display: grid; gap: 10px; }
.co-side h2 { margin: 0; }
.summary { list-style: none; margin: 0; padding: 0 0 10px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; font-size: .9rem; }
.summary li { display: flex; justify-content: space-between; gap: 12px; }
.total { font-size: 1.15rem; padding-top: 8px; border-top: 1px solid var(--line); }
.form-error { color: var(--bad); font-size: .9rem; margin: 0; min-height: 0; }
.form-error:empty { display: none; }

/* ---------- pedido ---------- */
.order-page { padding: 28px 0 48px; display: grid; gap: 14px; }
.order-page h1 { margin: 0; }
.code { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .04em; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--line); }
.s-pago, .s-enviado, .s-entregue { background: var(--ok-soft); color: var(--ok); }
.s-aguardando_pagamento { background: var(--warn-soft); color: var(--warn); }
.s-cancelado { background: var(--bad-soft); color: var(--bad); }
.order-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.notice { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.notice.ok { background: var(--ok-soft); border-color: #CFE3D6; color: #1E4A31; }
.notice.warn { background: var(--warn-soft); border-color: #F0DDB8; color: #6A450C; }
.notice.bad { background: var(--bad-soft); border-color: #F1CFCF; color: #7A2121; }
.pix { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; }
.pix h2 { margin: 0; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; font-size: .92rem; }
.qr { width: 240px; max-width: 100%; margin: 0 auto; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr svg { width: 100%; height: auto; display: block; }
.pix-amount { text-align: center; margin: 0; font-size: 1.1rem; }
.copy-row { display: flex; gap: 8px; }
.copy-row .btn { white-space: nowrap; flex: none; }
.copy-row input { font-family: ui-monospace, monospace; font-size: .8rem !important; }

/* ---------- rodapé ---------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 90px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; }
.footer-grid p { margin: 0 0 6px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; font-size: .8rem; }
.wa-float { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: #1F8F4E; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); z-index: 30; }

/* ---------- avisos ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: .92rem; transition: opacity .4s, transform .4s; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.toast-bad { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- celular e tablet ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .checkout, .order-grid { grid-template-columns: 1fr; }
  .co-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-row { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 12px; }
  .logo { font-size: 1.4rem; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .cart-btn { margin-left: auto; }
  .chips { padding-bottom: 10px; }
  .hero { grid-template-columns: 1fr; padding: 32px 0 28px; gap: 24px; }
  .hero-perks { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
  .hero-perks li { padding: 10px; font-size: .8rem; text-align: center; }
  .hero-perks strong { display: block; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .card-body .btn { min-height: 40px; font-size: .88rem; padding: 0 10px; }
  .product { grid-template-columns: 1fr; gap: 20px; }
  .two { grid-template-columns: 1fr; }
  .two-wide { grid-template-columns: 2fr 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; }
  .filters select { flex: 1; min-width: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
}
