/* Product and inquiry pages use the same rail, cards, and CTA treatment as the homepage. */
html.mgm-custom-product {
  --mgm-product-rail: 1200px;
  --mgm-product-gutter: 30px;
  --mgm-product-section-space: 90px;
  --mgm-product-card: #f6f6f6;
  --mgm-product-radius: 16px;
  --mgm-product-ink: #171817;
  --mgm-product-muted: #60665f;
  --mgm-product-line: #dedfda;
  --mgm-product-blue: #244c6b;
}
html.mgm-custom-product .ml-product,
html.mgm-custom-product .ml-editorial,
html.mgm-custom-product .neon-quote {
  width: 100%;
  max-width: var(--mgm-product-rail);
  margin-inline: auto;
  padding-inline: var(--mgm-product-gutter);
  background: transparent;
  color: var(--mgm-product-ink);
}
html.mgm-custom-product .ml-editorial,
html.mgm-custom-product .neon-quote {
  padding-block: var(--mgm-product-section-space);
}
.mgm-custom-product :is(.ml-cover, .ml-content-grid article, .ml-spec-list > div, .ml-faq details, .neon-preview, .neon-quote fieldset) {
  border-radius: var(--mgm-product-radius);
  background: var(--mgm-product-card);
}
.mgm-custom-product :is(.ml-cover, .ml-gallery-thumbs img) {
  object-fit: contain;
}
.mgm-custom-product .ml-cover {
  aspect-ratio: 5 / 4;
}
.mgm-custom-product .ml-gallery-thumbs button {
  border-radius: var(--mgm-product-radius);
}
.mgm-custom-product :is(.ml-intro, .ml-editorial p, .neon-quote .fine) {
  color: var(--mgm-product-muted);
}
.mgm-custom-product :is(.ml-product .ml-configuration, .neon-quote form) {
  min-width: 0;
}
.mgm-custom-product :is(.ml-size-grid button, .ml-tab-panel, .neon-plain) {
  border-radius: 12px;
}
.mgm-custom-product .ml-size-grid button[aria-pressed="true"],
.mgm-custom-product .neon-plain[aria-pressed="true"] {
  outline: 2px solid var(--mgm-product-blue);
  outline-offset: -2px;
}
.mgm-custom-product .neon-quote fieldset {
  border-color: var(--mgm-product-line);
  padding-inline: clamp(12px, 2.2vw, 28px);
}
.mgm-custom-product .neon-quote legend {
  padding-inline: 8px;
}
.mgm-custom-product .neon-preview {
  padding: clamp(12px, 2.2vw, 28px);
}
.mgm-custom-product .neon-stage {
  border-radius: var(--mgm-product-radius);
}

