:root {
  --cream: #f8efdd;
  --paper: #fffaf0;
  --ink: #3b2a20;
  --muted: #7a6656;
  --berry: #9b1b30;
  --berry-dark: #7a1424;
  --olive: #5f6f2a;
  --green: #3f8f3a;
  --line: #e7d8bc;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: "Lora", Georgia, serif; font-size: 16px; line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.script { font-family: "Caveat", cursive; }
.label-img { border-radius: 50%; clip-path: circle(48.5%); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(248,239,221,.95);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo img { height: 48px; width: auto; }
.top nav { display: flex; align-items: center; }
.top nav a { margin-left: 16px; text-decoration: none; font-size: 15px; color: var(--muted); }
.top nav a:hover { color: var(--berry); }
@media (max-width: 560px) { .top nav a.nav-link { display: none; } }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 6px;
  background: var(--berry); color: #fff !important; padding: 7px 14px; border-radius: 999px; }
.cart-btn svg { width: 20px; height: 20px; }
.cart-btn .badge { background: #fff; color: var(--berry); border-radius: 999px; min-width: 20px; height: 20px;
  font-size: 13px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }

/* Buttons */
.btn { display: inline-block; background: var(--berry); color: #fff; text-decoration: none; text-align: center;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--berry-dark); }
.btn:disabled { background: #cdbfae; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--berry); border: 2px solid var(--berry); }

section { padding: 40px 0; }
h2 { font-family: "Caveat", cursive; font-size: 46px; margin: 0 0 8px; text-align: center; line-height: 1.1; }
.sub { text-align: center; color: var(--muted); margin: 0 0 24px; }

/* Hero */
.hero { padding: 28px 0 24px; text-align: center; }
.hero-logo { width: min(460px, 88%); margin: 0 auto; }
.hero p.lead { max-width: 560px; margin: 12px auto 0; font-size: 18px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.badges li { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.badges li.row-break { flex-basis: 100%; height: 0; padding: 0; border: 0; margin-top: -8px; background: none; }
.hero-jars { display: flex; justify-content: center; margin: 32px 0 16px; }
.hero-jars img { width: 34%; max-width: 230px; }
.hero-jars img:nth-child(1) { transform: rotate(-8deg) translateX(18px); }
.hero-jars img:nth-child(2) { z-index: 2; transform: translateY(-14px); }
.hero-jars img:nth-child(3) { transform: rotate(8deg) translateX(-18px); }

/* Prices and filters */
.prices { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.price-tag { background: var(--paper); border: 1px dashed var(--berry); border-radius: 12px; padding: 8px 16px; }
.price-tag b { color: var(--berry); }
.filters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filters button { font: inherit; font-size: 15px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 6px 16px; cursor: pointer; color: var(--ink); }
.filters button.on { background: var(--olive); border-color: var(--olive); color: #fff; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  display: flex; flex-direction: column; text-align: center; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 10px; }
.card h3 { font-size: 17px; margin: 0 0 4px; line-height: 1.25; }
.card p { font-size: 14px; color: var(--muted); margin: 0 0 10px; flex: 1; }
.sizes { display: flex; gap: 4px; margin-bottom: 10px; background: var(--cream); border-radius: 999px; padding: 3px; }
.sizes button { flex: 1; font: inherit; font-size: 13px; border: 0; background: transparent; border-radius: 999px;
  padding: 5px 2px; cursor: pointer; color: var(--muted); line-height: 1.2; }
.sizes button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.card .btn { padding: 9px 12px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.card .btn svg { width: 18px; height: 18px; }
.counter { display: flex; align-items: center; justify-content: space-between; background: var(--olive);
  color: #fff; border-radius: 999px; padding: 3px; }
.counter button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.counter span { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.counter svg { width: 18px; height: 18px; }
@media (max-width: 380px) { .card { padding: 10px; } .card h3 { font-size: 15px; } .card p { font-size: 13px; } }

/* Sets */
.sets { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .sets { grid-template-columns: 1fr 1fr; } }
.set { background: var(--paper); border: 2px solid var(--berry); border-radius: 18px; padding: 22px; text-align: center; }
.set h3 { margin: 0 0 4px; font-size: 22px; }
.set .price { font-size: 30px; font-weight: 700; color: var(--berry); margin: 8px 0 2px; }
.set .old { color: var(--muted); text-decoration: line-through; font-size: 16px; margin-left: 6px; font-weight: 400; }
.set p { margin: 0 0 16px; color: var(--muted); }

/* How to order */
.steps { display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: s; padding: 0; list-style: none; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 18px 64px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 16px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--olive); color: #fff;
  display: grid; place-items: center; font-weight: 700; }
.steps b { display: block; }

/* Contacts */
.contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.contacts a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-weight: 600; }
.contacts a:hover { border-color: var(--berry); color: var(--berry); }
.contacts svg { width: 20px; height: 20px; }

/* Bottom bar (cart summary, set progress) */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--paper);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(80,40,10,.12); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.bar .info { font-size: 15px; line-height: 1.3; }
.bar .info b { color: var(--berry); }
.bar[hidden] { display: none; }
body.has-bar { padding-bottom: 76px; }

/* Set builder */
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 600px) { .pick-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .pick-grid { grid-template-columns: repeat(6, 1fr); } }
.pick { position: relative; font: inherit; background: var(--paper); border: 2px solid var(--line); border-radius: 16px;
  padding: 8px 6px; cursor: pointer; text-align: center; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.pick img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pick span { display: block; font-size: 12px; line-height: 1.2; margin-top: 6px; }
.pick.on { border-color: var(--green); background: #eef6e6; transform: scale(.94);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.18); }
.pick.on::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 16px; }
.pick:disabled { opacity: .4; cursor: not-allowed; }

/* Checkout */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 18px; }
.panel h3 { margin: 0 0 12px; font-size: 20px; }
.line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.line small { display: block; color: var(--muted); }
.line .rm { border: 0; background: none; color: var(--berry); cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; padding-top: 12px; }
.total b { color: var(--berry); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--olive); border-color: var(--olive); }
.field .err { color: var(--berry); font-size: 13px; display: none; }
.field.bad input { border-color: var(--berry); }
.field.bad .err { display: block; }
.radio { display: flex; gap: 10px; flex-wrap: wrap; }
.field .radio label { position: relative; flex: 1; min-width: 140px; margin: 0; border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 12px; background: #fff; cursor: pointer; font-weight: 600; text-align: center;
  transition: transform .12s, box-shadow .12s, border-color .12s, background .12s; }
/* The real radio stays for keyboard and screen readers, but is invisible. */
.field .radio input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; pointer-events: none; }
.field .radio label:has(input:checked) { border-color: var(--green); background: #eef6e6; transform: scale(.97);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.15); }
.field .radio label:has(input:checked)::after { content: "✓"; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.field .radio label:has(input:focus-visible) { outline: 2px solid var(--olive); outline-offset: 2px; }
.notice { background: #fff4d6; border: 1px solid #e8c96a; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.send-error { background: #fdecee; border: 1px solid var(--berry); border-radius: 12px; padding: 12px 14px;
  font-size: 14px; margin-bottom: 14px; }
.send-error b { display: block; color: var(--berry); margin-bottom: 4px; }
.send-error .btn { display: block; margin-top: 10px; padding: 9px 12px; font-size: 14px; }
.send-error[hidden] { display: none; }
.empty {text-align: center; color: var(--muted); padding: 20px 0; }

footer { text-align: center; padding: 28px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer img { width: 200px; margin: 0 auto 6px; }
.foot-link { color: var(--berry); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
footer img.avatar { width: 30px; height: 30px; margin: 0; border-radius: 50%; clip-path: circle(46%); }
.foot-link:hover { color: var(--berry-dark); }
