:root {
  --cream: #f5eee1;
  --paper: #fbf7ef;
  --ink: #2b1d14;
  --muted: #7a6656;
  --rust: #b5502d;
  --rust-dark: #8f3c1f;
  --mustard: #d99a2b;
  --olive: #6b7a3a;
  --line: #e3d6c1;
  --radius: 14px;
  --display: 'Shrikhand', Georgia, serif;
  --body: 'Karla', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(245, 238, 225, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.logo { font-family: var(--display); font-size: 28px; text-decoration: none; color: var(--rust); line-height: 1; white-space: nowrap; }
.logo small { display: block; font-family: var(--body); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.top .spacer { flex: 1; }
.bag-btn { background: var(--ink); color: var(--cream); border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bag-btn .count { background: var(--mustard); color: var(--ink); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; text-align: center; padding: 56px 16px 48px;
  background: repeating-conic-gradient(from 0deg at 50% 120%, #f0dfc2 0 6deg, var(--cream) 6deg 12deg); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 8vw, 84px); margin: 0; color: var(--rust); line-height: 1.05;
  text-shadow: 3px 3px 0 var(--mustard), 6px 6px 0 var(--olive); }
.hero p { margin: 18px auto 0; max-width: 520px; font-size: 19px; color: var(--muted); }
.hero p.about { margin-top: 10px; max-width: 560px; font-size: 16px; line-height: 1.55; }

/* ---------- Filters + grid ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 24px 0 8px; }
.chip { border: 1.5px solid var(--ink); background: transparent; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 15px; }
.chip.on { background: var(--ink); color: var(--cream); }
.chip-toggle { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; padding: 16px 0 64px; }
.card { text-decoration: none; display: block; }
.card .pic { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--paper); border: 1px solid var(--line); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .pic img { transform: scale(1.04); }
.card h3 { margin: 10px 0 2px; font-size: 17px; font-weight: 700; }
.card .meta { color: var(--muted); font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.card .price { color: var(--ink); font-weight: 700; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--cream); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.badge.held { background: var(--mustard); color: var(--ink); }
.card.sold .pic img, .card.sold .ph { filter: grayscale(.8) opacity(.6); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; grid-column: 1 / -1; }

/* Placeholder when an item has no photo yet */
.ph { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 16px;
  background: radial-gradient(circle at 50% 110%, var(--mustard) 0 18%, var(--rust) 18% 30%, var(--olive) 30% 42%, #e7d5b5 42% 100%); }
.ph span { font-family: var(--display); color: var(--paper); font-size: 22px; text-shadow: 2px 2px 0 rgba(0,0,0,.18); }

/* ---------- Item page ---------- */
.item { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 32px 0 64px; }
.gallery .main { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 68px; height: 85px; background: none; }
.thumbs button.on { border-color: var(--rust); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 0 0 8px; }
.info .price { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 18px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.desc { white-space: pre-line; }
.btn { background: var(--rust); color: #fff; border: 0; border-radius: 999px; padding: 14px 26px; font-weight: 800; font-size: 17px; }
.btn:hover { background: var(--rust-dark); }
.btn:disabled { background: #b9aa98; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.note { color: var(--muted); font-size: 14px; margin-top: 10px; }
.back { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 15px; }

/* ---------- Bag drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(43, 29, 20, .4); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--paper); z-index: 50; transform: translateX(100%); transition: transform .25s; display: flex; flex-direction: column; }
body.bag-open .scrim { opacity: 1; pointer-events: auto; }
body.bag-open .drawer { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 26px; }
.drawer .x { background: none; border: 0; font-size: 28px; line-height: 1; }
.lines { flex: 1; overflow: auto; padding: 8px 20px; }
.line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line .t { width: 56px; height: 70px; border-radius: 8px; overflow: hidden; flex: none; }
.line .t img { width: 100%; height: 100%; object-fit: cover; }
.line .n { flex: 1; font-size: 15px; }
.line .n b { display: block; }
.line .rm { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 14px; }
.totals { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.totals .row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.totals .row.big { font-weight: 800; font-size: 19px; margin: 10px 0 14px; }
.line .qty { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.line .qty select { font: inherit; font-size: 14px; padding: 2px 6px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }

/* Size picker on the item page */
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.sizes button { min-width: 48px; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 700; font-size: 15px; }
.sizes button.on { background: var(--ink); color: var(--cream); }
.sizes button:disabled { border-color: var(--line); color: #b9aa98; text-decoration: line-through; cursor: not-allowed; background: transparent; }
.pick-label { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 15px; }
.qty-row select { font: inherit; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.left { color: var(--rust); font-size: 14px; font-weight: 700; }

.ship h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 12px 0 10px; }
.ship .fld { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.ship .fld input, .ship .fld select { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; color: var(--ink);
  padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.ship .fld input:focus, .ship .fld select:focus { outline: none; border-color: var(--rust); }
.ship .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.msg { background: #fbe3d6; color: var(--rust-dark); border-radius: 10px; padding: 10px 12px; font-size: 15px; margin-bottom: 12px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 999px; z-index: 60; transition: transform .25s; font-weight: 600; }
.toast.show { transform: translateX(-50%); }

/* ---------- Simple centered pages ---------- */
.center { max-width: 560px; margin: 0 auto; padding: 64px 16px; text-align: center; }
.center h1 { font-family: var(--display); font-weight: 400; color: var(--rust); font-size: 44px; margin: 0 0 12px; }

footer { border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 14px; padding: 28px 16px; }
footer .peace { font-family: var(--display); color: var(--rust); font-size: 20px; }

@media (max-width: 760px) {
  .item { grid-template-columns: 1fr; gap: 20px; padding-top: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .logo { font-size: 22px; }
  .logo small { display: none; }
  .chip-toggle { margin-left: 0; width: 100%; }
}
