:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --bg: #fafaf9;
  --surface: #fff;
  --chip-bg: #1c1917;
  --chip-text: #fff;
  --amber: #d97706;
  --amber-dark: #b45309;
  --green: #059669;
  --green-dark: #047857;
  --red: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; margin: 0 0 .3em; }
a { color: inherit; text-decoration: none; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 420px; margin: 60px auto; padding: 0 16px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 960px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { font-family: Georgia, serif; font-size: 18px; font-weight: bold; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.tab-active { background: var(--chip-bg); color: var(--chip-text); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid transparent; border-radius: 8px; padding: 9px 16px;
  font-size: 14px; cursor: pointer; background: var(--chip-bg); color: var(--chip-text);
}
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-amber { background: var(--amber); }
.btn-amber:hover { background: var(--amber-dark); }
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 999px; }
.btn[disabled] { background: #e7e5e4; color: #a8a29e; cursor: not-allowed; }

label { display: block; margin-bottom: 14px; font-size: 14px; }
label span.lbl { display: block; margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat .n { font-family: Georgia, serif; font-size: 22px; }
.stat .l { font-size: 12px; color: var(--muted); }

.error { color: var(--red); font-size: 14px; margin: 8px 0; }
.notice { color: var(--green-dark); font-size: 14px; margin: 8px 0; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }

.hero { border-bottom: 1px solid var(--line); background-size: cover; background-position: center; }
.hero-inner { max-width: 960px; margin: 0 auto; padding: 32px 16px; }
.hero-overlay { background: rgba(0,0,0,.4); }
.hero-overlay h1, .hero-overlay p { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; color: var(--amber-dark); }
.hero-overlay .eyebrow { color: #fcd34d; }
.social-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.social-row a { color: var(--muted); display: inline-flex; }
.hero-overlay .social-row a { color: rgba(255,255,255,.85); }
.store-logo { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; border: 2px solid rgba(255,255,255,.8); margin-right: 8px; vertical-align: middle; }

.cat-row { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0; }
.cat-chip { flex-shrink: 0; padding: 6px 14px; border-radius: 999px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.cat-chip.active { background: var(--chip-bg); color: var(--chip-text); border-color: var(--chip-bg); }

.product-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 8px 0 100px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: 1fr 1fr; } }
.product-list { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 100px; }
.product-list .product-card { flex-direction: row; align-items: center; }
.product-list .product-img { width: 76px; height: 76px; flex-shrink: 0; }
.product-list .product-body { padding: 10px 14px; }
.product-list .product-desc { -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.product-img { width: 100%; aspect-ratio: 1 / 1; background: #f5f5f4; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.product-img .ph { font-family: Georgia, serif; font-size: 30px; color: #d6d3d1; }

.img-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 100; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.img-lightbox.open { display: flex; }
.img-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.product-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 { font-size: 17px; }
.product-desc { font-size: 14px; color: var(--muted); flex: 1; margin: 4px 0 0; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { font-weight: 600; }

.cart-fab {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--chip-bg); color: var(--chip-text); border-radius: 999px; padding: 12px 20px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  border: none; cursor: pointer; font-size: 14px; z-index: 30;
}

.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; display: none; }
.drawer-backdrop.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 400px; background: var(--surface); z-index: 41;
  transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-body { padding: 16px 20px; flex: 1; overflow-y: auto; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--line); }
.cart-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.qty-btn { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.wa-preview { background: #dcf8c6; color: #1c1917; border-radius: 16px 16px 4px 16px; padding: 12px 14px; font-size: 14px; white-space: pre-wrap; line-height: 1.5; }
.step-options { display: grid; gap: 8px; margin-bottom: 14px; }
.step-btn { padding: 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; }
.step-btn.active { background: var(--chip-bg); color: var(--chip-text); border-color: var(--chip-bg); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.row-list { display: flex; flex-direction: column; gap: 8px; }
.row-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.thumb { width: 42px; height: 42px; border-radius: 8px; background: #f5f5f4; object-fit: cover; flex-shrink: 0; }
.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-preview { width: 80px; height: 80px; border-radius: 12px; background: #f5f5f4; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.upload-preview.round { border-radius: 999px; }
.upload-preview.wide { width: 220px; height: 100px; border-radius: 12px; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
