/* Beauty & Grooming category hub — Asquan-style square tiles */
.beauty-hub {
  --beauty-hub-gap: 1.25rem;
  --beauty-hub-ink: #212121;
  --beauty-hub-muted: #5a5a5a;
  padding: 1.5rem 0 3rem;
}

.beauty-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--beauty-hub-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.beauty-hub-item {
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  animation: beauty-hub-in 0.55s ease forwards;
}

.beauty-hub-item:nth-child(1) { animation-delay: 0.05s; }
.beauty-hub-item:nth-child(2) { animation-delay: 0.1s; }
.beauty-hub-item:nth-child(3) { animation-delay: 0.15s; }
.beauty-hub-item:nth-child(4) { animation-delay: 0.2s; }
.beauty-hub-item:nth-child(5) { animation-delay: 0.25s; }
.beauty-hub-item:nth-child(6) { animation-delay: 0.3s; }
.beauty-hub-item:nth-child(7) { animation-delay: 0.35s; }
.beauty-hub-item:nth-child(8) { animation-delay: 0.4s; }

@keyframes beauty-hub-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.beauty-hub-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.beauty-hub-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ece8e4;
}

.beauty-hub-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.beauty-hub-link:hover .beauty-hub-media img,
.beauty-hub-link:focus-visible .beauty-hub-media img {
  transform: scale(1.04);
}

.beauty-hub-name {
  display: block;
  width: 100%;
  margin: 0.75rem 0 0;
  padding: 0.35rem 0.15rem;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: clamp(0.95rem, 1.15vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--beauty-hub-ink);
  text-align: left;
  line-height: 1.35;
  outline: none;
  cursor: text;
}

.beauty-hub-name:hover,
.beauty-hub-name:focus {
  border-bottom-color: #c8c8c8;
}

.beauty-hub-name:focus {
  border-bottom-color: var(--beauty-hub-ink);
}

/* Landing hub: hide classic product pager */
.beauty-hub-page .met_pager,
.beauty-hub-page .met-pager-ajax-link {
  display: none !important;
}

@media (max-width: 1199px) {
  .beauty-hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 991px) {
  .beauty-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 575px) {
  .beauty-hub {
    padding: 1rem 0 2rem;
  }
  .beauty-hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .beauty-hub-name {
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }
}

/* Column nav: parent click navigates; hover shows L3 dropdown */
.met-column-nav .dropdown {
  position: relative;
}
.met-column-nav .dropdown > .dropdown-menu {
  margin-top: 0;
}
.met-column-nav .dropdown:hover > .dropdown-menu,
.met-column-nav .dropdown:focus-within > .dropdown-menu {
  display: block;
}

/* GSC / Insights / About hubs: keep L1 hover menus above the hero */
.factory-hub-page .met-head,
.insights-hub-page .met-head,
.about-hub-page .met-head {
  position: relative;
  z-index: 1100;
}

@media (min-width: 768px) {
  .factory-hub-page .met-nav .navlist > .nav-item.dropdown:not(.st-cat-mega):hover > .dropdown-menu,
  .factory-hub-page .met-nav .navlist > .nav-item.dropdown:not(.st-cat-mega).open > .dropdown-menu,
  .insights-hub-page .met-nav .navlist > .nav-item.dropdown:not(.st-cat-mega):hover > .dropdown-menu,
  .insights-hub-page .met-nav .navlist > .nav-item.dropdown:not(.st-cat-mega).open > .dropdown-menu,
  .about-hub-page .met-nav .navlist > .nav-item.dropdown:not(.st-cat-mega):hover > .dropdown-menu,
  .about-hub-page .met-nav .navlist > .nav-item.dropdown:not(.st-cat-mega).open > .dropdown-menu {
    display: block;
  }
}

/* —— Category page hero (Asquan-style split) —— */
.beauty-cat-hero {
  --cat-hero-ink: #212121;
  --cat-hero-bg: #ffffff;
  position: relative;
  display: grid;
  grid-template-columns: 4fr 6fr;
  width: 100%;
  /* Same height as /product/ met-banner (image 1905×650) */
  aspect-ratio: 1905 / 650;
  height: auto;
  min-height: 0;
  max-height: none;
  background: var(--cat-hero-bg);
  overflow: hidden;
}

