/* Fixed storefront header. The public site has one deliberate composition. */
.store-header {
  padding-block: 14px 8px;
}

.store-header__bar {
  position: relative;
  gap: 10px;
  min-height: 64px;
  padding: 8px 10px 8px 12px;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .10);
}

.store-header .store-brand {
  flex: 0 1 auto;
  min-width: 0;
  margin-inline-end: 10px;
}

.store-header .store-brand__mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 9px;
  font-size: 15px;
}

.store-header .store-brand__name {
  max-width: 180px;
  font-size: 17px;
}

.store-header__catalog {
  min-height: 38px;
  flex: 0 0 auto;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 14px;
}

.store-header__catalog svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.store-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin-inline-start: 0;
  margin-inline-end: auto;
}

.store-header__nav a {
  padding: 9px 8px;
  border-radius: 8px;
  color: #b6bdc7;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
}

.store-header__nav a:hover,
.store-header__nav a:focus-visible {
  background: var(--site-surface-raised);
  color: var(--site-text);
}

.store-header__nav a[aria-current="page"] {
  background: rgba(139, 200, 80, .10);
  color: var(--site-accent);
}

.store-header__nav a[aria-current="page"]:hover,
.store-header__nav a[aria-current="page"]:focus-visible {
  background: rgba(139, 200, 80, .14);
  color: var(--site-accent-hover);
}

.store-header__phone[hidden] {
  display: none !important;
}

.store-header__phone {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 9px;
  color: #d9dee5;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms var(--site-ease), color 120ms var(--site-ease);
}

.store-header__phone:hover,
.store-header__phone:focus-visible {
  background: var(--site-surface-raised);
  color: var(--site-text);
}

.store-header__phone-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  background: rgba(139, 200, 80, .10);
  color: var(--site-accent);
  place-items: center;
}

.store-header__phone-icon svg {
  width: 15px;
  height: 15px;
}

.store-header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.store-header__services {
  display: flex;
  align-items: center;
  gap: 6px;
}

.store-header__service,
.store-search-trigger {
  display: inline-grid;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: var(--site-surface);
  color: var(--site-text-muted);
  cursor: pointer;
  place-items: center;
  transition: border-color 120ms var(--site-ease), background-color 120ms var(--site-ease), color 120ms var(--site-ease), transform 120ms var(--site-ease);
}

.store-header__service:hover,
.store-header__service:focus-visible,
.store-search-trigger:hover,
.store-search-trigger:focus-visible {
  border-color: var(--site-border-strong);
  background: var(--site-surface-raised);
  color: var(--site-text);
}

.store-header__service:active,
.store-search-trigger:active {
  transform: scale(.96);
}

.store-header__service svg,
.store-search-trigger svg {
  width: 18px;
  height: 18px;
}

.store-language-trigger {
  display: inline-flex;
  width: auto;
  min-width: 54px;
  flex-basis: auto;
  gap: 5px;
  padding-inline: 10px 8px;
  color: var(--site-text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
}

.store-language-trigger__chevron {
  width: 14px !important;
  height: 14px !important;
  transition: transform 120ms var(--site-ease);
}

.store-language-trigger[aria-expanded="true"] .store-language-trigger__chevron {
  transform: rotate(180deg);
}

.store-language-menu {
  position: fixed;
  z-index: 1300;
  width: 176px;
  max-width: calc(100vw - 24px);
  padding: 5px;
  border: 1px solid var(--site-border-strong);
  border-radius: 11px;
  background: #101318;
  color: var(--site-text);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .42);
}

.store-language-menu[hidden] {
  display: none !important;
}

.store-language-menu__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--site-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: start;
  transition: background-color 120ms var(--site-ease), color 120ms var(--site-ease), transform 120ms var(--site-ease);
}

.store-language-menu__item.is-active {
  color: var(--site-accent);
}

