.site-header {
  position: relative;
  z-index: 5;
  background: var(--paper);
}

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto minmax(148px, 1fr);
  align-items: center;
  gap: clamp(1rem, 2.1vw, 2.4rem);
  width: min(calc(100% - 2 * var(--page-gutter)), 1500px);
  min-height: clamp(76px, 6.6vw, 94px);
  margin-inline: auto;
}

.site-header__brand-group {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.1vw, 2.2rem);
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  color: var(--charcoal);
}

.brand__wordmark {
  font-family: var(--display);
  font-size: clamp(2.45rem, 3.05vw, 3.25rem);
  font-weight: 430;
  letter-spacing: -0.065em;
  line-height: 1;
}

.brand__tagline {
  color: var(--walnut);
  font-family: "Segoe Script", "Bradley Hand", cursive;
  font-size: clamp(0.88rem, 1.1vw, 1.02rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.25;
  transform: rotate(-4deg);
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 1.8vw, 1.8rem);
}

.primary-nav :where(a, .primary-nav__about) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--charcoal);
  font-size: clamp(0.76rem, 0.92vw, 0.88rem);
  transition: color var(--duration-short) var(--ease-gentle);
}

.primary-nav a:hover {
  color: var(--walnut);
}

.primary-nav__about[aria-disabled="true"] {
  cursor: default;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: clamp(0.3rem, 0.8vw, 0.75rem);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 44px;
  min-height: 44px;
}

.search-form input {
  position: absolute;
  z-index: 2;
  right: calc(100% - 1px);
  width: 0;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: var(--paper);
  font-size: var(--text-sm);
  transition: width var(--duration-short) var(--ease-gentle), opacity var(--duration-short) var(--ease-gentle);
}

.search-form[data-open="true"] input {
  width: min(15rem, 45vw);
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--walnut);
  opacity: 1;
  pointer-events: auto;
}

.search-form input:focus {
  outline: 0;
}

.search-form input::placeholder {
  color: var(--muted);
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.header-action {
  color: var(--charcoal);
}

.header-action:hover:not(:disabled) {
  color: var(--walnut);
}

.header-action:disabled {
  color: var(--charcoal);
  opacity: 1;
  cursor: default;
}

.header-action__count {
  position: absolute;
  top: 2px;
  right: 0;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding-inline: 0.18rem;
  border-radius: 50%;
  background: var(--brick);
  color: var(--paper-light);
  font-size: 0.62rem;
}

.menu-toggle {
  display: none;
}

.menu-toggle__glyph {
  display: grid;
  gap: 5px;
  width: 20px;
}

.menu-toggle__glyph span {
  display: block;
  height: 1px;
  background: var(--walnut);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  min-height: 50px;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--walnut);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--duration-short) var(--ease-gentle), color var(--duration-short) var(--ease-gentle), border-color var(--duration-short) var(--ease-gentle), transform var(--duration-short) var(--ease-gentle);
  cursor: pointer;
}

.button__arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.button--primary {
  background: var(--walnut);
  color: var(--paper-light);
}

.button--primary:hover {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--paper-light);
}

.button--outline {
  background: transparent;
  color: var(--walnut);
}

.button--outline:hover {
  background: var(--walnut);
  color: var(--paper-light);
}

.button--light {
  border-color: var(--paper-light);
  background: var(--paper-light);
  color: var(--charcoal);
}

.button--light:hover {
  border-color: var(--brass);
  background: var(--brass);
  color: var(--charcoal);
}

.button:disabled,
.button[disabled] {
  border-color: #a99b8e;
  background: #bcb1a7;
  color: #514a44;
  cursor: not-allowed;
}

.product-card {
  min-width: 0;
}

.product-card__image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.product-card__image-link {
  display: block;
  overflow: hidden;
}

.product-card__image {
  width: 100%;
  aspect-ratio: 0.94;
  object-fit: cover;
  transition: transform 500ms var(--ease-gentle);
}

