/**
 * PDP long-form visual system (Artwork story → Final CTA).
 * Production polish: chapters, width hierarchy, merchandising.
 */

.htha-product-detail {
  --htha-pdp-wide: 1360px;
  --htha-pdp-content: 1220px;
  --htha-pdp-reading: 680px;
  --pdp-chapter-space: 96px;
  --pdp-section-space-xl: 80px;
  --pdp-section-space-lg: 48px;
  --pdp-section-space-md: 40px;
  --pdp-section-space-sm: 24px;
  --pdp-grid-gap: 32px;
  --pdp-cream: #f5f1ea;
  --pdp-near-white: #fbfaf7;
  --pdp-h2: clamp(28px, 2.8vw, 36px);
  --pdp-h2-feature: clamp(34px, 3.2vw, 46px);
  --pdp-h2-rail: clamp(26px, 2.2vw, 32px);
  --pdp-body-lg: 17px;
}

.htha-product-detail .pdp-chapter .htha-container,
.htha-product-detail .htha-product-jump .htha-container,
.htha-product-detail .pdp-section > .htha-container,
.htha-product-detail .pdp-final-cta > .htha-container {
  width: min(100% - 48px, var(--htha-pdp-wide));
  margin-inline: auto;
}

/* Chapters */
.htha-product-detail .pdp-chapter {
  background: var(--pdp-cream);
  padding: var(--pdp-chapter-space) 0 56px;
}
.htha-product-detail .pdp-chapter--buy,
.htha-product-detail .pdp-chapter--interior {
  background: var(--pdp-near-white);
}
.htha-product-detail .pdp-chapter--discover {
  padding-bottom: 0;
}

.htha-product-detail .pdp-chapter .pdp-section,
.htha-product-detail .pdp-chapter .htha-section.pdp-section {
  padding: var(--pdp-section-space-lg) 0;
  background: transparent;
}
.htha-product-detail .pdp-chapter .pdp-section:first-child {
  padding-top: 0;
}
.htha-product-detail .pdp-chapter .pdp-section:last-child {
  padding-bottom: 0;
}
.htha-product-detail .pdp-section--tight {
  padding-top: var(--pdp-section-space-sm);
  padding-bottom: var(--pdp-section-space-sm);
}
.htha-product-detail .pdp-section--compact {
  padding-top: 16px;
  padding-bottom: 16px;
}

.htha-product-detail .pdp-product-rail.pdp-section {
  padding-top: 56px;
  padding-bottom: 16px;
}
.htha-product-detail .pdp-product-rail.pdp-section + .pdp-product-rail {
  padding-top: 36px;
}
.htha-product-detail .pdp-product-rail--utility {
  padding-top: 28px;
}

/* Heading */
.htha-product-detail .pdp-section .htha-section-heading {
  max-width: none;
  margin: 0 0 24px;
}
.htha-product-detail .pdp-split > .htha-section-heading {
  margin-bottom: 0;
}
.htha-product-detail .pdp-section .htha-eyebrow,
.htha-product-detail .pdp-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--htha-text-muted);
}
.htha-product-detail .pdp-section .htha-section-heading h2 {
  margin: 0;
  font-size: var(--pdp-h2);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.htha-product-detail .pdp-heading--feature h2 {
  font-size: var(--pdp-h2-feature);
}
.htha-product-detail .pdp-product-rail .htha-section-heading h2 {
  font-size: var(--pdp-h2-rail);
}
.htha-product-detail .htha-section-heading__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.htha-product-detail .htha-section-heading__row p {
  margin: 0;
}
.htha-product-detail .pdp-section .htha-section-heading__intro,
.htha-product-detail .pdp-section-intro {
  margin: 12px 0 0;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--htha-text);
}
.htha-product-detail .pdp-section .htha-section-heading__intro p {
  margin: 0 0 0.8em;
}
.htha-product-detail .pdp-section .htha-section-heading__intro p:last-child {
  margin-bottom: 0;
}

