/* ==========================================================================
   Rentals catalog (patrickta.com/collections/shop layout) and rental detail
   pages (Slight Twist hierarchy, Partake stacking). Loaded after home.css,
   which provides .card, .band, .eyebrow, .h2, the closing band and footer.
   ========================================================================== */

/* ==========================================================================
   CATALOG
   ========================================================================== */
.catalog {
  padding: calc(var(--chrome-inset) + var(--chrome-h) + clamp(20px, 3.5vw, 48px)) var(--page-gutter) var(--section-pad);
}

/* Breadcrumb (Patrick Ta: small text row above the title) */
.crumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-ui);
  font-weight: 500;
  color: var(--ink-70);
}
.crumbs a { transition: color var(--dur-fast) var(--ease-ambient); }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { color: var(--lilac); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.catalog__title {
  margin-top: clamp(0.75rem, 1.6vw, 1.25rem);
  font-size: clamp(2.5rem, 5.4vw, 5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---- Toolbar: layout switch | filters ............ count ------------------ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(1.25rem, 2.6vw, 2.25rem);
  padding: 0.75rem 0;
  border-top: 1px solid var(--lilac);
  border-bottom: 1px solid var(--lilac);
}
.toolbar__left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}
.layout { display: flex; align-items: center; gap: 1rem; }
.layout--mobile { display: none; }
.layout__opt { display: grid; }
.layout__opt input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.layout__opt label {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--ink);
  opacity: 0.3;                                   /* Patrick Ta: unselected 0.3 */
  cursor: pointer;
  transition: opacity 200ms var(--ease-ambient);
}
.layout__opt input:checked + label { opacity: 1; }
.layout__opt input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.toolbar__divider { width: 1px; height: 22px; background: var(--lilac); flex-shrink: 0; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(14px, 1.8vw, 28px);
}
.filter {
  min-height: 40px;
  padding: 0.5rem 2px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-45);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-ambient), border-color var(--dur-fast) var(--ease-ambient);
}
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); border-color: var(--gold); }
.toolbar__count {
  font-size: var(--text-ui);
  font-weight: 500;
  color: var(--ink-70);
  white-space: nowrap;
}
.toolbar__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}
.catalog-filter-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.catalog-filter-toggle svg { flex: none; }
.catalog-filter-toggle:hover span:not(.catalog-filter-toggle__count),
.catalog-filter-toggle:focus-visible span:not(.catalog-filter-toggle__count) { color: var(--cobalt, #2f6fe4); }
.catalog-filter-toggle__count {
  display: grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.7rem;
  line-height: 1;
}
.catalog-filter-toggle__count[hidden] { display: none; }

.catalog-controls {
  position: relative;
  margin: 0;
  padding: clamp(1.4rem, 2.5vw, 2.25rem) 0;
  border-bottom: 1px solid var(--lilac);
  background: var(--ivory);
}
.catalog-controls[hidden] { display: none; }
.catalog-controls__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.catalog-controls__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}
.catalog-controls__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
}
.catalog-controls__groups {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) repeat(2, minmax(250px, 1fr));
  gap: clamp(1.25rem, 3vw, 3rem);
}
.catalog-control {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.catalog-control > span,
.catalog-control legend {
  display: block;
  margin-bottom: 0.75rem;
  padding: 0;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.catalog-control--sort select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 2.7rem 0.65rem 0.9rem;
  border: 1px solid var(--lilac);
  border-radius: 4px;
  background-color: #fffdf7;
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--font-body);
}
.catalog-control:not(.catalog-control--sort) {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.65rem;
}
.catalog-control:not(.catalog-control--sort) legend { width: 100%; }
.catalog-control label {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.catalog-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.catalog-control label span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--lilac);
  border-radius: 999px;
  background: #fffdf7;
  color: var(--ink-70);
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.2;
}
.catalog-control input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ivory);
}
.catalog-control input:focus-visible + span,
.catalog-control--sort select:focus-visible,
.catalog-filter-toggle:focus-visible,
.catalog-controls__close:focus-visible,
.catalog-controls__reset:focus-visible,
.catalog-controls__done:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.catalog-controls__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.catalog-controls__reset,
.catalog-controls__done {
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.catalog-controls__reset {
  padding: 0.5rem 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink-70);
}
.catalog-controls__done {
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
}

