/* Product pages (/products/<handle>), built by tools/products/build.py. Sits on top of fitted.css
   (tokens, buttons, end band) so products and Fitted Homes read as one site. */
.pd-top { max-width: 1240px; margin: 0 auto; padding: clamp(104px, 11vw, 132px) clamp(16px, 5vw, 48px) clamp(32px, 4vw, 56px); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }

/* photos: one large, thumbnails under it */
.pd-gallery { position: sticky; top: 96px; }
.pd-main { background: var(--fx-surface); border-radius: 18px; overflow: hidden; aspect-ratio: 1 / 1; }
.pd-main img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { list-style: none; display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.pd-thumb { flex: 0 0 auto; width: 72px; height: 72px; padding: 0; border: 1px solid var(--fx-line); border-radius: 10px; overflow: hidden; background: var(--fx-surface); cursor: pointer; transition: border-color .2s var(--fx-ease); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb:hover, .pd-thumb.is-on { border-color: var(--fx-teal); box-shadow: 0 0 0 1px var(--fx-teal) inset; }
.pd-thumb:focus-visible { outline: 2px solid var(--fx-teal-ink); outline-offset: 2px; }

/* thumbnails that are real installs, and the 3D button */
.pd-thumb { position: relative; }
.pd-thumb-tag { position: absolute; left: 3px; right: 3px; bottom: 3px; padding: 1px 0; border-radius: 4px; background: rgba(26, 58, 74, 0.82); color: #fff; font-size: 0.56rem; font-weight: 600; letter-spacing: 0.04em; text-align: center; }
.pd-thumb-3d { display: grid; place-items: center; text-decoration: none; background: var(--fx-ink); border-color: var(--fx-ink); }
.pd-thumb-3d span { color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: 0.04em; }
.pd-thumb-3d:hover { background: var(--fx-teal-ink); }

/* 3D viewer (ShopXR) */
.pd-xr { max-width: 1240px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 5vw, 48px) 0; scroll-margin-top: 90px; }
.pd-xr-head h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; }
.pd-xr-head p { margin: 8px 0 18px; color: var(--fx-muted); max-width: 62ch; line-height: 1.6; }
.pd-xr-frame { background: var(--fx-surface); border-radius: 18px; overflow: hidden; border: 1px solid var(--fx-line); }
.pd-xr-frame iframe { display: block; width: 100%; height: clamp(440px, 62vh, 620px); border: 0; }

/* the buy box */
.pd-cat { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.pd-cat a { text-decoration: none; color: var(--fx-teal-ink); }
.pd-buy h1 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.08; margin: 10px 0 8px; letter-spacing: -0.01em; }
.pd-sub { color: var(--fx-muted); font-size: 0.95rem; line-height: 1.55; }
.pd-tagline { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.35; color: var(--fx-teal-ink); margin: 2px 0 10px; max-width: 34ch; text-wrap: balance; }
.pd-price { margin-top: 18px; font-size: 1.6rem; font-weight: 600; color: var(--fx-ink); font-variant-numeric: tabular-nums; }
.pd-stock { margin-top: 4px; font-size: 0.9rem; color: var(--fx-muted); }
.pd-opts { margin-top: 20px; border-top: 1px solid var(--fx-line); }
.pd-opt { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--fx-line); font-size: 0.92rem; }
.pd-opt dt { font-weight: 600; color: var(--fx-ink); }
.pd-opt dd { color: var(--fx-body); line-height: 1.55; }
.pd-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.pd-cta-main { flex: 1 1 220px; }
.pd-ctas .fx-btn-line-dark { flex: 1 1 160px; }
.pd-wa { flex-basis: 100%; font-size: 0.92rem; font-weight: 600; color: var(--fx-teal-ink); text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.pd-showroom, .pd-terms { margin-top: 14px; font-size: 0.88rem; line-height: 1.6; color: var(--fx-muted); }

/* below the fold */
.pd-body { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px) clamp(48px, 6vw, 88px); }
.pd-section { padding-top: clamp(36px, 5vw, 64px); }
.pd-section h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin-bottom: 18px; }
.pd-desc { max-width: 760px; line-height: 1.75; }
.pd-desc p, .pd-desc ul, .pd-desc ol, .pd-desc table { margin-bottom: 14px; }
.pd-desc ul, .pd-desc ol { padding-left: 1.2em; }
.pd-desc h3 { font-size: 1.05rem; font-weight: 600; margin: 22px 0 8px; color: var(--fx-ink); }
.pd-desc img { max-width: 100%; height: auto; border-radius: 12px; }
.pd-note { margin-top: 12px; font-size: 0.9rem; color: var(--fx-muted); }
.pd-table-wrap { overflow-x: auto; background: var(--fx-surface); border-radius: 14px; border: 1px solid var(--fx-line); }
.pd-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.pd-table th, .pd-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--fx-line); }
.pd-table th { font-weight: 600; color: var(--fx-ink); background: #F6FBFC; }
.pd-table tr:last-child td { border-bottom: 0; }
.pd-table s { color: var(--fx-muted); margin-left: 6px; }

.pd-cards, .pd-homes { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.pd-homes { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.pd-card, .pd-home { display: flex; flex-direction: column; height: 100%; background: var(--fx-surface); border-radius: 14px; overflow: hidden; text-decoration: none; transition: transform .3s var(--fx-ease), box-shadow .3s var(--fx-ease); }
.pd-card:hover, .pd-home:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(26, 58, 74, 0.12); }
.pd-card-img { display: block; aspect-ratio: 1 / 1; background: #F6FBFC; }
.pd-home-img { display: block; aspect-ratio: 3 / 4; }
.pd-card-img img, .pd-home-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-card-img img { object-fit: contain; }
.pd-card-name, .pd-home-name { padding: 12px 14px 4px; font-weight: 600; color: var(--fx-ink); line-height: 1.35; font-size: 0.95rem; }
.pd-home-name { padding-bottom: 14px; }
.pd-card-price { padding: 0 14px 14px; color: var(--fx-muted); font-size: 0.9rem; }

@media (max-width: 900px) {
  .pd-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-gallery { position: static; }
  .pd-top { padding-top: 108px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-card, .pd-home, .pd-thumb { transition: none; }
  .pd-card:hover, .pd-home:hover { transform: none; }
}

/* on-this-page tabs, Shopee style */
.pd-tabs { position: sticky; top: 64px; z-index: 5; background: rgba(238, 247, 249, 0.94); backdrop-filter: blur(10px); border-top: 1px solid var(--fx-line); border-bottom: 1px solid var(--fx-line); }
.pd-tabs ul { list-style: none; display: flex; gap: 4px; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); overflow-x: auto; scrollbar-width: none; }
.pd-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; font-size: 0.92rem; font-weight: 600; color: var(--fx-ink); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.pd-tabs a:hover { border-bottom-color: var(--fx-teal); }
.pd-tabs a span { font-size: 0.75rem; background: var(--fx-teal); color: #fff; border-radius: 999px; padding: 1px 7px; }
#real-homes, #view-3d, #details, #reviews { scroll-margin-top: 130px; }

/* real homes: the product's proof, like reviews with photos */
.pd-rh { max-width: 1240px; margin: 0 auto; padding: clamp(32px, 5vw, 56px) clamp(16px, 5vw, 48px) 0; }
.pd-rh-head h2, .pd-reviews h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.12; }
.pd-rh-head p, .pd-reviews > p { margin: 8px 0 16px; color: var(--fx-muted); max-width: 64ch; line-height: 1.6; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pd-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--fx-line); background: var(--fx-surface); color: var(--fx-ink); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.pd-chip span { color: var(--fx-muted); font-weight: 500; margin-left: 2px; }
.pd-chip.is-on { background: var(--fx-ink); border-color: var(--fx-ink); color: #fff; }
.pd-chip.is-on span { color: #C9DCE2; }
.pd-chip:focus-visible { outline: 2px solid var(--fx-teal-ink); outline-offset: 2px; }
.pd-rh-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pd-rh-grid li[hidden] { display: none; }
.pd-rh-card { background: var(--fx-surface); border-radius: 14px; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.pd-rh-media { position: relative; display: block; aspect-ratio: 3 / 4; padding: 0; border: 0; background: #DCE8EC; cursor: pointer; width: 100%; }
.pd-rh-media img, .pd-rh-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-rh-video { aspect-ratio: 3 / 4; background: #000; }
.pd-rh-playicon { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(26, 58, 74, 0.78); display: grid; place-items: center; }
.pd-rh-playicon svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.pd-rh-play:hover .pd-rh-playicon { background: var(--fx-teal); }
.pd-rh-body { padding: 12px 14px 14px; }
.pd-rh-where { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; color: var(--fx-teal-ink); }
.pd-rh-body h3 { font-size: 0.95rem; font-weight: 600; line-height: 1.35; margin-top: 4px; }
.pd-rh-body h3 a { color: var(--fx-ink); text-decoration: none; }
.pd-rh-body h3 a:hover { text-decoration: underline; }
.pd-rh-by { margin-top: 6px; font-size: 0.8rem; color: var(--fx-muted); }
.pd-rh-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 20px; font-size: 0.92rem; }
.pd-rh-more[hidden] { display: none; }
.pd-reviews { padding-top: clamp(40px, 5vw, 64px); }
@media (max-width: 600px) { .pd-rh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pd-tabs { top: 58px; } }

/* summary line under the title, and the /products hub */
.pd-summary { margin-top: 14px; font-size: 1rem; line-height: 1.65; color: var(--fx-body); max-width: 60ch; }
.pd-hub-top h1 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.05; }
.pd-jump { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pd-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--fx-line); border-radius: 999px; background: var(--fx-surface); color: var(--fx-ink); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.pd-jump a:hover { border-color: var(--fx-teal); }
.pd-section h2 a { color: inherit; text-decoration: none; }
.pd-count { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: var(--fx-muted); vertical-align: middle; }
