/* ============================================================
   PRODUCT PAGE  —  insulated-garden-shed.html
   Loads AFTER styles.css and reuses its design tokens and
   shared components (.hero, .configurator, .feature-item,
   .cart-*, .enquiry-*, .footer, .btn, .section …).
   Only the page-specific components live here.
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding-top: calc(var(--nav-height) + 1rem);
  padding-bottom: 0.25rem;
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-light);
  list-style: none;
}
.breadcrumb__list a { color: var(--green-mid); font-weight: 600; }
.breadcrumb__list a:hover { text-decoration: underline; }
.breadcrumb__sep { opacity: 0.5; }
.breadcrumb__current { color: var(--text-mid); }

/* ---------- Product hero (image-led) ---------- */
.product-hero {
  position: relative;
  overflow: hidden;
  background: var(--green-dark);
  color: var(--white);
}
.product-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keep the shed (and the dog) in frame as the hero narrows — the subject
     sits right of centre, so bias the crop that way rather than centring. */
  object-position: 62% 50%;
  z-index: 0;
}
.product-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Daylight shot: hold the scrim dark across the copy column, then drop it
     off quickly so the shed stays bright instead of going muddy. */
  background: linear-gradient(
    100deg,
    rgba(20, 38, 30, 0.94) 0%,
    rgba(20, 38, 30, 0.88) 32%,
    rgba(20, 38, 30, 0.62) 54%,
    rgba(20, 38, 30, 0.22) 76%,
    rgba(20, 38, 30, 0.08) 100%
  );
  z-index: 1;
}
.product-hero__inner {
  position: relative;
  z-index: 2;
  padding-block: 4.5rem 4rem;
  max-width: 640px;
}
.product-hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.product-hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 1rem;
}
.product-hero__sub {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 1.75rem;
}
.product-hero__pricing {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.product-hero__price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--white);
}
.product-hero__price-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.product-hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ---------- Quick specs strip ---------- */
.quickspecs { background: var(--white); border-bottom: 1px solid var(--cream-dark); }
.quickspecs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--cream-dark);
}
.quickspec {
  background: var(--white);
  padding: 1.5rem 1rem;
  text-align: center;
}
.quickspec__value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 800;
  color: var(--green-mid);
  line-height: 1.1;
}
.quickspec__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ---------- Gallery ---------- */
/* Six equal tiles, three across and two down. The photos are a mix of landscape
   and portrait, so the cell is deliberately between the two (about 1.3:1) —
   every shot takes a moderate crop rather than one group being mangled to suit
   the other. Uniform tiles also mean adding or removing a photo can't leave a
   hole, unlike the earlier mixed-span mosaic. */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  gap: 0.85rem;
}
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--cream-dark);
  cursor: pointer;
  border: none;
  padding: 0;
  width: 100%;
  height: 100%;
}
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.gallery__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.5rem 0.9rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  text-align: left;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
/* Placeholder tile (photo coming soon) */
.gallery__item--ph {
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-light);
  border: 2px dashed var(--cream-dark);
  background: var(--cream);
}
.gallery__item--ph svg { width: 30px; height: 30px; opacity: 0.55; }
.gallery__item--ph span { font-size: 0.8rem; font-weight: 600; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 18, 14, 0.92);
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox__close {
  position: absolute;
  top: 1.1rem; right: 1.25rem;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox__close:hover { background: rgba(255,255,255,0.28); }
.lightbox__close svg { width: 22px; height: 22px; }

/* ---------- Feature media (image inside an expandable feature) ---------- */
.feature-item__body { display: flex; gap: 1.25rem; align-items: flex-start; }
.feature-item__body .feature-item__bullets { flex: 1; }
.feature-item__media {
  flex: 0 0 200px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-dark);
}
.feature-item__media img { width: 100%; height: 150px; object-fit: cover; display: block; }
/* The panel shot carries a printed mm scale that's the whole point of it and is
   unreadable at 200px wide, so that tile opens in the lightbox. */
.feature-item__media--zoom { padding: 0; border: none; cursor: zoom-in; }
.feature-item__media--zoom:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.feature-item__media--ph {
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-light);
  border: 2px dashed var(--cream-dark);
  background: var(--cream);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
}
.feature-item__media--ph svg { width: 26px; height: 26px; opacity: 0.5; }

/* ---------- Specifications table ---------- */
/* A real 2x2 grid, not a multi-column flow: columns pack independently and the
   second card in each column ends up at a different height, so the four card
   tops don't line up. Stretching rows keeps every edge aligned, and the cards
   are ordered short/short then 5/5 so almost no slack is left to pad out. */
.specs__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
.spec-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
}
.spec-table caption {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-mid);
  background: var(--cream);
  border-bottom: 2px solid var(--amber);
  padding: 0.85rem 1.25rem;
}
.spec-table th,
.spec-table td {
  padding: 0.7rem 1.25rem;
  border-top: 1px solid var(--cream-dark);
  font-size: 0.9rem;
  vertical-align: top;
  line-height: 1.45;
}
.spec-table th {
  width: 45%;
  text-align: left;
  font-weight: 500;
  color: var(--text-light);
  padding-right: 0.5rem;
}
.spec-table td {
  text-align: right;
  font-weight: 500;
  color: var(--text-dark);
}
.spec-table tbody tr:first-child th,
.spec-table tbody tr:first-child td { border-top: none; }
.spec-table tbody tr:hover th,
.spec-table tbody tr:hover td { background: var(--cream); }

