@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #f6f1e7;
  --kraft: #d9c3a0;
  --kraft-dark: #c4a97f;
  --ink: #1f1d1a;
  --ink-soft: #5b544a;
  --red: #c8372d;
  --line: #e4d9c6;
  --ok: #2f6b3f;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.stamp {
  font-family: Oswald, 'Arial Narrow', Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.1;
}
header.top { padding: 36px 0 12px; }
header.top .brand { font-size: 44px; font-weight: 600; margin: 0; }
header.top .tag { color: var(--ink-soft); margin: 6px 0 0; }

.stampbox {
  display: inline-grid; grid-template-columns: auto auto; gap: 2px 28px;
  border: 2.5px solid var(--ink); padding: 12px 16px; margin-top: 20px;
  transform: rotate(-.6deg); font-size: 18px; background: rgba(255,255,255,.25);
}
.stampbox span { opacity: .55; font-size: 13px; }

.banner {
  margin: 22px 0 6px; padding: 14px 18px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.banner.closed { background: #fbf3e3; }
.banner.skip { background: #fdecea; border-color: #f2c7c2; }
.banner strong { font-weight: 600; }
.meter { flex: 1 1 200px; min-width: 180px; }
.meter .bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--red); border-radius: 99px; transition: width .3s; }
.meter small { color: var(--ink-soft); }

.layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; padding: 18px 0 60px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.beans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.bag {
  background: linear-gradient(160deg, var(--kraft) 0%, #d2b993 100%);
  border-radius: 10px 10px 6px 6px; padding: 18px 18px 16px; position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 8px 20px -12px rgba(60,40,10,.45);
}
.bag::before { /* zipper seal */
  content: ''; position: absolute; left: 14px; right: 14px; top: 40px; height: 0;
  border-top: 2px dashed rgba(120,60,40,.35);
}
.bag .roasted { font-size: 13px; opacity: .8; margin-bottom: 30px; }
.sticker {
  border-radius: 8px; padding: 14px 14px 12px; text-align: center; color: #15202b;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.sticker h3 { margin: 0 0 6px; font-size: 21px; font-weight: 600; line-height: 1.15; }
.sticker .origin { font-style: italic; font-size: 13px; }
.sticker .proc { font-size: 12.5px; margin-top: 6px; }
.sticker .notes { font-weight: 600; font-size: 14px; margin-top: 8px; }
.sizes { margin-top: 14px; display: grid; gap: 8px; }
.size {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.55); border-radius: 10px; padding: 8px 8px 8px 12px;
}
.size .lbl { font-size: 15px; }
.size .lbl b { font-weight: 600; }
.qty { display: flex; align-items: center; gap: 2px; }
.qty button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ink); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.qty button:disabled { background: #b9ab95; cursor: not-allowed; }
.qty output { width: 30px; text-align: center; font-weight: 600; }
.bag .left { font-size: 12.5px; margin-top: 8px; color: #4a3d2a; min-height: 1em; }
.bag.out { filter: grayscale(.5); opacity: .75; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  position: sticky; top: 16px;
}
.panel h2 { margin: 0 0 12px; font-size: 22px; }
.lines { list-style: none; margin: 0 0 12px; padding: 0; font-size: 15px; }
.lines li { display: flex; justify-content: space-between; padding: 4px 0; }
.lines .muted { color: var(--ink-soft); }
.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--paper); padding: 4px; border-radius: 12px; margin: 10px 0; }
.seg label { text-align: center; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-weight: 500; font-size: 15px; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--ink); color: #fff; }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid #d6cab5; background: #fff;
}
.field textarea { min-height: 64px; resize: vertical; }
.hint { font-size: 13px; color: var(--ink-soft); }
.btn {
  display: block; width: 100%; padding: 14px; margin-top: 14px; border: 0; border-radius: 12px;
  background: var(--red); color: #fff; font: 600 17px/1 Inter, sans-serif; cursor: pointer;
}
.btn:disabled { background: #c9b9a3; cursor: not-allowed; }
.err { color: #a3261d; font-size: 14px; margin-top: 10px; min-height: 1em; }
.empty { color: var(--ink-soft); font-size: 15px; }
footer { color: var(--ink-soft); font-size: 13px; padding: 0 0 40px; }
