/* Flormont — оптова торгівля квітами (B2B)
   Дизайн-система: див. docs/DESIGN.md */

:root {
  /* Нейтральна основа: у B2B-каталозі фон не конкурує з фото партій */
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #ebece7;
  --line: #d6d8d0;
  --line-strong: #b4b8ad;

  --ink: #171a17;
  --ink-2: #454a44;
  --ink-3: #6f746c;
  --ink-inverse: #f7f7f4;

  /* Фірмовий колір: ялиновий зелений. Один акцент: темна троянда для заявок і дедлайнів */
  --brand: #1e4d3b;
  --brand-hover: #173d2f;
  --brand-soft: #e2ece6;
  --accent: #a8353f;
  --accent-hover: #8d2b34;
  --accent-soft: #f6e6e7;

  /* Кольори статусів наявності: єдина легенда для каталогу, картки, кошика, кабінету */
  --st-stock: #2b7a4b;
  --st-stock-bg: #e3f1e8;
  --st-preorder: #2c5d94;
  --st-preorder-bg: #e3ecf6;
  --st-low: #b45d10;
  --st-low-bg: #f9ebdc;
  --st-none: #6f746c;
  --st-none-bg: #ebece7;

  --font-head: "Commissioner", "Arial", sans-serif;
  --font-body: "IBM Plex Sans", "Arial", sans-serif;
  --font-mono: "IBM Plex Mono", "Menlo", monospace;

  --r-s: 4px;
  --r-m: 6px;
  --r-l: 10px;

  --container: 1240px;
  --gutter: 16px;

  --shadow-pop: 0 8px 24px rgba(23, 26, 23, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }

/* Колонки за замовчуванням не ширші за контейнер */
.grid, .catalog, .dash, .cart, .pdp, .hero__inner, .form { grid-template-columns: minmax(0, 1fr); }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
p { margin: 0 0 1em; }
small, .small { font-size: 14px; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.nowrap { white-space: nowrap; }

@media (min-width: 900px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: 820px; }

.section { padding: 48px 0; }
.section--tight { padding: 28px 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.section__head h2 { margin: 0; }
@media (min-width: 900px) { .section { padding: 72px 0; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-m);
  font: 500 15px/1 var(--font-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); color: #fff; }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

/* ---------- Шапка ---------- */
.topbar {
  background: var(--brand); color: var(--ink-inverse); font-size: 13px;
}
.topbar__inner { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; min-height: 34px; }
.topbar a { color: var(--ink-inverse); }
.topbar__spacer { flex: 1; }
@media (max-width: 720px) { .topbar__hide-m { display: none; } }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo {
  font-family: var(--font-head); font-weight: 700; font-size: 24px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: 8px;
}
.logo small { font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--ink-3); letter-spacing: 0; }
.logo:hover { color: var(--brand); }

.nav { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: var(--r-s); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 500; }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 1023px) {
  .header__actions .btn--ghost { display: none; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .site-header.is-open .nav a { padding: 12px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
}
@media (min-width: 1024px) {
  .nav { display: flex; gap: 2px; }
  .nav-toggle { display: none; }
}
.header__cart { position: relative; }
.header__cart .badge-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}

/* ---------- Смуга дедлайнів ---------- */

/* ---------- Перший екран ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero__inner { display: grid; gap: 32px; padding: 40px 0; }
.hero__text h1 { margin-bottom: 16px; }
.hero__lead { font-size: 18px; color: var(--ink-2); max-width: 560px; margin-bottom: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero__note { font-size: 14px; color: var(--ink-3); }
.hero__panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.hero__panel h3 { font-size: 16px; margin-bottom: 12px; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; padding: 64px 0; }
}

/* Таблиця фактів: графік, мінімалка, пороги. Замість «смуги метрик» */
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.facts > div { background: var(--surface); padding: 16px; }
.facts dt { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.facts dd { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 20px; line-height: 1.2; }
.facts dd small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Статуси наявності ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: var(--r-s); font-size: 13px; font-weight: 500; line-height: 20px; white-space: nowrap;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--stock { color: var(--st-stock); background: var(--st-stock-bg); }
.status--preorder { color: var(--st-preorder); background: var(--st-preorder-bg); }
.status--low { color: var(--st-low); background: var(--st-low-bg); }
.status--none { color: var(--st-none); background: var(--st-none-bg); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--ink-2); }

/* ---------- Картки та сітки ---------- */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: minmax(0, 1fr); }
.grid--3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid--2, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card--flat { background: transparent; }
.card__foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }

/* Фото партії: заглушка. У продакшені — реальні фото з холодильника, дата в підписі */
.photo {
  position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); border-radius: var(--r-m); overflow: hidden;
  border: 1px solid var(--line);
}
.photo--tall { aspect-ratio: 3 / 4; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo__label {
  position: absolute; inset: auto 0 0 0; padding: 8px 10px;
  font-size: 12px; color: var(--ink-2); background: rgba(255,255,255,.9); border-top: 1px solid var(--line);
}
.photo__tint { position: absolute; inset: 0; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo__tint--rose { background: linear-gradient(160deg, #f3e0e2, #e6c7cb); }
.photo__tint--white { background: linear-gradient(160deg, #f6f6f2, #e4e6dd); }
.photo__tint--green { background: linear-gradient(160deg, #dde8df, #c3d4c6); }
.photo__tint--yellow { background: linear-gradient(160deg, #f6eed3, #e8dcae); }
.photo__tint--violet { background: linear-gradient(160deg, #e6dfee, #cfc3dd); }
.photo__tint--orange { background: linear-gradient(160deg, #f6e3d1, #e9c8a9); }
.photo__tint--blue { background: linear-gradient(160deg, #dfe6ee, #c4d0dd); }

/* ---------- Товар у списку ---------- */
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.product__title { font-weight: 500; font-size: 15px; line-height: 1.3; margin: 0; }
.product__title a { color: var(--ink); text-decoration: none; }
.product__title a:hover { color: var(--brand); text-decoration: underline; }
.product__meta { font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.product__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.product__row .btn { flex: 1 1 auto; }
.product__price { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.product__price small { font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--ink-3); display: block; }
.price-locked { font-size: 13px; color: var(--ink-3); }
.price-locked a { white-space: nowrap; }

/* Табличний вигляд каталогу: щільність для профі */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 500; color: var(--ink-3); font-size: 13px; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table--plain { border: 0; }

/* ---------- Лічильник упаковок ---------- */
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-m); overflow: hidden; background: var(--surface); }
.qty button { width: 40px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 18px; color: var(--ink); }
.qty button:hover { background: var(--line); }
.qty input { width: 56px; border: 0; text-align: center; font: 500 15px var(--font-body); min-height: 40px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--lg input { min-height: 48px; width: 72px; font-size: 18px; }
.qty--lg button { width: 48px; }

/* ---------- Фільтри ---------- */
.catalog { display: grid; gap: 24px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.filters legend { font-weight: 500; font-size: 14px; margin-bottom: 8px; padding: 0; }
.filters label { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; cursor: pointer; }
.filters input[type="checkbox"], .filters input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.filters__foot { display: none; }
.filters-toggle { display: inline-flex; }
.catalog__toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.catalog__count { font-size: 14px; color: var(--ink-2); }
.view-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-m); overflow: hidden; }
.view-switch button { border: 0; background: var(--surface); padding: 8px 12px; cursor: pointer; font: 500 14px var(--font-body); color: var(--ink-2); }
.view-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.products { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .catalog { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .filters { position: sticky; top: 80px; }
  .filters-toggle { display: none; }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1400px) { .products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1023px) {
  .filters { display: none; }
  .filters.is-open {
    display: block; position: fixed; inset: 0; z-index: 60; border-radius: 0; overflow-y: auto; padding-bottom: 96px;
  }
  .filters.is-open .filters__foot {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; padding: 12px var(--gutter);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .filters.is-open .filters__foot .btn { flex: 1; }
}

/* ---------- Картка товару ---------- */
.pdp { display: grid; gap: 24px; }
.pdp__gallery { display: grid; gap: 8px; }
.pdp__buy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.pdp__price { font-family: var(--font-head); font-weight: 600; font-size: 28px; line-height: 1; margin: 8px 0 4px; }
.pdp__price small { font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--ink-3); }
.mode-switch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 16px 0; }
.mode-switch label {
  display: block; border: 1px solid var(--line-strong); border-radius: var(--r-m); padding: 10px 12px; cursor: pointer; font-size: 14px;
}
.mode-switch label strong { display: block; font-size: 15px; }
.mode-switch input { position: absolute; opacity: 0; }
.mode-switch input:checked + label { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.mode-switch input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 14px; margin: 0; }
.spec dt { color: var(--ink-3); }
.spec dd { margin: 0; }
.sticky-cta { display: none; }
@media (max-width: 899px) {
  .sticky-cta {
    display: flex; gap: 8px; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px var(--gutter); background: var(--surface); border-top: 1px solid var(--line);
  }
  .sticky-cta .btn { flex: 1; }
  body.has-sticky { padding-bottom: 72px; }
}
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}

/* ---------- Форми ---------- */
.form { display: grid; gap: 16px; }
.form--2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .form--2 .span-2 { grid-column: 1 / -1; } }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"], .field input[type="url"], .field input[type="number"], .field input[type="date"], .field input[type="file"],
.field select, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-m);
  background: var(--surface); font: 15px var(--font-body); color: var(--ink);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 0; }
.field .req { color: var(--accent); }
.choice { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; padding: 6px 0; }
.choice input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; flex: none; }
.radio-cards { display: grid; gap: 8px; }
@media (min-width: 640px) { .radio-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.radio-cards label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: var(--r-m); padding: 12px; cursor: pointer; font-size: 14px; }
.radio-cards label span small { display: block; color: var(--ink-3); }
.radio-cards input { accent-color: var(--brand); margin-top: 3px; }
.radio-cards input:checked + span { color: var(--brand); }
.radio-cards label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Повідомлення ---------- */
.notice { border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--surface); padding: 12px 16px; border-radius: var(--r-m); font-size: 14px; }
.notice--warn { border-left-color: var(--st-low); }
.notice--accent { border-left-color: var(--accent); }
.notice p:last-child { margin: 0; }

/* ---------- Кроки (горизонтальна шкала з датами, не «1-2-3») ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time, .timeline .when { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.timeline strong { display: block; margin-bottom: 2px; }
.timeline p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* ---------- Кабінет ---------- */
.dash { display: grid; gap: 24px; }
.dash__side { display: grid; gap: 4px; align-content: start; }
.dash__side a { display: block; padding: 10px 12px; border-radius: var(--r-m); color: var(--ink-2); text-decoration: none; font-size: 15px; }
.dash__side a:hover { background: var(--surface-2); color: var(--ink); }
.dash__side a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.dash__side .dash__group { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 12px 12px 4px; }
@media (min-width: 1024px) { .dash { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } }
.manager { display: flex; gap: 12px; align-items: center; }
.manager__avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; flex: none; }
.kpi { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; }
.kpi dt { font-size: 13px; color: var(--ink-3); }
.kpi dd { margin: 4px 0 0; font-family: var(--font-head); font-weight: 600; font-size: 22px; }
.kpi dd small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--ink-2); }
@media (min-width: 900px) { .kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Таблиця швидкого замовлення: великі поля на мобільному */
.quick-order td .qty input { width: 64px; min-height: 44px; }
.quick-order .sku { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.quick-order .name { font-weight: 500; }
.quick-order .sub { font-size: 12px; color: var(--ink-3); }

/* ---------- Кошик ---------- */
.cart { display: grid; gap: 24px; }
@media (min-width: 1024px) { .cart { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.cart__summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; position: sticky; top: 80px; }
.cart__summary dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
.cart__summary dd { margin: 0; text-align: right; }
.cart__summary .total dt, .cart__summary .total dd { font-family: var(--font-head); font-weight: 600; font-size: 20px; padding-top: 8px; border-top: 1px solid var(--line); }
.reserve {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m);
  background: var(--st-low-bg); color: var(--st-low); font-size: 14px; margin-bottom: 16px;
}
.reserve .mono { font-weight: 600; }
.cart-group { margin-bottom: 24px; }
.cart-group__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cart-group__head h3 { margin: 0; font-size: 17px; }
.cart-empty { padding: 32px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-l); }

/* ---------- Календар дедлайнів ---------- */
.deadlines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.deadlines li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; display: grid; gap: 4px; }
.deadlines .d-date { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.deadlines .d-title { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.deadlines .d-deadline { font-size: 14px; }
.deadlines .d-deadline strong { color: var(--accent); }
@media (min-width: 640px) { .deadlines { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .deadlines { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Графік відвантажень ---------- */
.schedule { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.schedule div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 6px; text-align: center; font-size: 13px; }
.schedule div strong { display: block; font-family: var(--font-head); font-size: 15px; }
.schedule div.off { background: var(--surface-2); color: var(--ink-3); }
.schedule div small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ---------- Хлібні крихти, вкладки ---------- */
.crumbs { font-size: 13px; color: var(--ink-3); margin: 16px 0; }
.crumbs a { color: var(--ink-3); }
.crumbs span { margin: 0 6px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: 500 15px var(--font-body); color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- Сторінки з текстом ---------- */
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { font-size: 15px; }
.page-head { padding: 32px 0 8px; }
.page-head p { font-size: 18px; color: var(--ink-2); max-width: 720px; }

/* ---------- Надходження ---------- */
.arrival { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.arrival__date { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.arrival h3 { margin: 0; font-size: 18px; }
.arrival ul { margin: 0; padding-left: 18px; font-size: 14px; }
@media (min-width: 900px) { .arrival { grid-template-columns: 220px minmax(0, 1fr); } }

/* ---------- Футер ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 48px; font-size: 14px; }
.footer__grid { display: grid; gap: 24px; padding: 40px 0 24px; }
.site-footer h4 { font-size: 14px; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer__legal { border-top: 1px solid var(--line); padding: 16px 0 24px; font-size: 13px; color: var(--ink-3); display: grid; gap: 6px; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); } }


/* Стани доступу: до активації — каталог без цін */
body[data-access="guest"] .only-client { display: none !important; }
body[data-access="client"] .only-guest { display: none !important; }

@media print {
  .site-header, .topbar,   body { background: #fff; }
}

/* ---------- Уточнення після перевірки в браузері ---------- */
td.mono, .table-wrap .status, .table-wrap .num { white-space: nowrap; }
#productTable table { min-width: 960px; }
#productTable th, #productTable td { padding: 8px 10px; }
#productTable .qty input { width: 48px; }
.manager { flex-direction: column; align-items: flex-start; }
.dash__side .card .manager .small { line-height: 1.45; }
.arrival ul { columns: 1; }

.dash__side .manager a { display: inline; padding: 0; color: var(--brand); text-decoration: underline; font-size: 14px; }
.dash__nav { display: grid; gap: 4px; }
@media (max-width: 1023px) {
  .dash__side { display: flex; flex-direction: column; gap: 12px; }
  .dash__side .card { order: 2; padding: 12px; margin: 0; }
  .dash__side .manager { flex-direction: row; align-items: center; }
  .dash__side .manager__avatar { width: 40px; height: 40px; font-size: 14px; }
  .dash__nav { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
  .dash__nav .dash__group { display: none; }
  .dash__nav a { white-space: nowrap; border: 1px solid var(--line-strong); background: var(--surface); padding: 8px 12px; font-size: 14px; }
  .dash__nav a[aria-current="page"] { border-color: var(--brand); }
}

.catalog__toolbar > div { flex-wrap: wrap; }
.nav__mobile { display: none; }
@media (max-width: 1023px) {
  .header__actions .btn--ghost { display: none; }
  .header__actions .header__cart { display: inline-flex; }
  .site-header.is-open .nav .nav__mobile { display: block; font-weight: 500; color: var(--brand); }
}
.logo small { white-space: nowrap; }
@media (max-width: 420px) { .logo small { display: none; } }
@media (max-width: 640px) { #cartItems th:nth-child(3), #cartItems td:nth-child(3) { display: none; } }
/* Шапка на вузьких десктопах 1024–1199 px */
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav a { font-size: 14px; padding: 8px 6px; white-space: nowrap; }
  .logo small { display: none; }
  .header__actions .btn { padding: 0 12px; font-size: 14px; }
  .header__inner { gap: 10px; }
}

/* ---------- Повідомлення про cookie і юридичні примітки під формами ---------- */
.cookie-note {
  position: fixed; left: 12px; bottom: 12px; z-index: 75; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l);
  padding: 14px 16px; box-shadow: var(--shadow-pop); font-size: 14px;
  display: grid; gap: 10px; justify-items: start;
}
.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; }
.form-legal { margin: 4px 0 0; max-width: 640px; }
.prose table th[scope="row"] { width: 34%; text-align: left; font-weight: 500; vertical-align: top; }
@media (max-width: 559px) { .cookie-note { right: 12px; max-width: none; bottom: 56px; } }
@media print { .cookie-note { display: none !important; } }

/* ---------- Перемикач мови ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-m); overflow: hidden; }
.lang-switch a { padding: 0 10px; min-height: 36px; display: inline-flex; align-items: center; font: 500 13px var(--font-body); color: var(--ink-2); text-decoration: none; background: var(--surface); }
.lang-switch a + a { border-left: 1px solid var(--line-strong); }
.lang-switch a:hover { background: var(--surface-2); color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--brand); color: #fff; }
@media (max-width: 559px) { .lang-switch { display: none; } }
