/* Оболочка сайта: шапка и подвал (план 2026-09-29, карта 08, ЕФ8.4).
   Один файл для главной (всегда) и для страниц витрины /app/ в обычном
   браузере на любом экране (base.html подключает его с тем же media, что
   desktop.css; в приложении style.css прячет и шапку, и подвал, поэтому
   обе части здесь показываются явно). Цвета - макета владельца:
   чернила #080b0e, снег #f0f2f4, брусника #931d3b, роза #e5a8b9. Шрифты
   Manrope и Oswald объявлены в site.css (главная) и desktop.css (витрина).
   Переменные здесь свои (--sh-*): файл не зависит от токенов соседей. */

.site-header, .site-footer {
  --sh-ink: #080b0e; --sh-snow: #f0f2f4; --sh-rose: #e5a8b9; --sh-berry: #931d3b;
  --sh-muted: #aab3be; --sh-muted-2: #8796a8; --sh-line: #ffffff1c;
  --sh-gutter: max(5%, calc((100vw - 1440px) / 2));
  box-sizing: border-box; color: var(--sh-snow); background: var(--sh-ink);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.site-header *, .site-footer * { box-sizing: border-box; }
.site-header a, .site-footer a { color: inherit; text-decoration: none; }
.site-header a:focus-visible, .site-footer a:focus-visible, .site-header button:focus-visible,
.site-header select:focus-visible { outline: 3px solid #bd6580; outline-offset: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- Шапка ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  min-height: 96px; padding: 10px var(--sh-gutter);
  border-bottom: 1px solid var(--sh-line);
  /* Кегль и интерлиньяж свои: у главной и у страниц витрины body разный. */
  font-size: 16px; line-height: normal;
}
.site-header .brand {
  display: block; flex-shrink: 0; width: 118px; height: 79px;
  background: url(../webapp/logo-snow.svg) center / contain no-repeat;
}
.site-header .header-navigation { display: flex; align-items: center; gap: 28px; margin-left: auto; white-space: nowrap; font-size: 14px; }
.site-header .header-navigation > a, .site-header .city-name { display: flex; align-items: center; min-height: 44px; }
.site-header .header-navigation > a:hover, .site-header .header-navigation > a[aria-current="page"],
.site-header .account-link:hover, .site-header .account-link[aria-current="page"] { color: var(--sh-rose); }
.site-header .city-name { color: #c8d1db; }
.site-header .header-actions { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.site-header .account-link { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; }
.site-header .account-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.site-header .cart-link {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px;
  border: 1px solid #82909e88; font-size: 14px; transition: border-color .25s;
}
.site-header .cart-link:hover, .site-header .cart-link[aria-current="page"] { border-color: var(--sh-rose); }
.site-header .cart-link b { font-weight: 500; color: var(--sh-rose); }
.site-header .cart-link b[hidden] { display: none; }
.site-header .cart-link b:empty { display: none; }
.site-header .reading-progress { position: absolute; height: 2px; bottom: -1px; left: 0; width: 0; background: #c66b84; }

/* Город - выпадающий список, как в макете: без рамки, стрелка своя. */
.site-header .city-selector { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; height: 44px; font-size: 14px; }
.site-header .city-selector label { display: flex; align-items: center; position: relative; margin: 0; font: inherit; color: inherit; }
.site-header .city-selector label::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 1px solid var(--sh-muted); border-bottom: 1px solid var(--sh-muted); transform: rotate(45deg); pointer-events: none;
}
.site-header .city-selector select {
  appearance: none; -webkit-appearance: none; color: inherit; background: transparent; border: 0;
  height: 44px; padding: 12px 21px 12px 0; font: inherit; line-height: 20px; border-radius: 0; max-width: 150px; cursor: pointer;
}
.site-header .city-selector select:hover { color: var(--sh-rose); }
.site-header .city-selector option { background: #101720; color: #eef3f9; }
.site-header .city-go { font: inherit; font-size: 12px; color: var(--sh-snow); background: transparent; border: 1px solid #82909e88; border-radius: 0; padding: 6px 10px; cursor: pointer; }
html.js .site-header .city-go { display: none; }

/* ---- Подвал: строка макета и ровная сетка обязательного ---- */
.site-footer { display: block; border-top: 1px solid #344351; padding: 36px var(--sh-gutter) 28px; font-size: 13px; line-height: 1.75; color: #b3bfcd; }
.site-footer .footer-top { display: flex; align-items: center; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid #ffffff14; }
.site-footer .footer-top .brand { display: block; flex-shrink: 0; width: 140px; height: 94px; background: url(../webapp/logo-snow.svg) left center / contain no-repeat; }
.site-footer .cities { margin: 0; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: #c8d1db; }
.site-footer .footer-up { margin-left: auto; padding: 8px 0; font-size: 13px; color: #aab9c9; border-bottom: 1px solid #718397; white-space: nowrap; }
.site-footer .footer-up:hover { color: var(--sh-rose); border-color: var(--sh-rose); }
.site-footer .footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; padding: 28px 0; }
.site-footer h3 { margin: 0 0 8px; font: 400 12px/1.8 Manrope, sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--sh-snow); }
.site-footer p { margin: 0; overflow-wrap: anywhere; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 4px; }
.site-footer .footer-grid a { border-bottom: 1px solid #71839766; }
.site-footer .footer-grid a:hover { color: var(--sh-rose); border-color: var(--sh-rose); }
.site-footer .warn { color: #e59aae; }
.site-footer .footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid #ffffff14; font-size: 12px; color: var(--sh-muted-2); }

/* ---- Узкие экраны ---- */
@media (max-width: 1150px) {
  .site-header { gap: 24px; }
  .site-header .header-navigation { gap: 22px; }
  .site-header .header-actions { gap: 14px; }
  .site-header .account-link span { display: none; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .site-header { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; min-height: 0; padding: 7px 5%; }
  .site-header .brand { width: 84px; height: 56px; }
  .site-header .header-actions { justify-self: end; gap: 12px; }
  .site-header .header-navigation { grid-column: 1 / -1; grid-row: 2; gap: 18px; margin: 0; width: 100%; font-size: 13px; border-top: 1px solid #ffffff16; }
  .site-header .header-navigation > a { min-height: 40px; }
  .site-header .city-selector, .site-header .city-name { margin-left: auto; font-size: 13px; }
  .site-header .cart-link { font-size: 12px; padding: 10px 13px; }
  .site-footer { padding: 28px 5% 24px; }
  .site-footer .footer-top { flex-wrap: wrap; gap: 16px 24px; }
  .site-footer .footer-top .brand { width: 110px; height: 74px; }
  .site-footer .cities { order: 3; width: 100%; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .site-footer .footer-bottom { flex-direction: column; }
}
@media (max-width: 390px) {
  .site-header .header-navigation { gap: 12px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header a, .site-footer a, .site-header .cart-link { transition: none; }
}
