.block-shop-header {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 60;
  border-bottom: 1px solid var(--ib-line);
  background: var(--ib-bg);
  transition: transform .35s ease, box-shadow .35s ease;
}

.block-shop-header.is-stuck {
  box-shadow: 0 10px 30px rgb(16 24 40 / .08);
}

.block-shop-header.is-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .block-shop-header {
    transition: none;
  }
}

.block-shop-header__row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding-block: 14px;
}

.block-shop-header__logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 10px;
  max-width: 260px;
  color: var(--ib-fg);
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}

.block-shop-header__logo-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-shop-header__logo-image {
  width: 32px;
  height: auto;
  display: block;
}

.block-shop-header__search {
  display: flex;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
  max-width: 620px;
  margin-inline: auto;
  gap: 6px;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--ib-line);
  border-radius: 14px;
  background: var(--ib-bg);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.block-shop-header__search:hover {
  border-color: var(--ib-accent);
}

.block-shop-header__search:focus-within {
  border-color: var(--ib-accent);
  box-shadow: 0 0 0 3px var(--ib-accent-soft, rgba(0, 143, 118, .12));
}

.block-shop-header__search::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  opacity: .45;
  background: currentColor;
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='m16 16 4.5 4.5' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='m16 16 4.5 4.5' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.block-shop-header__search-field {
  flex: 1;
  min-width: 0;
  padding: 9px 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  outline: none;
  appearance: none;
}

.block-shop-header__search-field::-webkit-search-cancel-button {
  appearance: none;
}

.block-shop-header__search-button {
  padding: 9px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--ib-fill, var(--ib-accent));
  color: var(--ib-fill-ink, var(--ib-accent-contrast));
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: filter .2s ease;
}

.block-shop-header__search-button:hover {
  filter: brightness(1.08);
}

.block-shop-header__actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 10px;
  margin-inline-start: auto;
}

.block-shop-header__tg {
  width: 40px;
  height: 40px;
}

.block-shop-header__account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 180px;
  color: var(--ib-fg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}

.block-shop-header__account:hover {
  color: var(--ib-accent-ink, var(--ib-accent));
}

.block-shop-header__account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ib-fill, var(--ib-accent));
  color: var(--ib-fill-ink, var(--ib-accent-contrast));
  transition: filter .2s ease;
}

.block-shop-header__account:hover .block-shop-header__account-icon {
  filter: brightness(1.08);
}

.block-shop-header__account-icon svg {
  width: 19px;
  height: 19px;
}

.block-shop-header__account-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-shop-header__cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 6px 4px 16px;
  border-radius: 14px;
  background: var(--ib-fill, var(--ib-accent));
  color: var(--ib-fill-ink, var(--ib-accent-contrast));
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .2s ease;
}

.block-shop-header__cart:hover {
  filter: brightness(1.08);
}

.block-shop-header__cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: inherit;
}

.block-shop-header__cart-icon svg {
  width: 24px;
  height: 24px;
}

.block-shop-header__cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ib-fill-ink, var(--ib-accent-contrast));
  color: var(--ib-accent-ink, var(--ib-accent));
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-sizing: content-box;
}

.block-shop-header__cart-count[hidden] {
  display: none;
}

.block-shop-header__bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  border-top: 1px solid var(--ib-line);
}

.block-shop-header__nav {
  flex: 1 1 auto;
  min-width: 0;
}

.block-shop-header__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.block-shop-header__menu-item {
  position: relative;
}

.block-shop-header__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-block: 13px;
  color: var(--ib-fg);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}

.block-shop-header__link:hover,
.block-shop-header__menu-item:focus-within > .block-shop-header__link {
  color: var(--ib-accent-ink, var(--ib-accent));
}

.block-shop-header__link-chevron {
  display: block;
  width: 16px;
  height: 16px;
  transition: transform .2s ease;
}

.block-shop-header__menu-item--parent:hover .block-shop-header__link-chevron,
.block-shop-header__menu-item--parent:focus-within .block-shop-header__link-chevron {
  transform: rotate(180deg);
}

.block-shop-header__dropdown {
  position: absolute;
  top: 100%;
  left: -14px;
  z-index: 45;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--ib-line);
  border-radius: 14px;
  background: var(--ib-bg);
  box-shadow: 0 18px 40px rgb(16 24 40 / .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.block-shop-header__menu-item--parent:hover .block-shop-header__dropdown,
.block-shop-header__menu-item--parent:focus-within .block-shop-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.block-shop-header__dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ib-fg);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.block-shop-header__dropdown-link:hover,
.block-shop-header__dropdown-link:focus-visible {
  background: var(--ib-bg-soft);
  color: var(--ib-accent-ink, var(--ib-accent));
}

