/* Reusable editorial collection pages and the six-tile homepage gateway. */

body.muf-modern.home .muf-home-collections {
  padding: clamp(54px, 5vw, 82px) 0 0;
  background: #f8f6f2;
}

body.muf-modern.home .muf-home-collections__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: clamp(22px, 2.3vw, 36px);
}

body.muf-modern.home .muf-home-collections__heading h2 {
  margin: 0;
  color: #151515;
  font: inherit;
  font-size: clamp(30px, 3.2vw, 54px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.035em;
}

body.muf-modern.home .muf-home-collections__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

body.muf-modern.home .muf-home-collection-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1.44 / 1;
  background: #dedbd4;
  color: #fff;
}

body.muf-modern.home .muf-home-collection-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}

body.muf-modern.home .muf-home-collection-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 7, .48);
  opacity: 0;
  transition: opacity .3s ease;
}

body.muf-modern.home .muf-home-collection-tile strong {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  width: min(82%, 360px);
  transform: translate(-50%, -42%);
  color: #fff;
  font-size: clamp(16px, 1.25vw, 22px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .015em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}

body.muf-modern.home .muf-home-collection-tile:hover::after,
body.muf-modern.home .muf-home-collection-tile:focus-visible::after,
body.muf-modern.home .muf-home-collection-tile:hover strong,
body.muf-modern.home .muf-home-collection-tile:focus-visible strong {
  opacity: 1;
}

body.muf-modern.home .muf-home-collection-tile:hover strong,
body.muf-modern.home .muf-home-collection-tile:focus-visible strong {
  transform: translate(-50%, -50%);
}

body.muf-modern.home .muf-home-collection-tile:hover img,
body.muf-modern.home .muf-home-collection-tile:focus-visible img {
  transform: scale(1.035);
}

.muf-collection-page {
  background: #f8f6f2;
}

.muf-collection-hero {
  position: relative;
  min-height: clamp(430px, 60vh, 680px);
  overflow: hidden;
  isolation: isolate;
  background: #252525;
}

.muf-collection-hero > img,
.muf-collection-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.muf-collection-hero > img {
  z-index: -2;
  object-fit: cover;
  object-position: center;
}

.muf-collection-hero__shade {
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 15%, rgba(0,0,0,.7) 100%);
}

.muf-collection-hero__copy {
  display: flex;
  min-height: inherit;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 40px;
  padding-bottom: clamp(48px, 6vw, 76px);
  color: #fff;
}

.muf-collection-hero .woocommerce-breadcrumb,
.muf-collection-hero .woocommerce-breadcrumb a,
.muf-collection-hero__copy .muf-eyebrow {
  color: #fff;
}

.muf-collection-hero .woocommerce-breadcrumb {
  position: absolute;
  top: 28px;
  margin: 0;
  opacity: .9;
}

.muf-collection-hero__copy .muf-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.muf-collection-hero__copy h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font: inherit;
  font-size: clamp(42px, 6.1vw, 88px);
  font-weight: 750;
  line-height: .98;
  letter-spacing: -.045em;
}

.muf-collection-groups {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-top: 20px;
  padding-bottom: 20px;
  scrollbar-width: thin;
}

.muf-collection-groups a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid #d9d5ce;
  border-radius: 999px;
  background: #fff;
  color: #191919;
  font-size: 14px;
  font-weight: 700;
}

.muf-collection-groups a small {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #efebe4;
  color: #5e5a54;
  font-size: 11px;
}

.muf-collection-groups a:hover,
.muf-collection-groups a:focus-visible,
.muf-collection-groups a.is-current {
  border-color: #f9b52c;
  background: #f9b52c;
  color: #111;
}

.muf-collection-groups a.is-current small {
  background: #111;
  color: #fff;
}

.muf-collection-products {
  padding-top: clamp(34px, 4vw, 60px);
  padding-bottom: clamp(72px, 8vw, 120px);
}

