.product-page {
  padding-top: 1.1rem;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.product-breadcrumbs {
  margin-bottom: clamp(1rem, 2vw, 1.7rem);
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(350px, 0.88fr);
  align-items: start;
  gap: clamp(1.5rem, 3.4vw, 3.2rem);
}

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

.product-gallery__layout {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
}

.product-gallery__layout.product-gallery__layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.product-gallery__thumbs {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 0.65rem;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--paper-deep);
  cursor: pointer;
  transition: border-color var(--duration-short) var(--ease-gentle), opacity var(--duration-short) var(--ease-gentle);
}

.gallery-thumb:hover {
  opacity: 0.84;
}

.gallery-thumb.is-active {
  border-color: var(--walnut);
  box-shadow: 0 0 0 1px var(--walnut);
}

.gallery-thumb__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.product-gallery__stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.gallery-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: pan-y;
}

.product-gallery__main-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 50%;
  transition: opacity var(--duration-short) var(--ease-gentle);
}

.gallery-arrow,
.gallery-zoom {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 250 243 / 65%);
  border-radius: 50%;
  background: rgb(255 250 243 / 92%);
  color: var(--ink-deep);
  cursor: pointer;
  box-shadow: 0 2px 12px rgb(46 30 17 / 10%);
}

.gallery-arrow {
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--body);
  font-size: 1.6rem;
  line-height: 1;
}

.gallery-arrow--previous {
  left: 0.75rem;
}

.gallery-arrow--next {
  right: 0.75rem;
}

.gallery-arrow:hover,
.gallery-zoom:hover {
  background: var(--paper-light);
}

.gallery-zoom {
  right: 0.75rem;
  bottom: 0.75rem;
}

.gallery-zoom svg,
.product-wishlist svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-count {
  margin: 0.45rem 0 0 6rem;
  color: var(--muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.product-config {
  min-width: 0;
  padding-top: 0.12rem;
}

.product-config__eyebrow {
  margin-bottom: 0.5rem;
}

.product-config h1 {
  max-width: 13ch;
  margin: 0 0 0.75rem;
  color: var(--ink-deep);
  font-size: clamp(2.35rem, 3.35vw, 3.7rem);
  line-height: 1.02;
}

.product-review {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 28px;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: var(--text-xs);
}

.product-review__stars {
  color: var(--brass);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.product-config__intro {
  max-width: 37rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.58;
}

.product-config__price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
  color: var(--ink-deep);
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.product-config__price .price-label {
  display: none;
}

.product-config__price .price-value {
  font-size: inherit;
  font-weight: inherit;
}

.product-page .price-label {
  display: none;
}

.product-config__snapshot-note {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.product-form {
  display: block;
  min-width: 0;
}

.product-options {
  display: grid;
  gap: 0.8rem;
}

.product-option {
  min-width: 0;
  padding: 0;
  border: 0;
}

.product-option[hidden] {
  display: none;
}

.product-option > legend,
.product-option__label {
  display: block;
  width: 100%;
  margin: 0 0 0.34rem;
  color: var(--ink-warm);
  font-size: .875rem;
  font-weight: 520;
  line-height: 1.4;
}

.required-marker {
  color: var(--brick);
  font-weight: 700;
}

.product-option__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.option-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 43px;
  padding: 0.52rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-light);
  color: var(--charcoal);
  font-size: var(--text-xs);
  line-height: 1.3;
  cursor: pointer;
}

.option-choice:has(input:checked) {
  border-color: var(--walnut);
  background: var(--paper-deep);
}

.option-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--walnut);
}

.option-choice__price {
  color: var(--walnut);
  font-variant-numeric: tabular-nums;
}

.product-option input[type="text"],
.product-option input[type="date"],
.product-option input[type="time"],
.product-option input[type="datetime-local"],
.product-option select,
.product-option textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 250 243 / 38%);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4;
  transition: border-color var(--duration-short) var(--ease-gentle), background-color var(--duration-short) var(--ease-gentle);
}

.product-option :where(input, select, textarea):focus {
  border-color: var(--walnut);
  background: var(--paper-light);
}

.product-option textarea {
  min-height: 82px;
  resize: vertical;
}

.product-option--text textarea[data-line-limit] {
  min-height: 88px;
}

.product-option input::placeholder,
.product-option textarea::placeholder {
  color: var(--muted);
  font-family: var(--body);
  font-weight: 400;
  letter-spacing: normal;
}

.product-option__help {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.8rem;
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.field-error {
  display: block;
  margin-top: 0.22rem;
  color: var(--brick);
  font-size: 0.68rem;
  line-height: 1.35;
}

.field-error:empty {
  display: none;
}

.product-option__line-count {
  color: var(--walnut);
  font-variant-numeric: tabular-nums;
}

.product-option-disclosure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 250 243 / 26%);
}

.product-option-disclosure summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: 46px;
  padding: 0.5rem 0.75rem;
  color: var(--ink-warm);
  font-size: var(--text-xs);
  cursor: pointer;
  list-style: none;
}