/* L2 + L3 product-category pages: full-bleed 1905×520 banner, no left fade */
.beauty-cat-hero--l2,
.beauty-cat-hero--wide {
  grid-template-columns: 1fr;
  aspect-ratio: 1905 / 520;
  container-type: inline-size;
}
.beauty-cat-hero--l2 .beauty-cat-hero__media,
.beauty-cat-hero--l2 .beauty-cat-hero__copy,
.beauty-cat-hero--wide .beauty-cat-hero__media,
.beauty-cat-hero--wide .beauty-cat-hero__copy {
  grid-column: 1;
  grid-row: 1;
}
.beauty-cat-hero--l2 .beauty-cat-hero__copy,
.beauty-cat-hero--wide .beauty-cat-hero__copy {
  z-index: 2;
  width: min(48rem, 54%);
  padding-top: clamp(1.15rem, 2.6vw, 2.25rem);
  padding-bottom: clamp(1.15rem, 2.6vw, 2.25rem);
  background: transparent;
}
.beauty-cat-hero--wide .beauty-cat-hero__title {
  max-width: none;
  white-space: nowrap;
}
.beauty-cat-hero--l2 .beauty-cat-hero__desc,
.beauty-cat-hero--wide .beauty-cat-hero__desc,
.beauty-cat-hero--l2 .beauty-cat-hero__subtitle,
.beauty-cat-hero--wide .beauty-cat-hero__subtitle {
  max-width: calc(25vw - clamp(1.25rem, 3.5vw, 3.25rem));
  max-width: calc(25cqi - clamp(1.25rem, 3.5vw, 3.25rem));
}
.beauty-cat-hero--l2 .beauty-cat-hero__media,
.beauty-cat-hero--wide .beauty-cat-hero__media {
  z-index: 0;
  width: 100%;
  height: 100%;
}
.beauty-cat-hero--l2 .beauty-cat-hero__media img,
.beauty-cat-hero--wide .beauty-cat-hero__media img {
  object-fit: cover;
  object-position: center center;
  transform: none;
  animation: none;
}
.beauty-cat-hero--l2 .beauty-cat-hero__media::after,
.beauty-cat-hero--wide .beauty-cat-hero__media::after {
  display: none;
}

.beauty-cat-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3.5vw, 3rem) clamp(1.25rem, 3.5vw, 3.25rem);
  color: var(--cat-hero-ink);
  z-index: 1;
  min-height: 0;
}

.beauty-cat-hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #212121;
  opacity: 0.65;
}

.beauty-cat-hero__title {
  margin: 0;
  font-family: var(--font-display, "Marcellus", "Times New Roman", Georgia, serif);
  font-size: clamp(2.25rem, 4.5vw, 52.5px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #212121;
}

.beauty-cat-hero__title::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  margin-top: 1rem;
  background: #212121;
}

.beauty-cat-hero__desc {
  margin: 1.1rem 0 0;
  max-width: 22rem;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.55;
  color: #212121;
  opacity: 0.78;
}

.beauty-cat-hero__subtitle {
  margin: 1.1rem 0 0;
  font-family: inherit;
  font-size: calc(clamp(0.95rem, 1.2vw, 1.05rem) * 1.3);
  font-weight: 700;
  line-height: 1.55;
  color: #212121;
  opacity: 0.78;
}

.beauty-cat-hero__subtitle + .beauty-cat-hero__desc {
  margin-top: 0.55rem;
}

.beauty-cat-hero__media {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.beauty-cat-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  transform: scale(1.01);
  animation: beauty-cat-hero-ken 12s ease-in-out infinite alternate;
}

@keyframes beauty-cat-hero-ken {
  from { transform: scale(1.01); }
  to { transform: scale(1.06); }
}

.beauty-cat-hero__media::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 18%;
  background: linear-gradient(90deg, #ffffff, transparent);
  pointer-events: none;
}