/* "On request" reads as an invitation to email, not as a blank */
.spec-table__ask a {
  font-style: italic;
  font-weight: 400;
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-light);
  transition: color var(--transition), border-color var(--transition);
}
.spec-table__ask a:hover,
.spec-table__ask a:focus-visible {
  color: var(--amber-dark);
  border-bottom-color: var(--amber-dark);
}

/* ---------- FAQ (reuses .feature-list / .feature-item details) ---------- */
.faq .feature-item__summary { font-weight: 600; }
.faq .feature-item__text { font-weight: 500; }

/* ---------- Closing CTA band ---------- */
.product-cta { background: var(--green-dark); color: var(--white); text-align: center; }
.product-cta__title { color: var(--white); font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 0.75rem; }
.product-cta__sub { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 1.75rem; line-height: 1.7; }

/* ---------- Dimensions & inclusions ----------
   Exterior diagram and annotated interior sit side by side as a matched pair,
   with the inclusions list underneath. Both source images are cropped to 4:3 so
   they fill the shared box edge to edge — object-fit:cover here is a guard
   against sub-pixel rounding, not a real crop. Keep new images in this pair at
   4:3 or they'll letterbox. */
#dimensions .dimension-wrap { margin-bottom: 0; }

.dimension-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.dimension-pair__item { margin: 0; }
.dimension-pair .dimension-wrap {
  aspect-ratio: 4 / 3;
  display: flex;
}
.dimension-pair .dimension-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dimension-pair__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-lg);
}
.dimension-pair__btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.dimension-pair__cap {
  margin-top: 0.8rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-light);
}

/* Inclusions now run full width under the pair — two columns so seven short
   items don't become one tall thin list. */
.inclusions--below { margin-top: 2.75rem; }
.inclusions--below .inclusions__heading { text-align: center; }
/* .inclusions__list is a flex column by default, so override display outright
   rather than relying on CSS `columns` (inert on a flex container). */
.inclusions--below .inclusions__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
  row-gap: 0.8rem;
  max-width: 860px;
  margin: 0 auto;
}
#dimensions .inclusions__heading { font-size: 1.15rem; margin-bottom: 1.125rem; }
#dimensions .inclusions__list { gap: 0.8rem; }
#dimensions .inclusions__list li { font-size: 0.95rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Between the two extremes the copy column is a much larger share of the
   viewport than it is on desktop, so hold the scrim further right before
   letting it fall away. */
@media (min-width: 641px) and (max-width: 1024px) {
  .product-hero::after {
    background: linear-gradient(
      100deg,
      rgba(20, 38, 30, 0.94) 0%,
      rgba(20, 38, 30, 0.90) 45%,
      rgba(20, 38, 30, 0.74) 70%,
      rgba(20, 38, 30, 0.42) 88%,
      rgba(20, 38, 30, 0.20) 100%
    );
  }
}

@media (max-width: 900px) {
  .quickspecs__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 230px; }
  .gallery__item--wide { grid-column: span 2; }
  .gallery__item--tall { grid-row: span 1; }
  /* Side by side the two diagrams get too small to read their labels. */
  .dimension-pair { grid-template-columns: 1fr; gap: 1.75rem; }
  .inclusions--below .inclusions__list { grid-template-columns: 1fr; max-width: 420px; }
  .specs__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .product-hero__inner { padding-block: 3.5rem 3rem; }
  /* Copy runs full-bleed here, so a left-to-right scrim can't carry it —
     switch to a vertical one, easing off mid-height so the shed still reads
     behind the body copy (0.70 over the white wall still clears 6:1). */
  .product-hero::after {
    background: linear-gradient(
      175deg,
      rgba(20, 38, 30, 0.88) 0%,
      rgba(20, 38, 30, 0.70) 48%,
      rgba(20, 38, 30, 0.88) 100%
    );
  }
  /* Narrow crop: bias further right again so it frames the door, window and
     dog rather than the blank side wall. */
  .product-hero__media { object-position: 70% 50%; }
  .feature-item__body { flex-direction: column; }
  .feature-item__media { flex-basis: auto; width: 100%; }
  .feature-item__media img,
  .feature-item__media--ph { height: 180px; }
  /* Two columns this narrow wrap both the label and the value into ragged
     stacks, so drop to one: label above, value beneath. The th's border-top
     becomes the row divider. */
  .spec-table th,
  .spec-table td {
    display: block;
    width: auto;
    text-align: left;
    padding-inline: 1.1rem;
  }
  .spec-table th {
    padding-bottom: 0.1rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .spec-table td {
    padding-top: 0;
    border-top: none;
  }
}
