/* The megamenu (snippets/mega-menu.html).

   Desktop only: the snippet carries display-none-tablet, so none of this shows below 960px.
   The exception is the link icons (the .mm-icons, .mm-icon and .mmi-water rules), which the
   phone menu's Bathrooms and Showers links use too.
   Every rule is scoped to the .mm classes. Link colours are written as ".header .mm a..." because
   section-header.css sets every header link to `color: inherit` at a specificity a single
   class cannot beat. */

.mm {
  display: block;
  /* the panels hang off this box, so they span the full width of the header */
  position: relative;
  background-color: #fff;
}

/* the divider above the bar */
.mm::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(var(--color-text), 0.15);
}

.mm__bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mm__menu {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The department links: the theme's small uppercase menu type, underlined on hover. */
.header .mm a.mm__top {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 16px 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: rgb(var(--color-text));
}

.header .mm a.mm__top::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 8px;
  height: 2px;
  background: rgb(var(--color-light-text));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.header .mm .mm__item:hover > a.mm__top,
.header .mm .mm__item.is-open > a.mm__top,
.header .mm a.mm__top:focus-visible {
  color: rgb(var(--color-light-text));
}

.header .mm .mm__item:hover > a.mm__top::after,
.header .mm .mm__item.is-open > a.mm__top::after,
.header .mm a.mm__top:focus-visible::after {
  transform: scaleX(1);
}

/* ── Panels ─────────────────────────────────────────────────────────────── */

.mm-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background-color: #fff;
  border-top: 1px solid #d0d5dd;
  box-shadow: 0 16px 32px rgba(10, 39, 73, 0.12);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  /* On a short window the panel stops at the bottom of the screen and scrolls inside
     itself. component-mega-menu.js sets the height left below the bar. */
  max-height: var(--mm-panel-max, none);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mm__item--panel:hover > .mm-panel,
.mm__item--panel.is-open > .mm-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

/* Keyboard: tabbing onto a department opens it. Kept in a rule of its own, because a
   browser without :has() throws away the whole rule it appears in, hover included. */
.mm__item--panel:has(:focus-visible) > .mm-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

/* Escape shuts the open panel until the pointer or focus moves to another department
   (component-mega-menu.js). Must stay after the open rules above. */
.mm.is-dismissed .mm-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Vertical spacing is kept tight on purpose: the Bathrooms panel, link icons and all, has
   to clear the bottom of a 1366 x 768 laptop screen with the page scrolled to the top. */
.mm-panel__inner {
  padding-top: 18px;
  padding-bottom: 16px;
}

/* Head: title and shop-all links on the left, shop-by shortcuts on the right. */
.mm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 40px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaecf0;
}

.mm-head__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 24px;
}

.mm-head__title {
  font-family: baskerville-italic;
  font-size: 30px;
  line-height: 1.1;
  color: rgb(var(--color-text));
}

.header .mm a.mm-head__link {
  font-family: century-gothic-bold;
  font-size: 13px;
  line-height: 18px;
  text-decoration: none;
  color: rgb(var(--color-text));
}

.header .mm a.mm-head__link--primary {
  color: rgb(var(--color-light-text));
}

.header .mm a.mm-head__link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mm-head__shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 32px;
}

.mm-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mm-chips__label {
  margin-right: 6px;
  font-family: century-gothic-bold;
  font-size: 10px;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--color-text), 0.55);
}

.header .mm a.mm-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background-color: #fff;
  font-size: 12px;
  line-height: 16px;
  text-decoration: none;
  color: rgb(var(--color-text));
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.header .mm a.mm-chip:hover {
  border-color: rgb(var(--color-text));
  background-color: rgb(var(--color-text));
  color: #fff;
}

/* Body: the link columns, with the showroom card on the right. */
.mm-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  align-items: start;
  gap: 40px;
}

.mm-body--full {
  grid-template-columns: minmax(0, 1fr);
}

.mm-cols {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 24px;
}

/* A panel with more or fewer than six columns still keeps them on one row: a second row
   doubles the panel's height. */
.mm-cols--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mm-cols--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mm-cols--7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mm-cols--8 {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.header .mm a.mm-col__title {
  display: block;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eaecf0;
  font-family: century-gothic-bold;
  font-size: 13px;
  line-height: 18px;
  text-decoration: none;
  color: rgb(var(--color-text));
  transition: color 0.15s ease;
}

.header .mm a.mm-col__title:hover {
  color: rgb(var(--color-light-text));
}

.mm-col__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Icon and label in two columns, so a label that wraps stays under its own first line. */
.header .mm .mm-col__list a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  /* 2px, down from 4px: with a 24px icon a row is 28px, close to the 26px a row was
     before the icons */
  padding: 2px 0;
  font-size: 13px;
  line-height: 18px;
  text-decoration: none;
  color: rgba(var(--color-text), 0.8);
  transition: color 0.15s ease;
}

