@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Arabskij"; src: url("fonts/Arabskij.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --orange: #EE9528;
  --orange-dark: #d27d14;
  --green: #284332;
  --green-2: #35573f;
  --green-50: #eaf0ec;
  --white: #ffffff;
  --ink: #1a1a1a;
  /* Серый подобран под контраст 4.5:1 на белом (был #7a8580 — 3.8:1). */
  --gray: #5c6661;
  --gray-2: #8a938f;
  --border: #e7e3da;
  --bg: #fafaf8;
  --photobg: #eef2ef;
  --danger: #b3261e;

  --r-card: 20px;
  --r-pill: 999px;
  --tap: 44px;
  --shadow: 0 8px 28px rgba(20, 30, 25, 0.16);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: 88px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px; border: none; border-radius: var(--r-pill);
  font-weight: 700; font-size: 15px; cursor: pointer; transition: filter .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-accent { background: var(--orange); color: var(--white); }
.btn-green { background: var(--green); color: var(--white); }
.btn-ghost { background: var(--green-50); color: var(--green); }
.btn-wide { width: 100%; }

/* ---------- шапка: уезжает при прокрутке, закреплена только лента разделов ---------- */
.site-header { background: var(--green); color: var(--white); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px 16px; padding: 16px 20px 12px; max-width: 1100px; margin: 0 auto;
}
.logo { height: 44px; width: auto; }
.header-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.open-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.open-state .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ddc8f; }
.open-state.is-closed .dot { background: var(--gray-2); }
.contact-line { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; font-size: 14px; color: rgba(255,255,255,.85); }
.contact-line .sep { opacity: .5; }
.phone-link { color: var(--orange); font-weight: 700; }
.phone-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
  /* Контакты — отдельной строкой под логотипом на всю ширину: иначе блок
     берёт ширину по содержимому (378 px) и страница становится шире экрана. */
  .header-right { flex: 1 1 100%; min-width: 0; align-items: flex-start; }
  .contact-line { justify-content: flex-start; font-size: 12.5px; }
}

.catbar {
  position: sticky; top: 0; z-index: 20; background: var(--green);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.categories {
  display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; padding: 10px 20px 12px; max-width: 1100px; margin: 0 auto; scrollbar-width: none;
}
.categories::-webkit-scrollbar { display: none; }
.category-link {
  flex-shrink: 0; scroll-snap-align: start; padding: 9px 16px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.1); color: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s;
}
.category-link:hover, .category-link.active { background: var(--orange); color: var(--white); }

/* ---------- меню ---------- */
.menu { max-width: 1100px; margin: 0 auto; padding: 16px 20px 40px; }
.notice { border-radius: 16px; padding: 12px 16px; font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.notice-closed { background: #fff4e5; color: #6b3e00; }
.notice-table { background: var(--green-50); color: var(--green); }
.notice-order { background: var(--green); color: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notice-order a { font-weight: 700; color: var(--orange); white-space: nowrap; }

.hero {
  display: grid; grid-template-columns: 1fr; background: var(--green); color: var(--white);
  border-radius: 24px; overflow: hidden; margin: 4px 0 8px; cursor: pointer;
}
/* height:auto обязателен: атрибут height у <img> иначе перебивает aspect-ratio,
   и на телефоне фото занимало весь первый экран. */
.hero-photo { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-body { padding: 18px 20px 20px; }
.hero-badge { display: inline-block; background: var(--orange); color: var(--white); font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: var(--r-pill); }
.hero-title { font-family: "Arabskij", "Inter", cursive; font-weight: 400; font-size: 46px; line-height: 1.15; margin: 10px 0 4px; }
.hero-text { margin: 0 0 16px; color: rgba(255,255,255,.85); font-size: 15px; line-height: 1.45; }
.hero-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-price { font-size: 26px; font-weight: 700; }
.hero-old { font-size: 16px; color: rgba(255,255,255,.6); text-decoration: line-through; }
.hero-foot .btn { margin-left: auto; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .hero-photo { height: 100%; aspect-ratio: auto; min-height: 300px; }
  .hero-body { padding: 28px 32px; }
}

.category-section { padding-top: 26px; scroll-margin-top: 64px; }
.category-title { font-family: "Arabskij", "Inter", cursive; font-weight: 400; font-size: 44px; line-height: 1.2; color: var(--green); margin: 0 0 14px; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  min-width: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-photo {
  position: relative; display: block; width: 100%; padding: 0; border: none; background: var(--photobg);
  aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-photo img { transform: scale(1.03); }
.badge {
  position: absolute; top: 12px; left: 12px; background: var(--orange); color: var(--white);
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: var(--r-pill);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.card-name {
  display: block; text-align: left; padding: 0; border: none; background: none; cursor: pointer;
  font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word;
}
.card-weight { font-size: 13px; color: var(--gray); margin-top: 2px; }
.card-desc {
  font-size: 13.5px; line-height: 1.5; color: var(--gray); margin: 8px 0 0; overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 14px; }
.card-price { font-size: 18px; font-weight: 700; color: var(--green); }
.card-save { font-size: 12px; font-weight: 700; color: var(--white); background: var(--orange); border-radius: var(--r-pill); padding: 3px 8px; }
.card-control { margin-left: auto; display: flex; align-items: center; }
.card-off { font-size: 14px; font-weight: 600; color: var(--gray); }
.card.is-off .card-photo img { filter: grayscale(.8); opacity: .6; }

.add-btn {
  position: relative; width: var(--tap); height: var(--tap); border-radius: 50%; border: none;
  background: var(--green); color: var(--white); font-size: 24px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .1s;
}
.add-btn:hover { background: var(--green-2); }
.add-btn:active { transform: scale(.94); }
.add-btn .count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--orange); color: var(--white); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.qty-stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--green-50); border-radius: var(--r-pill); padding: 2px; }
.qty-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--white); color: var(--green);
  font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: #f4f7f5; }
.qty-value { min-width: 24px; text-align: center; font-size: 15px; font-weight: 700; }
.qty-stepper.small .qty-btn { width: 34px; height: 34px; font-size: 18px; }

/* ---------- подвал ---------- */
.site-footer { background: var(--green); color: var(--white); padding: 32px 0 40px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-logo { height: 48px; width: auto; }
.footer-info { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.85); }
.footer-links a { font-size: 12.5px; color: rgba(255,255,255,.6); text-decoration: underline; }

/* ---------- полоса корзины ---------- */
.cart-bar {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 40; width: min(460px, calc(100% - 32px)); min-height: 56px; border: none; border-radius: var(--r-pill);
  background: var(--orange); color: var(--white); display: flex; align-items: center; gap: 10px; padding: 0 22px;
  font-size: 16px; font-weight: 700; box-shadow: var(--shadow); cursor: pointer;
}
.cart-bar-count { background: rgba(255,255,255,.25); border-radius: var(--r-pill); min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }
.cart-bar-sum { margin-left: auto; }
.cart-bar.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: translateX(-50%) scale(1.04); } }

.toast {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--white); border-radius: 14px; padding: 12px 18px; font-size: 14px;
  font-weight: 500; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}

