/*
 * Colour pages, swatch book layout (wood on the left, details on a dark green page).
 * Only loaded when that layout is switched on - see front/product.blade.php.
 */

/* ---------- Colour pages: swatch book spread (wood left, dark green details right) ---------- */

:root { --tg-book-green: #3D4744; }   /* the swatch book's details page */

.tg-spread-wrap { padding: 40px 0 0; }
.tg-spread {
  /* Two equal pages, sized so the whole spread fits the screen height (the wood page is 1000 x 1900).
     If the details need more room, both pages grow together. */
  --tg-page: clamp(380px, calc((100vh - 170px) / 1.9), 470px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, var(--tg-page)));
  grid-auto-rows: minmax(calc(var(--tg-page) * 1.9), auto);
  justify-content: center;
  box-shadow: 0 18px 50px rgba(20, 24, 20, 0.18);
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.tg-spread__page { min-width: 0; }
.tg-spread__wood { position: relative; background: #E5E8E4; }
.tg-spread__wood .tg-zoom { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; overflow: hidden; }
.tg-spread__wood .tg-zoom img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

.tg-spread__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 32px 34px 30px;
  background: var(--tg-book-green);
  color: #E9ECE8;
}
.tg-spread__tone {
  font-family: var(--tg-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #C3CBC6;
  text-decoration: none;
}
.tg-spread__tone:hover, .tg-spread__tone:focus { color: #FFFFFF; text-decoration: underline; }
.tg-spread__chip { width: 40px; height: 40px; margin-top: 20px; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.85); }
.tg-spread__name {
  margin: 14px 0 0;
  font-family: var(--tg-display);
  font-weight: 300;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFFFF;
}
.tg-spread__code {
  margin: 8px 0 0;
  font-family: var(--tg-ui);
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
}
.tg-spread__rule { display: block; width: 44px; height: 1px; margin: 18px 0; background: rgba(255, 255, 255, 0.55); }
.tg-spread__lead { margin: 0 0 16px; font-size: 15px !important; color: #E9ECE8; }
.tg-spread__spec { margin: 0; display: flex; flex-direction: column; gap: 11px; }
.tg-spread__spec dt {
  font-family: var(--tg-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FFFFFF;
}
.tg-spread__spec dd { margin: 1px 0 0; font-size: 14px; line-height: 1.35; color: #DCE1DD; }

/* Sample button on the dark page: copper, like the header's Order samples. */
.tg-spread .tg-spread__sample { width: 100%; margin-top: 24px; padding: 0; gap: 10px; background: none; }
.tg-spread__sample .tg-sample-btn {
  width: 100%;
  border-color: var(--tg-orange);
  background: var(--tg-orange);
  color: var(--tg-orange-ink);
}
.tg-spread__sample .tg-sample-btn:hover,
.tg-spread__sample .tg-sample-btn[aria-pressed="true"] { border-color: #FFFFFF; background: #FFFFFF; color: var(--tg-ink); }
.tg-spread__sample .tg-sample-box__added { justify-content: center; gap: 4px 20px; }
.tg-spread__sample .tg-link-btn,
.tg-spread__sample .tg-remove-btn { color: #FFFFFF; }
.tg-spread__assure { margin: 0; font-size: 13px !important; color: #C3CBC6; }
.tg-spread a:focus-visible, .tg-spread button:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }

.tg-spread-after { padding-top: 56px; }
.tg-spread-after .tg-pd__choose { margin-top: 0; }
.tg-spread-after .tg-product__help { margin-top: 18px; }

@media (max-width: 991.98px) {
  .tg-spread { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(640px, auto); width: 100%; }
  .tg-spread__info { padding: 36px 24px 30px; }
}
@media (max-width: 767.98px) {
  .tg-spread-wrap { padding-top: 0; }
  .tg-spread-wrap .tg-container { padding-left: 0; padding-right: 0; }
  .tg-spread { grid-template-columns: 1fr; grid-auto-rows: auto; box-shadow: none; }
  .tg-spread__wood { height: 70vh; max-height: 620px; }
  .tg-spread__info { padding: 34px 20px 30px; }
  .tg-spread-after { padding-top: 40px; }
}


/* ---------- Planks / herringbone / chevron product pages (square floor photo) ---------- */

.tg-spread--product {
  --tg-photo: clamp(420px, calc(100vh - 170px), 640px);
  grid-template-columns: minmax(0, var(--tg-photo)) minmax(0, 440px);
  grid-auto-rows: minmax(var(--tg-photo), auto);
}
.tg-spread--product .tg-spread__wood .tg-zoom img { object-position: center; }
.tg-spread--product .tg-spread__chip { margin-top: 18px; }
.tg-spread__name--long { font-size: clamp(30px, 2.6vw, 40px); letter-spacing: 0.03em; line-height: 1.05; }

@media (max-width: 991.98px) {
  .tg-spread--product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-auto-rows: minmax(560px, auto); }
}
@media (max-width: 767.98px) {
  .tg-spread--product { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tg-spread--product .tg-spread__wood { height: auto; aspect-ratio: 1; max-height: none; }
}