.htha-product-detail .pdp-split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--pdp-grid-gap);
  align-items: start;
}
.htha-product-detail .pdp-split > .htha-section-heading,
.htha-product-detail .pdp-split__head {
  grid-column: 1 / span 4;
  margin: 0;
}
.htha-product-detail .pdp-split > *:nth-child(n + 2) {
  grid-column: 5 / span 8;
}
.htha-product-detail .pdp-split--faq > .htha-section-heading {
  grid-column: 1 / span 4;
}
.htha-product-detail .pdp-split--faq > *:nth-child(n + 2) {
  grid-column: 5 / span 8;
}
.htha-product-detail .pdp-section--tight + .pdp-section--tight {
  padding-top: 8px;
}
.htha-product-detail .pdp-process-note {
  margin-top: 20px;
}

.htha-product-detail .pdp-prose {
  max-width: var(--htha-pdp-reading);
  font-size: var(--pdp-body-lg);
  line-height: 1.7;
  color: var(--htha-text);
}
.htha-product-detail .pdp-prose p {
  margin: 0 0 1em;
}
.htha-product-detail .pdp-prose p:last-child {
  margin-bottom: 0;
}

.htha-product-detail #artwork-story .pdp-split {
  align-items: start;
}
.htha-product-detail #artwork-story .pdp-prose {
  padding-top: 6px;
}

/* Jump */
.htha-product-detail .htha-product-jump {
  position: sticky;
  top: var(--htha-header-h, 72px);
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--htha-line, var(--htha-border));
}
.htha-product-detail .htha-product-jump ul {
  padding: 0;
  min-height: 48px;
  align-items: center;
}
.htha-product-detail .htha-product-jump a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Texture gallery */
.htha-product-detail .htha-gallery {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
.htha-product-detail .htha-gallery figure {
  margin: 0;
  background: #ece6dd;
  overflow: hidden;
}
.htha-product-detail .htha-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
.htha-product-detail .htha-gallery figure:only-child,
.htha-product-detail .htha-gallery--solo {
  grid-template-columns: 1fr;
  max-width: 72%;
}
.htha-product-detail .htha-gallery figure:only-child img {
  aspect-ratio: 16 / 10;
}

/* Materials */
.htha-product-detail .pdp-spec-groups {
  display: grid;
  gap: 28px;
}
.htha-product-detail .pdp-spec-group h3 {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--htha-text-muted);
}
.htha-product-detail .pdp-fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  margin: 0;
}
.htha-product-detail .pdp-fact-grid div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--htha-border);
}
.htha-product-detail .pdp-fact-grid dt {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--htha-text-muted);
}
.htha-product-detail .pdp-fact-grid dd {
  margin: 0;
  font-size: 16px;
  color: var(--htha-text);
}

/* Size + custom */
.htha-product-detail .pdp-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.htha-product-detail .pdp-size-chips li {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--htha-border);
  border-radius: 999px;
  font-size: 15px;
  background: #fff;
  color: var(--htha-text);
}
.htha-product-detail .pdp-size-chips li:hover,
.htha-product-detail .pdp-size-chips li.is-selected {
  border-color: var(--htha-dark);
  background: var(--htha-dark);
  color: #fff;
}
.htha-product-detail .pdp-custom-callout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 32px;
  align-items: end;
  max-width: none;
  padding: 36px 40px;
  background: rgba(255, 255, 255, 0.42);
}
.htha-product-detail .pdp-custom-callout .htha-section-heading {
  margin-bottom: 0;
}
.htha-product-detail .pdp-custom-callout .htha-btn {
  min-height: 48px;
  padding: 0 22px;
  white-space: nowrap;
}

