/* Сайт ВПО. Цвета и шрифты — в переменных, чтобы менять в одном месте. */
@font-face { font-family: "Oswald"; src: url("../fonts/Oswald.987a2513f4a4.woff") format("woff"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/Literata.1870aa1c8ac2.woff") format("woff"); font-weight: 200 900; font-display: swap; }

:root {
  --red: #89171A; --red-dark: #7A1417; --red-line: #A5383B; --navy: #1E2357;
  --cream: #FBF8F1; --paper: #FFFFFF; --sand: #EDE4D3; --sand-dark: #E2D5BF;
  --ink: #2A1A16; --ink-soft: #4F3F37; --muted: #6B5A50; --on-red: #F1DFD3;
  --accent: #F0D070;
  --display: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.6 var(--text); }
img { max-width: 100%; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, .h2, .h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2, .h2 { font-size: clamp(30px, 4vw, 44px); }
h3, .h3 { font-size: 24px; }
.plain { list-style: none; margin: 0; padding: 0; }
.muted { color: var(--muted); }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 720px; }
.note { background: var(--paper); border: 1px solid var(--sand); border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.mt-auto { margin-top: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 8px 12px; }

.wrap { max-width: 1720px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 48px); }
.narrow { max-width: 760px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.section { padding: 56px 0; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }

.eyebrow { font: 700 14px/1.4 var(--text); text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin: 0 0 8px; }
.eyebrow--light { color: #E8CDBF; }
.eyebrow--accent { color: var(--accent); }

/* Кнопки: высота от 44 px — удобно нажимать пальцем */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 0; border-radius: 14px; background: var(--red); color: var(--cream); font: 700 15px/1.2 var(--text);
  text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--red-dark); color: var(--cream); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #E6C25C; color: var(--ink); }
.btn--line { background: transparent; border: 1px solid #C9676A; color: var(--cream); }
.btn--line:hover { background: rgba(255,255,255,.08); }
.btn--ghost { background: var(--paper); color: var(--red); border: 1px solid var(--red); }
.btn--ghost:hover { background: var(--cream); color: var(--red-dark); }
.btn--off { background: var(--sand); color: var(--ink-soft); cursor: default; }
.btn--lg { padding: 15px 24px; font-size: 16px; }
.badge { background: var(--red); color: var(--cream); border-radius: 999px; padding: 1px 8px; font-size: 13px; }

/* Шапка */
.top { background: var(--red); color: var(--cream); }
.top__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font-weight: 600; line-height: 1.2; font-size: 15px; }
.brand:hover { color: var(--cream); }
.brand__logo { height: 56px; width: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: var(--on-red); text-decoration: none; padding: 10px 12px; border-radius: 999px; }
.nav a:hover { background: var(--red-dark); color: var(--cream); }
.top__actions { display: flex; align-items: center; gap: 12px; }
.top__phone { color: var(--cream); font-weight: 600; text-decoration: none; }

/* Первый экран */
.hero { background: var(--red); color: var(--cream); padding: 40px 0 72px; position: relative; overflow: hidden; }
/* Водяной знак — логотип ВПО крупно и едва заметно */
.hero::before { content: ""; position: absolute; right: -6%; top: -18%; width: 62%; aspect-ratio: 1; background: url("../img/logo-w.598286a44a7b.svg") center / contain no-repeat; opacity: .06; pointer-events: none; }
.hero__grid { position: relative; }
/* Правая колонка не выше левой: фото занимают только свободное место над блоком заказа */
.hero__grid { align-items: stretch !important; }
.hero__grid > div:first-child { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.hero__side { display: flex; flex-direction: column; gap: 24px; justify-content: flex-end; }
.hero__photos { position: relative; flex: 1 1 0; min-height: 170px; }
.hero__photo { position: absolute; object-fit: cover; border-radius: 20px; box-shadow: 0 18px 40px rgba(40, 0, 0, .35); border: 6px solid #fff; }
.hero__photo--bread { width: 68%; height: 88%; left: 0; top: 4%; transform: rotate(-3deg); object-position: center 40%; }
.hero__photo--shop { width: 46%; height: 72%; right: 0; bottom: 0; transform: rotate(4deg); }
.hero__sticker { position: absolute; right: 30%; top: -4%; background: var(--accent); color: var(--ink); font: 600 14px/1.1 var(--display); text-transform: uppercase; padding: 12px; border-radius: 50%; width: 108px; height: 108px; display: grid; place-items: center; text-align: center; transform: rotate(10deg); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
@media (max-width: 720px) { .hero__photos { flex: none; height: 210px; } .hero__sticker { width: 84px; height: 84px; font-size: 12px; } }
.hero__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(40px, 6vw, 96px); align-items: end; }
.hero h1 { margin: 24px 0; }
.hero .accent { color: var(--accent); }
.hero__lead { font-size: 19px; color: var(--on-red); max-width: 600px; margin: 0 0 32px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--red-line); border-radius: 999px; padding: 8px 14px; font-size: 14px; color: var(--on-red); margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero__panel { background: var(--red-dark); border: 1px solid var(--red-line); border-radius: 24px; padding: 28px; }
.hero__panel-title { font: 500 26px/1.25 var(--display); margin: 0 0 8px; }
.hero__note { color: #E8CDBF; font-size: 14px; margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; font-size: 14px; color: var(--on-red); }
.facts div { background: var(--red); border-radius: 14px; padding: 14px; }
.facts b { display: block; color: var(--cream); font-size: 18px; }

/* Переключатели (фильтры) */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs button { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--sand-dark);
  background: var(--paper); color: var(--ink); font: 600 15px var(--text); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--cream); }

/* Карточки пирогов */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.grid--small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 32px; }
.card { background: var(--paper); border: 1px solid var(--sand); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.card__pic { position: relative; display: block; aspect-ratio: 2 / 1; background: var(--sand); }
.card__pic--small { aspect-ratio: 4 / 3; }
.card__pic img { width: 100%; height: 100%; object-fit: cover; }
.chip { position: absolute; left: 12px; top: 12px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.chip--light { position: static; background: var(--sand); white-space: nowrap; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font: 500 20px/1.2 var(--display); margin: 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--red); }
.card__body .muted { font-size: 14px; margin: 0; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { font: 600 22px var(--display); }
.price--big { font-size: 32px; margin: 8px 0 16px; }
.price--big .muted { font: 400 17px var(--text); }

/* Хлеб: тёмная полоса */
.band { border-radius: 32px; padding: 48px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.band--navy { background: var(--navy); color: var(--cream); }
.band p { color: var(--on-red); }
.bread-list { display: flex; flex-direction: column; gap: 10px; }
.bread-item { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); border-radius: 18px; padding: 10px 16px 10px 10px; font-size: 14px; color: #D9DBEA; }
.bread-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; flex: none; }
.bread-item div { flex: 1; }
.bread-item a { color: var(--cream); text-decoration: none; font-size: 17px; }

/* Магазины */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 24px 0; }
.photos figure { margin: 0; position: relative; border-radius: 20px; overflow: hidden; height: 190px; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos figcaption { position: absolute; left: 12px; bottom: 12px; background: var(--paper); font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.shop { background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.shop[hidden] { display: none; }
.shop__num { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--cream); font: 600 15px var(--display); display: grid; place-items: center; }
.shop__info { flex: 1 1 200px; display: flex; flex-direction: column; font-size: 15px; }
.shop__info .muted { font-size: 14px; }
.shop__links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-weight: 700; width: 100%; padding-left: 58px; }

/* Вакансии и опт */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.panel { background: var(--paper); border: 1px solid var(--sand); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.panel h3 { margin: 0; }
.panel p { margin: 0; color: var(--ink-soft); }

/* Формы */
.form { display: flex; flex-direction: column; gap: 12px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 12px; }
.form legend { font: 600 22px var(--display); margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; }
label { font-size: 15px; font-weight: 600; }
input[type=text], input[type=tel], input[type=email], input[type=date], select, textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--sand-dark); border-radius: 12px; background: var(--paper); color: var(--ink); width: 100%; }
.field--error input, .field--error select { border-color: var(--red); }
.err { color: var(--red); font-size: 14px; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; }
.radios { display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; gap: 10px; align-items: center; font-weight: 400; background: var(--paper); border: 1px solid var(--sand); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.radio input { width: 20px; height: 20px; margin: 0; }
[data-show-for][hidden], [data-show-for-payment][hidden] { display: none; }

/* Корзина и заказ */
.lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.line { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--sand); border-radius: 18px; padding: 10px 16px 10px 10px; flex-wrap: wrap; }
.line img { width: 88px; height: 64px; object-fit: cover; border-radius: 12px; }
.line__name { flex: 1 1 180px; }
.line__sum { min-width: 80px; text-align: right; }
.qty { display: flex; align-items: center; gap: 6px; background: var(--cream); border-radius: 12px; padding: 2px; }
.qty button { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 20px; font-weight: 700; cursor: pointer; }
.qty button:last-child { background: var(--red); color: var(--cream); }
.summary { background: var(--paper); border: 1px solid var(--sand); border-radius: 18px; padding: 20px; margin: 12px 0 20px; }
.summary p { margin: 0 0 6px; }
.summary .btn { margin: 10px 10px 0 0; }
.total { font-size: 20px; }

/* Карточка изделия и документы */
.product { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; align-items: start; }
.product__pic { border-radius: 24px; overflow: hidden; background: var(--sand); }
.facts-list { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 10px 20px; margin-top: 28px; font-size: 15px; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; }
@media (max-width: 560px) { .facts-list { grid-template-columns: 1fr; gap: 2px; } .facts-list dd { margin-bottom: 10px; } }
.doc__text { background: var(--paper); border-radius: 18px; padding: 24px; }

/* Сообщения */
.messages { padding-top: 16px; }
.msg { padding: 12px 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--sand); margin: 0 0 8px; }
.msg--success { border-color: #6A9A5B; }
.msg--error { border-color: var(--red); }
.msg--warning { border-color: var(--accent); }

/* Кооперация и подвал */
.coop { background: var(--paper); border-top: 1px solid var(--sand); padding: 40px 0; }
.coop__title { font: 500 26px/1.2 var(--display); color: var(--red); margin: 0 0 8px; }
.coop p { max-width: 760px; color: var(--ink-soft); }
.coop__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.coop__logos { display: flex; flex-wrap: wrap; gap: 16px; }
/* Брендбуки требуют белый фон под знаками */
.coop__logos img { background: #fff; border-radius: 14px; padding: 12px 16px; height: 84px; width: auto; box-sizing: border-box; }
.coop__logos img:first-child { height: 100px; } /* у знака Центросоюза свои поля, выравниваем на глаз */
.doclist { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.doclist a { display: flex; justify-content: space-between; gap: 16px; background: var(--paper); border: 1px solid var(--sand); border-radius: 14px; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.doclist a:hover { border-color: var(--red); }
.doclist span { color: var(--ink-soft); white-space: nowrap; }
.foot { background: var(--navy); color: #D9DBEA; padding: 48px 0 140px; font-size: 14px; line-height: 1.7; }
.foot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px; }
.foot__head { font: 600 17px var(--display); color: var(--cream); margin: 0 0 8px; }
.foot__brand { display: flex; align-items: center; gap: 10px; }
.foot a { color: var(--cream); }

/* Окно cookie */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 760px; margin: 0 auto;
  background: var(--paper); border-radius: 20px; box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 16px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.cookie p { flex: 1 1 300px; margin: 0; }
.cookie__btns { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 40px 0; }
  .band { padding: 32px 20px; border-radius: 24px; }
  .panel { padding: 24px; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .top__phone { display: none; }
  .shops { grid-template-columns: 1fr; }
  .shop__links { padding-left: 0; }
}

/* Сообщение «… в корзине» внизу экрана */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25); font-size: 16px; max-width: calc(100vw - 32px); }
.toast a { color: var(--accent); font-weight: 700; margin-left: 6px; }
.badge[hidden] { display: none; }