/* ---- Product list (Patrick Ta .product-list) ----------------------------
   Four columns, dense flow. Each card spans two grid rows (media, info) via
   subgrid so a promo tile that spans one row lines up with the image row of
   its neighbours exactly as on the reference. ----------------------------- */
.plist {
  --cols: 4;
  --colgap: 3rem;
  --rowgap: 4rem;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: auto;
  column-gap: var(--colgap);
  row-gap: 0;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.plist .card {
  flex: none;
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  min-width: 0;
}
.plist .card[hidden] { display: none; }
.plist .card__media { display: block; }
.plist .card__info {
  padding: 1.25rem 0 var(--rowgap);         /* Patrick Ta: info sits 1.5rem below the image */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.plist .card__name { margin-top: 0; font-size: var(--text-tile); }
.plist .card__name a {
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: 0 100%;
  transition: background-size var(--dur-fast) var(--ease-ambient);
}
.plist .card__name a:hover,
.plist .card__name a:focus-visible { background-size: 100% 1.5px; }
@media (hover: hover) {
  .plist .card__media:hover .card__img--alt,
  .plist .card__media:focus-visible .card__img--alt { opacity: 1; }
}

/* Promo tile (Patrick Ta product-list__promo): two columns wide. It occupies
   both grid rows like a card, but its box fills only the image row, so the
   cards beside it and the row after it line up exactly. */
.promo-tile {
  grid-column: span 2;
  grid-row: span 2;
  display: grid;
  grid-template-rows: subgrid;
  min-width: 0;
}
.promo-tile[hidden] { display: none; }
.promo-tile__box {
  grid-row: 1;
  position: relative;
  overflow: hidden;
  background: var(--deep-ivory);
  color: var(--ivory);
  display: flex;
  align-items: flex-start;
}
.promo-tile__spacer { grid-row: 2; padding-bottom: var(--rowgap); }
.promo-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.promo-tile__box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 31, 0.28);       /* flat scrim, no gradient */
}
.promo-tile__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: clamp(1.25rem, 2.4vw, 2.25rem);
  text-shadow: 0 1px 2px rgba(22, 22, 31, 0.5);
}
.promo-tile__title {
  font-family: var(--font-display);
  font-variation-settings: var(--display-axes);
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.promo-tile__body .btn { text-shadow: none; margin-top: 0.25rem; }

/* Empty state (a category with nothing in it): the dog, small, and a line */
.plist__empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: var(--section-pad) 0;
  text-align: center;
}
.plist__empty[hidden] { display: none; }
.plist__empty img { width: 72px; height: auto; }

/* ---- "Smaller cards" desktop layout: image-only thumbnails, 5 to 7 across */
.plist[data-desktop="small"] { --cols: 6; --colgap: 1.5rem; }
.plist[data-desktop="small"] .card { grid-row: span 1; grid-template-rows: auto; padding-bottom: var(--colgap); }
.plist[data-desktop="small"] .card__info,
.plist[data-desktop="small"] .promo-tile { display: none; }
@media (min-width: 1280px) { .plist[data-desktop="small"] { --cols: 7; } }

