/* party catalog + product pages */

/* ============================== CATALOG ============================== */

/* --- Breadcrumb + page title --- */
.catalog__first_fold { padding: 24px 0 16px; }

.catalog__first_fold > .content,
.catalog__second_fold > .content {
  width: min(90vw, 1200px);
  margin: auto;
}

.catalog__first_fold .crumbs > ol {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--colour-1);
}

.catalog__first_fold .crumbs > ol > li + li::before {
  content: '>';
  margin-right: .5rem;
  color: var(--colour-1);
}

.catalog__first_fold .crumbs > ol > li[aria-current] { color: var(--colour-2); }

.catalog__first_fold > .content > h1 {
  margin: 1.5rem 0 0;
  color: var(--colour-1);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

/* --- Filter panel --- */
.catalog__second_fold { padding: 16px 0 60px; }

.catalog__second_fold .filters > .sheet-head > h2 {
  margin: 0;
  color: var(--colour-1);
  font-size: 1.125rem;
  font-weight: 700;
}

.catalog__second_fold .filters > .group {
  border-bottom: 1px solid var(--colour-6);
  padding: .75rem 0;
}

.catalog__second_fold .filters > .group > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .5rem 0;
  border: none;
  background: none;
  color: var(--colour-7);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.catalog__second_fold .filters > .group > .options {
  max-height: 0;
  overflow: hidden;
}

.catalog__second_fold .filters > .group.is-open > .options {
  max-height: none;
  overflow: visible;
}

.catalog__second_fold .filters .options > ul {
  margin: .5rem 0 0;
  padding: 0;
  list-style: none;
}

.catalog__second_fold .filters .options > ul > li { padding: .375rem 0; }

.catalog__second_fold .filters .options > ul > li > a {
  color: var(--colour-10);
  font-size: .9375rem;
}

.catalog__second_fold .filters .options > ul > li > a.is-current {
  color: var(--colour-2);
  text-decoration: underline;
}

.catalog__second_fold .filters .options > ul > li > label {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--colour-10);
  font-size: .9375rem;
  cursor: pointer;
}

/* --- Custom checkbox --- */
.catalog__second_fold .filters input[type="checkbox"] {
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--colour-5);
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.catalog__second_fold .filters input[type="checkbox"]:checked {
  border-color: var(--colour-2);
  background: var(--colour-2);
}

.catalog__second_fold .filters input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  margin: 1px auto 0;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.catalog__second_fold .filters input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--colour-2);
  outline-offset: 2px;
}

.catalog__second_fold .filters {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  background: white;
  padding: 0 1.25rem 5rem;
}

body.filters-open .filters { display: flex; }

.catalog__second_fold .filters > .sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 1rem 0;
  border-bottom: 1px solid var(--colour-6);
}

.catalog__second_fold .filters > .sheet-head > .sheet-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--colour-10);
  font-size: 1.125rem;
  cursor: pointer;
}

.catalog__second_fold .filters > .sheet-apply {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  border: none;
  border-radius: 10px;
  background: var(--colour-2);
  padding: .875rem;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}

/* --- Results toolbar + chips --- */
.catalog__second_fold > .content > .results > .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.catalog__second_fold .toolbar > .filters-open,
.catalog__second_fold .toolbar > .chips > li > button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px dashed transparent;
  border-radius: 999px;
  padding: .5rem 1rem;
  color: var(--colour-10);
  font-family: 'Poppins', sans-serif;
  font-size: .875rem;
  cursor: pointer;
}

.catalog__second_fold .toolbar > .filters-open {
  border: 1px solid var(--colour-6);
  background: white;
}

.catalog__second_fold .toolbar > .chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog__second_fold .toolbar > .chips > li:nth-child(5n+1) > button {
  background: var(--pill-1);
  border-color: var(--pill-1-edge);
}
.catalog__second_fold .toolbar > .chips > li:nth-child(5n+2) > button {
  background: var(--pill-2);
  border-color: var(--pill-2-edge);
}
.catalog__second_fold .toolbar > .chips > li:nth-child(5n+3) > button {
  background: var(--pill-3);
  border-color: var(--pill-3-edge);
}
.catalog__second_fold .toolbar > .chips > li:nth-child(5n+4) > button {
  background: var(--pill-4);
  border-color: var(--pill-4-edge);
}
.catalog__second_fold .toolbar > .chips > li:nth-child(5n+5) > button {
  background: var(--pill-5);
  border-color: var(--pill-5-edge);
}

.catalog__second_fold .toolbar > .sort { margin-left: auto; }

.catalog__second_fold .toolbar > .sort > select {
  border: none;
  background: none;
  color: var(--colour-10);
  font-family: 'Poppins', sans-serif;
  font-size: .9375rem;
  cursor: pointer;
}

