/* Sib-Press modern header — Figma E-Com header */

:root {
  --sp-blue: #006AB5;
  --sp-text: #131927;
  --sp-muted: #4D5461;
  --sp-muted-2: #9EA2AE;
  --sp-bg-soft: #F5F6F8;
  --sp-catalog-bg: #E6F4FF;
  --sp-rating-bg: #ECF8EF;
  --sp-rating: #19AA1E;
  --sp-container: 1440px;
}

/* overflow-x:hidden на html/body ломает position:sticky — clip не ломает */
html:has(.sp-header),
body:has(.sp-header) {
  overflow-x: clip;
}

.sp-header,
header.sp-header {
  position: relative;
  top: auto;
  z-index: 1000;
  display: block !important;
  width: 100%;
  height: auto !important;
  min-height: 0;
  padding: 0 !important;
  background: #fff;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
  box-shadow: none;
}

/* Плейсхолдер высоты, пока шапка в fixed */
.sp-header-spacer {
  display: none;
  width: 100%;
  pointer-events: none;
}

.sp-header-spacer.is-active {
  display: block;
}

/* Если старый fixedMenu успел вставить .sell — прячем */
.sp-header > .sell,
.sp-header .sell {
  display: none !important;
}

.sp-header *,
.sp-header *::before,
.sp-header *::after {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
  box-sizing: border-box;
}

.sp-header a {
  text-decoration: none;
}

/* Контентная ширина 1440px (на 1920 = поля по 240px, как в макете) */
.sp-header__inner {
  width: min(var(--sp-container), calc(100% - 32px));
  max-width: var(--sp-container);
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

/* Info row */
.sp-header__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding-top: 14px;
  padding-bottom: 0;
  min-height: 38px;
}

.sp-header__info-left {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
}

.sp-header__address,
.sp-header__hours {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.sp-header__address {
  color: var(--sp-muted);
}

.sp-header__address a {
  color: inherit;
}

.sp-header__address a:hover {
  color: var(--sp-blue);
}

.sp-header__hours {
  color: var(--sp-muted-2);
}

.sp-header__info-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.sp-header__phone {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--sp-text);
  white-space: nowrap;
}

.sp-header__phone:hover {
  color: var(--sp-blue);
}

.sp-header a.sp-header__callback,
.sp-header a.sp-header__callback.button-popup {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent !important;
  background-color: transparent !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #006AB5 !important;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
  transition: color 0.15s ease;
}

.sp-header a.sp-header__callback:hover,
.sp-header a.sp-header__callback.button-popup:hover {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--Text-Color-text-links-hover, #003F6B) !important;
  opacity: 1;
}

/* Main row */
.sp-header__main {
  display: flex;
  align-items: center;
  gap: 52px;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: padding 0.2s ease;
}

.sp-header__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  width: 283px;
  max-width: 283px;
}

.sp-header__logo img {
  display: block;
  width: 283px;
  max-width: 100%;
  height: 32px;
  object-fit: contain;
  object-position: left center;
}

.sp-header__search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 679px;
}

.sp-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.sp-header__action-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-width: 163px;
  height: 52px;
  padding: 14px 18px;
  background: var(--sp-bg-soft);
  border: none;
  border-radius: 8px;
  color: var(--sp-text);
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  text-transform: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sp-header__action-btn:hover {
  background: #EBEDF0;
  color: #131927;
}

.sp-header__action-btn:hover svg path {
  stroke: #131927;
}

.sp-header__action-btn svg {
  flex-shrink: 0;
}

.sp-header__cart {
  position: relative;
}

.sp-header__compare {
  position: relative;
}

.sp-header__cart-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 24px;
  height: 24px;
  padding: 2px 7px;
  background: var(--sp-blue);
  border-radius: 99px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}

.sp-header__action-wrap,
.sp-header__cart-wrap,
.sp-header__cart-host {
  position: relative;
}

.sp-header__cart-wrap .clai {
  right: 0;
  left: auto;
  top: calc(100% + 12px);
  width: auto;
  background: transparent;
  padding: 0;
  z-index: 1200;
}

/* Filled basket modal (ContBas) — Figma Modal basket */
.sp-header__cart-wrap .ContBas.sp-basket-modal,
.sp-header__cart-wrap .sp-basket-modal {
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  align-items: stretch;
  isolation: isolate;
  width: 589px;
  max-width: calc(100vw - 32px);
  max-height: min(500px, calc(100vh - 120px));
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ebedf0;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: #131927;
  text-align: left;
}

