:root {
  --bg: #F3EEE2;
  --card: #FBF8F0;
  --border: #D9D0BB;
  --border-soft: #B9AE93;
  --green: #0E3B2C;
  --amber: #F4A300;
  --highlight: #FFF3D6;
  --muted: #5E5A4C;
  --text-soft: #3F3C30;
  --danger: #B3261E;
  --danger-bg: #FBEAE8;
  --radius-lg: 18px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--green);
  font-family: 'Onest', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Unbounded', system-ui, sans-serif; margin: 0; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--green); }
img { max-width: 100%; display: block; }

.shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ---------- экраны ---------- */
.screen { display: none; flex-direction: column; flex-grow: 1; min-height: 0; }
.screen.show { display: flex; }

.brand-row { display: flex; align-items: center; gap: 12px; padding: 20px 20px 4px 20px; }
.brand-row.sm { padding: 20px 20px 0 20px; }
.brand-hop { height: 56px; width: auto; flex-shrink: 0; }
.brand-hop.sm { height: 46px; }
.brand-word { width: 168px; height: auto; flex-shrink: 1; min-width: 0; }
.brand-word.sm { width: 136px; }

/* ---------- главная ---------- */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.h1 { font-weight: 800; font-size: 34px; line-height: 1.08; }
.h1.sm { font-size: 26px; }
.lead { margin: 0; font-size: 16px; line-height: 1.4; color: var(--text-soft); }
.h2 { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600; font-size: 17px; }

.row-head { display: flex; align-items: baseline; justify-content: space-between; }
.link-btn { background: none; border: none; font-size: 15px; font-weight: 700; color: var(--green); padding: 10px 0 10px 10px; cursor: pointer; }

.tap-row {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 10px 14px 10px 10px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md);
  text-decoration: none; color: var(--green); cursor: pointer; width: 100%; text-align: left;
}
.tap-badge {
  width: 52px; height: 58px; flex-shrink: 0; background: var(--green); color: var(--amber); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tap-badge .lbl { font-size: 10px; letter-spacing: 0.08em; font-weight: 700; }
.tap-badge .num { font-family: 'Unbounded', system-ui, sans-serif; font-size: 20px; font-weight: 800; line-height: 1; }
.tap-info { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tap-name { font-size: 17px; font-weight: 700; }
.tap-meta { font-size: 14px; color: var(--muted); }
.tap-price { font-weight: 700; font-size: 16px; white-space: nowrap; }

.whatsapp-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px;
  background: var(--amber); border-radius: var(--radius-md); text-decoration: none; color: var(--green);
  font-weight: 700; font-size: 17px;
}

/* ---------- каталог ---------- */
.cat-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px 20px; }
.age-pill { font-size: 13px; font-weight: 700; padding: 6px 10px; background: var(--green); color: var(--amber); border-radius: 8px; }

.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 20px 0 20px; }
.tab-btn {
  display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px;
  text-decoration: none; font-weight: 700; font-size: 16px; cursor: pointer; border: 1.5px solid var(--green);
  background: var(--card); color: var(--green);
}
.tab-btn.active { background: var(--green); color: var(--bg); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 0 20px; }
.chip {
  display: flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer; border: 1.5px solid var(--border-soft);
  background: transparent; color: var(--green);
}
.chip.active { background: var(--amber); border-color: var(--amber); font-weight: 700; }

.cat-list { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 16px 20px; flex-grow: 1; overflow-y: auto; }
.state-msg { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; }

