/* =========================================================
   «Зерно» — тепла «кавʼярняна» тема: кремовий фон,
   еспресо-текст, теракотовий акцент і глибокий зелений
   ========================================================= */
:root {
  --bg: #f7f1e8;
  --paper: #fffaf3;
  --sand: #efe4d4;
  --line: #e3d5c1;
  --ink: #2a1c14;
  --ink-2: #5c4636;
  --muted: #8a7462;
  --accent: #c8553d;
  --accent-dark: #a8402b;
  --green: #2f5d50;
  --gold: #d99a2b;
  --danger: #c0392b;
  --success: #2f7d4f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 30px rgba(74, 46, 31, .10);
  --shadow-lg: 0 24px 60px rgba(74, 46, 31, .16);
  --container: 1240px;
  --header-h: 74px;
  --ease: .2s ease;
  --font-head: 'Playfair Display', Georgia, serif;
  --font: 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { display: flex; justify-content: center; margin-top: 28px; }
.price { font-weight: 800; white-space: nowrap; }
.price s { color: var(--muted); font-weight: 600; margin-right: 6px; }

/* ---------- Кнопки й поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 800; letter-spacing: .2px;
  transition: transform var(--ease), background var(--ease), color var(--ease), box-shadow var(--ease);
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.btn--small { padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.link { padding: 0; border: none; background: none; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.field {
  width: 100%; min-height: 48px; padding: 11px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); font: inherit; outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(200, 85, 61, .12); }
.field.is-invalid { border-color: var(--danger); }
textarea.field { resize: vertical; }
select.field { cursor: pointer; }
.field--small { min-height: 36px; padding: 6px 10px; width: auto; font-size: 14px; }
.label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.label .error { color: var(--danger); font-weight: 600; font-size: 13px; min-height: 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px;
  border-radius: 999px; background: var(--sand); color: var(--ink-2);
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.chip--accent { background: var(--accent); color: #fff; }
.chip--green { background: var(--green); color: #fff; }
.chip--gold { background: #fbe9c4; color: #8a5a10; }

.notice { grid-column: 1 / -1; padding: 28px; border: 1.5px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); }
.notice a { color: var(--accent); font-weight: 700; }
.notice--error { border-style: solid; border-color: #e6b3a8; color: var(--ink); }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--sand) 25%, #f4ebde 50%, var(--sand) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton--card { aspect-ratio: 3 / 4.2; }
.skeleton--row { height: 90px; margin-bottom: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Смужка й шапка ---------- */
.topbar { background: var(--green); color: #e8f0ec; font-size: 13px; font-weight: 700; text-align: center; padding: 7px 16px; }
.header { position: sticky; top: 0; z-index: 100; background: rgba(247, 241, 232, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 26px; font-weight: 800; letter-spacing: .5px; flex-shrink: 0; }
.logo svg { width: 36px; height: 36px; }
.logo--light { color: var(--paper); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 700; color: var(--ink-2); transition: var(--ease); }
.nav a:hover, .nav a.is-active { background: var(--sand); color: var(--ink); }
.header__search { flex: 1; max-width: 300px; margin-left: auto; position: relative; }
.header__search input { width: 100%; padding: 10px 16px 10px 40px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font: inherit; outline: none; }
.header__search input:focus { border-color: var(--accent); }
.header__search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.header__actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px;
  border: none; border-radius: 50%; background: transparent; transition: var(--ease);
}
.icon-btn:hover { background: var(--sand); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.icon-btn .count[hidden] { display: none; }
.icon-btn.bump { animation: bump .4s ease; }
@keyframes bump { 50% { transform: scale(1.18); } }
.burger { display: none; }

/* ---------- Секції ---------- */
.page { padding-top: 36px; padding-bottom: 64px; }
.page--narrow { max-width: 480px; }
.page__title { font-family: var(--font-head); font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.1; margin-bottom: 10px; }
.section { margin-top: 72px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section__title { font-family: var(--font-head); font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.15; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.section__more { font-weight: 800; border-bottom: 2px solid var(--accent); }
.crumbs { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.crumbs a:hover { color: var(--accent); }

.panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.panel__title { font-family: var(--font-head); font-size: 22px; font-weight: 800; margin-bottom: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--green); color: var(--paper); }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; min-height: 520px; padding-top: 48px; padding-bottom: 48px; }
.hero__title { font-family: var(--font-head); font-size: clamp(38px, 5.5vw, 68px); font-weight: 800; line-height: 1.02; }
.hero__title em { font-style: italic; color: #f2c38a; }
.hero__text { max-width: 520px; margin: 22px 0 32px; font-size: 18px; color: #d9e6df; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn--ghost { color: var(--paper); border-color: var(--paper); }
.hero .btn--ghost:hover { background: var(--paper); color: var(--green); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; }
.hero__facts b { display: block; font-family: var(--font-head); font-size: 30px; color: #f2c38a; }
.hero__facts span { font-size: 14px; color: #c5d6cd; }
.hero__art { position: relative; display: grid; place-items: center; }
.hero__art::before { content: ''; position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(242, 195, 138, .35), transparent 65%); }
.hero__art img { position: relative; width: min(420px, 100%); border-radius: 40px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .3)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-1.5deg); } }

/* ---------- Категорії, переваги ---------- */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: end;
  min-height: 210px; padding: 22px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); transition: var(--ease);
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat img { position: absolute; right: -20px; top: -20px; width: 170px; border-radius: 50%; opacity: .95; transition: transform .4s ease; }
.cat:hover img { transform: rotate(-6deg) scale(1.05); }
.cat h3 { position: relative; font-family: var(--font-head); font-size: 24px; }
.cat p { position: relative; color: var(--muted); font-weight: 700; font-size: 14px; }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.perk { padding: 24px; border-radius: var(--radius); background: var(--sand); }
.perk__icon { font-size: 30px; }
.perk h3 { margin: 10px 0 6px; font-size: 17px; }
.perk p { color: var(--ink-2); font-size: 14px; }

.story { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 48px; border-radius: 28px; background: var(--ink); color: var(--paper); }
.story__steps { display: grid; gap: 18px; margin-top: 24px; counter-reset: step; }
.story__step { display: flex; gap: 16px; }
.story__step::before { counter-increment: step; content: counter(step); flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); font-weight: 800; }
.story__step p { color: #cbb9a8; font-size: 15px; }
.story__visual { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.story__visual img { border-radius: var(--radius); background: #3a2a20; width: 100%; }

.promo-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 30px 36px; border-radius: 24px; background: repeating-linear-gradient(-45deg, #f2c38a, #f2c38a 18px, #efbb7e 18px, #efbb7e 36px); }
.promo-banner h3 { font-family: var(--font-head); font-size: 28px; }
.promo-code { padding: 8px 16px; border: 2px dashed var(--ink); border-radius: 12px; font-weight: 800; letter-spacing: 2px; background: var(--paper); }

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.testimonial { padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.testimonial .stars { color: var(--gold); letter-spacing: 2px; }
.testimonial p { margin: 10px 0 14px; color: var(--ink-2); }
.testimonial b { font-size: 14px; }

/* ---------- Картки товарів ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 20px; }
.card { position: relative; display: flex; flex-direction: column; padding: 12px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); transition: transform var(--ease), box-shadow var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__img { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--sand); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card__img img { transform: scale(1.05); }
.card__badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 6px 4px; }
.card__meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.card__title { font-size: 18px; font-weight: 800; line-height: 1.25; }
.card__title a:hover { color: var(--accent); }
.card__notes { color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.card__foot .price { font-size: 19px; }
.card__foot .price small { color: var(--muted); font-weight: 600; font-size: 13px; }
.card .add-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 22px; }
.rating { color: var(--gold); font-weight: 800; }
.wish {
  position: absolute; top: 22px; right: 22px; z-index: 2; width: 40px; height: 40px;
  border: none; border-radius: 50%; background: rgba(255, 250, 243, .9); display: grid; place-items: center;
  transition: var(--ease);
}
.wish svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; }
.wish:hover { transform: scale(1.1); }
.wish.is-active svg { fill: var(--accent); stroke: var(--accent); }
.out { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(247, 241, 232, .7); font-weight: 800; }

/* ---------- Каталог ---------- */
.shop { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 24px; }
.filters h4 { margin-bottom: 10px; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.filter-list { display: grid; gap: 4px; }
.filter-list button {
  display: flex; justify-content: space-between; padding: 9px 12px; border: none; border-radius: 10px;
  background: transparent; font-weight: 700; text-align: left; transition: var(--ease);
}
.filter-list button:hover { background: var(--sand); }
.filter-list button.is-active { background: var(--ink); color: var(--paper); }
.filter-list span { color: inherit; opacity: .6; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.filters-toggle { display: none; }

/* ---------- Сторінка товару ---------- */
.product { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.product__gallery { position: sticky; top: calc(var(--header-h) + 20px); border-radius: 28px; overflow: hidden; background: var(--sand); }
.product__gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product__info { display: grid; gap: 22px; }
.product__title { font-family: var(--font-head); font-size: clamp(32px, 4vw, 48px); font-weight: 800; line-height: 1.05; }
.product__short { font-size: 18px; color: var(--ink-2); }
.product__price { font-size: 32px; font-family: var(--font-head); font-weight: 800; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.spec { padding: 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.spec span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.spec b { font-size: 15px; }
.roast-meter { display: flex; gap: 4px; margin-top: 6px; }
.roast-meter i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.roast-meter i.on { background: var(--ink-2); }
.option-group { display: grid; gap: 10px; }
.option-group > span { font-weight: 800; font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 700; transition: var(--ease); }
.pill:hover { border-color: var(--ink); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.qty button { width: 44px; height: 46px; border: none; background: none; font-size: 20px; font-weight: 800; }
.qty input { width: 44px; border: none; background: none; text-align: center; font: inherit; font-weight: 800; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--small button { width: 34px; height: 36px; font-size: 16px; }
.qty--small input { width: 32px; }
.buy-row .btn { flex: 1; min-width: 200px; }
.delivery-note { display: grid; gap: 8px; padding: 18px; border-radius: 16px; background: var(--sand); font-size: 14px; font-weight: 600; }
.description { white-space: pre-line; color: var(--ink-2); }

/* Відгуки */
.reviews { display: grid; gap: 14px; }
.review { padding: 18px 20px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.review header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars-input input { display: none; }
.stars-input label { font-size: 30px; color: var(--line); cursor: pointer; transition: color var(--ease); }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: var(--gold); }
.review-form { display: grid; gap: 12px; padding: 20px; border-radius: 16px; background: var(--sand); }
.review-form .btn { justify-self: start; }

/* ---------- Кошик і оформлення ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.cart-list { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.cart-item img { width: 96px; height: 96px; border-radius: 14px; background: var(--sand); }
.cart-item__title { font-weight: 800; font-size: 17px; }
.cart-item__title:hover { color: var(--accent); }
.cart-item__controls { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.cart-item__total { text-align: right; display: grid; gap: 8px; justify-items: end; }
.remove { border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: underline; }
.remove:hover { color: var(--danger); }
.summary { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 14px; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.summary__row--total { padding-top: 14px; border-top: 1.5px dashed var(--line); font-size: 22px; font-weight: 800; font-family: var(--font-head); }
.summary__row .discount { color: var(--success); }
.promo-form { display: flex; gap: 8px; }
.promo-form .field { min-height: 44px; text-transform: uppercase; }
.free-ship { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bar { height: 8px; border-radius: 4px; background: var(--sand); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .4s ease; }
.empty-cart { display: grid; justify-items: center; gap: 14px; padding: 64px 20px; text-align: center; }
.empty-cart svg { width: 120px; height: 120px; color: var(--line); }

.checkout { display: grid; gap: 22px; }
.checkout fieldset { margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: grid; gap: 16px; }
.checkout legend { padding: 0 8px; font-family: var(--font-head); font-size: 22px; font-weight: 800; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice-list { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: var(--ease); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--sand); }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }
.choice b { flex: 1; }
.mini-lines { display: grid; gap: 10px; max-height: 280px; overflow-y: auto; }
.mini-line { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.mini-line img { width: 52px; height: 52px; border-radius: 10px; background: var(--sand); }
.demo-note { padding: 12px 14px; border-radius: 12px; background: #fbe9c4; color: #6a4a10; font-size: 13px; font-weight: 600; }

/* Сторінка замовлення */
.success { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 20px 0 32px; }
.success__icon { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 40px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 6px; }
.timeline div { display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.timeline div::before { content: ''; width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.timeline div.is-done { color: var(--ink); }
.timeline div.is-done::before { background: var(--green); }
.status { display: inline-flex; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status--new { background: #fbe9c4; color: #8a5a10; }
.status--confirmed { background: #dbe8f5; color: #24527a; }
.status--shipped { background: #e4def5; color: #4a3a8a; }
.status--delivered { background: #d8eee0; color: #1f6a3c; }
.status--cancelled { background: #f3d9d4; color: #9a2f22; }

/* ---------- Кабінет, вхід ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.tabs button { padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 800; }
.tabs button.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.order-card { display: grid; gap: 12px; padding: 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.order-card header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.order-card__thumbs { display: flex; gap: 8px; }
.order-card__thumbs img { width: 52px; height: 52px; border-radius: 10px; background: var(--sand); }
.auth { display: grid; gap: 20px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--sand); }
.segmented button { padding: 10px; border: none; border-radius: 999px; background: none; font-weight: 800; color: var(--muted); }
.segmented button.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.form-error { min-height: 20px; color: var(--danger); font-weight: 700; font-size: 14px; }

/* ---------- Адмінка ---------- */
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { padding: 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.stat b { display: block; margin-top: 4px; font-family: var(--font-head); font-size: 30px; }
.stat--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stat--dark span { color: #cbb9a8; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.chart { width: 100%; height: 240px; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.chart .bar-rect { fill: var(--accent); transition: opacity var(--ease); }
.chart .bar-rect:hover { opacity: .75; }
.top-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.top-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-weight: 700; font-size: 14px; }
.top-list .bar { grid-column: 1 / -1; height: 6px; }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); background: var(--sand); }
tr:last-child td { border-bottom: none; }
td img { width: 44px; height: 44px; border-radius: 10px; background: var(--sand); }
.row-hidden { opacity: .5; }
.inline-input { width: 80px; min-height: 34px; padding: 4px 8px; }
.order-details { display: grid; gap: 6px; padding: 14px; margin-top: 8px; border-radius: 12px; background: var(--bg); font-size: 13px; }
.admin-form { display: grid; gap: 14px; }
.admin-form .form-row { grid-template-columns: repeat(3, 1fr); }

/* ---------- Модалки, тости ---------- */
.modal { padding: 0; border: none; border-radius: 22px; background: var(--paper); color: var(--ink); width: min(560px, calc(100% - 32px)); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(42, 28, 20, .45); backdrop-filter: blur(3px); }
.modal__body { display: grid; gap: 14px; padding: 26px; }
.modal__body h3 { font-family: var(--font-head); font-size: 24px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 8px; max-width: calc(100% - 40px); }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lg); font-weight: 700; animation: rise .25s ease; transition: opacity .4s; }
.toast a { color: #f2c38a; text-decoration: underline; }
.toast--error { background: var(--danger); }
.toast.is-out { opacity: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Футер ---------- */
.footer { margin-top: 40px; padding: 56px 0 28px; background: var(--ink); color: #cbb9a8; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: var(--paper); margin-bottom: 12px; font-size: 15px; }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer a:hover { color: var(--paper); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid #4a3a2e; font-size: 13px; }
.notfound { display: grid; justify-items: center; gap: 14px; text-align: center; padding-top: 80px; }
.notfound b { font-family: var(--font-head); font-size: 110px; line-height: 1; color: var(--accent); }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .cats, .perks { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .burger { display: grid; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column;
    padding: 12px 24px 20px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: var(--ease);
  }
  .header.is-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 12px; font-size: 18px; }
  .header__search { display: none; }
  .header__actions { margin-left: auto; }
  .hero__inner { grid-template-columns: 1fr; min-height: 0; }
  .hero__art { max-width: 320px; margin: 0 auto; }
  .story { grid-template-columns: 1fr; padding: 32px; }
  .testimonials { grid-template-columns: 1fr; }
  .shop { grid-template-columns: 1fr; }
  .filters { position: static; display: none; padding: 20px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
  .filters.is-open { display: grid; }
  .filters-toggle { display: inline-flex; }
  .product { grid-template-columns: 1fr; gap: 28px; }
  .product__gallery { position: static; max-width: 520px; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { margin-top: 52px; }
  .cats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat { min-height: 160px; padding: 16px; }
  .cat img { width: 120px; }
  .cat h3 { font-size: 20px; }
  .perks { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .card { padding: 8px; border-radius: 18px; }
  .card__title { font-size: 15px; }
  .card__notes { display: none; }
  .card__foot .price { font-size: 16px; }
  .card .add-btn { width: 38px; height: 38px; font-size: 18px; }
  .wish { top: 14px; right: 14px; width: 34px; height: 34px; }
  .specs { grid-template-columns: 1fr 1fr; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item img { width: 72px; height: 72px; }
  .cart-item__total { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; }
  .form-row, .admin-form .form-row { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .promo-banner { padding: 24px; }
}

/* Кнопка «в обране» поруч із «Додати в кошик» */
.buy-row .wish-big { flex: 0 0 52px; min-width: 0; padding: 0; height: 50px; font-size: 20px; }
.wish-big.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
