/* ——— Шапка: #DCE0E4 45%, blur 15, элементы #212529 ——— */

:root {
  --header-bg: rgba(220, 224, 228, 0.45);
  --header-fg: #212529;
  --header-top: 10px;
  --header-side: 10px;
  --header-h: 50px;
}

.site-header {
  position: fixed;
  top: var(--header-top);
  left: var(--header-side);
  right: var(--header-side);
  width: auto;
  margin: 0;
  z-index: 1000;
  background: transparent;
}

.site-header__bar {
  --header-pad: 15px;

  min-height: var(--header-h);
  padding: var(--header-pad);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-header);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: calc(var(--header-h) - var(--header-pad) * 2);
}

/* ——— Навигация (desktop) ——— */
.site-nav--desktop {
  display: none;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  flex-wrap: wrap;
}

.site-nav__link {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--header-fg);
  line-height: 1;
  transition: font-weight 0.2s ease, opacity 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link.is-active {
  font-weight: 600;
}

/* ——— Логотип ——— */
.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.site-logo:hover,
.site-logo:focus-visible {
  opacity: 0.88;
}

.site-logo__svg {
  display: block;
  width: auto;
  height: 16px;
  max-width: min(130px, 40vw);
  color: var(--header-fg);
}

.site-logo__svg [fill]:not([fill="none"]) {
  fill: currentColor;
}

.site-logo__svg [stroke] {
  stroke: currentColor;
}

/* ——— Корзина и бургер ——— */
.site-header__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

.cart-link-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  color: var(--header-fg);
  line-height: 1;
  transition: opacity 0.2s ease;
}

.cart-btn__icon [fill]:not([fill="none"]) {
  fill: currentColor;
}

.cart-btn:hover,
.cart-btn:focus-visible {
  opacity: 0.85;
}

.cart-btn__icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cart-btn__text {
  display: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
  color: var(--header-fg);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  pointer-events: none;
}

/* Бургер: только планшет и телефон (< 1024px) */
.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--header-fg);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.burger svg {
  display: block;
  width: 22px;
  height: auto;
}

.burger svg [stroke] {
  stroke: currentColor;
}

.burger:hover,
.burger:focus-visible {
  opacity: 0.85;
}

body.menu-open {
  overflow: hidden;
}

/* Планшет */
@media (min-width: 768px) {
  :root {
    --header-top: 20px;
    --header-side: 20px;
    --header-h: 65px;
  }

  .site-header__bar {
    --header-pad: 22px;
  }

  .site-logo__svg {
    height: 20px;
    max-width: 150px;
  }

  .cart-btn__icon {
    width: 22px;
    height: 22px;
  }
}

/* ПК: ≥1024px — лого строго по центру, навигация слева, корзина справа */
@media (min-width: 1024px) {
  :root {
    --header-top: 20px;
    --header-side: 25px;
    --header-h: 65px;
  }

  .site-header__inner {
    justify-content: flex-start;
  }

  .site-nav--desktop {
    display: flex;
    flex: 1 1 0;
    justify-content: flex-start;
    align-items: center;
    min-width: 0;
    z-index: 1;
  }

  .site-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: auto;
  }

  .site-header__actions {
    flex: 1 1 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    min-width: 0;
    z-index: 1;
  }

  .cart-btn__text {
    display: inline;
  }

  .burger {
    display: none !important;
  }
}

/* Широкий экран 1920px: ~75px */
@media (min-width: 1920px) {
  :root {
    --header-h: 75px;
  }

  .site-header__bar {
    --header-pad: 26px;
  }

  .site-logo__svg {
    height: 23px;
    max-width: 176px;
  }

  .cart-btn__icon {
    width: 16px;
    height: 16px;
  }
}

/* 1024–1919: высота 65px (как планшет/1200) */
@media (min-width: 1024px) and (max-width: 1919.98px) {
  .site-header__bar {
    --header-pad: 22px;
  }

  .site-logo__svg {
    height: 20px;
    max-width: 160px;
  }
}

/* Отступ под фиксированный хедер (контент не прячется под шапкой) */
.header-clearance {
  padding-top: calc(var(--header-top) + var(--header-h) + 12px);
}

/* ——— Мобильное меню (<1024px) ——— */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.mobile-menu__panel {
  position: absolute;
  overflow: auto;
}

.mobile-menu__close {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu__link {
  display: block;
  transition: color var(--transition), font-weight 0.2s ease;
}

.mobile-menu__link.is-active {
  font-weight: 700;
  color: var(--color-accent);
}

.mobile-menu__link--accent {
  color: var(--color-accent);
}

.mobile-menu__minor {
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mobile-menu__social-label {
  display: none;
}

.mobile-menu__social {
  display: flex;
  flex-wrap: wrap;
}

.social-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

@media (max-width: 1023.98px) {
  .mobile-menu__backdrop {
    top: var(--menu-top, 0);
  }

  .mobile-menu__panel {
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--menu-top, 0);
    width: 100%;
    background: #fff;
    padding: 20px 16px 28px;
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--menu-top, 0));
    -webkit-overflow-scrolling: touch;
    border-radius: 20px 20px 0 0;
  }

  .mobile-menu__close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    color: #6C757D;
  }

  .mobile-menu__nav {
    margin: 0;
    padding: 48px 0 0;
    gap: 0;
  }

  .mobile-menu__link {
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: clamp(1.75rem, 8.5vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
    color: #1a1a1a;
  }

  .mobile-menu__link:hover,
  .mobile-menu__link:focus-visible {
    color: var(--color-accent);
  }

  .mobile-menu__minor {
    margin-top: 28px;
    font-size: 0.875rem;
    color: #6b7280;
  }

  .mobile-menu__social-label {
    display: block;
    margin-top: auto;
    margin-bottom: 10px;
    padding-top: 24px;
    font-size: 0.75rem;
    color: #9ca3af;
  }

  .mobile-menu__social {
    gap: 10px;
  }

  .social-ico {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    
    transition: opacity 0.2s ease;
  }
}
