.page-intro {
  padding: clamp(3rem, 7vw, 4.25rem) 0 clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.page-intro h1 {
  margin: 0 0 0.75rem;
  font-size: var(--text-hero);
  font-weight: var(--weight, 300);
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: 0.02em;
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.65;
}

.page-intro p + p {
  margin-top: 1.35rem;
}

.collection-toolbar {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.25rem;
}

.collection-toolbar__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: var(--gap-col);
  min-width: 0;
  width: 100%;
}

.collection-toolbar h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: var(--weight, 300);
  text-align: center;
}

.collection-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--gap-col);
  width: 100%;
}

.product-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--gap-col);
}

.product-layout__btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-col);
}

.layout-btn {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight, 300);
  padding: 0;
  margin: 0;
  min-height: 0;
  min-width: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  transition: text-decoration-color var(--dur-fast) var(--ease);
}

.layout-btn[aria-pressed="true"] {
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness, 1px);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.layout-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.filters {
  display: flex;
  gap: var(--gap-col);
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight, 300);
  padding: 0.45rem 0.95rem;
  min-height: 2.5rem;
  border: 1px solid var(--line);
  background: var(--elevated);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: border-color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.filter-btn:hover {
  border-color: var(--line);
}

.filter-btn:active {
  transform: scale(0.98);
}

.filter-btn.is-active {
  font-weight: var(--weight, 300);
  border-color: var(--fg);
  background: var(--fg);
  color: var(--elevated);
}

/* Archive: underlined text filters (no pills) */
.filters--text {
  gap: 0.75rem 1rem;
}

.filter-btn--text {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness, 1px);
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  color: var(--muted);
}

.filter-btn--text:hover {
  text-decoration-color: var(--accent);
  color: var(--fg);
}

.filter-btn--text.is-active {
  font-weight: var(--weight, 300);
  background: transparent;
  color: var(--fg);
  text-decoration-color: var(--fg);
}

/* Text toolbar: layout toggle matches filter links */
.collection-toolbar__actions--text {
  gap: 0.75rem 1rem;
}

.product-layout__btns--text {
  gap: 0.75rem 1rem;
}

.layout-btn--text {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness, 1px);
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  color: var(--muted);
}

.layout-btn--text:hover {
  text-decoration-color: var(--accent);
  color: var(--fg);
}

.layout-btn--text[aria-pressed="true"] {
  font-weight: var(--weight, 300);
  background: transparent;
  color: var(--fg);
  text-decoration-color: var(--fg);
}

/* PLP: column count from data-cols (set by main.js); default 2 at ≥32rem, 4 at ≥48rem */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-v) var(--gap-h);
  padding-bottom: clamp(4.5rem, 12vw, 6rem);
}

@media (min-width: 32rem) {
  .product-grid:not(.product-grid--list):not([data-cols]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid:not(.product-grid--list)[data-cols="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid:not(.product-grid--list)[data-cols="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid:not(.product-grid--list)[data-cols="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-grid:not(.product-grid--list)[data-cols="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 48rem) {
  .product-grid:not(.product-grid--list):not([data-cols]) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-card {
  display: block;
  min-width: 0; /* grid item: allow track width to apply to the thumb */
  border-bottom: none;
  border-radius: var(--radius-sm);
  color: inherit;
  opacity: 1;
}

a.product-card:hover,
a.product-card:focus-visible {
  opacity: 1;
  color: inherit;
  border-bottom: none;
  box-shadow: none;
}

.product-card:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 4px;
  box-shadow: none;
}

.product-card:hover .label,
.product-card:focus-visible .label {
  color: var(--fg);
  text-decoration-color: var(--line);
}

/* span.thumb must be a sized block: abspos imgs do not give the box height/width. */
.product-card .thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: var(--product-thumb-aspect);
  overflow: hidden;
  background: var(--surface);
  border-radius: 0;
  isolation: isolate;
}

.product-card .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity var(--product-thumb-fade) var(--product-thumb-ease);
}

/* Stacking: default on top at rest; crossfade to worn when ready */
.product-card .thumb img.default {
  opacity: 1;
  z-index: 1;
}

.product-card .thumb img.worn {
  opacity: 0;
  z-index: 0;
}

@media (hover: hover) {
  .product-card:hover:has(.thumb img.worn.is-worn-ready) .thumb img.default,
  .product-card:focus-visible:has(.thumb img.worn.is-worn-ready) .thumb img.default {
    opacity: 0;
    z-index: 0;
  }

  .product-card:hover .thumb img.worn.is-worn-ready,
  .product-card:focus-visible .thumb img.worn.is-worn-ready {
    opacity: 1;
    z-index: 1;
  }
}

@media (hover: none) {
  .product-card.is-worn-active:has(.thumb img.worn.is-worn-ready) .thumb img.default {
    opacity: 0;
    z-index: 0;
  }

  .product-card.is-worn-active .thumb img.worn.is-worn-ready {
    opacity: 1;
    z-index: 1;
  }
}

.product-card .label {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--weight, 300);
  letter-spacing: 0.01em;
  line-height: 1.45;
  margin-top: 5px;
  margin-bottom: 5px;
  display: block;
  border-bottom: none;
  color: var(--fg);
  overflow-wrap: anywhere;
  max-width: 100%;
  text-align: center;
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness, 1px);
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