/* the label keeps the second column even on a link that has no icon */
.mm-col__list a > span {
  grid-column: 2;
  min-width: 0;
}

/* A panel whose links have no icons at all (the nine departments after Showers, written out
   from the admin menu on 24 Oct 2026, snippets/mega-menu-<department>.html): the label takes
   the whole row. */
.header .mm .mm-panel--plain .mm-col__list a {
  grid-template-columns: minmax(0, 1fr);
}

.mm-panel--plain .mm-col__list a > span {
  grid-column: 1;
}

.header .mm .mm-col__list a:hover {
  color: rgb(var(--color-light-text));
}

/* ── Link icons ─────────────────────────────────────────────────────────── */

/* The symbols (snippets/mega-menu-icons.html). Zero size rather than display: none,
   which stops some browsers drawing the symbols; for the same reason they sit just
   outside the bar, which is display: none on phones, where the phone menu uses them. */
.mm-icons {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Detail lines inherit this; the symbol's groups set their own fills and strokes.
   The icon takes the link's colour, gold on hover. */
.mm-icon {
  display: block;
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  --mm-icon-accent: #c09955;
}

/* While the icon is gold, its water point turns navy so it still shows. */
.header .mm .mm-col__list a:hover .mm-icon {
  --mm-icon-accent: rgb(var(--color-text));
}

.mmi-water {
  fill: var(--mm-icon-accent, #c09955);
}

/* the "All …" lead links: All Vanity Units, All Mirrors, All Shower Enclosures, All Shower Trays */
.header .mm .mm-col__list .mm-col__all a {
  font-family: century-gothic-bold;
  color: rgb(var(--color-text));
}

.header .mm a.mm-promo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: rgb(var(--color-text));
  text-decoration: none;
  color: #fff;
}

.mm-promo__media {
  display: block;
  overflow: hidden;
}

.mm-promo__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.header .mm a.mm-promo:hover .mm-promo__img {
  transform: scale(1.03);
}

.mm-promo__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.mm-promo__eyebrow {
  font-family: century-gothic-bold;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--color-light-text));
}

.mm-promo__title {
  font-family: baskerville-italic;
  font-size: 20px;
  line-height: 1.25;
  color: #fff;
}

.mm-promo__text {
  font-size: 13px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.75);
}

.mm-promo__cta {
  margin-top: 4px;
  font-family: century-gothic-bold;
  font-size: 13px;
  line-height: 18px;
  color: rgb(var(--color-light-text));
}

/* Foot: shop by finish and luxury brands. */
.mm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 40px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eaecf0;
}

/* The finish swatches use the same colours as the product page's colour chips
   (.pdp-colour-dot in section-main-product.css). */
.mm-swatch {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(10, 39, 73, 0.18);
}

.mm-swatch--chrome {
  background-image: linear-gradient(135deg, #f4f7f9, #b4bdc4 42%, #edf1f4 58%, #98a2aa);
}

.mm-swatch--matt-black {
  background-color: #1c1c1e;
}

.mm-swatch--brushed-brass {
  background-image: linear-gradient(135deg, #e6cd7c, #b8912f 55%, #d9bc63);
}

.mm-swatch--brushed-nickel {
  background-image: linear-gradient(135deg, #dad6cf, #ada79e 50%, #c8c3ba);
}

.mm-swatch--brushed-bronze {
  background-image: linear-gradient(135deg, #c89b6a, #8c5a2b 55%, #b98552);
}

/* ── Narrower desktops ──────────────────────────────────────────────────── */

/* The showroom card gives way first ... */
@media screen and (max-width: 1279px) {
  .mm-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .header .mm a.mm-promo {
    display: none;
  }
}

/* ... then the columns tighten up. Three across doubles the panel's height, which on a
   1024 x 768 screen put half of it below the fold. */
@media screen and (max-width: 1099px) {
  .mm-cols {
    column-gap: 16px;
  }

  .header .mm a.mm-col__title,
  .header .mm .mm-col__list a {
    font-size: 12px;
    line-height: 16px;
  }
}