.list-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); min-height: 76px;
}
.list-row.in-cart { background: var(--highlight); border: 2px solid var(--amber); padding: 9px 11px 9px 9px; }
.list-photo {
  width: 52px; height: 58px; flex-shrink: 0; border-radius: var(--radius-sm); position: relative; overflow: hidden;
  background: var(--green); color: var(--amber); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.list-photo svg { width: 24px; height: 24px; stroke-width: 1.8; }
.list-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.li-info { flex-grow: 1; min-width: 0; }
.li-name { font-size: 17px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
/* Когда товар уже в корзине, счётчик «− 1 +» уходит на свою строку справа — иначе длинное название налезает на кнопки. */
.list-row.in-cart { flex-wrap: wrap; }
.list-row.in-cart .li-info { flex: 1 1 0; }
.list-row.in-cart .stepper { flex-basis: 100%; justify-content: flex-end; }
.li-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }

.stepper { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; flex-shrink: 0;
}
.round-btn.minus { border: 2px solid var(--green); background: var(--card); }
.round-btn.plus { border: none; background: var(--amber); }
.round-btn.plus.lg { width: 56px; height: 56px; }
.round-btn:disabled { opacity: 0.4; cursor: default; }
.stepper .qty { min-width: 40px; text-align: center; font-weight: 700; font-size: 16px; }

.booking-bar {
  display: flex; align-items: center; justify-content: space-between; min-height: 64px;
  margin: 0 20px 14px 20px; padding: 0 20px; background: var(--green); border-radius: var(--radius-lg); color: var(--bg);
}
.bb-info { display: flex; flex-direction: column; }
.bb-count { font-size: 13px; color: var(--amber); font-weight: 700; }
.bb-total { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600; font-size: 18px; }
.bb-btn {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; border: none; background: none;
  color: var(--bg); cursor: pointer; padding: 10px 0;
}

/* ---------- бронь ---------- */
#bookingBody { display: flex; flex-direction: column; flex-grow: 1; min-height: 0; padding: 0 20px 16px 20px; gap: 18px; overflow-y: auto; }
.booking-head-row { display: flex; align-items: center; gap: 4px; padding: 10px 0 0 0; margin-left: -12px; }
.back-btn {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: none; background: none; cursor: pointer; color: var(--green);
}
.eyebrow-block { display: flex; flex-direction: column; gap: 6px; }

.cart-card { display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--green); border-radius: var(--radius-lg); padding: 6px 16px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.cart-line .li-info { flex-grow: 1; min-width: 0; }
.cart-line .li-name { font-size: 17px; font-weight: 700; }
.cart-line .li-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.divider-dashed { border-top: 2px dashed var(--border-soft); }
.total-row { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0 12px 0; }
.total-row .lbl { font-size: 16px; font-weight: 600; }
.total-row .val { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 800; font-size: 24px; }

.time-block { display: flex; flex-direction: column; gap: 10px; }
.time-block .cap { font-size: 16px; font-weight: 700; }
.time-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.time-chip {
  display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 14px;
  font-weight: 700; font-size: 14px; text-align: center; cursor: pointer; border: 1.5px solid var(--green);
  background: var(--card); color: var(--green); padding: 4px;
}
.time-chip.active { background: var(--green); color: var(--bg); }

.note-box { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); align-items: flex-start; }
.note-box.warn { background: var(--highlight); border: 1.5px solid var(--amber); }
.note-box.info { background: var(--card); border: 1.5px solid var(--border); }
.note-box.error { background: var(--danger-bg); border: 1.5px solid var(--danger); }
.note-box svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.note-box .age-tag { flex-shrink: 0; height: 28px; padding: 0 8px; display: flex; align-items: center; background: var(--green); color: var(--amber); border-radius: 8px; font-weight: 700; font-size: 13px; }
.note-box p, .note-box span.txt { font-size: 15px; line-height: 1.4; color: var(--text-soft); margin: 0; }

.login-prompt { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 15px; font-weight: 600; color: var(--text-soft); text-decoration: none; background: none; border: none; cursor: pointer; width: 100%; padding: 0; text-align: left; }
.login-prompt .go { font-weight: 700; color: var(--green); text-decoration: underline; }

.booking-cta { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.btn-primary {
  min-height: 64px; border: none; border-radius: var(--radius-lg); background: var(--amber); color: var(--green);
  font-weight: 700; font-size: 19px; cursor: pointer;
}
.btn-primary:disabled { opacity: 0.5; cursor: default; }
a.btn-primary { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; padding: 0 16px; }
.btn-ghost {
  min-height: 52px; border: 1.5px solid var(--green); border-radius: var(--radius-md); background: transparent; color: var(--green);
  font-weight: 700; font-size: 16px; cursor: pointer;
}
.text-link-btn { display: flex; align-items: center; justify-content: center; min-height: 52px; font-weight: 700; font-size: 16px; color: var(--green); text-decoration: underline; background: none; border: none; cursor: pointer; }

.done-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 24px 0; }
.done-wrap .big-icon { width: 64px; height: 64px; color: var(--green); }
.order-no { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 700; font-size: 20px; }
.order-text { text-align: left; white-space: pre-wrap; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: 13px; color: var(--text-soft); width: 100%; }
details summary { cursor: pointer; font-weight: 600; color: var(--muted); }

