/* Общая шапка и футер внутренних страниц (3.Ф2): templates/partials/site-header.html, site-footer.html.
   Свои переменные с префиксом --sc-, чтобы не спорить со стилями страниц. */
:root {
  --sc-bg: rgba(246, 241, 232, 0.86);
  --sc-border: rgba(146, 120, 71, 0.2);
  --sc-text: #1f1a14;
  --sc-text-soft: rgba(31, 26, 20, 0.68);
  --sc-accent: #a17a32;
  --sc-accent-dk: #8b6928;
  --sc-gold: #c9a84c;
  --sc-primary: #2f4a34;
  --sc-dark: #050505;
  --sc-container: 1320px;
}

.sc-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1001;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--sc-accent-dk);
  color: #fff;
  font: 600 14px/1 "Wix Madefor Text", system-ui, sans-serif;
  text-decoration: none;
}
.sc-skip:focus { left: 12px; }

/* ── Шапка ───────────────────────────────────────────────────────────── */
.sc-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--sc-bg);
  border-bottom: 1px solid var(--sc-border);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  font-family: "Wix Madefor Text", system-ui, sans-serif;
}

.sc-header__inner {
  width: min(100%, var(--sc-container));
  margin: 0 auto;
  min-height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.sc-header__brand {
  font-family: "Philosopher", serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--sc-text);
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}
.sc-header__brand-short { display: none; }

.sc-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sc-header__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--sc-text-soft);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}
.sc-header__link:hover { color: var(--sc-text); background: rgba(161, 122, 50, 0.1); }
.sc-header__link[aria-current="page"] { color: var(--sc-primary); background: rgba(47, 74, 52, 0.1); }

.sc-header__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--sc-text);
  border: 1px solid var(--sc-border);
  background: rgba(255, 252, 246, 0.7);
  transition: border-color 180ms ease;
}
.sc-header__cart:hover,
.sc-header__cart[aria-current="page"] { border-color: var(--sc-accent); }
.sc-header__cart svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sc-header__cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sc-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.sc-header__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--sc-border);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.7);
  color: var(--sc-text);
  font: 600 14px/1 "Wix Madefor Text", system-ui, sans-serif;
  cursor: pointer;
}
.sc-header__toggle-bars,
.sc-header__toggle-bars::before,
.sc-header__toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.sc-header__toggle-bars { position: relative; }
.sc-header__toggle-bars::before,
.sc-header__toggle-bars::after { content: ""; position: absolute; left: 0; }
.sc-header__toggle-bars::before { top: -5px; }
.sc-header__toggle-bars::after { top: 5px; }

.sc-header a:focus-visible,
.sc-header button:focus-visible,
.sc-footer a:focus-visible,
.sc-footer button:focus-visible {
  outline: 2px solid var(--sc-accent);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .sc-header__brand-full { display: none; }
  .sc-header__brand-short { display: inline; }
}

@media (max-width: 820px) {
  .sc-header__inner { gap: 10px; padding: 0 16px; }
  .sc-header__toggle { display: inline-flex; order: 2; }
  .sc-header__cart { order: 3; }
  .sc-header__brand { font-size: 17px; }
  .sc-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 16px 16px;
    background: #f6f1e8;
    border-bottom: 1px solid var(--sc-border);
    box-shadow: 0 18px 40px rgba(32, 24, 15, 0.1);
  }
  .sc-header.is-open .sc-header__nav { display: flex; }
  .sc-header__link { padding: 0 12px; border-radius: 12px; font-size: 16px; }
}

@media (max-width: 380px) {
  .sc-header__toggle-text { display: none; }
}

/* ── Футер ───────────────────────────────────────────────────────────── */
.sc-footer {
  position: relative;
  background: var(--sc-dark);
  color: rgba(255, 255, 255, 0.86);
  font-family: "Wix Madefor Text", system-ui, sans-serif;
  overflow: hidden;
}
.sc-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(201, 168, 76, 0.12), transparent 30%);
  pointer-events: none;
}

.sc-footer__inner,
.sc-footer__bottom {
  position: relative;
  width: min(100%, var(--sc-container));
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

.sc-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 56px;
}

.sc-footer__eyebrow {
  margin: 0 0 12px;
  font: 600 12px/1.6 "Comfortaa", system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sc-gold);
}
.sc-footer__title {
  display: block;
  margin-bottom: 12px;
  font-family: "Philosopher", serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-decoration: none;
}
.sc-footer__text { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.6); }

.sc-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.sc-footer__heading {
  margin: 0 0 8px;
  font-family: "Philosopher", serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.sc-footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  text-decoration: none;
  transition: color 180ms ease;
}
.sc-footer__link:hover { color: var(--sc-gold); }

.sc-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 18px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.56);
}
.sc-footer__seller { margin: 0; flex-basis: 100%; color: rgba(255, 255, 255, 0.72); }
.sc-footer__legal { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-right: auto; }
.sc-footer__legal-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}
.sc-footer__legal-link:hover { color: var(--sc-gold); }
.sc-footer__linkbtn { padding: 0; border: 0; background: none; cursor: pointer; }
.sc-footer__linkbtn[hidden] { display: none; }
.sc-footer__copy { margin: 0; }

@media (max-width: 900px) {
  .sc-footer__inner { grid-template-columns: 1fr 1fr; }
  .sc-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .sc-footer__inner { grid-template-columns: 1fr; gap: 24px; padding-top: 44px; padding-left: 16px; padding-right: 16px; }
  .sc-footer__bottom { padding-left: 16px; padding-right: 16px; }
  .sc-footer__link, .sc-footer__legal-link { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-header__link, .sc-header__cart, .sc-footer__link { transition: none; }
}