/* Collection pages reuse the catalogue product-card styling, but they do not
   have the catalogue filter sidebar. Collapse that inherited empty column so
   all four product cards use the complete content width. */
.muf-collection-products.muf-catalogue--v8 {
  display: block;
  width: var(--muf-shell);
  grid-template-columns: none;
  grid-template-areas: none;
}

.muf-collection-products .muf-collection-product-grid {
  width: 100%;
  min-width: 0;
}

@media (min-width: 1181px) {
  .muf-collection-products .muf-collection-product-grid ul.products {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

.muf-collection-products__bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 2px solid #f9b52c;
}

.muf-collection-products__bar h2 {
  margin: 4px 0 0;
  color: #171717;
  font: inherit;
  font-size: clamp(28px, 3.1vw, 46px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.muf-collection-products__tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.muf-collection-products__tools .woocommerce-result-count {
  margin: 0;
  white-space: nowrap;
}

.muf-collection-products__tools .woocommerce-ordering {
  margin: 0;
}

.muf-collection-product-grid ul.products {
  margin-bottom: 0;
}

.muf-collection-pagination {
  margin-top: 42px;
}

.muf-collection-pagination nav.woocommerce-pagination {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.muf-collection-pagination nav.woocommerce-pagination ul.page-numbers {
  display: flex !important;
  width: auto;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.muf-collection-pagination nav.woocommerce-pagination ul.page-numbers li {
  display: block;
  float: none;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.muf-collection-pagination nav.woocommerce-pagination ul.page-numbers li::marker {
  content: "";
}

.muf-collection-pagination nav.woocommerce-pagination .page-numbers a,
.muf-collection-pagination nav.woocommerce-pagination .page-numbers span {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #ded9d0;
  border-radius: 999px;
  background: #fff;
  color: #171717;
  line-height: 1;
}

.muf-collection-pagination nav.woocommerce-pagination .page-numbers .current,
.muf-collection-pagination nav.woocommerce-pagination .page-numbers a:hover,
.muf-collection-pagination nav.woocommerce-pagination .page-numbers a:focus-visible {
  border-color: #f9b52c;
  background: #f9b52c;
  color: #111;
}

.muf-collection-product-grid .muf-empty-state {
  margin: 0;
  padding: 70px 24px;
  border: 1px solid #ded9d0;
  background: #fff;
  text-align: center;
}

@media (max-width: 900px) {
  body.muf-modern.home .muf-home-collections__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .muf-collection-products__bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .muf-collection-products__tools {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  body.muf-modern.home .muf-home-collections {
    padding: 44px 0;
  }

  body.muf-modern.home .muf-home-collections__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.muf-modern.home .muf-home-collection-tile {
    aspect-ratio: 1.2 / 1;
  }

  body.muf-modern.home .muf-home-collection-tile::after {
    background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.7) 100%);
    opacity: 1;
  }

  body.muf-modern.home .muf-home-collection-tile strong {
    inset: auto 20px 22px;
    width: auto;
    transform: none;
    font-size: 17px;
    text-align: left;
    opacity: 1;
  }

  body.muf-modern.home .muf-home-collection-tile:hover strong,
  body.muf-modern.home .muf-home-collection-tile:focus-visible strong {
    transform: none;
  }

  .muf-collection-hero {
    min-height: 520px;
  }

  .muf-collection-hero__copy h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .muf-collection-groups {
    width: auto;
    margin-right: -18px;
    padding-right: 18px;
  }

  .muf-collection-products__tools {
    align-items: stretch;
    flex-direction: column;
  }

  .muf-collection-products__tools .woocommerce-ordering,
  .muf-collection-products__tools .woocommerce-ordering select {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.muf-modern.home .muf-home-collection-tile img,
  body.muf-modern.home .muf-home-collection-tile::after,
  body.muf-modern.home .muf-home-collection-tile strong {
    transition: none;
  }
}