.notify-box { width: 100%; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; text-align: left; }
.nb-title { font-weight: 700; font-size: 15px; }
.chan-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chan {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; border: 1.5px solid var(--border-soft); background: var(--bg); color: var(--green); cursor: pointer;
}
.chan.on { border-color: var(--green); background: var(--highlight); font-weight: 700; cursor: default; }
.order-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); }
.order-row:first-of-type { border-top: none; }
.order-row .li-meta { font-size: 13px; color: var(--muted); }
.status { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--highlight); }

/* ---------- вход ---------- */
#loginBody { display: flex; flex-direction: column; gap: 16px; padding: 0 20px 16px 20px; flex-grow: 1; overflow-y: auto; }
.login-step { display: flex; flex-direction: column; gap: 14px; }
.msg-btn {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 0 20px; border: none; border-radius: var(--radius-lg);
  background: var(--green); color: var(--bg); font-weight: 700; font-size: 19px; text-align: left; cursor: pointer; width: 100%;
}
.msg-btn svg { flex-shrink: 0; }

.wait-step {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 16px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
}
.wait-step .n { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--green); color: var(--amber); border-radius: 50%; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 800; font-size: 16px; }
.wait-step .t { font-size: 17px; font-weight: 600; line-height: 1.25; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 700; }
.phone-input-row {
  display: flex; align-items: center; min-height: 64px; background: var(--card); border: 2px solid var(--green);
  border-radius: var(--radius-md); padding: 0 16px; gap: 10px;
}
.phone-input-row .cc { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600; font-size: 20px; }
.phone-input-row input {
  flex-grow: 1; min-width: 0; height: 60px; border: none; background: transparent; outline: none;
  font-size: 22px; font-weight: 600; color: var(--green);
}
.code-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.code-grid input {
  min-height: 72px; width: 100%; text-align: center; background: var(--card); border: 2px solid var(--green);
  border-radius: var(--radius-md); outline: none; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 800; font-size: 28px; color: var(--green);
}

.profile-head { display: flex; flex-direction: column; gap: 4px; }
.profile-phone { color: var(--muted); font-size: 15px; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 14px; text-align: center; }
.stat-card .v { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 800; font-size: 22px; }
.stat-card .k { font-size: 13px; color: var(--muted); margin-top: 2px; }
.progress-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.progress-card .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--amber); }
.muted { color: var(--muted); font-size: 14px; }
.legal { font-size: 13px; line-height: 1.4; color: var(--muted); text-align: center; margin: 0; }

/* ---------- нижняя навигация ---------- */
.tabbar { display: flex; background: var(--card); border-top: 1.5px solid var(--border); position: sticky; bottom: 0; flex-shrink: 0; }
.tab-item {
  flex-grow: 1; flex-basis: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 72px; border: none; background: none; cursor: pointer;
  color: var(--muted); font-size: 12.5px; font-weight: 600;
}
.tab-item.active { color: var(--green); font-weight: 700; box-shadow: inset 0 3px 0 var(--amber); }

/* ---------- модалка 18+ и тост ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(14,59,44,0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: var(--card); border-radius: 22px 22px 0 0; padding: 28px 22px; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.age-big { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 800; font-size: 40px; color: var(--amber); background: var(--green); padding: 10px 22px; border-radius: 16px; }
.modal h2 { font-size: 20px; }
.modal p { margin: 0; color: var(--text-soft); font-size: 15px; }
.modal-actions { display: flex; gap: 10px; width: 100%; margin-top: 8px; }
.modal-actions .btn-ghost, .modal-actions .btn-primary { flex-grow: 1; min-height: 56px; }

.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); max-width: calc(100% - 40px);
  background: var(--green); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  z-index: 60; box-shadow: 0 8px 24px rgba(14,59,44,0.25);
}

@media (min-width: 481px) {
  .shell { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ---------- этап 2: поиск и подгруппы ---------- */