/* ---- End of grid: one quiet ask, aligned with the toolbar --------------- */
.catalog__end {
  margin-top: clamp(1rem, 2vw, 2rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--lilac);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.catalog__end p {
  font-family: var(--font-display);
  font-variation-settings: var(--display-axes);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---- 1024 to 1279: the six labels fit on one line at a slightly smaller size */
@media (max-width: 1279px) {
  .filter { font-size: 0.75rem; letter-spacing: 0.07em; }
  .filters { gap: 0 18px; }
}

/* ---- Tablet: two columns (Patrick Ta below 1000px); toolbar becomes two
   rows: layout switch and count, then a scrolling filter row ------------- */
@media (max-width: 1023px) {
  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "icons count" "filters filters";
    row-gap: 0.25rem;
    align-items: center;
  }
  .toolbar__left { display: contents; }
  .toolbar__divider { display: none; }
  .layout--desktop { grid-area: icons; }
  .toolbar__count { grid-area: count; }
  .toolbar__meta { grid-area: count; }
  .filters {
    grid-area: filters;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(var(--page-gutter) * -1);
    padding-inline: var(--page-gutter);
    gap: 0 18px;
  }
  .filters::-webkit-scrollbar { display: none; }

  .catalog-controls__groups { grid-template-columns: 1fr 1fr; }
  .catalog-control--sort { grid-column: 1 / -1; }

  .plist { --cols: 2; --colgap: 1.5rem; --rowgap: 2rem; }
  .plist .card__info { padding-top: 1rem; }
  .plist[data-desktop="small"] { --cols: 5; --colgap: 1rem; }
}

/* ---- Mobile: 2 or 3 per row switch; filters scroll in one row ------------ */
@media (max-width: 767px) {
  html.catalog-controls-open,
  html.catalog-controls-open body {
    overflow: hidden;
  }

  .layout--desktop { display: none; }
  .layout--mobile { display: none; }

  .plist,
  .plist[data-desktop="small"],
  .plist[data-mobile="3"] {
    --cols: 1;
    --colgap: 0;
    --rowgap: 1.25rem;
  }
  .plist[data-desktop="small"] .card { grid-row: span 2; grid-template-rows: subgrid; padding-bottom: 0; }
  .plist[data-desktop="small"] .card__info { display: flex; }
  .plist[data-desktop="small"] .promo-tile { display: grid; }
  .promo-tile { grid-column: 1 / -1; }
  .promo-tile__title { font-size: clamp(1.35rem, 6vw, 1.75rem); }

  .plist[data-mobile="3"] .card { grid-row: span 2; grid-template-rows: subgrid; padding-bottom: 0; }
  .plist[data-mobile="3"] .card__info { display: flex; }
  .plist[data-mobile="3"] .promo-tile { display: grid; }

  .plist .card__media { aspect-ratio: 4 / 3; }
  .plist .card__info {
    position: relative;
    display: flex;
    min-height: 44px;
    padding: 0 0 var(--rowgap);
  }
  .plist .card__name {
    width: 100%;
    font-size: 1rem;
    line-height: 1.2;
  }
  .plist .card__name a {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: none;
  }
  .plist .card__name a::after {
    content: "\2192";
    flex: none;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
  }
  .plist .card__price {
    position: absolute;
    left: 0.75rem;
    top: -3.1rem;
    z-index: 2;
    margin: 0;
    padding: 0.5rem 0.625rem;
    border: 1px solid rgba(251, 244, 223, 0.42);
    border-radius: 4px;
    background: rgba(22, 22, 31, 0.86);
    color: var(--ivory);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .plist .card__price-prefix { display: none; }
  .plist .card__cta { display: none; }
  .catalog__end { flex-direction: column; align-items: flex-start; }

  .toolbar__count { display: none; }
  .catalog-filter-toggle span:not(.catalog-filter-toggle__count) { font-size: 0.75rem; }
  .catalog-controls {
    position: fixed;
    z-index: 90;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(82svh, 720px);
    overflow-y: auto;
    padding: 1.25rem var(--page-gutter) calc(1.25rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--lilac);
    border-bottom: 0;
    box-shadow: 0 -18px 48px rgba(22, 22, 31, 0.16);
  }
  .catalog-controls__groups { grid-template-columns: 1fr; gap: 1.4rem; }
  .catalog-control--sort { grid-column: auto; }
  .catalog-control label span { font-size: 0.8125rem; }
  .catalog-controls__foot {
    position: sticky;
    bottom: calc(-1.25rem - env(safe-area-inset-bottom));
    margin-inline: calc(var(--page-gutter) * -1);
    padding: 1rem var(--page-gutter) calc(1rem + env(safe-area-inset-bottom));
    background: var(--ivory);
  }
}

@media (max-width: 429px) {
  .plist .card__cta { display: none; }        /* two columns at phone widths: name and price only */
}

/* ==========================================================================
   RENTAL DETAIL
   ========================================================================== */
.detail {
  --tone: var(--ivory);
  --tone-deep: var(--deep-ivory);
}

/* ---- Product hero ---------------------------------------------------------
   The product and the copy both stand on a lawn (the ground plane) at the
   bottom of the hero: nothing floats. Big, round, heavy title that the
   product tucks in front of. Bold product-coloured motif behind everything.
   The product bounces (Rule 14a, top of the spec) over a contact shadow. --- */
.phero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(28px, 4.5vw, 72px);              /* the same distance between product and title on every page */
  padding: calc(var(--chrome-inset) + var(--chrome-h)) var(--page-gutter) 0;
  background: var(--tone);
  overflow: hidden;
}
.phero__ground {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: 0;
  height: 22%;
  background: var(--accent);                  /* the product's own colour */
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;    /* a gentle mound of lawn */
}
.phero__media {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  max-width: 54vw;
  display: grid;
  place-items: end center;
  padding: 0 0 8vh;
}
.phero__media picture { position: relative; display: block; max-width: 100%; }
.phero__img {
  position: relative;
  width: 100%;                                /* never wider than its column */
  max-height: 68vh;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
}
.phero__shadow {
  position: absolute;
  left: 50%;
  bottom: calc(8vh - 1.5vh);
  width: 58%;
  height: 4vh;
  border-radius: 50%;
  background: rgba(22, 22, 31, 0.42);
  filter: blur(7px);
  transform: translateX(-50%) scaleX(1);
  transform-origin: center;
}
.phero--cutout .phero__img {
  animation: productBob 2s var(--ease-ambient) infinite alternate;   /* 4s cycle, 15px, vertical only */
  will-change: transform;
}
.phero--cutout .phero__shadow {
  animation: productShadow 2s var(--ease-ambient) infinite alternate;
}
@keyframes productBob {
  from { transform: translateY(0); }
  to   { transform: translateY(-15px); }
}
@keyframes productShadow {
  from { transform: translateX(-50%) scaleX(1); opacity: 1; }
  to   { transform: translateX(-50%) scaleX(0.82); opacity: 0.55; }
}
.phero__copy {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  max-width: min(40vw, 620px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 6vh 0 calc(22vh + 4vh);
}
.phero__eyebrow { color: var(--gold); font-weight: 700; }
.phero__title {
  font-size: clamp(3.25rem, 7.6vw, 8rem);
  font-weight: 600;                           /* same face and weight as the homepage title */
  font-variation-settings: var(--display-axes);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 9ch;
  color: var(--ink);
}
.phero__block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
}
.phero__line {
  max-width: 30ch;
  font-size: clamp(1.125rem, 1.45vw, 1.375rem);
  font-weight: 600;
  line-height: 1.35;
}
.phero__price {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-70);
}
.phero__price strong { color: var(--ink); font-weight: 800; }
.phero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.25rem;
}