.block-shop-header__city {
  flex: none;
}

.block-shop-header__city .geo-inline__control {
  padding: 6px 28px 6px 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.block-shop-header__city .geo-inline__control::after {
  right: 6px;
}

.block-shop-header__city .geo-inline__select {
  max-width: 180px;
  field-sizing: content;
}

@media (prefers-reduced-motion: reduce) {
  .block-shop-header__dropdown,
  .block-shop-header__link-chevron {
    transition: none;
  }
}

@media (max-width: 767px) {
  .block-shop-header__bar {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  .block-shop-header__city .geo-inline__phone {
    display: none;
  }
}

.block-shop-header__burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ib-line);
  border-radius: 50%;
  background: var(--ib-bg);
  color: var(--ib-fg);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.block-shop-header__burger:hover,
.block-shop-header__burger:focus-visible {
  border-color: var(--ib-accent);
  color: var(--ib-accent-ink, var(--ib-accent));
}

.block-shop-header__burger-glyph {
  display: block;
  width: 22px;
  height: 22px;
}

@media (max-width: 767px) {
  .block-shop-header__burger {
    display: inline-flex;
  }
}

.block-shop-header__drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(380px, 90vw);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ib-bg);
  color: var(--ib-fg);
  box-shadow: -18px 0 44px rgb(11 13 17 / .18);
  overflow: hidden;
}

.block-shop-header__drawer::backdrop {
  background: rgb(11 13 17 / .5);
  backdrop-filter: blur(2px);
}

.block-shop-header__drawer[open] {
  animation: ib-shop-drawer-in .34s var(--ib-ease, ease) both;
}

.block-shop-header__drawer[open]::backdrop {
  animation: ib-shop-drawer-fade .3s ease both;
}

.block-shop-header__drawer.is-closing {
  animation: ib-shop-drawer-out .26s cubic-bezier(.4, 0, 1, 1) both;
}

.block-shop-header__drawer.is-closing::backdrop {
  animation: ib-shop-drawer-fade .26s ease reverse both;
}

.block-shop-header__drawer-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.block-shop-header__drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 14px 10px 22px;
  border-bottom: 1px solid var(--ib-line);
}

.block-shop-header__drawer-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.block-shop-header__drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background .2s ease;
}

.block-shop-header__drawer-close:hover,
.block-shop-header__drawer-close:focus-visible {
  background: var(--ib-bg-soft);
}

.block-shop-header__drawer-glyph {
  display: block;
  width: 24px;
  height: 24px;
}

.block-shop-header__drawer-city {
  padding: 14px 22px;
  border-bottom: 1px solid var(--ib-line);
}

.block-shop-header__drawer-city .geo-inline__control {
  padding: 4px 28px 4px 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.block-shop-header__drawer-city .geo-inline__control::after {
  right: 6px;
}

.block-shop-header__drawer-nav {
  padding: 10px;
}

.block-shop-header__drawer-list,
.block-shop-header__drawer-sub {
  margin: 0;
  padding: 0;
  list-style: none;
}

.block-shop-header__drawer-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.block-shop-header__drawer-row .block-shop-header__drawer-link {
  flex: 1 1 auto;
  min-width: 0;
}

.block-shop-header__drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-radius: var(--ib-radius, 12px);
  background: none;
  color: var(--ib-fg);
  font: inherit;
  font-size: 17px;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.block-shop-header__drawer-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ib-muted);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.block-shop-header__drawer-link:hover,
.block-shop-header__drawer-link:focus-visible,
.block-shop-header__drawer-more:hover,
.block-shop-header__drawer-more:focus-visible {
  background: var(--ib-bg-soft);
  color: var(--ib-accent-ink, var(--ib-accent));
}

.block-shop-header__drawer-chevron {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  transition: transform .2s ease;
}

[aria-expanded="true"] > .block-shop-header__drawer-chevron {
  transform: rotate(180deg);
}

.block-shop-header__drawer-sub {
  margin: 0 0 6px 12px;
  padding-left: 10px;
  border-left: 1px solid var(--ib-line);
}

