/* One storefront header shared by the home, catalog, cart and information pages. */
header .topbar {
  justify-content: space-between;
}

header .topbar-phone {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

header .mainnav {
  gap: 10px;
  border-bottom: 1px solid #e6ded2;
}

header .brand img {
  width: 176px;
  height: 50px;
  object-fit: cover;
  object-position: center 46%;
  background: #201910;
  box-shadow: none;
}

header .brand,
header .catalog-button,
header .header-actions {
  flex: 0 0 auto;
}

header .catalog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding-inline: 15px;
  border-radius: 14px;
  font-size: 14px;
}

header .catalog-button .catalog-button-label {
  margin: 0;
  font-size: inherit;
  line-height: 1;
}

header .product-nav {
  min-width: 0;
  gap: 3px;
  justify-content: center;
}

header .product-nav a {
  padding: 9px 7px;
  border: 1px solid #e6ded2;
  border-radius: 11px;
  background: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

header .product-nav a:hover,
header .product-nav a.active {
  background: #211a13;
  border-color: #211a13;
  color: #fff;
  box-shadow: 0 6px 16px rgba(16, 17, 20, .12);
}

header .header-actions {
  margin-left: auto;
}

header .header-actions .icon-button {
  color: #211a13;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

header .header-actions .header-action-icon {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

header .header-actions .icon-button:hover {
  border-color: #211a13;
  background: #211a13;
  color: #fff;
  transform: translateY(-1px);
}

header .header-actions .icon-button:focus-visible {
  outline: 3px solid rgba(182, 123, 48, .22);
  outline-offset: 2px;
}

header .header-actions .account-icon.active {
  color: #fff;
}

header .header-actions #account-avatar {
  display: grid;
  place-items: center;
}

@media (max-width: 1200px) {
  header .product-nav {
    display: none;
  }
}

/* The home-page search is a real form: Enter and the visible button open filtered results. */
.search-panel {
  align-items: center;
  gap: 6px;
}

.search-panel input {
  min-width: 0;
}

.search-panel .search-submit {
  min-height: 42px;
  width: auto;
  padding: 0 16px;
  border-radius: 10px;
  background: #211a13;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.search-panel .search-close {
  display: grid;
  place-items: center;
}

@media (max-width: 700px) {
  body {
    overflow-x: hidden;
  }

  header .topbar,
  header .mainnav {
    width: calc(100% - 24px);
  }

  header .topbar {
    gap: 8px;
  }

  header .topbar > a:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  header .topbar .topbar-phone {
    display: inline-flex;
    font-size: 10px;
  }

  header .mainnav {
    display: grid;
    grid-template-areas: "catalog brand actions";
    grid-template-columns: 52px 120px minmax(104px, 1fr);
    gap: 9px;
    height: 72px;
  }

  header .mainnav::before {
    height: 72px;
  }

  header .brand,
  header .catalog-button {
    min-width: 0;
  }

  header .brand {
    grid-area: brand;
    justify-self: start;
    width: min(100%, 164px);
  }

  header .brand img {
    width: 100%;
    height: 42px;
    object-fit: contain;
  }

  header .catalog-button {
    grid-area: catalog;
    width: 52px;
    height: 48px;
    gap: 0;
    padding: 0;
    border: 1px solid #e6ded2;
    border-radius: 14px;
    background: #f6ecde;
    color: #211a13;
  }

  header .catalog-button .catalog-button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  header .catalog-menu-icon {
    width: 23px;
    height: 19px;
    flex-basis: 23px;
  }

  header .header-actions {
    grid-area: actions;
    gap: 4px;
  }

  header .header-actions .icon-button {
    display: grid;
    width: clamp(34px, 9.3vw, 40px);
    height: clamp(34px, 9.3vw, 40px);
    border-radius: 12px;
    font-size: 18px;
  }

  header .header-actions .account-icon {
    display: none;
  }

  header .cart-icon b {
    top: -6px;
    right: -4px;
  }

  .search-panel {
    left: 12px;
    right: 12px;
    top: 116px;
  }

  .search-panel input {
    width: auto;
    flex: 1;
  }
}

@media (max-width: 390px) {
  header .topbar > a:first-child {
    max-width: 55%;
  }

  header .topbar .topbar-phone {
    font-size: 9px;
  }
}

@media (max-width: 350px) {
  header .mainnav {
    grid-template-columns: 48px minmax(84px, 1fr) auto;
    gap: 6px;
  }

  header .catalog-button {
    width: 48px;
  }

  header .catalog-menu-icon {
    width: 13px;
    flex-basis: 13px;
  }

  header .header-actions {
    gap: 3px;
  }
}

/* Mobile controls meet the 48px touch-target recommendation without crowding. */
@media (max-width: 700px) {
  header .topbar { min-height: 48px; height: 48px; }
  header .topbar::before { height: 48px; }
  header .topbar > a { display: inline-flex; align-items: center; min-height: 48px; }
  header .mainnav {
    grid-template-columns: 52px 120px minmax(104px, 1fr);
    gap: 6px;
    height: 80px;
  }
  header .mainnav::before { height: 80px; }
  header .brand img,
  header .catalog-button { height: 48px; }
  header .header-actions { gap: 8px; }
  header .header-actions .icon-button,
  header .header-actions .icon-button:first-child {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
  header .header-actions .icon-button:first-child { display: grid; }
  header .header-actions .account-icon { display: none; }
}

@media (max-width: 350px) {
  header .mainnav {
    grid-template-columns: 48px 96px minmax(96px, 1fr);
    gap: 6px;
  }
}

body.mobile-catalog-open {
  overflow: hidden;
}

.mobile-catalog-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.mobile-catalog-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-catalog-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 11, 13, .48);
  backdrop-filter: blur(5px);
}

.mobile-catalog-sheet {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(94vw, 430px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  border-radius: 0 24px 24px 0;
  background: #fff;
  box-shadow: 18px 0 50px rgba(0, 0, 0, .2);
  transform: translateX(-102%);
  transition: transform .28s cubic-bezier(.22, .78, .22, 1);
}

.mobile-catalog-menu.is-open .mobile-catalog-sheet {
  transform: translateX(0);
}

.mobile-catalog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e6e6e8;
}

.mobile-catalog-head > div {
  min-width: 0;
}

.mobile-menu-brand {
  display: block;
  width: min(220px, 62vw);
  height: 82px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 12px;
  background: #201910;
}

.mobile-menu-brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mobile-menu-location {
  display: grid;
  gap: 3px;
  color: #211a13;
}

.mobile-menu-location strong {
  font-size: 20px;
  line-height: 1.15;
}

.mobile-menu-location span {
  color: #8a8c92;
  font-size: 13px;
}

.mobile-catalog-close {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #dedfe2;
  border-radius: 50%;
  background: #f6ecde;
  color: #211a13;
  font-size: 30px;
  line-height: 1;
}

.mobile-menu-content {
  min-width: 0;
}

.mobile-menu-label {
  margin: 0 0 11px;
  color: #a4a5aa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.4px;
}

.mobile-menu-catalog-link {
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
  padding: 0 18px;
  border-radius: 18px;
  background: #111216;
  color: #fff;
}

.mobile-menu-catalog-link strong {
  font-size: clamp(15px, 4.4vw, 19px);
  line-height: 1.15;
}

.mobile-menu-catalog-link span {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: #2a2b2f;
  color: #d3d3d6;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-menu-sections {
  margin-bottom: 28px;
  border-top: 1px solid #e6ded2;
}

.mobile-menu-sections a,
.mobile-menu-city {
  display: flex;
  min-height: 53px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6ded2;
  color: #27282c;
  font-size: 18px;
  font-weight: 650;
}

.mobile-menu-city {
  margin-bottom: 28px;
}

.mobile-menu-city span {
  color: #8b8e96;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.mobile-menu-contacts {
  display: grid;
  gap: 9px;
  padding: 22px;
  border-radius: 22px;
  background: #0f1013;
  color: #fff;
}

.mobile-menu-contacts p {
  margin: 0 0 4px;
  color: #a7a8ad;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.4px;
}

.mobile-menu-contacts a {
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.mobile-menu-contacts span {
  color: #bfc0c4;
  font-size: 13px;
  line-height: 1.35;
}

.mobile-menu-sections a:focus-visible,
.mobile-menu-catalog-link:focus-visible,
.mobile-menu-location:focus-visible,
.mobile-menu-contacts a:focus-visible {
  outline: 3px solid rgba(190, 63, 59, .28);
  outline-offset: 3px;
}

.mobile-catalog-sheet a {
  -webkit-tap-highlight-color: transparent;
}

.mobile-catalog-sheet .sr-only {
  position: absolute;
  display: block;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 701px) {
  .mobile-catalog-menu {
    display: none;
  }
}

@media (max-width: 360px) {
  .mobile-catalog-sheet {
    padding-inline: 13px;
  }

  .mobile-menu-catalog-link {
    padding-inline: 14px;
  }

  .mobile-menu-catalog-link span {
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-catalog-menu,
  .mobile-catalog-sheet {
    transition: none;
  }
}

/* Include .shell so the shared layout outranks .catalog-page .mainnav.
   Reserve the same row for the logo and controls on every storefront page. */
@media (max-width: 700px) {
  body header .mainnav.shell {
    display: grid;
    grid-template-areas: "catalog brand actions";
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: 80px;
  }

  body header .mainnav.shell::before {
    height: 80px;
  }

  body header .mainnav .brand {
    grid-area: brand;
    justify-self: center;
    display: flex;
    width: 112px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 960 / 552;
    align-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: transparent;
    min-width: 0;
  }

  body header .mainnav .brand img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
  }

  body header .mainnav .catalog-button {
    grid-area: catalog;
    display: inline-flex;
    width: 52px;
    height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    overflow: visible;
    border: 1px solid #e6ded2;
    border-radius: 14px;
    background: #f6ecde;
    color: #211a13;
    box-shadow: none;
    font-size: 14px;
  }

  body header .mainnav .catalog-button .catalog-button-label {
    position: absolute;
    display: block;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body header .mainnav .catalog-menu-icon {
    width: 23px;
    height: 19px;
    flex-basis: 23px;
    color: #211a13;
  }

  body header .mainnav .header-actions {
    grid-area: actions;
    min-width: 0;
    gap: 8px;
  }

  body header .mainnav .header-actions .icon-button,
  body header .mainnav .header-actions .icon-button:first-child {
    display: grid;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 14px;
  }

  body header .mainnav .header-actions .account-icon {
    display: none;
  }

  body .search-panel {
    top: 140px;
  }
}

@media (max-width: 350px) {
  body header .mainnav.shell {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 6px;
  }

  body header .mainnav .catalog-button {
    width: 48px;
  }

  body header .mainnav .header-actions {
    gap: 4px;
  }

  body header .mainnav .header-actions .icon-button,
  body header .mainnav .header-actions .icon-button:first-child {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}
