/* Home textile category pages (cushion covers, throws, table linens, bedding). Uses tokens from site.css. */

/* 1. Compact intro: copy + one photo */
.ht-intro { padding-block: clamp(56px, 7vw, 104px) clamp(40px, 5vw, 64px); }
.ht-intro__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.ht-intro h1 { font-size: clamp(40px, 5vw, 72px); }
.ht-intro__lead { max-width: 600px; margin: 24px 0 32px; color: var(--muted); font-size: 18px; }
.ht-intro figure img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }

/* 2. Fact row */
.ht-facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.ht-facts div { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline; padding: 26px 24px 26px 0; }
.ht-facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.ht-facts dt { white-space: nowrap; font-family: "Manrope", sans-serif; font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.ht-facts dd { margin: 0; color: var(--muted); font-size: 15px; }

/* 3. Range grid: square photo + name + one line */
.ht-range { padding-block: var(--section); background: var(--soft); }
.ht-range__head { max-width: 760px; }
.ht-range__head p { margin: 24px 0 0; color: var(--muted); font-size: 18px; }
.ht-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; margin: 44px 0 0; }
.ht-grid div { display: flex; flex-direction: column; }
.ht-grid img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 18px; }
.ht-grid dt { margin-bottom: 8px; font-family: "Manrope", sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ht-grid dd { margin: 0; color: var(--muted); font-size: 17px; }
.ht-range__note { margin-top: 28px; color: var(--muted); font-size: 15px; }

.ht-range--plain { background: var(--paper); }

/* 3b. Design rows: one row of thumbnails per fabric family */
.ht-families { display: grid; gap: clamp(36px, 4vw, 52px); margin-top: 48px; }
.ht-family__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.ht-family__head h3 { font-size: clamp(22px, 2vw, 28px); }
.ht-family__head p { margin: 0; color: var(--muted); font-size: 16px; }
/* Each row is a horizontal slider: 4 visible on desktop, 3 on tablet, ~2.5 on phones */
.ht-thumbs { --per: 4; --gap: 14px; display: flex; gap: var(--gap); margin: 18px 0 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ht-thumbs::-webkit-scrollbar { display: none; }
.ht-thumbs li { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); scroll-snap-align: start; }
.ht-thumbs img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: var(--paper); }
/* Arrows sit on the left and right edges of the row, vertically centred on the photos */
.ht-slider { position: relative; margin-top: 18px; }
.ht-slider .ht-thumbs { margin-top: 0; }
.ht-arrow { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(16,18,18,.18); transition: background .2s, color .2s; }
.ht-arrow--prev { left: 12px; }
.ht-arrow--next { right: 12px; }
.ht-arrow:hover { background: var(--ink); color: var(--paper); }
.ht-arrow[hidden] { display: none; }

/* 3c. "More designs" catalog prompt under the design rows */
.ht-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 48px; padding: 28px 32px; background: var(--paper); border-left: 3px solid var(--ink); }
.ht-more strong { display: block; font-family: "Manrope", sans-serif; font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.ht-more p { max-width: 620px; margin: 8px 0 0; color: var(--muted); font-size: 16px; }

/* 4. Sizes and construction */
.ht-build { padding-block: var(--section); }
.ht-build__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.ht-sizes { margin: 32px 0 0; border-top: 2px solid var(--ink); }
.ht-sizes div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.ht-sizes dt { font-size: 17px; font-weight: 600; }
.ht-sizes dd { margin: 0; color: var(--muted); font-size: 15px; text-align: right; }
.ht-build__copy > p { margin: 26px 0 0; color: var(--muted); font-size: 17px; }
.ht-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ht-details img { aspect-ratio: 1 / 1; height: auto; object-fit: cover; }

/* 4b. Silent loop video above the detail photos */
.ht-media { display: grid; gap: 22px; }
.ht-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }

/* 5. Packing / ordering */
.ht-order { padding-block: clamp(64px, 8vw, 112px); background: var(--soft); }
.ht-order__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.ht-order .link-row { margin-top: 28px; }

/* 6. FAQ sits on white after the grey ordering block */
.ht-faq.faq { background: var(--paper); }

@media (max-width: 1050px) {
  .ht-intro__grid, .ht-build__grid, .ht-order__grid { grid-template-columns: 1fr; }
  .ht-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .ht-grid dt { font-size: 19px; }
  .ht-grid dd { font-size: 15px; }
  .ht-thumbs { --per: 3; }
}
@media (max-width: 720px) {
  .ht-intro__lead { font-size: 16px; }
  .ht-facts { grid-template-columns: 1fr; }
  .ht-facts div, .ht-facts div + div { grid-template-columns: 96px 1fr; padding: 16px 0; border-left: 0; }
  .ht-facts div + div { border-top: 1px solid var(--line); }
  .ht-facts dt { font-size: 24px; }
  .ht-details { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ht-details .media-caption { font-size: 12px; }
  .ht-family__head p { font-size: 15px; }
  /* Phones: swipe; the row bleeds to the screen edge so the next tile peeks in */
  .ht-thumbs { --gap: 8px; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); }
  .ht-thumbs li { flex: 0 0 56%; }
  .ht-arrow { display: none !important; }
}