.product-card:hover .product-card__image {
  transform: scale(1.025);
}

.product-card__edition {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  padding: 0.3rem 0.48rem;
  background: rgb(248 241 231 / 88%);
  color: var(--walnut);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.favorite-toggle {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(107 79 58 / 30%);
  border-radius: 50%;
  background: rgb(248 241 231 / 92%);
  color: var(--walnut);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--duration-short) var(--ease-gentle), color var(--duration-short) var(--ease-gentle), transform var(--duration-short) var(--ease-gentle);
}

.favorite-toggle:hover {
  transform: translateY(-1px);
}

.favorite-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.favorite-toggle[aria-pressed="true"] {
  background: var(--brick);
  color: var(--paper-light);
}

.product-card__details {
  padding-top: 0.75rem;
}

.product-card__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.7rem;
}

.product-card__heading h3 {
  margin-bottom: 0;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
}

.product-card__heading h3 a:hover {
  color: var(--walnut);
}

.product-card__price {
  display: grid;
  justify-items: end;
  gap: 0.06rem;
  flex: 0 0 auto;
  color: var(--walnut);
  text-align: right;
}

.price-label {
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.2;
}

.price-value {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.product-card__meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.45;
}

@media (max-width: 1120px) and (min-width: 921px) {
  .site-header__inner {
    grid-template-columns: minmax(285px, 1fr) auto auto;
    gap: 0.55rem;
  }

  .primary-nav {
    gap: 0.7rem;
  }

  .primary-nav :where(a, .primary-nav__about) {
    font-size: 0.73rem;
  }

  .site-header__brand-group {
    gap: 1rem;
  }

  .brand__wordmark {
    font-size: 2.05rem;
  }

  .brand__tagline {
    font-size: 0.8rem;
  }

  .header-tools {
    gap: 0;
  }

  .header-tools .icon-button {
    width: 38px;
  }
}

@media (max-width: 920px) {
  .site-header__inner {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    width: calc(100% - 2 * clamp(0.75rem, 4vw, 1.4rem));
    min-height: 68px;
    gap: 0.35rem;
  }

  .menu-toggle {
    display: inline-grid;
    grid-column: 1;
    grid-row: 1;
  }

  .site-header__brand-group {
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
  }

  .site-header .brand {
    justify-content: center;
  }

  .brand__tagline {
    display: none;
  }

  .brand__wordmark {
    font-size: clamp(1.35rem, 5vw, 1.8rem);
  }

  .primary-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    align-items: stretch;
    padding: 0.5rem var(--page-gutter) 1rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 14px 20px rgb(45 28 16 / 8%);
  }

  .primary-nav[data-nav-ready="true"] {
    display: none;
  }

  .primary-nav[data-nav-ready="true"][data-open="true"] {
    display: grid;
  }

  .primary-nav :where(a, .primary-nav__about) {
    min-height: 48px;
    border-bottom: 1px solid rgb(107 79 58 / 12%);
  }

  .header-tools {
    grid-column: 3;
    grid-row: 1;
    gap: 0.1rem;
  }

  .search-form {
    width: 42px;
  }

  .search-form input {
    position: fixed;
    top: 68px;
    left: clamp(0.75rem, 4vw, 1.4rem);
    right: clamp(0.75rem, 4vw, 1.4rem);
    z-index: 6;
    width: auto;
    min-height: 46px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    background: var(--paper-light);
    box-shadow: 0 10px 20px rgb(45 28 16 / 9%);
    transform: translateY(-6px);
    transition: opacity var(--duration-short), transform var(--duration-short);
  }

  .search-form[data-open="true"] input#site-search {
    width: auto;
    min-width: 0;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
  }

  .search-form:not([data-open="true"]) input#site-search {
    visibility: hidden;
  }

  .header-account,
  .header-tools > .header-action:nth-of-type(1) {
    display: none;
  }

  .header-tools > .header-action:last-child {
    width: 42px;
  }
}