/* Generic utility, intentionally global. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.catalog__second_fold .results > .product-cards { width: auto; }

.catalog__second_fold .results > .product-cards > .card > .sale-badge.oos {
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: .25rem .625rem;
  background: var(--colour-5);
  outline: none;
}

/* --- Pagination --- */
.catalog__second_fold .pagination { margin-top: 2.5rem; }

.catalog__second_fold .pagination > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog__second_fold .pagination > ul > li > a,
.catalog__second_fold .pagination > ul > li > span { font-size: .9375rem; }

.catalog__second_fold .pagination > ul > li > a { color: var(--colour-2); }

.catalog__second_fold .pagination > ul > li > a.is-current {
  color: var(--colour-10);
  font-weight: 600;
}

/* Gap ellipsis, not a link — muted so it does not read as clickable. */
.catalog__second_fold .pagination > ul > li > span { color: var(--colour-1); }

/* [hidden] must beat .card's display:flex, or filtered-out cards stay visible. */
.catalog__second_fold .results > .product-cards > .card[hidden] { display: none; }

.catalog__second_fold .no-results {
  margin: 2rem 0;
  text-align: center;
  color: var(--colour-1);
}
.catalog__second_fold .no-results[hidden] { display: none; }

/* ============================== PRODUCT ============================== */

.product__first_fold  { padding: 24px 0 16px; }
.product__second_fold { padding: 16px 0 40px; }
.product__third_fold  { padding: 16px 0 60px; }

.product__first_fold > .content,
.product__second_fold > .content,
.product__third_fold > .content {
  width: min(90vw, 1200px);
  margin: auto;
}

.product__first_fold .crumbs > ol {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--colour-1);
}

.product__first_fold .crumbs > ol > li + li::before {
  content: '>';
  margin-right: .5rem;
  color: var(--colour-1);
}

.product__first_fold .crumbs > ol > li[aria-current] { color: var(--colour-2); }

.product__first_fold .gallery {
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
}

.product__first_fold .gallery > .stage {
  border: 1px solid var(--colour-6);
  border-radius: 20px;
  overflow: hidden;
  background: white;
}

.product__first_fold .gallery > .stage > img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product__first_fold .gallery > .thumbs {
  display: flex;
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product__first_fold .gallery > .thumbs > li {
  flex: none;
  width: 72px;
}

.product__first_fold .gallery > .thumbs > li > button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--colour-6);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  cursor: pointer;
}

.product__first_fold .gallery > .thumbs > li > button:hover { border-color: var(--colour-2); }

.product__first_fold .gallery > .thumbs > li > button.is-current {
  border-color: var(--colour-2);
  border-width: 2px;
}

.product__first_fold .gallery > .thumbs > li > button:focus-visible {
  outline: 2px solid var(--colour-2);
  outline-offset: 2px;
}

.product__first_fold .gallery > .thumbs > li > button > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

/* --- Delivery panel --- */
.product__first_fold .delivery {
  border: 1px solid var(--colour-6);
  border-radius: 16px;
  background: var(--background-colour);
  padding: 1.25rem;
}

.product__first_fold .delivery > h2 {
  margin: 0 0 1rem;
  color: var(--colour-2);
  font-size: 1rem;
  font-weight: 700;
}

.product__first_fold .delivery > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product__first_fold .delivery > ul > li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
  color: var(--colour-2);
  font-size: .875rem;
}

.product__first_fold .delivery > ul > li > i {
  flex: none;
  color: var(--colour-2);
  font-size: 1.125rem;
}

.product__first_fold .delivery > ul > li > .label { margin-right: auto; }

.product__first_fold .delivery > ul > li > .value {
  color: var(--colour-2);
  font-weight: 500;
}

.product__first_fold .delivery > ul > li > a.value {
  color: var(--colour-2);
  text-decoration: underline;
}

/* --- Title + price --- */
.product__first_fold .buy > h1 {
  margin: 0 0 1rem;
  color: var(--colour-7);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.product__first_fold .buy > .price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .625rem;
  /* Rule separating the price block from the option fields, as in the mockup. */
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--colour-6);
  padding-bottom: 1.5rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  color: var(--colour-9);
}

.product__first_fold .buy > .price > .price-was {
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--colour-5);
  text-decoration: line-through;
}

.product__first_fold .buy > .price > .stock-pill {
  border-radius: 999px;
  background: var(--colour-5);
  padding: .25rem .625rem;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
}

/* --- Variant fields --- */
.product__first_fold .options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.product__first_fold .options > .field { display: block; }

.field > .field-label,
.qty > .field-label {
  display: block;
  margin-bottom: .5rem;
  color: var(--colour-7);
  font-size: .875rem;
  font-weight: 600;
}