/* Follow the homepage campaign geometry while leaving room for long product titles. */
.mgm-custom-product main .custom-campaign {
  position: relative;
  display: grid;
  isolation: isolate;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  width: calc(100% - 24px);
  min-height: clamp(700px, calc(100svh - 24px), 1200px);
  height: auto;
  max-height: none;
  margin: 0 12px;
  padding-block-end: 12px;
  overflow: clip;
  background: #527da1;
  color: #fff;
}
.custom-campaign .custom-campaign-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.custom-campaign .hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, #0914211f 25%, #03091047 55%, #000c);
  pointer-events: none;
}
.mgm-custom-product .custom-campaign .campaign-intro {
  position: relative;
  display: block;
  inset: auto !important;
  z-index: 2;
  grid-row: 1;
  padding: 0;
  width: 32%;
  max-width: 440px;
  min-width: 0;
  margin: clamp(133px, calc(19svh - 4.56px), 228px) 0 0 3.5%;
  isolation: isolate;
  color: #fff;
  overflow-wrap: anywhere;
}
.mgm-custom-product .custom-campaign .campaign-intro::before {
  content: "";
  position: absolute;
  inset: -20px -22px;
  z-index: -1;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 20px;
  background: linear-gradient(125deg, rgb(238 247 255 / 12%), rgb(205 228 245 / 3.5%));
  backdrop-filter: blur(10px) saturate(115%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
  pointer-events: none;
}
.custom-campaign .campaign-intro p {
  margin: 0 0 22px;
  color: inherit;
}
.mgm-custom-product .custom-campaign .custom-campaign-title {
  position: relative;
  inset: auto !important;
  z-index: 2;
  grid-row: 3;
  height: auto !important;
  max-height: none !important;
  min-width: 0;
  margin: 36px max(2.3%, 20px) 0;
  color: #fff;
  font: 500 clamp(2.75rem, 9.5vw, 10rem)/.9 "MGM Review Heading", "Big Shoulders", sans-serif !important;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.mgm-custom-product .neon-hero .neon-actions .mgm-cta,
.mgm-custom-product .custom-campaign .mgm-cta {
  --cta-bg: #fff;
  --cta-fg: #171817;
  --cta-disc: #171817;
  --cta-arrow: #fff;
}
.mgm-custom-product .custom-configure-link {
  display: inline-flex;
}
@media (max-width: 900px) {
  html.mgm-custom-product {
    --mgm-product-gutter: 25px;
    --mgm-product-section-space: 65px;
  }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .mgm-custom-product .custom-campaign .campaign-intro { width: 35%; }
}
@media (max-width: 700px) {
  .mgm-custom-product main .custom-campaign {
    width: calc(100% - 16px);
    margin-inline: 8px;
    min-height: clamp(620px, 90svh, 780px);
  }
  .mgm-custom-product .custom-campaign .campaign-intro {
    width: min(calc(69% - 14px), 260px);
    margin: 105px 0 0 20px;
  }
  .mgm-custom-product .custom-campaign .campaign-intro::before {
    inset: -14px -12px;
  }
  .custom-campaign .campaign-intro p {
    margin-bottom: 12px;
  }
  .custom-campaign .custom-campaign-photo {
    object-position: center bottom;
  }
}
@media (max-width: 600px) {
  html.mgm-custom-product {
    --mgm-product-gutter: 20px;
    --mgm-product-section-space: 55px;
  }
}

.mgm-custom-product :is(.category-campaign-hero, .neon-hero) .hero-copy {
  color: #fff;
}
.mgm-custom-product .neon-hero {
  background: linear-gradient(146deg, #4d7e9f, var(--mgm-product-blue) 65%, #172c3e);
}
.mgm-custom-product .neon-hero-inner {
  max-width: var(--mgm-product-rail);
  padding-inline: var(--mgm-product-gutter);
}
.mgm-custom-product .neon-hero-inner > div:first-child {
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid #ffffff44;
  border-radius: var(--mgm-product-radius);
  background: #ffffff16;
}
.mgm-custom-product .neon-hero-sign {
  border-radius: var(--mgm-product-radius);
}
.mgm-custom-product :is(.mq-landing, .quote-section) {
  max-width: var(--mgm-product-rail);
  padding-inline: var(--mgm-product-gutter);
}
.mgm-custom-product :is(#product-quote, #patch-quote-dialog, #pqc-dialog, #legacy-medal-quote):not(.ml-native) {
  border-radius: var(--mgm-product-radius);
}

.mgm-custom-product .custom-product-nav:not(.mgm-two-tier) {
  position: relative;
  background: #171717;
  color: #fff;
}

.mgm-custom-product main :is(.hero, .coin-hero, .neon-hero)[hidden] {
  display: none !important;
}
.mgm-custom-product .category-campaign-hero .hero-bottom {
  max-width: 480px;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid #ffffff44;
  border-radius: var(--mgm-product-radius);
  background: #ffffff16;
}

.mgm-custom-product .mq-landing {
  padding-block: clamp(34px, 6vw, 88px);
  background: linear-gradient(146deg, #4d7e9f, var(--mgm-product-blue) 65%, #172c3e);
  border-radius: var(--mgm-product-radius);
  color: #fff;
}
.mgm-custom-product .mq-landing :is(.eyebrow, h1, p) {
  color: inherit;
}
.mgm-custom-product .mq-landing .mgm-cta {
  --cta-bg: #fff;
  --cta-fg: #171817;
  --cta-disc: #171817;
  --cta-arrow: #fff;
}
.mgm-custom-product .neon-product-header .ml-configuration {
  align-self: start;
}

/* Let the live catalog's own filter strip scroll within the category column. */
.mgm-custom-product .category-layout > * {
  min-width: 0;
}
@media (max-width: 760px) {
  html.mgm-custom-product .category-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Constrain text and native controls to the cards that own them. */
.mgm-custom-product :is(.category-related, .directory-grid > *, .mgmcb-grid > *, .ml-content-grid > *, .ml-spec-list > div, .ml-configuration, .neon-preview, .neon-quote fieldset, .neon-quote label) {
  min-inline-size: 0;
}
.mgm-custom-product :is(.category-tree a, .category-related a, .directory-grid a, .mgmcb-card h3, .ml-editorial h2, .ml-content-grid h3, .ml-spec-list dt, .ml-spec-list dd, .ml-faq summary, .neon-quote legend, .neon-quote label, .neon-quote .fine, .english-file-name) {
  overflow-wrap: anywhere;
}
.mgm-custom-product .neon-quote :is(legend, label, input:not([type="radio"], [type="checkbox"]), select, textarea) {
  max-inline-size: 100%;
}
.mgm-custom-product .neon-quote :is(legend, .neon-modes label) {
  white-space: normal;
}
.mgm-custom-product .neon-quote textarea {
  resize: vertical;
}
.mgm-custom-product .neon-quote :is(.neon-modes, .neon-line-title, .neon-line-controls, .neon-preview-tools) > * {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.mgm-custom-product .neon-quote :is(input[type="radio"], input[type="checkbox"]) {
  flex-shrink: 0;
}
.mgm-custom-product .neon-design {
  grid-template-columns: minmax(0, 1fr);
}

/* Apply the shared campaign to authored category templates without moving their controls. */
.custom-campaign-authored .mcl-hero-inner,
.custom-campaign-authored picture {
  display: contents;
}
.mgm-custom-product .custom-campaign-authored .custom-campaign-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  object-fit: contain;
}
.mgm-custom-product .custom-campaign-authored .mcl-actions {
  padding: 0;
}
.mgm-custom-product .custom-campaign-authored .mcl-action {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mgm-custom-product .custom-campaign-authored .mcp-trust {
  margin-inline: 0;
}
.mgm-custom-product :is(.mcp-heading, .mcp-card, .mcp-gallery-promos > *, .mcl-action, .mcl-hero-copy) {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
