/* Общая шапка для всех доп. страниц сайта (каталог, юридические).
   Полная копия шапки с главной: логотип, бургер, поиск, избранное, корзина,
   плюс выпадающее меню и верхняя бегущая строка. */

:root {
  --milk: #FAF4E4;
  --chocolate: #3A2417;
  --cream: #F7EFD9;
  --emerald: #BE73BF;
  --peach: #BF4904;
  --wine: #BF4904;
  --tomato: #BF4904;
  --bright-yellow: #F2B705;
  --rose: #D2A3D9;
  --mustard: #F2B705;
  --sand: #D98E04;
  --pink-soft: #EBD2EE;
  --peach-soft: #F2B89A;
  --navy: var(--emerald);
  --ink: var(--chocolate);
  --font-mono: 'Unbounded', sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;
}

/* ====== ПЛАШКА СВЕРХУ + БЕГУЩАЯ СТРОКА ====== */
.topbar {
  background: var(--navy);
  color: var(--milk);
  padding: 8px 0;
  overflow: hidden;
  border-bottom: none;
}
.topbar .marquee {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: site-topbar-scroll 9s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar .marquee span { display: flex; align-items: center; gap: 40px; }
.topbar .marquee span::after { content: '✦'; color: var(--bright-yellow); font-size: 14px; }
@keyframes site-topbar-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ====== ШАПКА ====== */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 100;
}
.header {
  background: var(--cream);
  border-bottom: none;
  position: relative;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1320px;
  margin: 0 auto;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.logo .logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: color .2s;
  position: relative;
}
.nav a:hover {
  color: var(--tomato);
  text-decoration: underline wavy var(--wine);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav a.is-sale { color: var(--rose); }
.nav a.is-sale::after {
  content: '🔥';
  margin-left: 4px;
  font-size: 12px;
}
.nav a.is-catalog { color: var(--mustard); }

.header-actions { display: flex; gap: 14px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--milk);
  color: var(--wine);
  border: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s;
  position: relative;
  cursor: pointer;
}
.icon-btn:hover { transform: rotate(-8deg); background: var(--mustard); }
.icon-btn .badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--wine);
  color: var(--milk);
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none;
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--milk);
  color: var(--wine);
  border: none;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.burger:hover { transform: rotate(-8deg); background: var(--mustard); }
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ====== ВЫПАДАЮЩЕЕ МЕНЮ ====== */
.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cream);
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  z-index: 5;
  transition: max-height .3s ease, visibility 0s linear .3s;
}
.menu-panel[data-open="true"] {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  visibility: visible;
  transition: max-height .3s ease, visibility 0s linear 0s;
}
.menu-panel-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 32px 48px;
}
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.menu-list a {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chocolate);
  text-decoration: none;
  transition: color .2s;
}
.menu-list a:hover,
.menu-list a:focus,
.menu-list a:active,
.menu-list a.is-active {
  color: var(--emerald);
  text-decoration: underline wavy var(--wine);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ====== АДАПТИВ ====== */
@media (max-width: 980px) {
  .nav { display: none; }
}
@media (max-width: 540px) {
  .menu-panel-inner { padding: 24px 24px 32px; }
  .menu-list { gap: 14px; }
  .menu-list a { font-size: 13px; }
  .header-inner { padding: 14px 16px; gap: 12px; }
  .header-actions { gap: 8px; }
  .icon-btn, .burger { width: 36px; height: 36px; }
  .burger span { width: 16px; }
}