/* Like every single-choice dropdown: the highlighted item is filled with
   the accent, the current one is accent text with a check. */
.store-language-menu__item:hover,
.store-language-menu__item:focus-visible {
  background: var(--site-accent);
  color: var(--site-accent-contrast);
  outline: 0;
}

.store-language-menu__item:active {
  transform: scale(.98);
}

.store-language-menu__item svg {
  width: 16px;
  height: 16px;
  color: currentColor;
  opacity: 0;
  stroke-width: 2.3;
}

.store-language-menu__item.is-active svg {
  opacity: 1;
}

.store-account-trigger,
.store-cart-trigger,
.store-search-trigger {
  width: 40px;
}

.store-cart-trigger {
  position: relative;
}

.store-cart-count {
  position: absolute;
  inset-block-start: -5px;
  inset-inline-end: -5px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border: 2px solid #101318;
  border-radius: 999px;
  background: #0b0d10;
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  place-items: center;
}

.store-cart-count[hidden] {
  display: none !important;
}

/* A cart with items is filled with the accent; the count bubble is black. */
.store-cart-trigger:has(.store-cart-count:not([hidden])),
.store-cart-trigger:has(.store-cart-count:not([hidden])).is-cart-updated {
  border-color: var(--site-accent);
  background: var(--site-accent);
  color: var(--site-accent-contrast);
}

.store-cart-trigger:has(.store-cart-count:not([hidden])):hover,
.store-cart-trigger:has(.store-cart-count:not([hidden])):focus-visible {
  border-color: var(--site-accent-hover);
  background: var(--site-accent-hover);
  color: var(--site-accent-contrast);
}

.store-cart-trigger:has(.store-cart-count:not([hidden])):focus-visible {
  outline: 2px solid rgba(139, 200, 80, .45);
  outline-offset: 2px;
}

.store-cart-trigger.is-cart-updated {
  border-color: var(--site-accent);
  background: rgba(139, 200, 80, .12);
  color: var(--site-accent);
  box-shadow: 0 0 0 3px rgba(139, 200, 80, .12);
  animation: store-cart-added 300ms cubic-bezier(0.2, 0, 0, 1);
}

.store-cart-trigger.is-cart-updated .store-cart-count {
  animation: store-cart-count-added 300ms cubic-bezier(0.2, 0, 0, 1);
}


@keyframes store-cart-added {
  0% { transform: scale(1); }
  48% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes store-cart-count-added {
  0% { transform: scale(1); }
  48% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .store-cart-trigger.is-cart-updated,
  .store-cart-trigger.is-cart-updated .store-cart-count {
    animation: none;
  }

}

.store-search--expanded[hidden] {
  display: none !important;
}

.store-search--expanded {
  position: relative;
  z-index: 5;
  width: auto;
  min-width: 0;
  min-height: 40px;
  flex: 1 1 auto;
  grid-template-columns: 18px minmax(0, 1fr) 32px 32px;
  margin-inline-start: 0;
  padding-inline: 13px 5px;
  border-color: var(--site-border-strong);
  border-radius: 10px;
  background: var(--site-surface);
  box-shadow: none;
  transform-origin: right center;
  animation: store-search-open 180ms cubic-bezier(0.2, 0, 0, 1);
}

.store-search--expanded .store-search__icon {
  transition: color 120ms var(--site-ease);
}

.store-search--expanded:focus-within .store-search__icon {
  color: var(--site-accent);
}

.store-search--expanded:focus-within {
  border-color: var(--site-accent);
  box-shadow: none;
}

.store-search--expanded .store-search__input {
  font-size: 14px;
}

.store-search--expanded .store-search__input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
}

.store-search__close {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--site-text-muted);
  cursor: pointer;
  place-items: center;
  transition: background-color 120ms var(--site-ease), color 120ms var(--site-ease);
}

.store-search__close:hover {
  background: var(--site-surface-soft);
  color: var(--site-text);
}

