.product-page {
  min-height: 100vh;
  background: var(--paper);
}

.product-header {
  position: relative;
  top: auto;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 233, .96);
}

.product-header .brand {
  justify-self: start;
}

.product-nav {
  justify-self: center;
}

.product-nav a,
.product-header-back {
  position: relative;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.product-nav a::after,
.product-header-back::after {
  content: '';
  position: absolute;
  right: 100%;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: currentColor;
  transition: right .3s var(--ease);
}

.product-nav a:hover::after,
.product-nav a:focus-visible::after,
.product-header-back:hover::after,
.product-header-back:focus-visible::after {
  right: 0;
}

.product-header-back {
  justify-self: end;
}

.product-loading {
  min-height: calc(100vh - 230px);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.product-loading[hidden],
.product-detail[hidden],
.product-error[hidden] {
  display: none;
}

.product-error {
  min-height: calc(100vh - 230px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 820px;
}

.product-error h1 {
  max-width: 700px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .95;
}

.product-error > p:not(.eyebrow) {
  margin: 28px 0;
  color: var(--muted);
  font-size: 16px;
}

.product-detail {
  min-height: calc(100vh - 136px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
}

.product-detail-media {
  position: relative;
  min-height: 680px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper-deep);
}

.product-detail-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset -1px 0 0 var(--line);
}

.product-detail-media img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 136px);
  object-fit: cover;
}

.product-back-mobile {
  display: none;
}

.product-detail-copy {
  align-self: center;
  max-width: 660px;
  padding: clamp(64px, 7vw, 120px) clamp(32px, 7vw, 112px);
}

.product-detail-copy .eyebrow {
  margin-bottom: 16px;
}

.product-detail-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(54px, 5.5vw, 88px);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .88;
}

.product-description {
  max-width: 560px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.8;
}

.product-price-block {
  margin-top: 36px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-price-block > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.product-price-block strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.product-price-block p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.product-specs {
  margin: 0;
}

.product-specs > div {
  display: grid;
  grid-template-columns: minmax(120px, 30%) 1fr;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.product-specs dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.product-specs dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.product-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.product-buy-button {
  width: 100%;
  justify-content: space-between;
  margin-top: 28px;
  padding-inline: 22px;
}

.product-buy-button span {
  font-size: 16px;
}

.product-buy-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.product-footer {
  min-height: 110px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px clamp(22px, 4vw, 72px);
  color: #eee8de;
  background: var(--ink);
}

.product-footer .brand-main {
  font-size: 30px;
}

.product-footer p {
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.product-footer p:last-child {
  justify-self: end;
}

@media (max-width: 960px) {
  .product-header {
    min-height: 88px;
    grid-template-columns: 1fr auto;
    padding-block: 14px;
  }

  .product-header .brand-mark {
    width: 46px;
    height: 46px;
  }

  .product-header .brand-main {
    font-size: 27px;
  }

  .product-header .brand-sub,
  .product-nav {
    display: none;
  }

  .product-detail {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .product-detail-media {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .product-detail-media::after {
    box-shadow: inset 0 -1px 0 var(--line);
  }

  .product-detail-media img {
    max-height: none;
  }

  .product-detail-copy {
    max-width: 760px;
    padding: 64px clamp(24px, 8vw, 72px) 84px;
  }
}

@media (max-width: 640px) {
  .product-header-back {
    font-size: 9px;
    letter-spacing: .08em;
  }

  .product-detail-media {
    aspect-ratio: 4 / 5;
  }

  .product-back-mobile {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.55);
    color: white;
    background: rgba(30, 28, 25, .38);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
  }

  .product-detail-copy {
    padding-top: 52px;
  }

  .product-detail-copy h1 {
    font-size: clamp(48px, 16vw, 68px);
  }

  .product-specs > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .product-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: left;
  }

  .product-footer p:last-child {
    justify-self: start;
  }
}
