
/* Product page: the same palette, header and footer as the catalog. */
.detail-page {
  padding-bottom: 76px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}

.detail-media {
  min-width: 0;
}

.detail-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}

.detail-gallery--footwear {
  aspect-ratio: 3/2;
}

.detail-gallery-open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.detail-gallery-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(26, 31, 27, .82);
  color: #fff;
  font: 700 12px var(--font-body);
}

.detail-thumbs {
  display: flex;
  gap: 10px;
  max-width: 100%;
  margin-top: 13px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.detail-thumbs .inline-thumb {
  flex: 0 0 76px;
  width: 76px;
}

.detail-thumb {
  display: block;
  flex: none;
  width: 76px;
  height: 76px;
  padding: 3px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.detail-thumb[aria-pressed="true"] {
  border-color: var(--forest);
}

.detail-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 62px clamp(54px, 7vw, 90px) 48px;
  border: 0;
  background: rgba(18, 23, 20, .97);
  color: #fff;
}

.detail-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-lightbox::backdrop {
  background: rgba(18, 23, 20, .8);
}

.detail-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.detail-lightbox-close {
  position: absolute;
  top: 14px;
  right: clamp(16px, 4vw, 48px);
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 5px;
  background: rgba(18, 23, 20, .8);
  color: #fff;
  font: 700 14px var(--font-body);
  cursor: pointer;
}

.detail-lightbox-close:hover {
  background: #fff;
  color: var(--ink);
}

.detail-info {
  padding: 5px 0;
}

.detail-info .product-brand {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
}

.detail-info h1 {
  margin: 8px 0 13px;
  font: 800 clamp(28px, 3.2vw, 43px)/1.13 var(--font-display);
  letter-spacing: -.035em;
  color: var(--ink);
}

.detail-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  margin: 19px 0 27px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 21px 0 9px;
}

.detail-info select {
  width: 100%;
  max-width: 300px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.detail-price {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 23px 0;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}

.detail-price strong {
  font-size: 30px;
  letter-spacing: -.025em;
}

.buy-row {
  display: flex;
  gap: 11px;
}

.quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.quantity button {
  width: 39px;
  height: 47px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.quantity input {
  width: 54px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: white;
  color: var(--ink);
  font: 700 15px var(--font-body);
  text-align: center;
  appearance: textfield;
}

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

.detail-add {
  flex: 1;
  min-height: 47px;
  border: 0;
  border-radius: 7px;
  background: var(--forest);
  color: white;
  padding: 0 18px;
  font: 700 14px var(--font-body);
  cursor: pointer;
}

.detail-add:hover {
  background: var(--forest-dark);
}

.detail-feedback {
  margin: 13px 0 0;
  color: var(--forest-dark);
  font-weight: 700;
}

.story {
  margin-top: 66px;
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.story h2 {
  margin: 0 0 17px;
  font-size: 28px;
  letter-spacing: -.03em;
}

.story h3 {
  margin: 27px 0 10px;
  font-size: 19px;
}

.story p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 80ch;
}

.feature-list {
  padding-left: 20px;
  line-height: 1.95;
  color: var(--muted);
}

.spec-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

.spec-table th,
.spec-table td {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.spec-table th {
  width: 42%;
  color: var(--muted);
  font-weight: 500;
}

.product-extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  margin-top: 65px;
  border-top: 1px solid var(--line);
}

.product-extra.specs-only {
  display: block;
}

.product-extra .story {
  margin-top: 0;
  border: 0;
  padding-top: 34px;
  min-width: 0;
}

.product-intro {
  margin-bottom: 27px;
}

.product-content-block {
  margin: 32px 0 44px;
}

.product-content-block h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.product-content-block p {
  margin: 0 0 16px;
}

.product-story-image {
  margin: 0;
}

.product-story-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.product-specs {
  margin-top: 34px;
  border-radius: 12px;
  background: var(--moss);
  padding: 23px;
  min-width: 0;
}

.product-specs h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.product-specs .spec-table th,
.product-specs .spec-table td {
  border-color: #d9e5d2;
  vertical-align: top;
}

@media(max-width:850px) {

  .product-detail,
  .product-extra {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .detail-gallery {
    max-width: 600px;
  }

  .product-specs {
    margin-top: 0;
  }
}

@media(max-width:620px) {
  .detail-info h1 {
    font-size: 30px;
  }

  .buy-row {
    flex-wrap: wrap;
  }

  .detail-add {
    min-width: 185px;
  }
}

/* Keep gallery controls reachable on narrow screens without covering the photo. */
.detail-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 5px;
  background: rgba(18, 23, 20, .8);
  color: #fff;
  font: 32px/1 var(--font-body);
  cursor: pointer;
}
.detail-lightbox-arrow:hover { background: #fff; color: var(--ink); }
.detail-lightbox-previous { left: max(6px, env(safe-area-inset-left)); }
.detail-lightbox-next { right: max(6px, env(safe-area-inset-right)); }
.detail-lightbox-counter { position: absolute; bottom: 14px; font: 700 14px var(--font-body); }
.detail-lightbox button:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
