.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--batya-border);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding-block: 8px;
}

.site-header__brand {
  min-width: 0;
  display: flex;
  align-items: center;
  align-self: center;
}

.site-header__brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  line-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.site-header__brand-link .custom-logo-link,
.site-header__brand-link .site-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.site-header__brand-link .custom-logo {
  display: block;
  width: 40px;
  height: 40px;
  max-width: none;
  object-fit: cover;
}

.site-header__brand-link .site-title {
  padding: 6px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.site-header__catalog-link,
.site-nav,
.site-header__actions {
  display: none;
}

.site-header__search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.site-header__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--batya-text-soft);
  pointer-events: none;
}

.site-header__search-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--batya-border);
  border-radius: 14px;
  background: #fff;
  color: var(--batya-text);
}

.site-header__search-input::placeholder {
  color: var(--batya-text-soft);
}


.header-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--batya-text);
}

.header-action-link--account {
  display: none;
}

.header-action-link__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.header-action-link__icon svg {
  width: 32px;
  height: 32px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.header-cart-count,
.mobile-bottom-nav__count {
  position: absolute;
  top: -4px;
  right: -6px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #111;
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-cart-count.has-items,
.mobile-bottom-nav__count.has-items {
  opacity: 1;
  transform: scale(1);
}

.mobile-bottom-nav__item--cart {
  position: relative;
}

.site-footer {
  margin-top: 48px;
  padding: 28px 0 96px;
  border-top: 1px solid var(--batya-border);
  color: var(--batya-text-soft);
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  min-height: 52px;
  max-height: 52px;
  padding: 0 6px env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--batya-border);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.mobile-bottom-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0;
  color: #8f95a3;
  -webkit-tap-highlight-color: transparent;
  transition: color .18s ease, opacity .18s ease, transform .18s ease;
}

.mobile-bottom-nav__item.is-active {
  color: #ff6900;
}

.mobile-bottom-nav__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.mobile-bottom-nav__icon svg {
  width: 32px;
  height: 32px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.mobile-bottom-nav__label {
  display: none;
}

@media (min-width: 992px) {
  .site-header__inner {
    grid-template-columns: auto auto minmax(320px, 1fr) auto;
    gap: 16px;
    min-height: 72px;
    padding-block: 12px;
  }

  .site-header__brand-link {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    align-items: center;
    line-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .site-header__brand-link .custom-logo-link,
  .site-header__brand-link .site-title {
    justify-content: center;
  }

  .site-header__brand-link .custom-logo {
    width: 40px;
    height: 40px;
    max-width: none;
    object-fit: cover;
  }

  .site-header__brand-link .site-title {
    padding: 6px;
    font-size: 12px;
    text-align: center;
  }

  .site-header__catalog-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--batya-border);
    border-radius: 14px;
    background: #fff;
    font-weight: 700;
    white-space: nowrap;
  }

  .site-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .header-action-link {
    width: 44px;
    height: 44px;
    border: 1px solid var(--batya-border);
    border-radius: 14px;
    background: #fff;
  }

  .header-action-link--account {
    display: inline-flex;
  }

  .header-cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #ff6900;
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: scale(.88);
  pointer-events: none;
}

  .site-footer {
    padding-bottom: 48px;
  }

  .mobile-bottom-nav {
    display: none;
  }
}