.block-shop-header__drawer-sublink {
  display: block;
  padding: 10px 12px;
  border-radius: var(--ib-radius, 12px);
  color: var(--ib-muted);
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.block-shop-header__drawer-sublink:hover,
.block-shop-header__drawer-sublink:focus-visible {
  background: var(--ib-bg-soft);
  color: var(--ib-accent-ink, var(--ib-accent));
}

.block-shop-header__drawer-foot {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 18px 22px 24px;
  border-top: 1px solid var(--ib-line);
}

@keyframes ib-shop-drawer-in {
  from { transform: translateX(100%); }
  to { transform: none; }
}

@keyframes ib-shop-drawer-out {
  from { transform: none; }
  to { transform: translateX(100%); }
}

@keyframes ib-shop-drawer-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .block-shop-header__drawer[open],
  .block-shop-header__drawer[open]::backdrop,
  .block-shop-header__drawer.is-closing,
  .block-shop-header__drawer.is-closing::backdrop {
    animation: none;
  }

  .block-shop-header__drawer-chevron {
    transition: none;
  }
}

@media (max-width: 1100px) {
  .block-shop-header__account-label {
    display: none;
  }
}

@media (max-width: 900px) {
  .block-shop-header__row {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .block-shop-header__search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .block-shop-header__logo {
    flex: 1 1 0;
    min-width: 0;
    font-size: 17px;
  }

  .block-shop-header__actions {
    gap: 4px;
  }

  .block-shop-header__tg,
  .block-shop-header__cart-sum {
    display: none;
  }

  .block-shop-header__actions .block-header__list,
  .block-shop-header__account-icon,
  .block-shop-header__burger {
    width: 36px;
    height: 36px;
  }

  .block-shop-header__cart {
    min-height: 36px;
    padding: 2px;
    border-radius: 12px;
  }

  .block-shop-header__cart-icon {
    width: 32px;
    height: 32px;
  }

  .block-shop-header__burger-glyph {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 400px) {
  .block-shop-header__actions .block-header__list--compare {
    display: none;
  }
}

.block-header__list {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ib-line);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

.block-header__list:hover {
  border-color: var(--ib-accent);
  color: var(--ib-accent-ink, var(--ib-accent));
}

.block-header__list-icon {
  width: 17px;
  height: 17px;
  background: currentColor;
}

.block-header__list--wishlist .block-header__list-icon {
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4h10a1 1 0 0 1 1 1v15l-6-4-6 4V5a1 1 0 0 1 1-1z' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4h10a1 1 0 0 1 1 1v15l-6-4-6 4V5a1 1 0 0 1 1-1z' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.block-header__list--compare .block-header__list-icon {
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 20V9M12 20V4M18 20v-7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 20V9M12 20V4M18 20v-7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.block-header__list .shop-list-count {
  position: absolute;
  top: -4px;
  right: -4px;
}

@media (max-width: 767px), (pointer: coarse) {
  .block-shop-header__search-field {
    font-size: 16px;
  }
}

.block-shop-header__search[data-live-search] {
  position: relative;
}

.block-shop-header__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: min(75vh, 780px);
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--ib-line);
  border-radius: 14px;
  background: var(--ib-bg);
  box-shadow: 0 18px 40px rgb(16 24 40 / .14);
}

.block-shop-header__results[hidden] {
  display: none;
}

.block-shop-header__result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  color: var(--ib-fg);
  text-decoration: none;
}

.block-shop-header__result:hover,
.block-shop-header__result[aria-selected="true"],
.block-shop-header__result-more:hover,
.block-shop-header__result-more[aria-selected="true"] {
  background: var(--ib-bg-soft);
}

.block-shop-header__result-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--ib-bg-soft);
  object-fit: cover;
}

.block-shop-header__result-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.block-shop-header__result-category {
  color: var(--ib-muted);
  font-size: 12px;
}

.block-shop-header__result-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.block-shop-header__result-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.block-shop-header__result-old {
  color: var(--ib-muted);
  font-size: 12px;
  font-weight: 400;
}

.block-shop-header__result-more {
  margin-top: 4px;
  padding: 12px 8px;
  border-top: 1px solid var(--ib-line);
  border-radius: 0 0 10px 10px;
  color: var(--ib-accent-ink, var(--ib-accent));
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.block-shop-header__search.is-searching .block-shop-header__search-field {
  background-image: linear-gradient(90deg, transparent, rgb(0 0 0 / .04), transparent);
  background-size: 200% 100%;
  animation: shop-search-wait 1s linear infinite;
}

@keyframes shop-search-wait {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .block-shop-header__search.is-searching .block-shop-header__search-field {
    animation: none;
  }
}