@media (max-width: 767px) {
  .beauty-cat-hero {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .beauty-cat-hero__media {
    order: -1;
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
  }
  .beauty-cat-hero__media img {
    object-position: right center;
  }
  .beauty-cat-hero__media::after {
    inset: auto 0 0 0;
    width: auto;
    height: 40%;
    background: linear-gradient(0deg, #ffffff, transparent);
  }
  .beauty-cat-hero__copy {
    padding: 1.5rem 1.25rem 2rem;
  }
  .beauty-cat-hero--l2,
  .beauty-cat-hero--wide {
    aspect-ratio: auto;
  }
  .beauty-cat-hero--l2 .beauty-cat-hero__media,
  .beauty-cat-hero--l2 .beauty-cat-hero__copy,
  .beauty-cat-hero--wide .beauty-cat-hero__media,
  .beauty-cat-hero--wide .beauty-cat-hero__copy {
    grid-column: auto;
    grid-row: auto;
  }
  .beauty-cat-hero--l2 .beauty-cat-hero__media,
  .beauty-cat-hero--wide .beauty-cat-hero__media {
    order: -1;
    aspect-ratio: 1905 / 520;
  }
  .beauty-cat-hero--l2 .beauty-cat-hero__copy,
  .beauty-cat-hero--wide .beauty-cat-hero__copy {
    width: 100%;
  }
  .beauty-cat-hero--l2 .beauty-cat-hero__desc,
  .beauty-cat-hero--wide .beauty-cat-hero__desc,
  .beauty-cat-hero--l2 .beauty-cat-hero__subtitle,
  .beauty-cat-hero--wide .beauty-cat-hero__subtitle {
    max-width: none;
  }
  .beauty-cat-hero--wide .beauty-cat-hero__title {
    white-space: normal;
  }
  .beauty-cat-hero--l2 .beauty-cat-hero__media::after,
  .beauty-cat-hero--wide .beauty-cat-hero__media::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beauty-hub-item {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .beauty-hub-media img,
  .beauty-cat-hero__media img {
    transition: none;
    animation: none;
  }
}

/* —— Third-level product lists: same square-tile language as /product/ hub —— */
.beauty-product-hub {
  --beauty-hub-gap: 1.25rem;
  --beauty-hub-ink: #212121;
  padding-bottom: 2rem;
}

.beauty-product-hub .less-page-content {
  padding-top: 0.5rem;
}

.beauty-product-hub ul.met-product.blocks {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--beauty-hub-gap);
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  list-style: none;
}

.beauty-product-hub ul.met-product.blocks > li {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  transform: translateY(12px);
  animation: beauty-hub-in 0.55s ease forwards;
}

.beauty-product-hub ul.met-product.blocks > li:nth-child(1) { animation-delay: 0.05s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(2) { animation-delay: 0.1s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(3) { animation-delay: 0.15s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(4) { animation-delay: 0.2s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(5) { animation-delay: 0.25s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(6) { animation-delay: 0.3s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(7) { animation-delay: 0.35s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(8) { animation-delay: 0.4s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(9) { animation-delay: 0.45s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(10) { animation-delay: 0.5s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(11) { animation-delay: 0.55s; }
.beauty-product-hub ul.met-product.blocks > li:nth-child(12) { animation-delay: 0.6s; }

.beauty-product-hub .card {
  box-shadow: none !important;
  border: 0 !important;
  background: transparent !important;
  margin: 0 !important;
}

.beauty-product-hub .card-header.cover {
  position: relative;
  aspect-ratio: 1 / 1;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  background: #ece8e4;
  border: 0 !important;
}

.beauty-product-hub .card-header.cover a {
  display: block;
  width: 100%;
  height: 100%;
}

.beauty-product-hub .cover-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.beauty-product-hub .card:hover .cover-image,
.beauty-product-hub .card:focus-within .cover-image {
  transform: scale(1.04);
}

.beauty-product-hub .card-title {
  margin: 0.75rem 0 0 !important;
  padding: 0.35rem 0.15rem 0 !important;
  text-align: left !important;
  font-size: clamp(0.95rem, 1.15vw, 1.15rem) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--beauty-hub-ink);
}

.beauty-product-hub .card-title a {
  color: inherit !important;
  text-decoration: none !important;
  white-space: normal !important;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.beauty-product-hub .card-title .text-truncate {
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: unset !important;
}

@media (max-width: 991px) {
  .beauty-product-hub ul.met-product.blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 575px) {
  .beauty-product-hub ul.met-product.blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .beauty-product-hub .card-title {
    font-size: 0.9rem !important;
    margin-top: 0.5rem !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Insights Catalogs only: 15% larger tile gap than the shared hub */
.insights-hub-page .beauty-product-hub,
.insights-hub-catalog .beauty-product-hub {
  --beauty-hub-gap: 1.4375rem;
}

.insights-hub-page .beauty-product-hub ul.met-product.blocks,
.insights-hub-catalog .beauty-product-hub ul.met-product.blocks,
.insights-hub-page .hygiene-qp-results ul.met-product.blocks,
.insights-hub-catalog .hygiene-qp-results ul.met-product.blocks {
  gap: 1.4375rem;
}

@media (max-width: 991px) {
  .insights-hub-page .beauty-product-hub ul.met-product.blocks,
  .insights-hub-catalog .beauty-product-hub ul.met-product.blocks,
  .insights-hub-page .hygiene-qp-results ul.met-product.blocks,
  .insights-hub-catalog .hygiene-qp-results ul.met-product.blocks {
    gap: 1.15rem;
  }
}

@media (max-width: 575px) {
  .insights-hub-page .beauty-product-hub ul.met-product.blocks,
  .insights-hub-catalog .beauty-product-hub ul.met-product.blocks,
  .insights-hub-page .hygiene-qp-results ul.met-product.blocks,
  .insights-hub-catalog .hygiene-qp-results ul.met-product.blocks {
    gap: 0.8625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beauty-product-hub ul.met-product.blocks > li {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .beauty-product-hub .cover-image {
    transition: none;
  }
}
