.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 250, .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: var(--batya-weight-semibold);
  text-align: center;
}

.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: var(--batya-control);
  padding: 0 14px 0 40px;
  border: 1px solid var(--batya-border);
  border-radius: var(--batya-radius);
  background: var(--batya-card);
  color: var(--batya-text);
}

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

.site-header__search-input:focus {
  border-color: var(--batya-brand-border);
  outline: 0;
  box-shadow: 0 0 0 3px var(--batya-brand-soft);
}


.header-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--batya-control);
  height: var(--batya-control);
  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: var(--batya-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: var(--batya-brand);
  color: var(--batya-text);
  border: 2px solid var(--batya-card);
  font-size: 10px;
  font-weight: var(--batya-weight-medium);
  letter-spacing: 0;
}

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

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


.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, 253, 250, .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: var(--batya-text-faint);
  -webkit-tap-highlight-color: transparent;
  transition: color .18s ease, opacity .18s ease, transform .18s ease;
}

.mobile-bottom-nav__item.is-active {
  color: var(--batya-brand-dark);
}

.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: var(--batya-space-4);
    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__actions {
    display: flex;
    align-items: center;
    gap: var(--batya-space-2);
  }

  .header-action-link {
    width: var(--batya-control);
    height: var(--batya-control);
    border: 1px solid var(--batya-border);
    border-radius: var(--batya-radius);
    background: var(--batya-card);
  }

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


  .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;
  }
}


.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: var(--batya-brand);
  border: 2px solid var(--batya-card);
  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: var(--batya-radius);
  }
}

/* Mobile search header */
.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;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--batya-text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  -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: var(--batya-bg);
  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__actions {
    display: none;
  }

  .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: var(--batya-card);
    padding-right: 14px;
  }
}

@media (max-width: 991.98px) {
  .site-header__inner {
    padding-left: var(--content-gutter, 12px);
    padding-right: 0;
  }
}


/* mobile catalog panel */
.catalog-mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: var(--batya-card);
}

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

.catalog-mobile-panel__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--batya-card);
}

.catalog-mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--batya-space-3);
  min-height: 62px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  border-bottom: 1px solid var(--batya-border, #e7ddd3);
  background: var(--batya-card);
}

.catalog-mobile-panel__title-wrap {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.catalog-mobile-panel__head strong,
.catalog-mobile-panel__head h2 {
  margin: 0;
  color: var(--batya-text, #1b1815);
  font-size: 20px;
  font-weight: var(--batya-weight-regular);
  line-height: 1.15;
  letter-spacing: 0;
}

.catalog-mobile-panel__meta {
  color: var(--batya-text-soft, #706861);
  font-size: 13px;
  font-weight: var(--batya-weight-regular);
  line-height: 1.25;
}

.catalog-mobile-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--batya-border, #e7ddd3);
  border-radius: var(--batya-radius-pill);
  background: var(--batya-card);
  color: var(--batya-text, #1b1815);
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}

.catalog-mobile-panel__close:hover,
.catalog-mobile-panel__close:focus-visible {
  background: var(--batya-surface);
  border-color: var(--batya-border-strong);
}

.catalog-mobile-panel__close svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.catalog-mobile-panel__content {
  flex: 1 1 auto;
  overflow: auto;
  padding: 10px 0 calc(82px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  background: var(--batya-card);
}

.catalog-mobile-panel__group {
  padding: 0;
}

.catalog-mobile-links,
.catalog-mobile-links__section,
.catalog-mobile-links__children {
  display: grid;
  gap: 0;
}

.catalog-mobile-links__section {
  min-width: 0;
}

.catalog-mobile-links__children {
  margin-left: 16px;
  padding-left: 12px;
  border-left: 1px solid var(--batya-border, #e7ddd3);
}

.catalog-mobile-links__children--depth-2 {
  margin-left: 12px;
  padding-left: 10px;
}

.catalog-mobile-links__children--depth-3,
.catalog-mobile-links__children--depth-4 {
  margin-left: 8px;
  padding-left: 8px;
}

.catalog-mobile-links__item,
.catalog-mobile-links__child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--batya-space-3);
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--batya-text, #1b1815);
  font-size: 15px;
  font-weight: var(--batya-weight-regular);
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .1s ease, color .1s ease;
}

.catalog-mobile-links__item:hover,
.catalog-mobile-links__item:focus-visible,
.catalog-mobile-links__child:hover,
.catalog-mobile-links__child:focus-visible {
  background: var(--batya-surface);
  color: var(--batya-text, #1b1815);
  text-decoration: none;
}

.catalog-mobile-links__item.is-current,
.catalog-mobile-links__child.is-current {
  background: var(--batya-surface-2);
}

.catalog-mobile-links__item--root {
  min-height: 46px;
}

.catalog-mobile-links__child {
  min-height: 40px;
  padding-left: 12px;
}

.catalog-mobile-links__children--depth-2 .catalog-mobile-links__child {
  font-size: 14.5px;
}

.catalog-mobile-links__children--depth-3 .catalog-mobile-links__child,
.catalog-mobile-links__children--depth-4 .catalog-mobile-links__child {
  font-size: 14px;
}

.catalog-mobile-links__name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.catalog-mobile-links__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--batya-radius-pill);
  background: rgba(112, 104, 97, .08);
  color: var(--batya-text-soft, #706861);
  font-size: 11.5px;
  font-weight: var(--batya-weight-regular);
  line-height: 1;
  white-space: nowrap;
}

html.catalog-panel-open,
body.catalog-panel-open {
  overflow: hidden !important;
}

body.catalog-sort-open,
body.catalog-filter-open {
  overflow: hidden !important;
}

@media (max-width: 991.98px) {
  .catalog-mobile-panel,
  #catalog-mobile-panel {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    overflow: hidden !important;
    background: #fff !important;
    z-index: 10060 !important;
  }

  .catalog-mobile-panel__inner {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    min-height: 100dvh;
    max-height: none !important;
    height: 100dvh;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }
}

@media (min-width: 992px) {
  #catalog-mobile-panel {
    display: none !important;
  }
}