.store-search__close svg {
  width: 16px;
  height: 16px;
}

.store-search-results[hidden] {
  display: none !important;
}

.store-search-results {
  position: absolute;
  z-index: 90;
  inset-block-start: calc(100% + 8px);
  inset-inline: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  overflow: hidden;
  border: 1px solid #343941;
  border-radius: 10px;
  background: #171a1f;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .65), 0 20px 40px rgba(0, 0, 0, .35);
  animation: store-search-results-open 160ms cubic-bezier(0.2, 0, 0, 1);
}

@keyframes store-search-open {
  from { opacity: 0; transform: scaleX(.96); }
  to { opacity: 1; transform: none; }
}

@keyframes store-search-results-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .store-search--expanded,
  .store-search-results {
    animation: none;
  }
}

.store-search-results__body {
  display: grid;
  gap: 2px;
  max-height: min(480px, calc(100dvh - 170px));
  overflow-y: auto;
  scrollbar-width: none;
}

.store-search-results__body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Rows (products and models): a soft fill on hover, an accent ring for
   the keyboard - no border or shadow of their own, so the list reads as
   one surface rather than a stack of boxes. */
.store-search-results__row,
.store-search-results__model {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 7px 10px 7px 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--site-text);
  text-decoration: none;
  outline: 0;
  transition: background-color 120ms var(--site-ease);
}

.store-search-results__row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 58px;
}

.store-search-results__model {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  padding-inline-start: 12px;
}

@media (hover: hover) {
  .store-search-results__row:hover,
  .store-search-results__model:hover {
    background: var(--site-surface-raised);
  }
}

.store-search-results__row:focus-visible,
.store-search-results__model:focus-visible {
  background: var(--site-surface-raised);
  box-shadow: inset 0 0 0 2px var(--site-accent);
}

/* The hovered / focused row's name turns accent. */
.store-search-results__name,
.store-search-results__model-name {
  transition: color 120ms var(--site-ease);
}

@media (hover: hover) {
  .store-search-results__row:hover .store-search-results__name,
  .store-search-results__model:hover .store-search-results__model-name {
    color: var(--site-accent);
  }
}

.store-search-results__row:focus-visible .store-search-results__name,
.store-search-results__model:focus-visible .store-search-results__model-name {
  color: var(--site-accent);
}

.store-search-results__media {
  display: grid;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--site-surface-light);
  color: var(--site-text-subtle);
  place-items: center;
}

.store-search-results__media img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.store-search-results__media svg {
  width: 22px;
  height: 22px;
}