.search-row { position: relative; padding: 8px 20px 0 20px; }
.search-input {
  width: 100%; box-sizing: border-box; height: 52px; padding: 0 48px 0 46px; font: inherit; font-size: 17px; color: var(--green);
  background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; -webkit-appearance: none; appearance: none;
}
.search-input:focus { outline: none; border-color: var(--green); }
/* свой крестик уже есть — встроенный синий крестик браузера прячем */
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search-ico { position: absolute; left: 34px; top: 50%; margin-top: 4px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-clear {
  position: absolute; right: 24px; top: 8px; width: 52px; height: 52px; border: none; background: none; font-size: 28px; line-height: 1;
  color: var(--muted); cursor: pointer;
}
.search-clear[hidden] { display: none; }

.chips-scroll {
  display: flex; flex-wrap: nowrap; gap: 8px; padding: 12px 20px 2px 20px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll[hidden] { display: none; }
.chips-scroll .chip { flex: 0 0 auto; white-space: nowrap; }
.chips-scroll.sub .chip { min-height: 40px; font-size: 14px; }
.chips-scroll.sub .chip.active { background: var(--green); border-color: var(--green); color: var(--bg); }

.list-head { margin: 10px 2px 0; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600; font-size: 15px; color: var(--green); }
.list-head.sub { margin-top: 4px; font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.found-note { font-size: 14px; color: var(--muted); margin: 0 2px; }


/* ---------- главная в стиле Ozon: поиск, каталог, подборка ---------- */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.home-scroll { flex-grow: 1; display: flex; flex-direction: column; gap: 18px; padding: 0 20px 24px 20px; }
.home-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  margin: 0 -20px; padding: calc(12px + env(safe-area-inset-top)) 20px 8px 20px; background: var(--bg);
}
.home-hop { height: 48px; width: auto; flex-shrink: 0; }
.home-search {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px;
  background: var(--card); border: 2px solid var(--green); border-radius: 14px; color: var(--muted);
  font-size: 17px; text-align: left; cursor: pointer;
}
.home-search svg { flex-shrink: 0; color: var(--green); }
.home-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-address { display: flex; align-items: center; gap: 8px; margin: -8px 0 0 0; font-size: 14px; font-weight: 600; color: var(--text-soft); }
.home-address svg { width: 18px; height: 18px; flex-shrink: 0; }

.home-block { display: flex; flex-direction: column; gap: 12px; }

.cat-grid { display: flex; flex-direction: column; gap: 10px; }
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, 88px); gap: 10px; }
.bento-lead {
  grid-row: span 2; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  padding: 16px; background: var(--green); color: var(--bg); border: 0; border-radius: 24px; cursor: pointer;
}
.bento-bg { position: absolute; pointer-events: none; z-index: 0; }
.bg-tap { right: 6px; bottom: 4px; width: 92px; height: 129px; opacity: 0.16; }
.bg-flag { inset: 0; background: linear-gradient(to bottom, rgba(20,20,20,0.10) 0 33.3%, rgba(221,0,0,0.13) 33.3% 66.6%, rgba(255,206,0,0.30) 66.6% 100%); }
.bg-bottle { right: 40px; top: 6px; height: 76px; width: 30px; opacity: 0.2; transform: rotate(14deg); }
.bento-ico { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 20px; background: var(--amber); color: var(--green); display: flex; align-items: center; justify-content: center; }
.bento-ico svg { width: 38px; height: 38px; }
.bento-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.bento-title { font-size: 21px; font-weight: 700; line-height: 1.1; }
.bento-sub { font-size: 12.5px; opacity: 0.78; }
.bento-beer {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; text-align: left; padding: 12px 14px;
  position: relative; overflow: hidden; background: #f6e3b4; color: var(--green); border: 0; border-radius: 20px; cursor: pointer;
}
.bento-beer-name, .bento-beer-ico { position: relative; z-index: 1; }
.bento-beer-ico { display: flex; }
.bento-beer-name { font-size: 15px; font-weight: 700; line-height: 1.15; }
.bento-beer-ico svg { width: 30px; height: 30px; flex-shrink: 0; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill {
  flex: 1 1 auto; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 23px; color: var(--green); font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.cat-pill svg { width: 20px; height: 20px; flex-shrink: 0; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; min-height: 100px; padding: 10px 4px 8px 4px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); color: var(--green); cursor: pointer;
}
.cat-ico { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 13px; background: var(--bg); }
.cat-ico svg { width: 26px; height: 26px; }
.cat-name {
  font-size: 12.5px; font-weight: 600; line-height: 1.15; text-align: center; overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-tile.lead { background: var(--green); border-color: var(--green); color: var(--bg); }
.cat-tile.lead .cat-ico { background: var(--amber); color: var(--green); }

.reco-login {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 14px; width: 100%;
  background: var(--highlight); border: 1.5px solid var(--amber); border-radius: 14px; color: var(--green);
  font-size: 14.5px; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer;
}
.reco-login .go { flex-shrink: 0; font-weight: 700; text-decoration: underline; }

.reco-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rc { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px 8px 10px 8px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); }
.rc.in-cart { background: var(--highlight); border: 2px solid var(--amber); padding: 7.5px 7.5px 9.5px 7.5px; }
.rc-photo {
  position: relative; aspect-ratio: 4 / 5; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #E9E2CF; color: var(--green); border-radius: var(--radius-sm);
}
.rc-photo > svg { width: 40px; height: 40px; }
.rc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-photo.tap { background: var(--amber); }
.rc-photo .tap-badge { width: 64px; height: 72px; }
.rc-photo .tap-badge .num { font-size: 28px; }
.rc-why {
  position: absolute; left: 6px; top: 6px; max-width: calc(100% - 12px); padding: 4px 8px; border-radius: 999px;
  background: var(--card); color: var(--green); font-size: 11.5px; font-weight: 700; line-height: 1.1;
}
.rc-why.bought { box-shadow: inset 0 0 0 1.5px var(--amber); }
.rc-price { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600; font-size: 16px; }
.rc-price small { font-family: 'Onest', system-ui, sans-serif; font-size: 13px; font-weight: 600; color: var(--muted); }
.rc-name {
  font-size: 15px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-meta { font-size: 13px; color: var(--muted); }
.rc-meta:empty { display: none; }
.rc-ctl { margin-top: auto; padding-top: 6px; display: flex; justify-content: flex-end; }

/* ---------- выбор тары под разливным ---------- */
.list-row.has-cont { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.cont-row {
  margin-top: -10px; padding: 10px 12px 12px; background: var(--highlight); border: 2px solid var(--amber); border-top: 1px dashed var(--border-soft);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.cont-cap { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 8px; }
.cont-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cont-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 88px; min-height: 52px; padding: 6px 12px;
  background: var(--card); color: var(--green); border: 1.5px solid var(--border-soft); border-radius: var(--radius-sm); font-family: inherit; cursor: pointer;
}
.cont-chip .c1 { font-size: 15px; font-weight: 700; }
.cont-chip .c2 { font-size: 13px; color: var(--muted); }
.cont-chip.active { background: var(--amber); border-color: var(--amber); }
.cont-chip.active .c2 { color: var(--green); }
.cont-hint { margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--muted); }
/* на экране брони блок тары лежит внутри карточки со списком — без своей рамки */
.cart-card .cont-row { margin-top: 0; padding: 4px 0 6px; background: none; border: 0; border-radius: 0; }

/* ---- заставка загрузки (скелет главной) ---- */
.splash { flex-grow: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.sk { background: linear-gradient(90deg, #e8e2d3 25%, #f1ecdf 50%, #e8e2d3 75%); background-size: 200% 100%; animation: skShine 1.3s linear infinite; border-radius: 14px; }
.sk-bar { height: 52px; border-radius: 26px; }
.sk-line { height: 14px; width: 60%; }
.sk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sk-tile { height: 92px; }
.sk-row { height: 64px; }
@keyframes skShine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* заставка пропадает сама, как только показан любой экран (без JS) */
.screen.show ~ .splash { display: none; }

/* ---- подборка: подписи и «Показать ещё» ---- */
.rc-why.repeat { background: var(--amber); box-shadow: none; }
.rc-why.pair { box-shadow: inset 0 0 0 1.5px var(--green); }
.reco-more { display: flex; justify-content: center; padding-top: 4px; }
.reco-more .btn-ghost { width: auto; min-width: 200px; }

/* ---- личный кабинет: связь с магазином ---- */
.contact-box { display: flex; flex-direction: column; gap: 10px; }
.contact-btn {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px; border-radius: var(--radius-md);
  background: var(--green); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 17px;
}
.contact-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.contact-wa { align-self: flex-start; padding: 8px 0; color: var(--text-soft); font-weight: 600; font-size: 15px; text-decoration: underline; }

.contact-btn.static { cursor: default; }
.contact-btn.static span { display: flex; flex-direction: column; flex-grow: 1; line-height: 1.2; }
.contact-btn.static b { font-size: 15px; font-weight: 600; opacity: 0.9; }
.copy-btn { border: none; border-radius: 10px; padding: 10px 14px; background: var(--amber); color: var(--green); font-weight: 700; font-size: 14px; cursor: pointer; }
.contact-hint { margin: 0; font-size: 14px; color: var(--text-soft); }

.cont-more { margin-top: 8px; background: none; border: none; padding: 6px 0; font-size: 14px; font-weight: 700; color: var(--green); text-decoration: underline; cursor: pointer; }

.reco-end { margin: 6px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* ---- лента: заготовки внизу, пока подгружается следующая порция ---- */
.reco-sentinel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rc-skel { height: 230px; border-radius: var(--radius-md); }

/* Фото товара крупно */
img[data-fb] { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(14,59,44,0.82); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 80vh; min-width: 60vw; object-fit: contain; background: #fff; border-radius: 16px; padding: 12px; cursor: zoom-out; }
.lb-close { position: absolute; top: 14px; right: 16px; width: 48px; height: 48px; border: none; border-radius: 50%; background: #fff; color: var(--green); font-size: 28px; line-height: 1; cursor: pointer; }

/* История заказов в профиле */
.order-hist { border-top: 1px solid var(--border); }
.order-hist:first-of-type { border-top: none; }
.order-hist summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.order-hist summary::-webkit-details-marker { display: none; }
.order-hist summary .li-meta { font-size: 13px; color: var(--muted); }
.order-hist summary::after { content: ''; width: 8px; height: 8px; flex-shrink: 0; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg); transition: transform 0.15s; }
.order-hist[open] summary::after { transform: rotate(-135deg); }
.oh-body { padding: 0 0 12px 0; display: flex; flex-direction: column; gap: 8px; }
.oh-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; font-weight: 500; }
.oh-name { display: flex; flex-direction: column; min-width: 0; }
.oh-sum { white-space: nowrap; font-weight: 600; }
.oh-total { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 15px; }

/* Главная, вариант D «Стена» */
.wall { display: flex; flex-direction: column; gap: 8px; }
.wall-cols { display: flex; gap: 8px; align-items: flex-start; }
.wall-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wall-tile {
  all: unset; cursor: pointer; box-sizing: border-box; position: relative; overflow: hidden; width: 100%;
  display: flex; flex-direction: column; justify-content: space-between; padding: 10px; border-radius: 22px; background: #2a2a24; color: #fff;
  -webkit-tap-highlight-color: transparent;
}
.wall-tile:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.wall-media { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }
.wall-lead .wall-media { object-position: center 40%; }
.wall-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; background: linear-gradient(to top, rgba(8,28,20,0.82), rgba(8,28,20,0)); pointer-events: none; }
.wall-ico { position: relative; width: 38px; height: 38px; border-radius: 50%; background: rgba(251,248,238,0.92); color: var(--green); display: flex; align-items: center; justify-content: center; }
.wall-ico svg { width: 24px; height: 24px; }
.wall-name { position: relative; font-family: 'Unbounded', 'Onest', sans-serif; font-size: 16.8px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; text-shadow: 0 1px 4px rgba(0,0,0,0.55); overflow-wrap: anywhere; }
.wall-lead .wall-name { font-size: 21.8px; }
.wall + .cat-pills { margin-top: 10px; }

/* Студийные фото 3:4 — показываем целиком, без обрезки */
.list-photo { width: 60px; height: 80px; }
.list-photo img { object-fit: contain; background: #fff; }
.rc-photo { aspect-ratio: 3 / 4; }
.rc-photo img { object-fit: contain; background: #fff; }
.list-row { min-height: 96px; }

.li-more { display: inline-block; margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