/* ---- Story: one big, confident statement under the product side --------- */
.story {
  padding: calc(var(--section-pad) * 0.9) var(--page-gutter) calc(var(--section-pad) * 0.7);
}
.story__text {
  max-width: 34ch;
  font-size: clamp(1.375rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---- Details: grouped typography, two columns, no cards ------------------ */
.specs {
  padding: 0 var(--page-gutter) var(--section-pad);
}
.specs__inner {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  border-top: 1px solid var(--lilac);
  padding-top: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 8vw, 8rem);
}
.specs__head { grid-column: 1 / -1; }
.specs__head .h2 { margin-top: 0.35rem; }
.spec { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.spec__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.spec__list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(192, 180, 204, 0.55);
  font-size: 1rem;
  line-height: 1.5;
}
.spec__list li:last-child { border-bottom: 0; }
.spec__list .link { font-size: inherit; padding: 0; }

/* ---- Secondary imagery: pair (big left bleed + small offset) or one band -- */
.gallery {
  padding: 0 0 var(--section-pad);
}
.gallery--pair {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
  align-items: start;
  padding-right: var(--page-gutter);
}
.gallery__big { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--deep-ivory); }
.gallery__small { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--deep-ivory); margin-top: clamp(3rem, 12vw, 12rem); }
.gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.gallery--single .band { min-height: clamp(400px, 62vh, 680px); }