.store-search-results__info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.store-search-results__name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--site-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.store-search-results__sku {
  overflow: hidden;
  color: var(--site-text-subtle);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Search result meta is one compact right-aligned column. Keeping
   old price, current price and stock in the same grid column guarantees
   that every price is visually centered over the stock badge, with or
   without a discount. */
.store-search-results__meta {
  display: grid;
  grid-template-columns: max-content;
  min-width: 108px;
  justify-content: end;
  justify-items: center;
  align-content: center;
  gap: 4px;
}

.store-search-results__old-price {
  color: var(--site-text-subtle);
  font-size: 11px;
  line-height: 1;
  text-decoration: line-through;
  white-space: nowrap;
}

.store-search-results__price {
  color: var(--site-text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.store-search-results__price.is-discounted {
  color: var(--site-danger);
}

/* Compact storefront stock badge for search suggestions. */
.store-search-results__stock {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--site-accent);
  color: var(--site-accent-contrast);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.store-search-results__stock.is-unavailable {
  background: var(--site-danger);
  color: #2a0b0d;
}

/* "Показать все результаты": pinned to the bottom of the scrolling list. */
.store-search-results__all {
  position: sticky;
  inset-block-end: -1px;
  z-index: 1;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-block-start: 4px;
  padding: 8px 10px;
  border-block-start: 1px solid var(--site-border);
  background: #171a1f;
  color: var(--site-accent);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  outline: 0;
  transition: color 120ms var(--site-ease), box-shadow 120ms var(--site-ease);
}

.store-search-results__all:hover {
  color: var(--site-accent-hover);
}

.store-search-results__all:focus-visible {
  box-shadow: inset 0 0 0 2px var(--site-accent);
  border-radius: 8px;
}

.store-search-results__all svg {
  width: 15px;
  height: 15px;
}

/* Model search: a "Поиск по модели" heading, then each model on top with
   "Запчасти для стиральной машины" under it and an arrow that wakes up on
   hover / focus. */
.store-search-results__heading {
  margin: 0;
  padding: 8px 12px 4px;
  color: var(--site-text-subtle);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.store-search-results__model-name {
  min-width: 0;
  color: var(--site-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.store-search-results__model-type {
  color: var(--site-text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.store-search-results__arrow {
  display: grid;
  color: var(--site-text-subtle);
  place-items: center;
  transition: color 120ms var(--site-ease), translate 120ms var(--site-ease);
}

.store-search-results__arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-search-results__model:hover .store-search-results__arrow,
.store-search-results__model:focus-visible .store-search-results__arrow {
  color: var(--site-accent);
  translate: 2px 0;
}

.store-search-results__status {
  margin: 0;
  padding: 22px 14px;
  color: var(--site-text-muted);
  font-size: 13px;
  text-align: center;
}

.store-header__bar.is-search-open > .store-header__catalog,
.store-header__bar.is-search-open > .store-header__nav,
.store-header__bar.is-search-open > .store-header__phone,
.store-header__bar.is-search-open > .store-header__actions {
  display: none;
}

.store-header__bar.is-search-open > .store-brand {
  flex: 0 0 auto;
  margin-inline-end: 8px;
}

@media (max-width: 1180px) {
  .store-header__nav a {
    padding-inline: 6px;
    font-size: 13px;
  }

  .store-header__phone {
    padding-inline: 6px;
    font-size: 12px;
  }
}

@media (max-width: 980px) {
  .store-header__nav {
    display: none;
  }

  .store-header .store-brand {
    margin-inline-end: auto;
  }
}

@media (max-width: 700px) {
  .store-search-results {
    position: fixed;
    inset-block-start: 76px;
    inset-inline: 10px;
    width: auto;
  }

  .store-search-results__row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .store-search-results__media {
    width: 40px;
    height: 40px;
  }

  .store-search-results__stock {
    display: none;
  }

  .store-search-results__meta {
    min-width: 76px;
  }

  .store-header {
    padding-block-start: 10px;
  }

  .store-header__bar {
    gap: 7px;
    min-height: 60px;
    padding: 7px;
  }

  .store-header .store-brand {
    margin-inline-end: auto;
  }

  .store-header .store-brand__name {
    max-width: 110px;
    font-size: 15px;
  }

  .store-header__catalog {
    min-height: 38px;
    padding-inline: 11px;
  }

  .store-header__phone {
    width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
  }

  .store-header__phone > span:last-child {
    display: none;
  }

  .store-header__phone-icon {
    background: transparent;
  }

  .store-language-trigger {
    min-width: 48px;
    padding-inline: 8px;
  }

  .store-language-trigger svg {
    display: none;
  }
}

@media (max-width: 560px) {
  .store-header .store-brand__name {
    display: none;
  }

  .store-header .store-brand {
    margin-inline-end: 2px;
  }
}

@media (max-width: 460px) {
  .store-header__catalog svg {
    display: none;
  }

  .store-header__catalog {
    padding-inline: 10px;
  }

  .store-language-trigger {
    min-width: 40px;
    padding-inline: 7px;
  }
}

@media (max-width: 420px) {
  .store-header__bar.is-search-open > .store-brand {
    display: none;
  }

  .store-search--expanded {
    width: 100%;
  }
}