.sp-header__cart-wrap .ContBas.sp-basket-modal.is-scrollable {
  height: 500px;
  max-height: min(500px, calc(100vh - 120px));
}

.sp-header__cart-wrap .ContBas.sp-basket-modal[style*="display: block"],
.sp-header__cart-wrap .ContBas.sp-basket-modal[style*="display:block"],
.sp-header__cart-wrap .ContBas.sp-basket-modal[style*="display: flex"],
.sp-header__cart-wrap .ContBas.sp-basket-modal[style*="display:flex"],
.sp-header__cart-wrap .ContBas.sp-basket-modal.is-open {
  display: flex !important;
}

.sp-basket-modal__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 24px 24px 24px;
  gap: 20px;
  box-sizing: border-box;
}

.sp-basket-modal.is-scrollable .sp-basket-modal__body {
  padding: 24px 27px 24px 24px;
}

.sp-basket-modal__head {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex: 0 0 auto;
  width: 100%;
}

.sp-basket-modal__title {
  margin: 0;
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: #131927;
}

.sp-basket-modal__link {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #131927;
  text-decoration: none;
  white-space: nowrap;
}

.sp-basket-modal__link:hover {
  color: var(--sp-blue);
}

.sp-basket-modal__list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.sp-basket-modal__items {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 100%;
  max-height: 240px; /* ~3 cards: 64*3 + 24*2 */
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #d2d5db transparent;
}

.sp-basket-modal.is-scrollable .sp-basket-modal__items {
  max-height: none;
  height: 100%;
  flex: 1 1 auto;
}

.sp-basket-modal__items::-webkit-scrollbar {
  width: 3px;
}

.sp-basket-modal__items::-webkit-scrollbar-track {
  background: transparent;
}

.sp-basket-modal__items::-webkit-scrollbar-thumb {
  background: #d2d5db;
  border-radius: 2px;
}

.sp-header__cart-wrap .sp-basket-modal .bx_itemincart,
.sp-basket-modal__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 64px;
  height: auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  position: relative;
  font-weight: 400;
  box-sizing: border-box;
}

.sp-basket-modal__main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 64px;
  height: auto;
}

.sp-header__cart-wrap .sp-basket-modal .bx_item_img_container,
.sp-basket-modal__thumb {
  flex: 0 0 64px;
  width: 64px !important;
  height: 64px !important;
  margin: 0 !important;
  float: none !important;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}

.sp-basket-modal__thumb a,
.sp-basket-modal__thumb img {
  display: block;
  width: 100%;
  height: 100%;
}

.sp-header__cart-wrap .sp-basket-modal .bx_item_img_container img,
.sp-basket-modal__thumb img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sp-basket-modal__info {
  flex: 1 1 auto;
  min-width: 0;
}

.sp-header__cart-wrap .sp-basket-modal .bName,
.sp-basket-modal__name,
.sp-basket-modal__name a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px !important;
  line-height: 24px;
  font-weight: 400;
  color: #131927 !important;
  text-decoration: none;
}

.sp-basket-modal__name a:hover {
  color: var(--sp-blue) !important;
}

.sp-header__cart-wrap .sp-basket-modal .bx_item_delete,
.sp-basket-modal__remove {
  position: static !important;
  top: auto !important;
  right: auto !important;
  flex: 0 0 36px;
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  opacity: 1 !important;
  cursor: pointer;
  line-height: 0;
  font-size: 0;
  transition: background 0.15s ease;
}

.sp-basket-modal__remove:hover {
  background: #f5f6f8;
}

.sp-basket-modal__remove i,
.sp-basket-modal__remove .fa {
  display: none !important;
}

.sp-basket-modal__remove svg {
  display: block;
  width: 20px;
  height: 20px;
}

.sp-basket-modal__divider {
  flex: 0 0 auto;
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid #ebedf0;
}

.sp-header__cart-wrap .sp-basket-modal .bx_button_container,
.sp-header__cart-wrap .basket .ContBas .bx_button_container,
.sp-basket-modal__footer {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 100% !important;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  padding: 24px !important;
  margin: 0 !important;
  gap: 0;
  box-sizing: border-box;
  background: #fff;
  white-space: normal !important;
}