/* ---- Related: three squares on the product's tone ----------------------- */
.related {
  background: var(--tone);
  padding: var(--section-pad) var(--page-gutter);
}
.related__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.related__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 3rem;
}
.related__grid .card {
  flex: 0 0 calc((100% - 6rem) / 3);
  display: flex;
  flex-direction: column;
}
.related__grid .card__info { display: flex; flex-direction: column; align-items: flex-start; padding-top: 1rem; }
.related__grid .card__name { margin-top: 0; }
@media (hover: hover) {
  .related__grid .card__media:hover .card__img--alt { opacity: 1; }
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1023px) {
  .phero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-top: calc(var(--chrome-inset) + var(--chrome-h) + 1rem);
  }
  .phero__copy { order: 1; max-width: none; padding: 1.5rem 0; gap: 0.5rem; }
  .phero__title { font-size: clamp(2.75rem, 11vw, 4.5rem); max-width: 12ch; }
  .phero__media { order: 2; max-width: none; padding: 1rem 0 56px; align-self: center; }
  .phero__img { width: min(100%, 560px); max-height: 52vh; }
  .phero__ground { height: 120px; border-radius: 50% 50% 0 0 / 60% 60% 0 0; }
  .phero__shadow { bottom: 44px; height: 18px; }
  .story__text { max-width: 30ch; font-size: clamp(1.25rem, 5vw, 1.6rem); }
  .related__grid .card { flex-basis: calc((100% - 3rem) / 2); }
  .related__grid { gap: 1.5rem; }
}
@media (max-width: 767px) {
  .specs__inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .gallery--pair { grid-template-columns: minmax(0, 1fr); padding-right: 0; gap: 0.75rem; }
  .gallery__small { margin-top: 0; }
  .related__grid .card { flex-basis: calc((100% - 1rem) / 2); }
  .related__grid { gap: 1rem; }
  .related__grid .card__cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .phero--cutout .phero__img { animation: none; transform: translateY(-15px); }   /* frozen at the top of the cycle */
  .phero--cutout .phero__shadow { animation: none; transform: translateX(-50%) scaleX(0.82); opacity: 0.55; }
  .filter, .layout__opt label, .crumbs a { transition: none; }
}

/* ==========================================================================
   DETAIL — per-product tailoring (added 2026-09-04)
   Background motif, Wet or Dry switch, treat add-ons, related on ivory
   ========================================================================== */

/* ---- Motif: hand-scattered shapes drawn for the product, tone-on-tone ---- */
.motif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--motif, var(--gold));
  opacity: var(--motif-a, 0.3);
  pointer-events: none;
}
.motif--quiet { opacity: calc(var(--motif-a, 0.3) * 0.75); }

