:root {
  --primary: #8a6a3b;
  --accent: #c9a45c;
  --bg: #fbf9f6;
  --surface: #ffffff;
  --ink: #2b2622;
  --muted: #7c736a;
  --line: #e9e3da;
  --danger: #a4433b;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 400; font-size: 15px; line-height: 1.5;
}
img { max-width: 100%; display: block; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Cabeçalho */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251,249,246,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1200px; margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.brand { text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: .04em; display: flex; align-items: center; }
.brand img { height: 44px; width: auto; }
.cart-btn { position: relative; background: none; border: 0; padding: 8px; color: var(--ink); }
.cart-count { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; display: grid; place-items: center; }

.hero { max-width: 1200px; margin: 0 auto; text-align: center; padding: 10px var(--gutter) 10px; }
.hero-logo { width: 100%; height: clamp(200px, 34vw, 320px); margin: 0 0 12px; border-radius: 10px; overflow: hidden; }
.hero-logo img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; display: block; }
.hero-logo .name { padding: 28px var(--gutter) 8px; font-family: var(--serif); font-size: 40px; font-weight: 500; letter-spacing: .04em; line-height: 1.1; }
.tagline { margin: 0; padding: 0 var(--gutter); font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--muted); }

/* Filtros */
.filters { max-width: 1200px; margin: 0 auto; padding: 12px var(--gutter) 4px; display: grid; gap: 12px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; }
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.row select:last-child { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }

main { max-width: 1200px; margin: 0 auto; padding: 8px var(--gutter) 48px; }
.count { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }

/* Grade */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
.card { background: none; border: 0; padding: 0; text-align: left; display: block; width: 100%; }
.card .ph { position: relative; aspect-ratio: 4 / 5; background: #efeae2; border-radius: 6px; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .ph img { transform: scale(1.03); }
.card .name { margin: 10px 0 2px; font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.2; }
.card .meta { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.card .price { margin-top: 4px; font-size: 15px; }
.card .price small { color: var(--muted); font-size: 12px; }
.card.sold .ph img, .card.sold .ph svg { opacity: .45; }
.badge { position: absolute; top: 8px; left: 8px; padding: 3px 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--surface); border-radius: 999px; }
.badge.sold { background: var(--ink); color: #fff; }
.badge.hot { background: var(--primary); color: #fff; }
.ph svg { width: 100%; height: 100%; }

.empty { text-align: center; padding: 56px 0; color: var(--muted); }
.link { background: none; border: 0; color: var(--primary); text-decoration: underline; padding: 8px; }

.foot { border-top: 1px solid var(--line); text-align: center; padding: 28px var(--gutter) 40px; color: var(--muted); font-size: 13px; }
.foot a { color: var(--primary); }

/* Modal de detalhe */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(30,25,20,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; background: var(--bg); width: 100%; max-height: 94vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px var(--gutter) 28px; animation: up .25s ease; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 26px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.close.static { position: static; box-shadow: none; background: transparent; }
.detail { display: grid; gap: 20px; }
.stage { aspect-ratio: 4 / 5; background: #efeae2; border-radius: 8px; overflow: hidden; }
.stage img, .stage svg { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { flex: none; width: 56px; aspect-ratio: 4 / 5; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #efeae2; }
.thumbs button[aria-current="true"] { border-color: var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info .sku { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.info h2 { margin: 2px 0 6px; font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.1; }
.status { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.status.out { color: var(--danger); }
.info .price { font-size: 22px; margin: 4px 0 12px; }
.info .price small { display: block; font-size: 13px; color: var(--muted); }
.desc { margin: 0 0 16px; color: #4a433c; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; padding: 14px 0; border-block: 1px solid var(--line); font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.var { margin-bottom: 16px; }
.var label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.var select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.actions { display: grid; gap: 10px; margin-bottom: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; text-decoration: none; border: 1px solid var(--primary); font-size: 15px; letter-spacing: .02em; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.care { border-top: 1px solid var(--line); padding: 10px 0; font-size: 14px; }
.care summary { cursor: pointer; font-weight: 500; }
.care p { margin: 8px 0 0; color: #4a433c; white-space: pre-line; }

/* Pedido */
.drawer { background: var(--bg); width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: up .25s ease; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gutter) 6px; }
.drawer-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; }
.drawer-body { overflow-y: auto; padding: 0 var(--gutter); flex: 1; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line .th { width: 64px; aspect-ratio: 4/5; background: #efeae2; border-radius: 6px; overflow: hidden; }
.line .th img, .line .th svg { width: 100%; height: 100%; object-fit: cover; }
.line .t { font-family: var(--serif); font-size: 18px; line-height: 1.2; }
.line .s { color: var(--muted); font-size: 12px; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.qty span { min-width: 22px; text-align: center; }
.line .rm { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.drawer-foot { padding: 14px var(--gutter) 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.total strong { font-size: 22px; font-weight: 500; }
.minorder { margin: 0; font-size: 13px; color: var(--danger); }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; }

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
  .filters { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr 1fr 1fr; max-width: 640px; }
  .row select:last-child { grid-column: auto; }
  .overlay { align-items: center; }
  .sheet { max-width: 920px; border-radius: 18px; padding: 28px; }
  .detail { grid-template-columns: 1fr 1fr; gap: 32px; }
  .drawer { max-width: 440px; margin-left: auto; height: 100vh; max-height: none; border-radius: 0; }
  #cart.overlay { align-items: stretch; justify-content: flex-end; }
}
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