.sp-basket-modal__actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  height: 52px;
}

.sp-basket-modal__btn {
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  flex: 1 1 0;
  width: auto !important;
  min-width: 0;
  max-width: none;
  height: 52px !important;
  padding: 14px 24px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 500 !important;
  font-size: 18px !important;
  line-height: 24px !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: none !important;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.sp-basket-modal__btn--secondary {
  background: #f5f6f8 !important;
  color: #131927 !important;
}

.sp-basket-modal__btn--secondary:hover {
  background: #ebedf0 !important;
  color: #131927 !important;
}

.sp-basket-modal__btn--primary {
  background: #006ab5 !important;
  color: #fff !important;
}

.sp-basket-modal__btn--primary:hover {
  background: #005a9a !important;
  color: #fff !important;
}

.sp-header__cart-wrap .sp-basket-modal .profl {
  display: none !important;
}

.sp-header__cart .sp-header__cart-badge {
  margin-left: 2px;
}

@media (max-width: 640px) {
  .sp-header__cart-wrap .ContBas.sp-basket-modal,
  .sp-header__cart-wrap .ContBas.sp-basket-modal.is-scrollable {
    width: min(589px, calc(100vw - 24px));
    height: auto;
    max-height: min(500px, calc(100vh - 100px));
  }

  .sp-basket-modal__item {
    gap: 16px;
  }

  .sp-basket-modal__footer {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .sp-basket-modal__actions {
    flex-direction: column;
    height: auto;
  }

  .sp-basket-modal__btn {
    width: 100% !important;
  }
}

/* Empty compare / cart mini modals */
.sp-mini-modal {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 400px;
  min-height: 260px;
  padding: 24px 24px 32px;
  gap: 24px;
  isolation: isolate;
  background: #FFFFFF;
  border: 1px solid #E6E8EC;
  box-shadow: 0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.sp-mini-modal[hidden] {
  display: none !important;
}

.sp-mini-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  padding: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sp-mini-modal__close:hover {
  opacity: 0.75;
}

.sp-mini-modal__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.sp-mini-modal__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  padding: 22px;
  box-sizing: border-box;
  background: #F5F6F8;
  border-radius: 40px;
  flex-shrink: 0;
  color: #131927;
}

.sp-mini-modal__icon svg {
  display: block;
  width: auto;
  height: auto;
  max-width: 36px;
  max-height: 36px;
}

.sp-mini-modal__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.sp-mini-modal__title {
  width: 100%;
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  text-align: center;
  color: #111827;
}

.sp-mini-modal__detail {
  width: 100%;
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  color: #5A616C;
}

.sp-mini-modal__btn {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 10px;
  background: #e6e8ec;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #131927;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.sp-mini-modal__btn:hover {
  background: #d2d5db;
}

/* Nav row — 64px: 48px контент + 16px снизу */
.sp-header__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
  height: 64px;
  padding-top: 0;
  padding-bottom: 16px;
  overflow: visible;
}

.sp-header__nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
  min-width: 0;
  height: 48px;
  overflow: visible;
}

.sp-header__catalog-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  isolation: isolate;
  width: auto;
  min-width: 147px;
  height: 48px;
  padding: 12px 20px;
  background: #E6F4FF;
  border: none;
  border-radius: 8px;
  color: #006AB5;
  font-family: inherit;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  text-transform: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.sp-header__catalog-btn:hover:not(.is-open) {
  background: #B0DEFF;
}

.sp-header__catalog-btn.is-open,
.sp-header__catalog-btn.is-open:hover {
  background: #E6F4FF;
}