/* ---- Wet or Dry: two-state switch under the price ------------------------ */
.wetdry {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.wetdry__label {
  font-size: var(--text-ui);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-70);
}
.wetdry__group {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-btn);
  overflow: hidden;
}
.wetdry__opt { position: relative; }
.wetdry__opt input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wetdry__opt span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.45rem 1.1rem;
  font-size: var(--text-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-ambient), color var(--dur-fast) var(--ease-ambient);
}
.wetdry__opt + .wetdry__opt span { border-left: 1.5px solid var(--ink); }
.wetdry__opt input:checked + span { background: var(--ink); color: var(--ivory); }
.wetdry__opt input[value="wet"]:checked + span { background: #BFE3F2; color: var(--ink); }   /* water: light blue */
.wetdry__opt input[value="wet"]:checked + span svg { color: #1D3A6E; }
.wetdry__opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.wetdry__opt svg { width: 12px; height: 12px; }
.wetdry__note {
  flex-basis: 100%;
  font-size: 0.875rem;
  color: var(--ink-70);
}
/* wet-only lines (hose hookup, towels) appear only when Wet is selected */
.detail .wet-only { display: none; }
.detail[data-water="wet"] .wet-only { display: revert; }
.detail[data-water="wet"] li.wet-only { display: list-item; }

/* ---- Treat add-ons: "Sweeten the deal" ---------------------------------- */
.treats {
  position: relative;
  background: var(--tone);
  padding: var(--section-pad) var(--page-gutter);
  overflow: hidden;
}
.treats__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.treats__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}
.treats__line { color: var(--ink-70); }
.treats__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
  width: 100%;
}
.treat {
  flex: 0 0 calc((100% - 4rem) / 3);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.treat__pick {
  position: relative;
  display: block;
  cursor: pointer;
}
.treat__pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.treat__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;                       /* add-on tiles are squares too */
  overflow: hidden;
  background: var(--deep-ivory);
  outline: 2px solid transparent;
  outline-offset: 0;                          /* selected state is immediate, no fade */
}
.treat__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.treat__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--ivory);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-btn);
  color: var(--ivory);
}
.treat__check svg { width: 14px; height: 14px; }
.treat.is-on .treat__media { outline-color: var(--ink); }
.treat.is-on .treat__check { background: var(--ink); }
.treat__pick input:focus-visible ~ .treat__media { outline-color: var(--gold); }
.treat__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding-top: 0.875rem;
}
.treat__name { font-size: var(--text-tile); font-weight: 600; }
.treat__price { font-size: var(--text-tile); font-weight: 500; color: var(--ink-70); }
.treat__info .link { margin-top: 0.35rem; }
.treats__summary {
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  min-height: 1.5em;
}

/* ---- Related on plain ivory, ruled off from the section above ----------- */
.related { background: var(--ivory); }
.related__head { border-top: 1px solid var(--lilac); padding-top: clamp(2rem, 4vw, 3rem); }

@media (max-width: 767px) {
  .treat { flex-basis: calc((100% - 1rem) / 2); }
  .treats__grid { gap: 1rem; }
  .treat__info .link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wetdry__opt span { transition: none; }
}


/* ---- Inflated CTA: the product's colour, shaped like vinyl ---------------- */
.btn--inflate {
  min-height: 56px;
  padding: 1rem 1.9rem;
  border-radius: 999px;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.38),    /* top gloss */
    inset 0 -4px 0 rgba(22, 22, 31, 0.22),      /* underside shade */
    0 6px 14px rgba(22, 22, 31, 0.16);
  transition: transform var(--dur-fast) var(--ease-ambient), filter var(--dur-fast) var(--ease-ambient);
}
.btn--inflate:hover,
.btn--inflate:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  filter: brightness(1.08);
  transform: scale(1.04);                       /* it inflates a touch */
}
@media (prefers-reduced-motion: reduce) {
  .btn--inflate { transition: none; }
  .btn--inflate:hover, .btn--inflate:focus-visible { transform: none; }
}