/* Compare table */
.htha-product-detail .pdp-compare-grid {
  border-top: 1px solid var(--htha-border);
}
.htha-product-detail .pdp-compare-grid__head,
.htha-product-detail .pdp-compare-grid__row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.htha-product-detail .pdp-compare-grid__head {
  padding: 20px 0 12px;
}
.htha-product-detail .pdp-compare-grid__head h3 {
  margin: 0;
  font-family: var(--htha-font-serif);
  font-size: 24px;
  font-weight: 400;
}
.htha-product-detail .pdp-compare-grid__row {
  padding: 14px 0;
  border-top: 1px solid var(--htha-border);
}
.htha-product-detail .pdp-compare-grid__row span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--htha-text-muted);
  padding-top: 4px;
}
.htha-product-detail .pdp-compare-grid__row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--htha-text);
}

.htha-product-detail .pdp-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.htha-product-detail .pdp-process li {
  margin: 0;
  padding: 0 24px 0 0;
  color: var(--htha-text);
}
.htha-product-detail .pdp-process li + li {
  padding-left: 24px;
  border-left: 1px solid var(--htha-border);
}
.htha-product-detail .pdp-process__num {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--htha-text-muted);
  white-space: nowrap;
}
.htha-product-detail .pdp-process strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}
.htha-product-detail .pdp-process p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--htha-text-muted);
}

/* Room */
.htha-product-detail .pdp-room {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--pdp-grid-gap);
  align-items: start;
}
.htha-product-detail .pdp-room__copy {
  grid-column: 1 / span 5;
}
.htha-product-detail .pdp-room__media {
  grid-column: 6 / span 7;
  margin: 0;
}
.htha-product-detail .pdp-room__media .htha-gallery {
  margin: 0;
}
.htha-product-detail .pdp-room__media .htha-gallery img {
  aspect-ratio: 16 / 10;
}

/* Lookbook */
.htha-product-detail .pdp-lookbook-grid {
  display: grid;
  gap: 28px;
}
.htha-product-detail .pdp-lookbook-grid--single {
  grid-template-columns: 1fr;
}
.htha-product-detail .pdp-lookbook-grid .htha-editorial-card h3 {
  margin: 0 0 6px;
  font-family: var(--htha-font-serif);
  font-size: 28px;
  font-weight: 400;
}
.htha-product-detail .pdp-lookbook-grid--single .htha-editorial-card__media {
  aspect-ratio: 16 / 8;
}
.htha-product-detail .pdp-lookbook-grid--single .htha-editorial-card:not(.htha-editorial-card--fallback) .htha-editorial-card__media {
  min-height: 0;
}
.htha-product-detail .pdp-lookbook-grid .htha-editorial-card--fallback {
  max-width: 720px;
  padding-top: 8px;
}
.htha-product-detail .pdp-lookbook-grid:not(.pdp-lookbook-grid--single) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* FAQ */
.htha-product-detail .htha-faq details {
  border-bottom: 1px solid var(--htha-border);
  padding: 0;
}
.htha-product-detail .htha-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 16px 0;
  font-size: 17px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  color: var(--htha-text);
}
.htha-product-detail .htha-faq summary:hover {
  color: #000;
}
.htha-product-detail .htha-faq summary::-webkit-details-marker {
  display: none;
}
.htha-product-detail .htha-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
  color: var(--htha-text-muted);
}
.htha-product-detail .htha-faq details[open] summary::after {
  content: "−";
}
.htha-product-detail .htha-faq details > div {
  padding: 0 0 18px;
  max-width: 650px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--htha-text);
}