/* ---------- окна ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(10, 20, 15, .45); opacity: 0; transition: opacity .2s; }
.backdrop.open { opacity: 1; }

.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 94vh; background: var(--white);
  border-radius: 24px 24px 0 0; display: flex; flex-direction: column; transform: translateY(100%);
  transition: transform .25s ease; overflow: hidden;
}
.sheet.open { transform: translateY(0); }
@media (min-width: 760px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 540px; max-height: 88vh; border-radius: 24px;
           transform: translate(-50%, -46%); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
}
.sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: 16px; cursor: pointer;
}
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--photobg); }
.sheet-content { padding: 18px 20px 8px; }
.sheet-name { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.25; }
.sheet-weight { color: var(--gray); font-size: 14px; margin-top: 4px; }
.sheet-desc { color: var(--gray); font-size: 15px; line-height: 1.5; margin: 10px 0 0; }
.sheet-save { display: inline-block; margin-top: 10px; background: #fff4e5; color: #7a4300; font-weight: 600; font-size: 13.5px; padding: 6px 12px; border-radius: 12px; }
.opt-group { margin-top: 18px; }
.opt-title { font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 40px; padding: 8px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--border); background: var(--white);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.pill small { font-weight: 500; opacity: .75; margin-left: 4px; }
.pill:hover { border-color: var(--green); }
.pill.selected { background: var(--green); border-color: var(--green); color: var(--white); }
.pill:disabled { opacity: .4; cursor: default; text-decoration: line-through; }
.mods { display: flex; flex-direction: column; gap: 6px; }
.mod {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: 14px; cursor: pointer; font-size: 15px; background: var(--white); text-align: left; width: 100%;
}
.mod .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--gray-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 14px; }
.mod.on { border-color: var(--green); background: var(--green-50); }
.mod.on .box { background: var(--green); border-color: var(--green); }
.mod .price { margin-left: auto; font-weight: 600; color: var(--green); white-space: nowrap; }
.mod:disabled { opacity: .45; cursor: default; }
.sheet-foot { display: flex; gap: 12px; align-items: center; padding: 12px 20px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--white); }
.sheet-foot .btn { flex: 1; min-height: 52px; font-size: 16px; }
.sheet-foot .btn-ghost { flex: 0 0 auto; padding: 0 18px; }

.upsell { padding: 20px; }
.upsell-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; }
.upsell h3 { font-size: 22px; margin: 16px 0 6px; }
.upsell p { margin: 0; color: var(--gray); font-size: 15px; line-height: 1.5; }

/* ---------- корзина ---------- */
.cart-panel {
  position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: 100%; max-width: 440px; background: var(--white);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; box-shadow: -8px 0 24px rgba(0,0,0,.15);
}
.cart-panel.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--green); color: var(--white); }
.cart-head h2 { font-size: 20px; font-weight: 700; margin: 0; flex: 1; }
.cart-back { border: none; background: rgba(255,255,255,.15); color: var(--white); border-radius: var(--r-pill); padding: 8px 12px; font-weight: 600; cursor: pointer; }
.cart-close { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: var(--white); font-size: 16px; cursor: pointer; }
.cart-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cart-step, .checkout { padding: 16px 20px 24px; }
.cart-foot { padding: 12px 20px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.cart-foot .btn { min-height: 54px; font-size: 16px; }
.cart-note { font-size: 13px; color: var(--gray); text-align: center; margin: 0 0 8px; }

.seg { display: flex; background: var(--green-50); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 40px; border: none; background: none; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--green); cursor: pointer; }
.seg button.on { background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg button:disabled { opacity: .4; cursor: default; }

.progress { margin: 14px 0 4px; font-size: 13px; color: var(--gray); }
.progress-bar { height: 6px; background: var(--green-50); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.progress-bar i { display: block; height: 100%; background: var(--orange); border-radius: 6px; transition: width .3s; }

.cart-lines { margin-top: 8px; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-thumb { flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px; background: var(--photobg); overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-size: 14.5px; font-weight: 600; }
.cart-opts { font-size: 12.5px; color: var(--gray); margin-top: 2px; line-height: 1.35; }
.cart-sum { font-size: 14px; font-weight: 700; color: var(--green); margin-top: 4px; }
.cart-empty { text-align: center; color: var(--gray); padding: 40px 0; }

.xsell { margin-top: 20px; }
.xsell h3 { font-size: 15px; margin: 0 0 10px; }
.xsell-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.xsell-row::-webkit-scrollbar { display: none; }
.xsell-card { flex: 0 0 132px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--white); display: flex; flex-direction: column; }
.xsell-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--photobg); }
.xsell-card .n { font-size: 13px; font-weight: 600; padding: 8px 10px 0; line-height: 1.3; flex: 1; }
.xsell-card .f { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px 10px; }
.xsell-card .p { font-weight: 700; font-size: 14px; color: var(--green); }
.xsell-card .add-btn { width: 36px; height: 36px; font-size: 20px; }