@media (max-width: 991px) {
  body {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  }

  .site-header {
    transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
    will-change: transform;
  }

  .site-header.is-hidden-by-scroll {
    transform: translateY(calc(-100% - 4px));
  }

  .site-header.is-at-top {
    transform: translateY(0);
  }

  .mobile-bottom-nav {
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* cleaned legacy mobile header/nav overrides */
.site-title,
.site-branding .site-title,
.site-header .site-title,
.mobile-header .site-title,
.site-name,
.brand-text,
.header-branding__text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


@media (max-width: 991px) {
  .header-action-link {
    width: 44px;
    height: 44px;
  }
}

.mobile-bottom-nav__count:not(.has-items),
.mobile-bottom-nav__count:empty,
.header-cart-count:not(.has-items),
.header-cart-count:empty {
  display: none;
}

.mobile-bottom-nav__icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.mobile-bottom-nav__icon svg,
.header-action-link__icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.9;
  shape-rendering: geometricPrecision;
}

.mobile-bottom-nav__item--cart .mobile-bottom-nav__icon svg,
.header-action-link--cart .header-action-link__icon svg {
  width: 35px;
  height: 35px;
}

.header-action-link__icon {
  width: 32px;
  height: 32px;
}

.header-action-link--cart .header-action-link__icon,
.mobile-bottom-nav__item--cart .mobile-bottom-nav__icon {
  transform: translateX(-0.5px);
}

.header-cart-count {
  top: -3px;
  right: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: #ff6900;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(17,17,17,.14);
}

.mobile-bottom-nav__count {
  top: -3px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  box-shadow: 0 2px 8px rgba(17,17,17,.12);
}

@media (min-width: 992px) {
  .header-action-link {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }
}

/* v14 mobile header refinement */
.site-header__search-wrap {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-header__back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 44px;
  color: var(--batya-text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.site-header__back-link svg {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.site-header__search {
  min-width: 0;
}

.site-header__search-icon {
  left: 12px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--batya-text-soft);
}

.site-header__search-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.site-header__search-input {
  border: 0;
  background: #faf8f6;
  padding-left: 44px;
  padding-right: 12px;
}

@media (max-width: 991.98px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .site-header__brand,
  .site-header__brand-link,
  .site-header__catalog-link,
  .site-nav,
  .site-header__actions {
    display: none !important;
  }

  .site-header__search-wrap {
    margin-right: 10px;
  }

  .site-header__back-link {
    order: 0;
  }

  .site-header__search {
    order: 1;
  }
}

@media (min-width: 992px) {
  .site-header__search-wrap {
    display: contents;
  }

  .site-header__back-link {
    display: none;
  }

  .site-header__search {
    width: 100%;
  }

  .site-header__search-input {
    border: 1px solid var(--batya-border);
    background: #fff;
    padding-right: 14px;
  }
}

:root {
  --page-gutter: 12px;
}

@media (max-width: 991.98px) {
  .site-container,
  .site-main.site-container,
  .catalog-page.site-container,
  .site-footer .site-container {
    width: 100%;
    max-width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .site-header__inner {
    padding-left: var(--page-gutter);
    padding-right: 0;
  }
}


/* desktop catalog panel */
@media (min-width: 992px) {
  .site-header {
    z-index: 120;
  }

  .site-header__catalog-link[aria-expanded="true"] {
    background: #f6f7f8;
    border-color: #d7dce3;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.04);
  }

  .desktop-catalog-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding-top: 14px;
    z-index: 119;
  }

  .desktop-catalog-panel__inner {
    border: 1px solid #e6e9ee;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
      0 22px 70px rgba(17, 24, 39, 0.11),
      0 2px 12px rgba(17, 24, 39, 0.04);
    overflow: hidden;
    backdrop-filter: blur(10px);
  }

  .desktop-catalog-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 0 20px;
    border-bottom: 1px solid #eef1f4;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.9));
  }

  .desktop-catalog-panel__title {
    font-size: 18px;
    line-height: 1.1;
    font-weight: 680;
    letter-spacing: -0.01em;
    color: #111827;
  }

  .desktop-catalog-panel__close {
    width: 40px;
    height: 40px;
    border: 1px solid #e7ebef;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 28px;
    line-height: 1;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  }

  .desktop-catalog-panel__close:hover {
    background: #f8fafc;
    border-color: #dbe2ea;
  }

  .desktop-catalog-panel__body {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr) 208px;
    min-height: 500px;
    max-height: min(72vh, 760px);
  }

  .desktop-catalog-nav {
    padding: 18px 14px;
    border-right: 1px solid #eef1f4;
    background: #fbfcfd;
    overflow: auto;
  }

  .desktop-catalog-nav__label,
  .desktop-catalog-featured__title {
    margin: 0 4px 10px;
    color: #7b8694;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .desktop-catalog-nav__item {
    position: relative;
    width: 100%;
    min-height: 46px;
    padding: 0 14px 0 18px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #1f2937;
    text-align: left;
    font: inherit;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 665;
    letter-spacing: -0.012em;
    transition: background-color 0.16s ease, color 0.16s ease;
  }

  .desktop-catalog-nav__item::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    transition: background-color 0.16s ease;
  }

  .desktop-catalog-nav__item:hover {
    background: #f6f7f8;
  }

  .desktop-catalog-nav__item.is-active {
    background: #f4f6f8;
    color: #111827;
    font-weight: 720;
  }

  .desktop-catalog-nav__item.is-active::before {
    background: #ff6900;
  }

  .desktop-catalog-subnav {
    padding: 22px 18px 24px;
    overflow: auto;
    background: #fff;
  }

  .desktop-catalog-subnav__panel {
    display: none;
    animation: desktopCatalogFade 0.14s ease;
  }

  .desktop-catalog-subnav__panel.is-active {
    display: block;
  }

  .desktop-catalog-subnav__title {
    margin-bottom: 14px;
    font-size: 32px;
    line-height: 1.05;
    font-weight: 760;
    letter-spacing: -0.032em;
    color: #111827;
  }

  .desktop-catalog-subnav__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
  }

  .desktop-catalog-subnav__link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid #edf1f4;
    border-radius: 17px;
    background: linear-gradient(to bottom, #fbfcfd, #fafbfc);
    transition:
      background-color 0.16s ease,
      border-color 0.16s ease,
      transform 0.16s ease,
      box-shadow 0.16s ease;
  }

  .desktop-catalog-subnav__link:hover {
    background: #fff;
    border-color: #dfe6ed;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
  }

  .desktop-catalog-subnav__link span {
    font-size: 15px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #111827;
  }

  .desktop-catalog-subnav__link small {
    font-size: 11px;
    line-height: 1.3;
    font-weight: 500;
    color: #96a0af;
  }

  .desktop-catalog-subnav__all {
    display: inline-flex;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 720;
    letter-spacing: -0.012em;
    color: #111827;
  }

  .desktop-catalog-subnav__all:hover {
    color: #ff6900;
  }

  .desktop-catalog-featured {
    padding: 22px 16px;
    border-left: 1px solid #eef1f4;
    background: linear-gradient(to bottom, #fbfbfc, #fafbfc);
    overflow: auto;
  }

  .desktop-catalog-featured__list {
    display: grid;
    gap: 8px;
  }

  .desktop-catalog-featured__item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 32px 0 14px;
    border: 1px solid #edf1f4;
    border-radius: 14px;
    background: #fff;
    color: #243041;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 660;
    letter-spacing: -0.01em;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  }

  .desktop-catalog-featured__item:hover {
    background: #f9fafb;
    border-color: #dfe6ed;
    transform: translateY(-1px);
  }

  .desktop-catalog-featured__item::after {
    content: "→";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a8b5;
    font-size: 14px;
    line-height: 1;
  }

  .desktop-catalog-backdrop {
    position: fixed;
    inset: 72px 0 0;
    background: rgba(17, 24, 39, 0.10);
    backdrop-filter: blur(3px);
    z-index: 118;
  }

  html.desktop-catalog-open,
  body.desktop-catalog-open {
    overflow: hidden;
  }

  @keyframes desktopCatalogFade {
    from {
      opacity: 0;
      transform: translateY(4px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
