/* Спільні частини всіх сторінок: шапка з меню, хлібні крихти, «Вам також сподобається», футер.
   Розмітка однакова (tools/sitekit.py), а кольори й шрифти кожен розділ задає сам змінними
   у своєму файлі стилів (posters.css, car-cases.css, car-posters.css, pages.css):
   --ink, --ink-2, --ink-3, --line, --accent, --font-heading, --footer-bg, --footer-ink,
   --footer-muted, --footer-line, --footer-hover, --menu-bg, --crumbs-bg, --crumbs-ink, --card-bg. */

/* Фото й відео з атрибутами width/height: атрибути дають браузеру пропорції (без стрибків верстки),
   а розмір задають стилі розділу */
img, video { max-width: 100%; height: auto; }

/* ── Шапка ── */
.site-header { position: relative; z-index: 20; }
.site-header .header-row { display: flex; align-items: center; gap: 20px; }
.site-header .brand { flex: none; }
.site-header .site-nav, .site-header .page-nav { display: none; }
.site-nav a[aria-current] { color: var(--ink); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-cta { white-space: nowrap; }
@media (min-width: 1100px) {
  .site-header .site-nav { display: flex; gap: 22px; margin-left: auto; }
  .header-actions { margin-left: 8px; }
  .site-menu { display: none; }
}
/* Лендинги: навігація по самій сторінці (якорі), видно з 900px; меню сайту — з 1100px */
@media (min-width: 900px) {
  .site-header .page-nav { display: flex; gap: 24px; margin-left: auto; }
  .page-nav ~ .header-actions { margin-left: 8px; }
  .page-nav ~ .header-actions .site-menu { display: none; }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
}

/* Меню на телефоні й планшеті: <details> працює без скриптів, common.js лише закриває його */
.site-menu > summary { list-style: none; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--line-strong, var(--line)); border-radius: 999px;
  color: var(--ink); font-size: .9375rem; font-weight: 600; cursor: pointer; user-select: none;
}
.site-menu[open] .site-menu-btn { border-color: var(--ink); }
.site-menu-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  padding: 6px 16px 18px; background: var(--menu-bg, #fff); color: var(--ink);
  border-bottom: 1px solid var(--line); box-shadow: 0 18px 32px rgba(0, 0, 0, .12);
}
.site-menu-panel nav { display: grid; max-width: 640px; margin: 0 auto; }
.site-menu-panel nav a { padding: 13px 2px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; }
.site-menu-panel nav a[aria-current] { color: var(--accent); }
.site-menu-contacts { display: flex; flex-wrap: wrap; gap: 8px 20px; max-width: 640px; margin: 14px auto 0; }
.site-menu-contacts a { color: var(--ink-2); }
@media (max-width: 420px) {
  .site-menu-btn span { display: none; }
  .site-menu-btn { padding: 6px; border-radius: 12px; }
}

/* ── Хлібні крихти ── */
.crumbs { background: var(--crumbs-bg, transparent); color: var(--crumbs-ink, var(--ink-3)); font-size: .8125rem; line-height: 1.4; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0; padding: 12px 0 4px; list-style: none; }
.crumbs li { display: flex; gap: 8px; min-width: 0; }
.crumbs li + li::before { content: '›'; opacity: .7; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--crumbs-current, var(--ink)); text-decoration: underline; }
.crumbs [aria-current] { color: var(--crumbs-current, var(--ink-2)); }

/* ── Вам також сподобається (і картки на головній) ── */
.related { padding: 48px 0 56px; background: var(--related-bg, transparent); }
.related-title { margin: 0 0 20px; color: var(--ink); font-family: var(--font-heading, inherit); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 700; line-height: 1.15; }
.related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.related-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 10px 10px 14px;
  border: 1px solid var(--card-line, var(--line)); border-radius: var(--r-m, 12px);
  background: var(--card-bg, #fff); color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.related-card:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.related-media { display: block; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 4px; border-radius: calc(var(--r-m, 12px) - 4px); background: var(--line); }
.related-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.related-name { font-weight: 600; line-height: 1.3; }
.related-price { margin-top: auto; color: var(--ink-2); font-size: .9375rem; }
@media (max-width: 560px) {
  .related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .related-card { padding: 8px 8px 12px; }
  .related-name { font-size: .9375rem; }
}

/* ── Футер ── */
.site-footer {
  padding: 48px 0 32px; background: var(--footer-bg, #fff); color: var(--footer-ink, var(--ink));
  border-top: 1px solid var(--footer-line, var(--line)); font-size: .9375rem;
}
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); } }
.footer-logo { display: block; width: auto; height: 56px; }
.footer-tag { max-width: 30ch; margin: 12px 0 0; color: var(--footer-muted, var(--ink-3)); }
.footer-title { margin: 0 0 10px; color: var(--footer-muted, var(--ink-3)); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.footer-col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--footer-ink, var(--ink)); text-decoration: none; }
.site-footer a:hover { color: var(--footer-hover, var(--accent)); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--footer-line, var(--line));
  color: var(--footer-muted, var(--ink-3)); font-size: .8125rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer .footer-legal a { color: var(--footer-muted, var(--ink-3)); }
/* Розділи сайту — дрібним рядком у самому низу: для пошуку, непомітно для клієнта */
.footer-sections { margin-top: 10px; color: var(--footer-muted, var(--ink-3)); font-size: .75rem; opacity: .75; }
.site-footer .footer-sections a { color: inherit; }
/* Мобільна панель з ціною не закриває футер */
@media (max-width: 959px) {
  .has-buybar .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Після замовлення: інші продукти у вікні «Дякуємо» (common.js → showAfterOrder) ── */
.after-order { display: grid; gap: 10px; width: 100%; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.after-order-title { margin: 0; color: var(--ink-2); font-size: .875rem; font-weight: 600; }
.after-order-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.after-order-card {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--r-m, 12px); color: var(--ink); text-decoration: none;
}
.after-order-card:hover { border-color: var(--ink-3); }
.after-order-card img { width: 56px; height: 70px; object-fit: cover; border-radius: 6px; background: var(--line); }
.after-order-card b { display: block; font-size: .9375rem; line-height: 1.3; }
.after-order-card span span { color: var(--ink-3); font-size: .8125rem; }
.after-order-bundle { border-color: var(--accent); }
.after-order-bundle b { color: var(--accent); }