.sp-header__catalog-icon {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sp-header__catalog-icon-menu,
.sp-header__catalog-icon-close {
  display: block;
  flex-shrink: 0;
}

.sp-header__catalog-icon-close {
  display: none;
}

.sp-header__catalog-btn.is-open .sp-header__catalog-icon-menu {
  display: none;
}

.sp-header__catalog-btn.is-open .sp-header__catalog-icon-close {
  display: block;
}

/* Сброс глобальных nav > ul > li > a (uppercase / padding / hover-фон) */
.sp-header__menu {
  display: flex;
  align-items: center;
  height: 48px;
  margin: 0;
  padding: 0;
}

.sp-header__menu-list,
.sp-header nav.sp-header__menu > ul.sp-header__menu-list {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 48px;
}

.sp-header__menu-item,
.sp-header nav.sp-header__menu > ul > li.sp-header__menu-item {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  height: auto;
  position: static;
  float: none;
}

.sp-header__menu-item--has-dropdown,
.sp-header nav.sp-header__menu > ul > li.sp-header__menu-item--has-dropdown {
  position: relative;
}

/* Hover-dropdown для пунктов с .left.menu (О компании и т.п.) */
.sp-header__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1200;
  box-sizing: border-box;
  min-width: 280px;
  padding: 16px;
  background: #fff;
  border: 1px solid #E6E8EC;
  border-radius: 16px;
  box-shadow:
    0px 8px 12px -4px rgba(0, 0, 0, 0.07),
    0px -5px 16px -2px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.sp-header__dropdown::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.sp-header__menu-item--has-dropdown:hover > .sp-header__dropdown,
.sp-header__menu-item--has-dropdown:focus-within > .sp-header__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.sp-header__dropdown-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-header__dropdown-item {
  margin: 0;
  padding: 0;
  width: 100%;
}

.sp-header__dropdown-link,
.sp-header nav.sp-header__menu .sp-header__dropdown-link {
  display: block;
  width: 100%;
  padding: 8px 12px !important;
  border-radius: 8px;
  background: transparent !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #111827 !important;
  text-decoration: none;
  text-transform: none !important;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.sp-header__dropdown-link:hover,
.sp-header__dropdown-link.is-active,
.sp-header nav.sp-header__menu .sp-header__dropdown-link:hover,
.sp-header nav.sp-header__menu .sp-header__dropdown-link.is-active {
  color: #006AB5 !important;
  background: #F5F6F8 !important;
  text-decoration: none;
}

.sp-header__menu-link,
.sp-header nav.sp-header__menu > ul > li > a.sp-header__menu-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0 !important;
  border: none;
  border-radius: 0;
  background: transparent !important;
  background-color: transparent !important;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  color: var(--sp-text);
  text-align: left;
  text-transform: none !important;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.sp-header__menu-link:hover,
.sp-header__menu-link.is-active,
.sp-header__menu-link:focus,
.sp-header nav.sp-header__menu > ul > li:hover > a.sp-header__menu-link,
.sp-header nav.sp-header__menu > ul > li > a.sp-header__menu-link:hover {
  color: var(--Text-Color-text-links, #006AB5) !important;
  background: transparent !important;
  background-color: transparent !important;
  text-decoration: none;
}

.sp-header__rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 13px 14px;
  background: var(--sp-rating-bg);
  border-radius: 10px;
  color: var(--sp-text);
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  text-transform: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.sp-header__rating:hover {
  color: var(--sp-text);
  opacity: 0.9;
}

.sp-header__rating-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sp-header__mobile-tools {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sp-header__icon-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  color: #5a616c;
}

.sp-header__icon-btn:hover {
  background: #f5f6f8;
}

.sp-header__icon-close {
  display: none;
}

.sp-header.is-menu-open .sp-header__icon-menu {
  display: none;
}

.sp-header.is-menu-open .sp-header__icon-close {
  display: block;
}

.sp-header__drawer {
  display: none;
}

/* Catalog mega menu */
.sp-header__catalog-anchor {
  position: relative;
  height: 0;
  padding: 0;
  overflow: visible;
  z-index: 1100;
}

.sp-catalog-panel {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1100;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 784px;
  max-width: calc(100vw - 32px);
  min-height: 402px;
  padding: 32px;
  background: #FFFFFF;
  border: 1px solid #E6E8EC;
  box-shadow: 0px 8px 12px -4px rgba(0, 0, 0, 0.07), 0px -5px 16px -2px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.sp-catalog-panel[hidden] {
  display: none !important;
}

.sp-catalog-panel__slot {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  max-width: 720px;
}

.sp-catalog-panel__col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 40px;
  width: 50%;
  max-width: 360px;
  box-sizing: border-box;
  padding-right: 32px;
}

.sp-catalog-panel__col--right {
  gap: 48px;
  padding-right: 0;
}

.sp-catalog-panel__group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.sp-catalog-panel__title {
  display: block;
  width: 100%;
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: #111827;
  text-decoration: none;
  text-transform: none;
  transition: color 0.15s ease;
}

.sp-catalog-panel__title:hover {
  color: #006AB5;
}

.sp-catalog-panel__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.sp-catalog-panel__list li {
  margin: 0;
  padding: 0;
}

.sp-catalog-panel__link {
  display: inline-block;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #111827;
  text-decoration: none;
  text-transform: none;
  transition: color 0.15s ease;
}

.sp-catalog-panel__link:hover {
  color: #006AB5;
}

.sp-catalog-panel__leaves {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

/* Compact sticky header — logo + search + actions, 84px (Figma) */
.sp-header.is-compact,
header.sp-header.is-compact {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(19, 25, 39, 0.08);
  animation: spHeaderCompactIn 0.18s ease-out;
}

@keyframes spHeaderCompactIn {
  from {
    transform: translateY(-8px);
    opacity: 0.85;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sp-header.is-compact .sp-header__info,
.sp-header.is-compact .sp-header__nav,
.sp-header.is-compact .sp-header__catalog-anchor {
  display: none !important;
}

.sp-header.is-compact .sp-header__main {
  height: 84px;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 52px;
  box-sizing: border-box;
}

.sp-header.is-compact .sp-header__logo img {
  height: 28px;
}

.sp-header.is-compact .sp-catalog-panel {
  display: none !important;
}

/* Легаси-шапка всегда скрыта, пока есть редизайн */
body:has(.sp-header) .header-line,
body:has(.sp-header) .head2,
body:has(.sp-header) .header-mobile,
body:has(.sp-header) .mobile-fixe-menu,
body:has(.sp-header) #top-menu-fixed-box {
  display: none !important;
}

@media (min-width: 992px) and (max-width: 1439px) {
  .sp-header__logo {
    width: 220px;
  }

  .sp-header__main {
    gap: 24px;
  }

  .sp-header__nav-left {
    gap: 24px;
  }

  .sp-header__menu-list,
  .sp-header nav.sp-header__menu > ul.sp-header__menu-list {
    gap: 20px;
  }

  .sp-header__action-btn {
    min-width: 0;
    padding: 14px 14px;
  }

  .sp-header__info-left {
    gap: 16px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .sp-header__hours {
    display: none;
  }

  .sp-header__menu-list,
  .sp-header nav.sp-header__menu > ul.sp-header__menu-list {
    gap: 14px;
  }

  .sp-header__menu-link,
  .sp-header nav.sp-header__menu > ul > li > a.sp-header__menu-link {
    font-size: 14px;
  }

  .sp-header__action-btn span:not(.sp-header__cart-badge) {
    display: none;
  }

  .sp-header__action-btn {
    width: 52px;
    min-width: 52px;
    padding: 14px;
  }
}

/* Планшет / моб: одна редизайн-шапка, без старых дублей */
@media (max-width: 991px) {
  .sp-header,
  header.sp-header {
    display: block !important;
  }

  .sp-header__info {
    display: none;
  }

  .sp-header__main {
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
    height: auto;
    flex-wrap: wrap;
  }

  .sp-header__logo {
    width: auto;
    max-width: 180px;
    flex: 0 0 auto;
  }

  .sp-header__logo img {
    height: 28px;
    width: auto;
  }

  .sp-header__search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .sp-header__actions {
    margin-left: auto;
    gap: 8px;
  }

  .sp-header__action-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 10px;
  }

  .sp-header__action-btn span:not(.sp-header__cart-badge) {
    display: none;
  }

  .sp-header__nav {
    height: auto;
    padding-bottom: 12px;
    gap: 12px;
    overflow: visible;
  }

  .sp-header__nav-left {
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .sp-header__catalog-btn {
    min-width: 0;
    height: 40px;
    padding: 8px 14px;
    font-size: 15px;
    flex-shrink: 0;
  }

  .sp-header__menu {
    min-width: 0;
  }

  .sp-header__menu-list,
  .sp-header nav.sp-header__menu > ul.sp-header__menu-list {
    gap: 16px;
    height: 40px;
  }

  .sp-header__menu-link,
  .sp-header nav.sp-header__menu > ul > li > a.sp-header__menu-link {
    font-size: 14px;
    line-height: 20px;
  }

  .sp-header__rating {
    display: inline-flex;
    flex-shrink: 0;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .sp-header__catalog-anchor {
    padding: 0 16px;
  }

  .sp-catalog-panel {
    width: min(784px, calc(100vw - 32px));
    left: 50%;
    transform: translateX(-50%);
  }

  /* Compact sticky на планшете/моб */
  .sp-header.is-compact .sp-header__main {
    height: 64px;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .sp-header.is-compact .sp-header__search {
    display: none !important;
  }

  .sp-header.is-compact .sp-header__logo img {
    height: 28px;
  }
}

@media (max-width: 776px) {
  .sp-header,
  header.sp-header {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    /* низ без padding — отступ до баннера задаём margin-top: 16px */
    padding: 12px 16px 0 !important;
    box-sizing: border-box;
    overflow: visible;
  }

  .sp-header__inner {
    width: 100%;
    max-width: none;
    overflow: visible;
  }

  .sp-header__main {
    gap: 0;
    height: 40px;
    min-height: 40px;
    padding: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }

  .sp-header__logo {
    max-width: 154px;
    width: auto;
    margin: 0;
  }

  .sp-header__logo img {
    height: 18px;
    width: auto;
    max-width: 154px;
  }

  .sp-header__search {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    z-index: 1201;
    order: 0;
    flex: none;
    width: auto;
    max-width: none;
    display: none;
  }

  .sp-header.is-search-open .sp-header__search {
    display: block;
  }

  .sp-header__actions {
    display: none;
  }

  .sp-header__mobile-tools {
    display: inline-flex;
    margin-left: auto;
  }

  .sp-header__nav {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .sp-header__nav-left {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: calc(100% + 16px);
    max-width: none;
    height: 36px;
    min-width: 0;
    margin-right: -16px;
    padding-right: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .sp-header__nav-left::-webkit-scrollbar {
    display: none;
  }

  /* По макету в чипах только пункты меню, Каталог — в бургере */
  .sp-header__catalog-btn {
    display: none !important;
  }

  .sp-header__menu {
    display: block;
    height: 36px;
    flex: 0 0 auto;
    width: max-content;
    min-width: max-content !important;
    max-width: none !important;
  }

  .sp-header__menu-list,
  .sp-header nav.sp-header__menu > ul.sp-header__menu-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 6px;
    width: max-content !important;
    min-width: max-content !important;
    height: 36px;
    margin: 0;
    padding: 0;
  }

  .sp-header__menu-item,
  .sp-header nav.sp-header__menu > ul > li.sp-header__menu-item {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0;
    padding: 0;
    position: relative;
    float: none !important;
  }

  .sp-header__menu-link,
  .sp-header nav.sp-header__menu > ul > li > a.sp-header__menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: 36px;
    padding: 8px 20px !important;
    border-radius: 6px;
    background: #f5f6f8 !important;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #131927 !important;
    white-space: nowrap;
  }

  .sp-header__menu-link:hover,
  .sp-header__menu-link.is-active,
  .sp-header nav.sp-header__menu > ul > li:hover > a.sp-header__menu-link,
  .sp-header nav.sp-header__menu > ul > li > a.sp-header__menu-link:hover {
    background: #e6e8ec !important;
    color: #131927 !important;
  }

  .sp-header__menu-item--has-dropdown > .sp-header__dropdown,
  .sp-header__dropdown {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .sp-header__rating {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 40px;
    padding: 10px 14px;
    background: #ecf8ef;
    border-radius: 10px;
    font-weight: 500;
    font-size: 13px;
    line-height: 18px;
    color: #131927;
  }

  .sp-header__rating-icon {
    width: 20px;
    height: 20px;
  }

  /* height:0 + relative всё равно даёт flex gap 16px после рейтинга */
  .sp-header__catalog-anchor {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
  }

  .sp-catalog-panel {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    min-height: 0;
    transform: none;
  }

  /* Drawer — full screen mobile menu (Figma Status=Menu) */
  html.sp-menu-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  html.sp-menu-open body {
    position: fixed !important;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
  }

  html.sp-menu-open .sp-header.is-menu-open,
  html.sp-menu-open .sp-header__drawer,
  html.sp-menu-open .sp-header__drawer-nav {
    touch-action: pan-y;
  }

  html.sp-menu-open .sp-tabbar {
    display: none !important;
  }

  .sp-header.is-menu-open,
  header.sp-header.is-menu-open {
    position: fixed !important;
    inset: 0;
    z-index: 12100;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0 !important;
    width: 100%;
    height: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
    margin: 0;
    background: #fff;
    overflow: hidden;
  }

  .sp-header.is-menu-open .sp-header__info,
  .sp-header.is-menu-open .sp-header__nav,
  .sp-header.is-menu-open .sp-header__catalog-anchor,
  .sp-header.is-menu-open .sp-header__logo,
  .sp-header.is-menu-open .sp-header__search,
  .sp-header.is-menu-open #spSearchToggle {
    display: none !important;
  }

  .sp-header.is-menu-open .sp-header__main {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    z-index: 2;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    width: auto;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
  }

  .sp-header.is-menu-open .sp-header__mobile-tools {
    display: inline-flex !important;
    margin: 0;
  }

  .sp-header.is-menu-open #spMobileMenuBtn {
    width: 44px;
    height: 40px;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
  }

  .sp-header__drawer {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 16px 6px;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sp-header__drawer[hidden] {
    display: none !important;
  }

  .sp-header__drawer-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    gap: 24px;
  }

  .sp-header__drawer-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    max-width: 363px;
    margin: 0 auto;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sp-header__drawer-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: none;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 14px 24px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #131927 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .sp-header__drawer-link.is-active {
    background: #f5f6f8;
  }

  .sp-header__drawer-link:hover,
  .sp-header__drawer-link:active {
    background: #f5f6f8;
  }

  .sp-header__drawer-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: none;
    gap: 24px;
    width: 100%;
    max-width: 363px;
    margin: 0 auto;
    padding: 0 24px 12px;
  }

  .sp-header__drawer-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .sp-header__drawer-phone-num {
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 32px;
    color: #111827 !important;
    text-decoration: none !important;
  }

  .sp-header__drawer-callback,
  .sp-header__drawer-callback.button-popup,
  a.sp-header__drawer-callback.button-popup {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    color: #127be9 !important;
    text-decoration: none !important;
  }

  .sp-header__drawer-callback:hover,
  .sp-header__drawer-callback.button-popup:hover,
  a.sp-header__drawer-callback.button-popup:hover {
    background: transparent !important;
    background-color: transparent !important;
    text-decoration: underline !important;
  }

  .sp-header__drawer-address {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 100%;
  }

  .sp-header__drawer-address-title {
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    color: #111827;
  }

  .sp-header__drawer-address-meta {
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    color: #9299a5;
  }

  /* Sticky compact: только лого + иконки */
  .sp-header.is-compact:not(.is-menu-open) {
    gap: 0;
    padding-bottom: 12px !important;
  }

  .sp-header.is-compact:not(.is-menu-open) .sp-header__main {
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  .sp-header.is-compact:not(.is-menu-open) .sp-header__nav {
    display: none !important;
  }

  .sp-header.is-compact:not(.is-menu-open) .sp-header__logo img {
    height: 18px;
  }

  .sp-header.is-compact.is-search-open:not(.is-menu-open) .sp-header__search {
    display: block !important;
  }

  /* Empty cart / compare — bottom sheet */
  .sp-mini-modal,
  .sp-mini-modal.is-sheet {
    position: fixed;
    top: auto;
    right: 8px;
    left: 8px;
    bottom: 8px;
    z-index: 12100;
    width: auto;
    max-width: none;
    min-height: 0;
    height: auto;
    padding: 32px 20px 20px;
    gap: 32px;
    border: none;
    border-radius: 12px;
    box-shadow:
      0px -20px 25px -5px rgba(0, 0, 0, 0.05),
      0px -10px 30px -5px rgba(0, 0, 0, 0.04);
  }

  #spEmptyCart.sp-mini-modal {
    left: 8px;
    right: 8px;
  }

  #spEmptyCompare.sp-mini-modal {
    left: 8px;
    right: 8px;
  }

  .sp-mini-modal__close {
    top: 10px;
    right: 10px;
  }

  .sp-mini-modal__icon {
    color: #5a616c;
  }

  .sp-mini-modal__title {
    font-size: 20px;
    line-height: 24px;
  }

  .sp-mini-modal__detail {
    font-size: 16px;
    line-height: 24px;
  }

  .sp-mini-modal__btn {
    display: inline-flex;
  }
}