/* Product rails / cards */
.htha-product-detail .pdp-product-rail .htha-section-heading {
  margin-bottom: 20px;
}
.htha-product-detail .pdp-product-rail ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 44px 24px;
  width: 100%;
}
.htha-product-detail .pdp-product-rail ul.products::before,
.htha-product-detail .pdp-product-rail ul.products::after {
  content: none !important;
  display: none !important;
}
.htha-product-detail .pdp-product-rail ul.products li.product,
.htha-product-detail .pdp-product-rail ul.products li.first,
.htha-product-detail .pdp-product-rail ul.products li.last {
  width: auto;
  float: none;
  clear: none;
  margin: 0;
}
.htha-product-detail .pdp-product-rail .htha-product-card__media {
  aspect-ratio: 4 / 5;
  margin-bottom: 14px;
}
.htha-product-detail .pdp-product-rail .htha-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.htha-product-detail .pdp-product-rail .htha-product-card__title {
  font-size: 16px;
  line-height: 1.35;
  margin-top: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.htha-product-detail .pdp-product-rail .htha-meta {
  font-size: 12px;
  margin: 0 0 6px;
}
.htha-product-detail .pdp-product-rail .htha-price {
  font-size: 15px;
  margin: 6px 0 0;
  color: var(--htha-text);
}
.htha-product-detail .pdp-product-rail .htha-product-card__body > p:last-child {
  display: none;
}
.htha-product-detail .pdp-product-rail--utility ul.products {
  gap: 32px 20px;
}
.htha-product-detail .pdp-product-rail--utility .htha-product-card__title {
  font-size: 15px;
}

/* Reviews */
.htha-product-detail .pdp-reviews {
  background: var(--pdp-near-white);
  padding: 80px 0 56px;
  border-top: 1px solid var(--htha-border);
}
.htha-product-detail .pdp-chapter .pdp-section.pdp-reviews {
  padding: 80px 0 56px;
  background: var(--pdp-near-white);
}
.htha-product-detail .pdp-review-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--pdp-grid-gap);
  align-items: start;
}
.htha-product-detail .pdp-review-summary {
  grid-column: 1 / span 4;
}
.htha-product-detail .pdp-review-main {
  grid-column: 5 / span 8;
  max-width: 680px;
}
.htha-product-detail .pdp-review-score {
  margin: 12px 0 4px;
  font-family: var(--htha-font-serif);
  font-size: 48px;
  line-height: 1;
}
.htha-product-detail .pdp-review-score span {
  font-size: 18px;
  color: var(--htha-text-muted);
}
.htha-product-detail .pdp-review-stars {
  color: #c4a056;
  letter-spacing: 2px;
  margin: 0 0 8px;
}
.htha-product-detail .pdp-review-empty {
  margin: 16px 0 8px;
  font-size: 18px;
  color: var(--htha-text);
}
.htha-product-detail .pdp-review-count {
  margin: 0 0 20px;
  color: var(--htha-text-muted);
  font-size: 14px;
}
.htha-product-detail .pdp-review-all {
  margin: 12px 0 0;
  font-size: 14px;
}
.htha-product-detail .pdp-review-all a {
  color: inherit;
}
.htha-product-detail .woocommerce-Reviews-title,
.htha-product-detail #reviews .woocommerce-Reviews-title,
.htha-product-detail .pdp-review-main .woocommerce-noreviews {
  display: none;
}
.htha-product-detail #reviews .commentlist {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}
.htha-product-detail #reviews .comment_container {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--htha-border);
  background: none;
}
.htha-product-detail #reviews .avatar {
  display: none;
}
.htha-product-detail #reviews .comment-text {
  margin: 0;
  padding: 0;
  border: 0;
}
.htha-product-detail #review_form_wrapper {
  margin: 0;
  padding: 8px 0 0;
  border-top: 0;
}
.htha-product-detail #review_form #reply-title {
  display: block;
  font-family: var(--htha-font-serif);
  font-size: 28px;
  margin: 0 0 16px;
}
.htha-product-detail #review_form .comment-form-comment textarea {
  min-height: 160px;
  height: 160px;
  max-width: 100%;
  background: #fff;
}
.htha-product-detail #review_form input[type="text"],
.htha-product-detail #review_form input[type="email"] {
  height: 48px;
  background: #fff;
}
.htha-product-detail #review_form .form-submit input {
  background: var(--htha-dark);
  color: #fff;
  border: 0;
  height: 48px;
  padding: 0 22px;
  cursor: pointer;
}

