/* A single reference, its photographs and the next buying step. */
body.ec-detail-page {
  --detail-ink: #382d32;
  --detail-muted: #655a5d;
  --detail-accent: #56303f;
  --detail-line: #ded7d2;
}

body.ec-detail-page .breadcrumbs,
body.ec-detail-page .pd-product,
body.ec-detail-page .pd-related,
body.ec-detail-page .pd-series-only {
  width: min(1136px, calc(100% - 72px));
}

body.ec-detail-page .v5-nav-actions .v5-nav-cta {
  background: transparent;
  color: var(--detail-accent);
  border: 1px solid var(--detail-line);
}

.pd-product {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  grid-template-areas: "gallery heading" "gallery buying";
  grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 6vw, 88px);
  padding-block: 20px 44px;
  align-items: start;
}

.pd-heading { grid-area: heading; padding-top: clamp(16px, 3.6vw, 52px); }
.pd-buying { grid-area: buying; min-width: 0; }
.pd-gallery { grid-area: gallery; min-width: 0; }

body.ec-detail-page .pd-reference {
  margin: 0 0 9px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--detail-muted);
}

body.ec-detail-page .pd-heading h1 {
  font-size: clamp(34px, 3.75vw, 54px);
  line-height: 1.08;
  letter-spacing: -.045em;
  color: var(--detail-ink);
  margin: 0 0 22px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body.ec-detail-page .pd-gallery .gallery-main {
  height: clamp(310px, 38vw, 480px);
  width: 100%;
  aspect-ratio: auto;
  padding: clamp(16px, 2.3vw, 32px);
  border: 1px solid #e9e3de;
  border-radius: 22px;
  background: #faf9f6;
}

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

body.ec-detail-page .pd-gallery .gallery-main span {
  right: 13px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 8px;
  color: #514b49;
  background: #fffdf8ed;
  font-size: 12px;
  font-weight: 500;
}

body.ec-detail-page .pd-gallery .gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  padding: 0;
  margin-top: 9px;
  overflow: visible;
}

/* A single supplied image does not need a view selector. */
.ec-detail-page .pd-gallery .gallery-thumbs:has(> button:only-child) { display: none; }
.ec-detail-page .pd-gallery .gallery-thumbs:has(> button:only-child) + .ec-caption { margin-top: 8px; }
.ec-detail-page:has(.pd-gallery .gallery-thumbs > button:only-child) .lightbox-image-wrap {
  grid-template-columns: minmax(0, 1fr);
}
.ec-detail-page:has(.pd-gallery .gallery-thumbs > button:only-child) .lightbox-image-wrap button {
  display: none;
}

.pd-gallery .gallery-thumbs button,
.pd-gallery .gallery-thumbs button[aria-pressed="true"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px 7px;
  background: transparent;
}

body.ec-detail-page .pd-gallery .gallery-thumbs button[aria-pressed="true"] {
  background: #f2eeea;
  border: 1px solid #b8aaa9;
  padding: 3px 7px;
}

body.ec-detail-page .pd-gallery .gallery-thumbs img {
  width: 30px;
  height: 30px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 3px;
}

body.ec-detail-page .pd-gallery .gallery-thumbs span {
  padding: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--detail-ink);
}

body.ec-detail-page .pd-gallery .ec-caption {
  font-size: 12px !important;
  color: var(--detail-muted);
  margin: 4px 0 0;
}

.pd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 16px; }
.pd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }

body.ec-detail-page .pd-actions .pd-quote {
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  text-decoration: none;
  background: var(--detail-accent);
  border-color: var(--detail-accent);
  color: white;
}

.pd-actions .pd-secondary,
.pd-series-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: var(--detail-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: #b2a4a6;
  text-underline-offset: 4px;
}

button.pd-secondary { background: transparent; border: 0; padding: 0; cursor: pointer; }
button.pd-secondary[aria-pressed="true"] { font-weight: 650; }
.pd-series-link span { padding-left: 5px; }
.pd-actions a:hover, .pd-series-link:hover, button.pd-secondary:hover { text-decoration-color: currentColor; }
body.ec-detail-page .pd-actions .pd-quote:hover { color: white; background: #422331; }

.pd-features {
  margin: 20px 0;
  padding-left: 1.05em;
  color: var(--detail-ink);
  font-size: 15px;
  line-height: 1.6;
}

.pd-features li + li { margin-top: 4px; }
.pd-features li::marker { color: #a89496; font-size: .83em; }
.pd-sample { border-block: 1px solid var(--detail-line); scroll-margin-top: 110px; }
.pd-sample summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 12px;
  color: var(--detail-ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.pd-sample summary::-webkit-details-marker { display: none; }
.pd-sample summary::after { content: "+"; color: var(--detail-muted); font-weight: 400; font-size: 20px; }
.pd-sample[open] summary::after { content: "−"; }
.pd-sample summary:focus-visible { outline: 2px solid var(--detail-accent); outline-offset: 3px; }
.pd-sample ul { padding-left: 1.15em; margin: 2px 0 10px; font-size: 14px; line-height: 1.7; }
.pd-sample p { margin: 0 0 16px; font-size: 14px; color: var(--detail-muted); }
.pd-sample p a { color: var(--detail-accent); }

.pd-related, .pd-series-only { padding-block: 28px 50px; border-top: 1px solid var(--detail-line); }
.pd-related header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 20px; }
body.ec-detail-page .pd-related h2 { font-size: clamp(23px, 2.35vw, 32px); margin: 0; color: var(--detail-ink); }
.pd-related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; list-style: none; margin: 15px 0 0; padding: 0; }
.pd-related li { border-top: 1px solid var(--detail-line); min-width: 0; }
.pd-related-link { display: flex; align-items: center; gap: 15px; padding-block: 12px; min-height: 70px; color: var(--detail-ink); text-decoration: none; }
.pd-related-link img { width: 66px; height: 66px; flex: none; object-fit: contain; border-radius: 8px; background: #faf9f6; }
.pd-related-link span { display: grid; gap: 4px; }
.pd-related-link small { font-size: 12px; color: var(--detail-muted); }
.pd-related-link strong { font-size: 15px; line-height: 1.45; font-weight: 600; }
.pd-related-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  body.ec-detail-page .breadcrumbs,
  body.ec-detail-page .pd-product,
  body.ec-detail-page .pd-related,
  body.ec-detail-page .pd-series-only { width: calc(100% - 36px); }
  body.ec-detail-page .breadcrumbs { padding-block: 12px 5px; }
  .pd-product {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "gallery" "buying";
    grid-template-rows: auto;
    row-gap: 14px;
    padding-block: 9px 28px;
  }
  .pd-heading { padding-top: 0; }
  body.ec-detail-page .pd-reference { margin-bottom: 5px; }
  body.ec-detail-page .pd-heading h1 { font-size: clamp(28px, 6.7vw, 37px); line-height: 1.12; margin: 0; }
  body.ec-detail-page .pd-gallery .gallery-main { height: clamp(210px, 63vw, 335px); padding: 12px; border-radius: 17px; }
  body.ec-detail-page .pd-gallery .gallery-thumbs { margin-top: 5px; }
  .pd-gallery .gallery-thumbs button { min-height: 44px; }
  .pd-actions { gap: 0 14px; }
  .pd-features { margin-block: 12px 16px; }
  .pd-related, .pd-series-only { padding-block: 20px 33px; }
  .pd-related ul { grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
  .pd-related-link { gap: 12px; padding-block: 8px; }
  .pd-related-link img { width: 54px; height: 54px; }
}
