@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  background: #fff;
  color: #141414;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  --page-surface: #fdfdfd;
  --home-card-surface: #ebebeb;
  --home-graphite: #2e2e2e;
  --home-dark-section-height: 310px;
  --home-accent: #f58634;
  --home-text-size: clamp(14px, 1.2vw, 16px);
  --home-heading-size: clamp(16px, 1.55vw, 20px);
  --home-header-row-height: 72px;
  --home-header-height: calc(2 * var(--home-header-row-height));
  --home-title-gap: clamp(22px, 2.5vw, 36px);
  scroll-padding-block-start: var(--home-header-height);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.site-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-page > main {
  flex: 1 0 auto;
}

.site-frame {
  width: min(1360px, calc(100% - 80px));
  min-width: 740px;
  margin-inline: auto;
}

.site-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: clamp(6px, .75vw, 12px) clamp(10px, 1.45vw, 20px);
  background: var(--home-card-surface);
  color: #141414;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

.site-card > :is(h2, h3, p) {
  margin: 0;
}

.site-card > :is(h2, h3) {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-card > p {
  color: #444;
  font-size: var(--home-text-size);
  font-weight: 500;
  line-height: 1.3;
}

.site-card:is(:hover, :focus-visible) {
  background: var(--home-graphite);
  color: #fff;
}

.site-card:is(:hover, :focus-visible) > p {
  color: inherit;
}

.home-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  min-height: var(--home-header-height);
  background: #fff;
  font-size: var(--home-text-size);
  font-weight: 500;
}

.home-header__main,
.home-header__secondary {
  display: grid;
  min-height: var(--home-header-row-height);
  align-items: center;
  column-gap: clamp(12px, 1.6vw, 24px);
}

.home-header__main {
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  padding-inline: clamp(16px, 2vw, 28px);
  background: var(--home-graphite);
  color: #fff;
}

.home-header__secondary {
  grid-template-columns: minmax(0, 1fr) min(49%, 620px) minmax(0, 1fr);
}

.home-header__catalog-actions,
.home-header__secondary .collection-actions {
  gap: clamp(12px, 1.7vw, 24px);
}

.home-header__catalog-actions {
  display: flex;
  align-items: center;
  justify-self: start;
}

@media (max-width: 900px) {
  .home-header__catalog-actions {
    gap: 8px;
  }
}

.home-header__secondary .collection-actions {
  justify-self: end;
}

.home-header__catalog {
  position: relative;
}

.home-header__catalog-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: inherit;
  white-space: nowrap;
}

.home-header__catalog:hover .home-header__catalog-link {
  color: var(--home-accent);
}

.home-header__catalog-sections {
  position: absolute;
  inset: 100% auto auto 0;
  z-index: 3;
  display: none;
  width: max-content;
  min-width: 210px;
  max-width: 320px;
  max-height: min(340px, calc(100vh - var(--home-header-height)));
  overflow: auto;
  border: 1px solid #dedede;
  background: #fff;
  box-shadow: 0 10px 22px rgb(0 0 0 / 12%);
}

.home-header__catalog:not([data-dismissed]):is(:hover, :focus-within) .home-header__catalog-sections {
  display: grid;
}

.home-header__catalog-section {
  padding: 11px 14px;
  color: inherit;
}

.home-header__catalog-section + .home-header__catalog-section {
  border-block-start: 1px solid #ebebeb;
}

.home-header__catalog-section:hover {
  background: var(--home-graphite);
  color: #fff;
}

.home-header a.home-header__catalog-section:focus-visible {
  outline-offset: -3px;
}

.home-header__action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.home-header__action:hover {
  color: var(--home-accent);
}

.home-header__action .collection-count {
  position: static;
}

.home-header a {
  text-decoration: none;
}

.home-header :is(a, .home-header__action):focus-visible {
  outline: 2px solid #141414;
  outline-offset: 4px;
}

.home-header__main a:focus-visible {
  outline-color: currentColor;
}

.home-header__logo {
  width: clamp(150px, 16.5vw, 235px);
  max-width: 100%;
}

.home-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.home-header__menu {
  display: flex;
  align-items: center;
  column-gap: clamp(12px, 2.2vw, 32px);
}

.home-header__menu > * {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: inherit;
  white-space: nowrap;
}

.home-header__contacts {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(12px, 1.55vw, 24px);
}

.home-header__contact {
  display: grid;
  gap: 3px;
  color: inherit;
  font-size: clamp(14px, 1.1vw, 16px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.home-header__contact span {
  color: #d7d7d7;
  font-size: 12px;
}

.home-header__menu > :hover,
.home-header__menu > [aria-current],
.home-header__contact:hover,
.home-header__contact:hover span {
  color: var(--home-accent);
}

@media (max-width: 1050px) {
  .home-header__contacts {
    display: grid;
    justify-items: start;
    gap: 4px;
  }

  .home-header__contact {
    gap: 1px;
  }
}

.home-search {
  position: relative;
  display: flex;
  grid-column: 2;
  min-width: 0;
}

.home-search__input {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding-inline: 14px;
  border: 1px solid #141414;
  border-radius: 0;
  background: #fff;
  color: inherit;
  font: inherit;
}

.home-search__input::placeholder {
  color: #555;
}

.home-search__input:focus {
  border-color: var(--home-accent);
  outline: none;
}

.home-search__input--custom-clear {
  appearance: none;
  padding-inline-end: 40px;
}

.home-search__input--custom-clear::-webkit-search-cancel-button {
  display: none;
}

.home-search__clear {
  position: absolute;
  inset-block: 1px;
  inset-inline-end: 1px;
  display: grid;
  width: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--home-graphite);
  cursor: pointer;
}

.home-search__clear[hidden] {
  display: none;
}

.home-search__clear::before,
.home-search__clear::after {
  grid-area: 1 / 1;
  width: 13px;
  height: 1px;
  background: currentColor;
  content: "";
}

.home-search__clear::before {
  transform: rotate(45deg);
}

.home-search__clear::after {
  transform: rotate(-45deg);
}

.home-search__clear:hover {
  color: var(--home-accent);
}

.home-search button:focus-visible {
  z-index: 1;
  outline: 2px solid var(--home-graphite);
  outline-offset: 2px;
}

.home-search .home-search__clear:focus-visible {
  outline-offset: -3px;
}

.home-search .search__suggestions {
  position: absolute;
  inset: calc(100% + 6px) 0 auto;
  z-index: 2;
  max-height: min(490px, calc(100vh - 130px));
  overflow: auto;
  border: 1px solid #dedede;
  background: #fff;
  box-shadow: 0 10px 22px rgb(0 0 0 / 12%);
}

.home-search .search-suggestion {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-block-end: 1px solid #ebebeb;
  color: inherit;
}

.home-search .search-suggestion:is(:hover, :focus-visible, .is-active) {
  background: var(--home-card-surface);
}

.home-search .search-suggestion img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.home-search .search-suggestion__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-search .search-suggestion__sku {
  display: block;
  color: #555;
  font-size: .82em;
}

.home-search .search-suggestion__price {
  font-size: .9em;
  white-space: nowrap;
}

.home-search .search__all {
  width: 100%;
  padding: 12px;
  border: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.home-search .search__all:hover {
  background: var(--home-card-surface);
}

.home-search :is(.search__empty, .search__loading) {
  margin: 0;
  padding: 14px;
}

.home-search .search__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