/* Final CTA */
.htha-product-detail .pdp-final-cta {
  background: var(--pdp-near-white);
  border-top: 1px solid var(--htha-border);
  padding: 80px 0 88px;
  text-align: left;
}
.htha-product-detail .pdp-final-cta > .htha-container {
  max-width: 1080px;
  width: min(100% - 48px, 1080px);
}
.htha-product-detail .pdp-final-cta h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 400;
}
.htha-product-detail .pdp-final-cta__lede {
  max-width: 640px;
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--htha-text);
}
.htha-product-detail .pdp-final-cta .htha-final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}
.htha-product-detail .pdp-final-cta .htha-btn {
  min-height: 50px;
  padding: 0 22px;
}
.htha-product-detail .pdp-final-cta__meta {
  margin: 18px 0 0;
}

@media (max-width: 1024px) {
  .htha-product-detail .pdp-product-rail ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .htha-product-detail .pdp-process {
    grid-template-columns: 1fr 1fr;
    gap: 24px 0;
  }
  .htha-product-detail .pdp-process li:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .htha-product-detail .pdp-compare-grid__head,
  .htha-product-detail .pdp-compare-grid__row {
    grid-template-columns: 110px 1fr 1fr;
    gap: 16px;
  }
  .htha-product-detail .pdp-custom-callout {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

@media (max-width: 900px) {
  .htha-product-detail {
    --pdp-chapter-space: 64px;
    --pdp-section-space-lg: 36px;
  }
  .htha-product-detail .pdp-chapter {
    padding: 64px 0 40px;
  }
  .htha-product-detail .pdp-chapter .pdp-section,
  .htha-product-detail .pdp-chapter .htha-section.pdp-section {
    padding: 36px 0;
  }
  .htha-product-detail .pdp-split,
  .htha-product-detail .pdp-room,
  .htha-product-detail .pdp-review-layout {
    grid-template-columns: 1fr;
  }
  .htha-product-detail .pdp-split > .htha-section-heading,
  .htha-product-detail .pdp-split__head,
  .htha-product-detail .pdp-split > *:nth-child(n + 2),
  .htha-product-detail .pdp-room__copy,
  .htha-product-detail .pdp-room__media,
  .htha-product-detail .pdp-review-summary,
  .htha-product-detail .pdp-review-main {
    grid-column: 1 / -1;
  }
  .htha-product-detail .pdp-section .htha-section-heading {
    margin-bottom: 20px;
  }
  .htha-product-detail .pdp-fact-grid,
  .htha-product-detail .pdp-process,
  .htha-product-detail .htha-gallery,
  .htha-product-detail .pdp-lookbook-grid:not(.pdp-lookbook-grid--single),
  .htha-product-detail .pdp-compare-grid__head,
  .htha-product-detail .pdp-compare-grid__row {
    grid-template-columns: 1fr;
  }
  .htha-product-detail .pdp-process li + li,
  .htha-product-detail .pdp-process li:nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--htha-border);
    padding-top: 16px;
    margin-top: 8px;
  }
  .htha-product-detail .pdp-custom-callout,
  .htha-product-detail .htha-gallery figure:only-child,
  .htha-product-detail .htha-gallery--solo {
    max-width: none;
  }
  .htha-product-detail .pdp-product-rail ul.products {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    grid-template-columns: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .htha-product-detail .pdp-product-rail ul.products li.product {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }
  .htha-product-detail .pdp-reviews,
  .htha-product-detail .pdp-final-cta {
    padding: 56px 0;
  }
}

@media (max-width: 430px) {
  .htha-product-detail .pdp-chapter {
    padding: 48px 0 32px;
  }
  .htha-product-detail .pdp-chapter .pdp-section,
  .htha-product-detail .pdp-chapter .htha-section.pdp-section {
    padding: 28px 0;
  }
  .htha-product-detail .pdp-chapter .htha-container,
  .htha-product-detail .pdp-final-cta > .htha-container {
    width: min(100% - 32px, var(--htha-pdp-wide));
  }
}