.totals { margin-top: 16px; font-size: 14.5px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--gray); }
.totals .grand { color: var(--ink); font-weight: 700; font-size: 17px; padding-top: 8px; }

.field { margin-top: 14px; }
.field label, .field .label { display: block; font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 6px; }
.field input[type=text], .field input[type=tel], .field input[type=number], .field select, .field textarea {
  width: 100%; min-height: 48px; border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px;
  font: inherit; font-size: 16px; background: var(--white); color: var(--ink);
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-top: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; flex-shrink: 0; }
.legal { font-size: 12px; color: var(--gray); margin-top: 14px; line-height: 1.45; }
.legal a { text-decoration: underline; }
.form-error { background: #fdecea; color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-top: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- страница заказа ---------- */
.order-page { max-width: 560px; margin: 0 auto; padding: 20px 20px 60px; }
.order-card { background: var(--white); border: 1px solid var(--border); border-radius: 24px; padding: 22px 20px; margin-top: 16px; }
.order-num { font-size: 15px; color: var(--gray); }
.order-num b { display: block; font-size: 56px; line-height: 1.05; color: var(--green); margin-top: 2px; }
.order-status { font-size: 22px; font-weight: 700; margin-top: 12px; }
.order-hint { color: var(--gray); font-size: 15px; margin-top: 6px; line-height: 1.45; }
.order-card.ready { background: var(--green); color: var(--white); border-color: var(--green); }
.order-card.ready .order-num, .order-card.ready .order-hint { color: rgba(255,255,255,.8); }
.order-card.ready .order-num b { color: var(--orange); }
.order-card.cancelled { background: #fdecea; border-color: #f6c9c4; }
.steps { display: flex; gap: 6px; margin-top: 18px; }
.steps .s { flex: 1; }
.steps .s i { display: block; height: 6px; border-radius: 6px; background: var(--green-50); }
.steps .s.done i { background: var(--orange); }
.steps .s span { display: block; font-size: 11.5px; color: var(--gray); margin-top: 6px; }
.steps .s.done span { color: var(--ink); font-weight: 600; }
.order-card.ready .steps .s span { color: rgba(255,255,255,.8); }
.order-card.ready .steps .s i { background: rgba(255,255,255,.25); }
.order-card.ready .steps .s.done i { background: var(--orange); }
.order-items .cart-line:last-child { border-bottom: none; }
.order-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.points-note { background: #fff4e5; color: #6b3e00; border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }

.page-text { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; line-height: 1.6; font-size: 15px; }
.page-text h1 { font-size: 26px; line-height: 1.25; }
.page-text h2 { font-size: 18px; margin-top: 28px; }