.product-option-disclosure summary::-webkit-details-marker {
  display: none;
}

.product-option-disclosure__note {
  flex: 0 0 auto;
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 0.66rem;
}

.product-option-disclosure__toggle {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.product-option-disclosure__toggle::before,
.product-option-disclosure__toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  background: var(--walnut);
  content: "";
  transform: translate(-50%, -50%);
}

.product-option-disclosure__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform var(--duration-short) var(--ease-gentle);
}

.product-option-disclosure[open] .product-option-disclosure__toggle::after {
  transform: translate(-50%, -50%);
}

.product-option-disclosure__content {
  padding: 0.55rem 0.7rem 0.65rem;
  border-top: 1px solid var(--line);
}

.product-option-disclosure__content .product-option__label {
  font-size: 0.7rem;
}

.upload-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.8rem;
  border: 1px dashed var(--taupe);
  border-radius: var(--radius);
  background: rgb(255 250 243 / 38%);
  color: var(--walnut);
  font-size: var(--text-xs);
}

.upload-placeholder:disabled {
  opacity: 0.76;
  cursor: not-allowed;
}

.product-purchase {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 46px;
  grid-template-rows: auto 52px;
  align-items: end;
  gap: 0.45rem 0.6rem;
  margin-top: 1rem;
}

.quantity-label {
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: var(--text-xs);
}

.quantity-control {
  display: grid;
  grid-template-columns: 44px minmax(2rem, 1fr) 44px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper-light);
  grid-column: 1;
  grid-row: 2;
}

.quantity-control button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--walnut);
  font-size: 1.1rem;
  cursor: pointer;
}

.quantity-control input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-deep);
  font-size: var(--text-sm);
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.button--purchase {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border-radius: var(--radius-pill);
  background: var(--ink-deep);
  color: var(--paper-light);
  white-space: nowrap;
  gap: .65rem;
}

.button--purchase:disabled {
  border-color: var(--ink-deep);
  background: var(--ink-deep);
  color: var(--paper-light);
  opacity: 0.74;
  cursor: not-allowed;
}

.product-wishlist {
  display: grid;
  grid-column: 3;
  grid-row: 2;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--taupe);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-deep);
}

.product-wishlist:disabled {
  opacity: 0.76;
  cursor: not-allowed;
}

.product-trust {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .8rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.product-trust li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: var(--text-xs);
}

.product-trust svg { flex: 0 0 30px; width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-deep); }
.product-trust li span { max-width: 13ch; }
.purchase-divider { opacity: .6; }

.product-details {
  margin-top: clamp(2.5rem, 5vw, 4.25rem);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-details__item + .product-details__item {
  border-top: 1px solid var(--line);
}

.product-details__item summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.65rem;
  min-height: 58px;
  padding: 0.55rem 1rem;
  color: var(--ink-warm);
  font-size: var(--text-sm);
  font-weight: 540;
  cursor: pointer;
  list-style: none;
}

.product-details__item summary::-webkit-details-marker {
  display: none;
}

.product-details__icon {
  display: grid;
  place-items: center;
  color: var(--ink-deep);
}

.product-details__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-details__toggle {
  position: relative;
  justify-self: center;
  width: 16px;
  height: 16px;
}

.product-details__toggle::before,
.product-details__toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1px;
  background: var(--walnut);
  content: "";
  transform: translate(-50%, -50%);
}

.product-details__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform var(--duration-short) var(--ease-gentle);
}

.product-details__item[open] .product-details__toggle::after {
  transform: translate(-50%, -50%) rotate(0);
}

.product-details__body {
  padding: 0 1rem 0.8rem 3.55rem;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.65;
}

.product-details__body p {
  max-width: 68rem;
  margin: 0;
}

.product-story {
  display: grid;
  grid-template-columns: minmax(290px, 0.72fr) minmax(0, 1.28fr);
  align-items: stretch;
  height: clamp(270px, 24vw, 330px);
  min-height: 0;
  margin-top: clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.product-story__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1.4rem, 3vw, 2.7rem);
}

.product-story__copy h2 {
  max-width: 10ch;
  margin: 0.75rem 0 0.75rem;
  color: var(--ink-deep);
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.02;
}

.product-story__copy p {
  max-width: 27rem;
  margin: 0 0 1.05rem;
  color: var(--muted);
  font-size: var(--text-sm);
}

.product-story__copy .button {
  min-height: 46px;
  border-radius: var(--radius-pill);
}

.product-story__image {
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--taupe);
}

.product-story__image img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 55% 50%;
}

.related-edit {
  margin-top: clamp(2.8rem, 6vw, 4.5rem);
}

.related-edit .section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 1rem;
}

.related-edit .section-heading h2 {
  margin: 0.35rem 0 0;
  font-size: var(--title-sm);
}

.related-edit__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.5vw, 1.25rem);
}

.related-edit .product-card__image-wrap {
  aspect-ratio: 5 / 4;
}