/* List + browse region (data-plp-browse, data-product-list-preview in main.js) */
[data-plp-browse] {
  position: relative;
  width: 100%;
}

@media (min-width: 64rem) {
  [data-plp-browse] {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--gap-h);
  }

  [data-plp-browse] [data-product-list-preview] {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    flex: 0 0 min(20rem, 24vw);
    max-width: 24rem;
  }

  [data-plp-browse] .product-grid--list,
  [data-plp-browse] .product-grid:not(.product-grid--list) {
    flex: 1 1 0;
    min-width: 0;
  }
}

[data-product-list-preview] {
  margin: 0;
  padding: 0;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
  aspect-ratio: 5 / 7;
  max-height: min(70vh, 32rem);
}

[data-product-list-preview][hidden] {
  display: none;
}

@media (max-width: 63.99rem) {
  [data-product-list-preview] {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 40vh;
    aspect-ratio: auto;
    border-left: none;
    border-right: none;
    border-radius: 0;
    max-width: none;
  }
}

[data-product-list-preview] img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* List: label-only rows; hides thumbs */
.product-grid--list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0));
}

@media (min-width: 64rem) {
  .product-grid--list {
    padding-bottom: clamp(4.5rem, 12vw, 6rem);
  }
}

.product-grid--list .product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--gap-col);
  min-height: 0;
  padding: 0.85rem 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.product-grid--list .product-card:hover,
.product-grid--list .product-card:focus-visible {
  box-shadow: none;
  transform: none;
  outline: none;
}

.product-grid--list .product-card .thumb {
  display: none;
}

.product-grid--list .product-card .label {
  margin-top: 0;
  margin-bottom: 0;
  font-size: var(--text-xl);
  font-weight: var(--weight, 300);
  text-align: center;
}

.pdp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2.25rem, 5.5vw, 4rem);
  row-gap: var(--gap-v);
  padding: clamp(2.5rem, 5vw, 3.25rem) 0 clamp(4rem, 10vw, 5.5rem);
  align-items: start;
}

@media (max-width: 768px) {
  .pdp {
    grid-template-columns: 1fr;
    row-gap: clamp(1.75rem, 4.5vw, 2.75rem);
  }
}

.pdp-gallery {
  position: relative;
  background: var(--surface);
  border-radius: 0;
  overflow: hidden;
}

.pdp-slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  aspect-ratio: 1;
  scrollbar-width: none;
}

.pdp-slides::-webkit-scrollbar {
  display: none;
}

.pdp-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 100%;
}

.pdp-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-detail {
  font-size: var(--text-base);
  line-height: 1.55;
  margin-inline: var(--editorial-inset);
}

.pdp-detail h1 {
  margin: 0 0 1rem;
  font-size: inherit;
  font-weight: var(--weight, 300);
  line-height: 1.25;
  text-wrap: balance;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness, 1px);
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

.pdp-detail .lede {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.pdp-detail ul {
  font-size: 1.05rem;
  margin: 0 0 2rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.pdp-enquiry {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--header-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pdp-enquiry a {
  border-bottom: none;
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness, 1px);
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

.pdp-enquiry a:hover {
  text-decoration-color: var(--accent);
}

.pdp-back {
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
}

.pdp-back a {
  border-bottom: none;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity var(--dur-fast) var(--ease);
}

.pdp-back a:hover,
.pdp-back a:focus-visible {
  opacity: 1;
}

.about-prose {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: clamp(2.5rem, 6vw, 3.25rem) 0 clamp(4rem, 10vw, 5.5rem);
  box-sizing: border-box;
}

.about-prose p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.65;
}

.about-prose p:last-child {
  margin-bottom: 0;
}