/* ---- Cake House product world review pass ------------------------------- */
.detail[data-slug="cake-house"] {
  --tone: #FFF3BE;
  --tone-deep: #FFE39A;
  --accent: #156EC5;
  --accent-ink: #FFFFFF;
  background: #FFF3BE;
}
.detail[data-slug="cake-house"] .phero {
  background-image: url("../bundled/product-worlds/cake-house-hero-bg.webp");
  background-size: cover;
  background-position: center bottom;
}
.detail[data-slug="cake-house"] .phero .motif,
.detail[data-slug="cake-house"] .treats .motif {
  display: none;
}
.detail[data-slug="cake-house"] .phero__ground {
  display: none;
}
.detail[data-slug="cake-house"] .phero__media {
  padding-bottom: clamp(34px, 7vh, 72px);
}
.detail[data-slug="cake-house"] .phero__copy {
  z-index: 2;
  padding-bottom: clamp(96px, 18vh, 168px);
}
.detail[data-slug="cake-house"] .phero__eyebrow,
.detail[data-slug="cake-house"] .spec__label {
  color: #156EC5;
}
.detail[data-slug="cake-house"] .story,
.detail[data-slug="cake-house"] .specs {
  background: #FFF3BE;
}
.detail[data-slug="cake-house"] .specs__inner {
  border-top-color: rgba(22, 22, 31, 0.24);
}
.detail[data-slug="cake-house"] .spec__list li {
  border-bottom-color: rgba(22, 22, 31, 0.24);
}
.detail[data-slug="cake-house"] .treats {
  background:
    linear-gradient(rgba(255, 243, 190, 0.78), rgba(255, 243, 190, 0.78)),
    url("../bundled/product-worlds/cake-house-addons-bg.webp") center / cover;
}
.detail[data-slug="cake-house"] .gallery {
  background: #FFF3BE;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1rem, 3vw, 2.5rem) 0 clamp(2.5rem, 7vw, 6rem);
}
.detail[data-slug="cake-house"] .gallery__scene {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  width: min(100%, 1440px);
  margin-inline: auto;
  overflow: hidden;
  background: #FFF0BC;
}
.detail[data-slug="cake-house"] .gallery__scene--action::after,
.detail[data-slug="cake-house"] .gallery__scene--people::after {
  content: "";
  position: absolute;
  left: 10%;
  bottom: 7%;
  z-index: 1;
  width: 34%;
  height: 8%;
  border-radius: 50%;
  background: rgba(22, 22, 31, 0.3);
  filter: blur(12px);
}
.detail[data-slug="cake-house"] .gallery__scene--people::after {
  left: 18%;
  bottom: 8%;
}
.detail[data-slug="cake-house"] .gallery__product {
  position: absolute;
  left: 7%;
  bottom: 6%;
  z-index: 2;
  width: min(34%, 520px);
  height: auto;
  filter: drop-shadow(0 22px 18px rgba(22, 22, 31, 0.28));
}
.detail[data-slug="cake-house"] .gallery__product--people {
  left: 16%;
  bottom: 7%;
  width: min(31%, 480px);
}
.detail[data-slug="cake-house"] .related {
  background: #156EC5;
  color: var(--ivory);
}
.detail[data-slug="cake-house"] .related__head {
  border-top-color: rgba(255, 255, 255, 0.42);
}
.detail[data-slug="cake-house"] .related .eyebrow,
.detail[data-slug="cake-house"] .related .h2,
.detail[data-slug="cake-house"] .related .card__name a,
.detail[data-slug="cake-house"] .related .card__price {
  color: var(--ivory);
}
.detail[data-slug="cake-house"] .related .btn--secondary {
  border-color: var(--ivory);
  background: var(--ivory);
  color: #16161F;
}
.detail[data-slug="cake-house"] .onramp {
  min-height: clamp(420px, 62vh, 700px);
}
.detail[data-slug="cake-house"] .onramp::after {
  background: rgba(22, 22, 31, 0.36);
}

@media (max-width: 1023px) {
  .detail[data-slug="cake-house"] .phero__copy {
    padding-bottom: 1.5rem;
  }
  .detail[data-slug="cake-house"] .phero__media {
    padding-bottom: 52px;
  }
  .detail[data-slug="cake-house"] .gallery__product {
    width: 37%;
  }
  .detail[data-slug="cake-house"] .gallery__product--people {
    left: 12%;
    width: 34%;
  }
}

@media (max-width: 767px) {
  .detail[data-slug="cake-house"] .gallery {
    padding-top: 0;
  }
  .detail[data-slug="cake-house"] .gallery__product {
    left: 3%;
    bottom: 3%;
    width: 42%;
  }
  .detail[data-slug="cake-house"] .gallery__product--people {
    left: 8%;
    bottom: 4%;
    width: 39%;
  }
}