.product__first_fold .options select,
.product__first_fold .options input[type="text"],
.product__first_fold .options textarea {
  width: 100%;
  border: 1px solid var(--colour-6);
  border-radius: 10px;
  background: white;
  padding: .75rem 1rem;
  color: var(--colour-10);
  font-family: 'Poppins', sans-serif;
  font-size: .9375rem;
}

.product__first_fold .options textarea { resize: vertical; }

.product__first_fold .options select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23757575' stroke-width='2'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.75rem;
  cursor: pointer;
}

.product__first_fold .options select:focus-visible,
.product__first_fold .options input[type="text"]:focus-visible,
.product__first_fold .options textarea:focus-visible {
  outline: 2px solid var(--colour-2);
  outline-offset: 1px;
}

.product__first_fold .options ::placeholder { color: var(--colour-5); }

.product__first_fold .options select:has(option[value=""]:checked) { color: var(--colour-5); }

.product__first_fold .options select > option { color: var(--colour-10); }

/* --- Quantity + Add To Cart --- */
.product__first_fold .cart {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.product__first_fold .cart > .qty > .stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--colour-6);
  border-radius: 10px;
  background: white;
  overflow: hidden;
}

.product__first_fold .cart > .qty > .stepper > button {
  width: 40px;
  height: 46px;
  border: none;
  background: none;
  color: var(--colour-10);
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  cursor: pointer;
}

.product__first_fold .cart > .qty > .stepper > input {
  width: 40px;
  border: none;
  background: none;
  padding: 0;
  color: var(--colour-10);
  font-family: 'Poppins', sans-serif;
  font-size: .9375rem;
  text-align: center;
}

.product__first_fold .cart > .add-to-cart {
  flex: 1;
  min-width: 200px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--colour-2);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}

.product__first_fold .cart > .add-to-cart:disabled {
  background: var(--colour-6);
  color: var(--colour-5);
  cursor: not-allowed;
}

/* --- Description --- */
.product__second_fold > .content > h2 {
  margin: 0 0 1.25rem;
  color: var(--colour-7);
  font-size: .875rem;
  font-weight: 600;
}

.product__second_fold > .content > h3 {
  margin: 1.25rem 0 .625rem;
  color: var(--colour-7);
  font-size: .8125rem;
  font-weight: 600;
}

.product__second_fold > .content > h4 {
  margin: 1rem 0 .375rem;
  color: var(--colour-7);
  font-size: .75rem;
  font-weight: 600;
}

.product__second_fold > .content > ul {
  margin: 0;
  padding-left: 1.125rem;
}
.product__second_fold > .content > ul > li > p, 
.product__second_fold > .content > ul > li {
  margin-bottom: .25rem;
  color: var(--colour-10);
  font-size: .75rem;
  line-height: 1.6;
}

/* --- You May Also Like --- */
.product__third_fold > .content > h2 {
  margin: 0 0 2rem;
  color: var(--colour-1);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.product__third_fold .product-cards { width: auto; }

/* --- Responsive --- */
@media screen and (min-width: 425px)  {}
@media screen and (min-width: 600px)  {}
@media screen and (min-width: 768px)  {}
@media screen and (min-width: 1024px) {
  .catalog__second_fold > .content {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
  }

  .catalog__second_fold > .content > .results { min-width: 0; }

  /* Unwind the mobile sheet back into a static sidebar. */
  .catalog__second_fold .filters {
    position: sticky;
    inset: auto;
    z-index: auto;
    display: block;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 0;
  }

  .catalog__second_fold .filters > .sheet-head > .sheet-close,
  .catalog__second_fold .filters > .sheet-apply,
  .catalog__second_fold .toolbar > .filters-open { display: none; }

  .catalog__second_fold .filters > .sheet-head {
    position: static;
    padding: 0 0 .75rem;
  }

  .product__first_fold > .content > .product {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    column-gap: 3rem;
    align-items: stretch;
  }

  .product__first_fold > .content > .product > .media {
    display: flex;
    flex-direction: column;
  }

  .product__first_fold .gallery {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .product__first_fold .gallery > .stage { min-height: 460px; }

  .product__first_fold .gallery > .stage > img {
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .product__first_fold .gallery > .thumbs { justify-content: flex-start; }

  /* The panel is a sibling of .gallery, so by default it spans the rail as well as the
     stage. Indent it past the rail (72px) and the gallery's 1rem gap so its left edge
     lines up with the main image, as in the mockup. */
  .product__first_fold .delivery { margin-left: calc(72px + 1rem); }

  .product__first_fold .gallery > .thumbs { flex-direction: column; }
  .product__first_fold .gallery > .stage {
    flex: 1;
    min-width: 0;
  }

  .product__first_fold .buy > h1 { font-size: 1.375rem; }
}
@media screen and (min-width: 1440px) {}
@media screen and (min-width: 2000px) {}
