/* Shared mobile layout for the catalog and all six editorial product pages.
   Loaded after each campaign stylesheet; desktop artwork stays in those files. */
.product-mobile-gallery-hint {
  display: none;
}

@media (max-width: 820px) {
  .product-page,
  .catalog-page {
    --product-gutter: 20px;
    --product-content-width: 560px;
    --product-section-space: 56px;
    --product-gap: 24px;
    --product-radius: 20px;
    --product-body-size: 16px;
    --product-heading-size: clamp(26px, 6.8vw, 32px);
  }

  /* Same navigation row and image / brand stack on every product. */
  .product-page .site-header {
    position: absolute;
    display: block;
    height: 80px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  .product-page .site-header .brand {
    position: absolute;
    top: 16px;
    left: var(--product-gutter);
    width: 85px;
    min-height: 44px;
    pointer-events: auto;
  }

  .product-page .product-mobile-hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    padding: 80px 0 0;
  }

  .product-page .product-mobile-hero::before,
  .product-page .product-mobile-hero::after,
  .product-page .spectra-hero-shade {
    display: none;
  }

  .product-page .product-mobile-back {
    top: 16px;
    right: var(--product-gutter);
    bottom: auto;
    left: auto;
    z-index: 2;
    gap: 12px;
    width: auto;
    max-width: calc(100% - 144px);
    min-height: 44px;
    padding: 10px 0;
    font: 400 12px/1.5 var(--poppins);
  }

  .product-page .product-mobile-back:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
  }

  .product-page .product-mobile-photo {
    position: relative;
    inset: auto;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: 8 / 5;
    object-fit: cover;
    object-position: center;
    transform: none;
  }

  .product-page .blue-hero-photo { object-position: center 65%; }
  .product-page .ilux-hero-photo { object-position: center 28%; }
  /* The Spectra wordmark is part of the photograph, so never crop it. */
  .product-page .spectra-hero-photo { object-fit: contain; }

  .product-page .product-mobile-lockup {
    position: relative;
    inset: auto;
    width: min(320px, calc(100% - 40px));
    max-width: none;
    height: auto;
    margin: 28px auto;
    padding: 0;
    transform: none;
    text-align: center;
  }

  .product-page .ailens-hero-lockup h1,
  .product-page .blue-hero-lockup h1 { width: 100%; }
  .product-page .ailens-powered { font-size: 12px; }
  .product-page .ailens-hero-eyebrow { margin-top: 16px; }
  .product-page .gold-hero-logo { height: 67px; }
  .product-page .ilux-hero h1 { height: 64px; }
  .product-page .biolux-hero-lockup h1 { font-size: 60px; line-height: 1.1; }
  .product-page .biolux-hero-lockup p { max-width: none; }
  .product-page .spectra-hero-lockup > p { font-size: 22px; line-height: 1.4; }

  /* A common reading scale, without changing product names or logo artwork. */
  .product-page main p,
  .product-page main dd,
  .product-page main :is(.ailens-ai-copy, .gold-story-copy, .blue-daily-copy) > p {
    font-family: var(--poppins);
    font-size: var(--product-body-size);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: normal;
    text-shadow: none;
  }

  .product-page main h2:not(.sr-only) {
    max-width: none;
    font-family: var(--poppins);
    font-size: var(--product-heading-size);
    line-height: 1.25;
    letter-spacing: -0.4px;
    text-wrap: balance;
    text-shadow: none;
  }

  .product-page main h3 {
    font-size: 20px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: normal;
    text-shadow: none;
  }

  .product-page main :is(p, h2, h3, li, dd) { overflow-wrap: break-word; }

  /* Single-column content, identical gutters and rhythm. */
  .product-page :is(.ailens-inner, .ailens-ai-inner, .gold-inner, .gold-story-inner,
      .blue-mechanisms-inner, .blue-daily-inner, .blue-ai-inner,
      .spectra-intro-grid, .spectra-story, .biolux-objective-grid,
      .ilux-coating-grid, .ilux-benefit-cards, .ilux-expression, .ilux-identity) {
    width: calc(100% - 2 * var(--product-gutter));
    max-width: var(--product-content-width);
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--product-gap);
  }

  .product-page :is(.ailens-intro, .gold-intro, .blue-intro, .spectra-intro,
      .biolux-intro, .ilux-intro) {
    padding: var(--product-section-space) 0;
  }

  .product-page :is(.blue-intro, .biolux-intro, .ilux-intro) {
    padding-inline: var(--product-gutter);
  }

  .product-page :is(.blue-intro > h2, .blue-intro > p, .biolux-intro-copy,
      .ilux-intro-statement, .ilux-intro-cards) {
    max-width: var(--product-content-width);
    margin-inline: auto;
  }

  .product-page :is(.ailens-intro-grid, .ailens-ai-layout, .gold-benefits,
      .ilux-intro-cards, .biolux-features, .blue-ai-benefits) {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--product-gap);
  }

  .product-page :is(.ailens-intro-grid, .ailens-ai-copy, .blue-daily-inner,
      .blue-daily-copy, .blue-mechanisms-copy, .biolux-objective-copy) { padding: 0; }

  .product-page :is(.ailens-psicoptix, .ailens-ai-layout, .gold-benefits,
      .ilux-intro-cards, .ilux-benefit-cards) { margin-top: 32px !important; }

  .product-page :is(.gold-intro-summary, .gold-ai-note) { margin-top: 32px !important; }
  .product-page .gold-intro-summary { width: 100%; }
  .product-page .gold-intro h2 { padding: 0; }
  .product-page .gold-intro h2 em { margin-right: 0.15em; }
  .product-page .gold-benefits { width: 100%; }
  .product-page .gold-benefits li {
    min-height: 0;
    padding: 24px;
    border-radius: var(--product-radius);
    font-size: 20px;
    line-height: 1.4;
  }
  .product-page .gold-ai-note { width: 100%; }

  .product-page .ailens-benefits {
    width: 100%;
    margin-top: 32px;
    padding: 16px 20px;
    border-radius: var(--product-radius);
    grid-template-columns: 1fr;
  }

  .product-page .ailens-benefits li { padding: 16px 0 16px 24px; }
  .product-page .ailens-benefits :is(span, strong) { font-size: 16px; line-height: 1.5; }
  .product-page .ailens-ai { padding: 0 0 var(--product-section-space); }
  .product-page .ailens-ai-visual { min-height: 0; }
  .product-page .ailens-ai-lens-frame {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1.6;
  }
  .product-page .ailens-ai-lens-crop { width: 88%; }
  .product-page .ailens-ai-visual figcaption {
    position: static;
    width: 100%;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
  }

  .product-page :is(.gold-story, .blue-mechanisms, .blue-daily, .blue-ai) {
    padding: var(--product-section-space) 0;
  }
  .product-page :is(.gold-story-inner, .blue-daily-inner, .spectra-story) { min-height: 0; }
  .product-page .spectra-story { margin-top: var(--product-section-space); }
  .product-page :is(.blue-corner, .ailens-corner, .gold-corner) { display: none; }
  .product-page main :is(.gold-story-visual, .ailens-ai-visual, .spectra-story-visual) > figcaption {
    font-size: 14px;
    line-height: 1.5;
  }

  .product-page :is(.gold-story-visual, .blue-daily-visual, .blue-mechanisms-visual,
      .spectra-story-visual, .ilux-portrait, .ilux-identity-photo) {
    width: 100%;
    max-width: none;
    border-radius: var(--product-radius);
  }
  .product-page .blue-mechanisms-visual { height: auto; aspect-ratio: 1.1; }
  .product-page .blue-mechanisms-copy dl > div { grid-template-columns: 1fr; gap: 12px; }
  .product-page .blue-mechanisms-copy dt { font-size: 20px; line-height: 1.4; }
  .product-page .blue-ai-benefits li { font-size: 16px; line-height: 1.6; }

  .product-page :is(.gold-pills, .blue-pills, .spectra-pills, .ilux-tags) {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px !important;
  }
  .product-page :is(.gold-pills, .blue-pills, .spectra-pills, .ilux-tags) li {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
  }

  .product-page .biolux-intro-frame { inset-inline: 12px; }
  .product-page .biolux-keywords {
    min-height: 0;
    padding: 24px var(--product-gutter);
    gap: 12px;
    flex-wrap: wrap;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-page .biolux-keywords li {
    padding: 8px 12px;
    font: 400 16px/1.5 var(--poppins);
  }
  .product-page .biolux-objective { min-height: 0; }
  .product-page .biolux-objective-grid { padding-block: var(--product-section-space); }
  .product-page .biolux-feature { min-height: 0; }
  .product-page .biolux-feature p { max-width: none; margin-top: 12px; }

  .product-page .ilux-intro-statement { padding: 24px; }
  .product-page .ilux-coating-grid { min-height: 0; padding-block: var(--product-section-space); }
  .product-page .ilux-coating-features ul { grid-template-columns: 1fr; gap: 20px; }
  .product-page .ilux-coating-features li { max-width: none; font-size: 20px; line-height: 1.5; }
  .product-page :is(.ilux-intro-cards > div, .ilux-benefit-cards > div) {
    min-height: 0;
    padding: 24px;
    border-radius: var(--product-radius);
  }
  .product-page :is(.ilux-expression, .ilux-quote, .ilux-identity) { margin-top: var(--product-section-space); }
  .product-page .ilux-quote { width: calc(100% - 40px); max-width: 560px; margin-inline: auto; }
  .product-page .ilux-quote p { font-size: 22px; line-height: 1.5; }
  .product-page .ilux-identity-photo { height: auto; aspect-ratio: 1.1; order: -1; }
  .product-page .ilux-identity-photo > img { inset: 0; height: 100%; object-fit: cover; object-position: center 30%; }

  /* Native scrolling: large campaign images, visible next card, keyboard access.
     Decorative SVG wings stay on desktop; all seven Gold photos remain available. */
  .product-page .product-mobile-gallery {
    container-type: normal;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: var(--product-section-space) 0;
  }
  .product-page .product-mobile-gallery > h2 {
    position: static !important;
    width: calc(100% - 40px);
    max-width: var(--product-content-width);
    height: auto;
    margin: 0 auto;
    padding: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    font: 500 22px/1.4 var(--poppins);
    text-align: left;
    text-wrap: balance;
  }
  .product-page .product-mobile-gallery-hint {
    display: block;
    width: calc(100% - 40px);
    max-width: var(--product-content-width);
    margin: 12px auto 24px;
    padding: 0;
    color: inherit;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
  }
  .product-page .product-mobile-gallery-stage {
    position: relative;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    margin: 0;
    padding: 8px max(var(--product-gutter), calc((100% - var(--product-content-width)) / 2)) 20px;
    overflow-x: auto;
    overflow-y: hidden;
    transform: none;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(var(--product-gutter), calc((100% - var(--product-content-width)) / 2));
    scrollbar-width: thin;
    scrollbar-color: #ffffff80 transparent;
    overscroll-behavior-x: contain;
  }
  .product-page .product-mobile-gallery-stage:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -3px;
  }
  .product-page .product-mobile-gallery-stage > :is(img, figure) {
    position: relative;
    inset: auto;
    display: block;
    flex: 0 0 min(68vw, 280px);
    width: min(68vw, 280px);
    max-width: none;
    height: auto;
    aspect-ratio: 2 / 3;
    margin: 0;
    border-radius: var(--product-radius);
    object-fit: contain;
    transform: none;
    scroll-snap-align: start;
  }
  .product-page .product-mobile-gallery-stage > span { display: none; }
  .product-page .product-mobile-gallery-stage > :is(img[aria-hidden="true"][src*=".svg"], .ilux-gallery-card--7) { display: none; }
  .product-page .product-mobile-gallery-stage > figure > img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .product-page .product-mobile-gallery-stage > :is(
      .gold-gallery-wing--left, .gold-gallery-card--far-left, .gold-gallery-card--left,
      .ailens-gallery-wing--left, .ailens-gallery-card--far-left, .ailens-gallery-card--left,
      .blue-gallery-wing--left, .blue-gallery-card--far-left, .blue-gallery-card--left,
      .spectra-gallery-card--outer-left, .spectra-gallery-card--left,
      .biolux-gallery-wing--left, .biolux-gallery-card--far-left, .biolux-gallery-card--left,
      .ilux-gallery-card--1, .ilux-gallery-card--2, .ilux-gallery-card--3) { transform: scaleX(-1); }
  .product-page .product-mobile-gallery > ul {
    position: static;
    width: calc(100% - 40px);
    max-width: var(--product-content-width);
    margin: 20px auto 0 !important;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    transform: none;
  }
  .product-page .product-mobile-gallery > ul > li { padding: 6px 12px; font-size: 12px; line-height: 1.5; }

  /* The catalog keeps its arrows and swipe interaction, with fluid card height. */
  .catalog-page .catalog-back { left: 20px; min-height: 44px; font-size: 12px; }
  .catalog-page .catalog-heading { padding-inline: 20px; }
  .catalog-page .catalog-heading > p:last-child { max-width: 560px; font-size: 16px; line-height: 1.6; }
  .catalog-page .catalog-carousel.is-enhanced .catalog-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    padding: 0 20px;
  }
  .catalog-page .catalog-carousel.is-enhanced .product-card {
    position: relative;
    inset: auto;
    grid-area: 1 / 1;
    width: 100%;
    max-width: 560px;
    max-height: none;
    margin: 0 auto;
    padding: 24px;
    border-radius: var(--product-radius);
    transform: none;
    opacity: 0;
    visibility: hidden;
  }
  .catalog-page .catalog-carousel.is-enhanced .product-card[data-position="main"] { opacity: 1; visibility: visible; }
  .catalog-page .product-card h2 { font-size: 28px; }
  .catalog-page .product-card p { font-size: 16px; line-height: 1.6; }
  .catalog-page .product-card-link { font-size: 14px; }
  .catalog-page .catalog-controls { margin: 24px 0; }
  .catalog-page .catalog-controls button { min-width: 44px; min-height: 44px; }
  .catalog-page .product-index { padding-inline: 20px; gap: 12px; }
  .catalog-page .product-index a { font-size: 14px; min-height: 52px; }

  :is(.product-page, .catalog-page) .site-footer {
    min-height: 0;
    padding: 32px 20px;
  }
  :is(.product-page, .catalog-page) .site-footer .social-links { gap: 8px; flex-wrap: wrap; }
  :is(.product-page, .catalog-page) .site-footer .social-links a { width: 44px; height: 44px; }
  :is(.product-page, .catalog-page) .site-footer .social-links img { width: 22px; height: 22px; }
}