.related-edit .product-card__image-link,
.related-edit .product-card__image {
  height: 100%;
}

.related-edit .product-card__image {
  aspect-ratio: auto;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  width: min(92vw, 1100px);
  max-width: none;
  max-height: 92vh;
  padding: clamp(0.6rem, 2vw, 1.5rem);
  overflow: visible;
  border: 1px solid rgb(255 250 243 / 40%);
  border-radius: var(--radius);
  background: var(--paper-light);
  box-shadow: var(--shadow-soft);
}

.product-lightbox::backdrop {
  background: rgb(25 17 11 / 82%);
  backdrop-filter: blur(3px);
}

.product-lightbox img {
  width: 100%;
  max-height: calc(92vh - 3rem);
  object-fit: contain;
}

.product-lightbox__close {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-light);
  color: var(--ink-deep);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 980px) {
  .product-detail {
    grid-template-columns: minmax(0, 1.08fr) minmax(315px, 0.92fr);
    gap: 1.6rem;
  }

  .product-gallery__layout {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 0.6rem;
  }

  .product-purchase {
    grid-template-columns: 120px minmax(0, 1fr) 46px;
    column-gap: 0.4rem;
  }

  .product-wishlist {
    width: 46px;
    height: 46px;
  }

  .related-edit__grid {
    gap: 0.75rem;
  }
}

@media (max-width: 760px) {
  .product-page {
    padding-top: 0.65rem;
  }

  .product-breadcrumbs {
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    font-size: 0.68rem;
  }

  .product-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.35rem;
  }

  .product-gallery__layout {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .product-gallery__stage {
    order: 1;
    width: 100%;
  }

  .product-gallery__thumbs {
    order: 2;
    display: grid;
    grid-auto-columns: minmax(60px, 72px);
    grid-auto-flow: column;
    grid-auto-rows: auto;
    justify-content: start;
    width: 100%;
    gap: 0.55rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 1px 1px 0.35rem;
    scrollbar-color: var(--taupe) transparent;
    scrollbar-width: thin;
  }

  .gallery-thumb__image {
    aspect-ratio: 4 / 5;
  }

  .product-gallery__main-image {
    aspect-ratio: 4 / 5;
  }

  .gallery-count {
    margin-left: 0;
  }

  .product-config {
    padding-top: 0;
  }

  .product-config h1 {
    max-width: 16ch;
    margin-bottom: 0.65rem;
    font-size: clamp(2.35rem, 9vw, 3.4rem);
  }

  .product-config__intro {
    font-size: 0.9rem;
  }

  .product-options {
    gap: 0.95rem;
  }

  .product-option input[type="text"],
  .product-option input[type="date"],
  .product-option input[type="time"],
  .product-option input[type="datetime-local"],
  .product-option select,
  .product-option textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .product-option textarea {
    min-height: 90px;
  }

  .product-purchase {
    grid-template-columns: 120px minmax(0, 1fr) 46px;
    column-gap: 0.55rem;
  }

  .product-purchase .button--purchase { gap: .35rem; padding-inline: .5rem; font-size: .875rem; }

  .product-wishlist {
    width: 46px;
    height: 46px;
  }

  .product-details {
    margin-top: 2.25rem;
  }

  .product-story {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    margin-top: 1rem;
  }

  .product-story__copy {
    padding: 1.45rem 1.15rem 1.25rem;
  }

  .product-story__copy h2 {
    max-width: 13ch;
    font-size: clamp(2.35rem, 9vw, 3.4rem);
  }

  .product-story__image,
  .product-story__image img {
    min-height: 0;
  }

  .product-story__image img {
    height: auto;
    aspect-ratio: 1.45 / 1;
  }

  .related-edit {
    margin-top: 2.8rem;
  }

  .related-edit__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.65rem;
  }
}

@media (max-width: 420px) {
  .product-page {
    padding-bottom: 3rem;
  }

  .product-purchase {
    grid-template-columns: 120px minmax(0, 1fr) 46px;
    column-gap: 0.4rem;
  }

  .product-wishlist {
    width: 46px;
    height: 46px;
  }

  .button--purchase {
    gap: 0.45rem;
    padding-inline: 0.45rem;
    font-size: 0.78rem;
  }

  .product-details__item summary {
    grid-template-columns: 28px minmax(0, 1fr) 24px;
    gap: 0.5rem;
    min-height: 54px;
    padding-inline: 0.7rem;
  }

  .product-details__body {
    padding: 0 0.75rem 0.75rem 2.9rem;
  }

  .related-edit .section-heading {
    align-items: flex-end;
    flex-direction: row;
  }

  .related-edit .section-heading h2 {
    font-size: clamp(1.7rem, 7vw, 2.25rem);
  }

  .related-edit .section-heading > a {
    flex: 0 0 auto;
    font-size: 0.67rem;
  }
}

@media (max-width: 350px) {
  .product-purchase { grid-template-rows: auto 48px 52px; }
  .product-purchase .button--purchase { grid-row: 3; grid-column: 1/-1; }
  .related-edit .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
