
/*
  Separate mobile presentation.
  The original r5 desktop markup and style.css remain intact inside
  .desktop-layout. This stylesheet only switches layouts and styles
  the isolated .mobile-layout tree.
*/
.desktop-layout { display: block; }
.mobile-layout { display: none !important; }

@media (max-width: 767px) {
  html { scroll-behavior: smooth; }

  body {
    min-width: 0;
    overflow-x: hidden;
    background: #ffffff;
  }

  body.nav-open { overflow: auto; }

  .desktop-layout { display: none !important; }
  .mobile-layout {
    display: block !important;
    width: 100%;
    min-width: 0;
    overflow: clip;
    color: #111827;
    background: #ffffff;
    font-family: "Montserrat", Arial, sans-serif;
    line-height: 1.55;
  }

  .mobile-layout *,
  .mobile-layout *::before,
  .mobile-layout *::after { box-sizing: border-box; }

  .mobile-layout img {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .mobile-layout a { text-decoration: none; }

  .m-shell {
    width: min(100% - 32px, 560px);
    margin-inline: auto;
  }

  .m-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 10, 18, 0.97);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
  }

  .m-header__row {
    min-height: 68px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
  }

  .m-brand {
    display: inline-flex;
    align-items: center;
    width: 132px;
  }

  .m-brand img {
    height: 42px;
    object-fit: contain;
    object-position: left center;
  }

  .m-call {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: #0b2b54;
    background: #ffffff;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .m-menu { position: relative; }
  .m-menu summary {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.38);
    border-radius: 50%;
    cursor: pointer;
    list-style: none;
  }
  .m-menu summary::-webkit-details-marker { display: none; }
  .m-menu summary::before {
    content: "";
    width: 18px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    box-shadow: 0 -5px 0 -3px currentColor inset;
  }
  .m-menu[open] summary::before {
    width: 17px;
    height: 17px;
    border: 0;
    background:
      linear-gradient(45deg, transparent 45%, currentColor 46% 54%, transparent 55%),
      linear-gradient(-45deg, transparent 45%, currentColor 46% 54%, transparent 55%);
    box-shadow: none;
  }

  .m-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 11px);
    width: min(82vw, 310px);
    padding: 10px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(0,0,0,0.28);
  }

  .m-menu__panel a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    color: #0b2b54;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .m-menu__panel a + a { border-top: 1px solid #e5e7eb; }
  .m-menu__panel a:active { background: #eef4fa; }

  .m-hero {
    position: relative;
    min-height: clamp(470px, 74svh, 660px);
    display: grid;
    align-items: end;
    isolation: isolate;
    overflow: hidden;
    color: #ffffff;
    background: #0a0f17;
  }

  .m-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--m-hero-image);
    background-size: cover;
    background-position: var(--m-hero-position, center);
  }

  .m-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0,0,0,0.14) 10%, rgba(0,0,0,0.32) 48%, rgba(0,0,0,0.86) 100%);
  }

  .m-hero--home {
    --m-hero-image: url("assets/home/img/hero.jpg");
    --m-hero-position: 58% center;
    align-items: center;
  }

  .m-hero--shower {
    --m-hero-image: url("assets/shower-doors/img/hero.jpg");
    --m-hero-position: center;
  }

  .m-hero--contact {
    --m-hero-image: url("assets/contact/img/bathroom.jpg");
    --m-hero-position: center;
  }

  .m-hero__content { padding: 42px 0 36px; }

  .m-hero__logo {
    width: min(88vw, 390px);
    margin: 0 auto;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.32));
  }

  .m-eyebrow {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .m-hero h1,
  .m-section h2,
  .m-card h2,
  .m-card h3,
  .m-footer h2 {
    margin-top: 0;
    font-family: "Montserrat", Arial, sans-serif;
  }

  .m-hero h1 {
    max-width: 11ch;
    margin-bottom: 12px;
    font-size: clamp(2.25rem, 11vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
  }

  .m-hero p {
    max-width: 34rem;
    margin: 0;
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
  }

  .m-section { padding: 64px 0; }
  .m-section--tight { padding: 46px 0; }
  .m-section--soft { background: #f3f6f9; }
  .m-section--navy { color: #ffffff; background: #0b2b54; }
  .m-section--black { color: #ffffff; background: #050505; }

  .m-section__head { margin-bottom: 24px; }
  .m-section__head--center { text-align: center; }

  .m-section__head h2 {
    margin-bottom: 10px;
    color: #0b2b54;
    font-size: clamp(1.9rem, 8.7vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
  }

  .m-section--navy .m-section__head h2,
  .m-section--black .m-section__head h2 { color: #ffffff; }

  .m-section__head p {
    margin: 0;
    color: #526071;
    font-size: 0.98rem;
  }

  .m-section--navy .m-section__head p,
  .m-section--black .m-section__head p { color: rgba(255,255,255,0.76); }

  .m-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 20px;
    box-shadow: 0 16px 42px rgba(11,43,84,0.10);
  }

  .m-card__body { padding: 24px 22px; }
  .m-card__body h2,
  .m-card__body h3 {
    margin-bottom: 10px;
    color: #0b2b54;
    line-height: 1.07;
    letter-spacing: -0.03em;
  }
  .m-card__body h2 { font-size: 1.8rem; }
  .m-card__body h3 { font-size: 1.35rem; }
  .m-card__body p { margin: 0; color: #4b5563; }

  .m-card__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e5e7eb;
  }
  .m-card__image img {
    height: 100%;
    object-fit: cover;
  }

  .m-intro-title {
    margin: 0 0 24px;
    color: #080808;
    text-align: center;
    font-size: clamp(2rem, 9vw, 3.2rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
  }

  .m-cta-card {
    padding: 26px 22px;
    color: #ffffff;
    background: #0b2b54;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(11,43,84,0.28);
  }
  .m-cta-card h2 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    line-height: 1.05;
    letter-spacing: -0.035em;
  }
  .m-cta-card p { margin: 0; color: rgba(255,255,255,0.85); }

  .m-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
  }

  .m-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 2px solid #0b2b54;
    border-radius: 999px;
    color: #ffffff;
    background: #0b2b54;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-align: center;
    text-transform: uppercase;
  }
  .m-btn--light { color: #0b2b54; background: #ffffff; border-color: #ffffff; }
  .m-btn--outline-light { color: #ffffff; background: transparent; border-color: rgba(255,255,255,0.7); }
  .m-btn--outline { color: #0b2b54; background: transparent; }

  .m-intro-photo {
    aspect-ratio: 4 / 3;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 20px;
  }
  .m-intro-photo img { height: 100%; object-fit: cover; }

  .m-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .m-service {
    min-width: 0;
    padding: 18px 14px;
    color: #ffffff;
    background: #0b2b54;
    border-radius: 16px;
    text-align: center;
  }
  .m-service__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
  }
  .m-service__icon img { height: 100%; object-fit: contain; }
  .m-service h3 {
    margin: 0 0 6px;
    font-size: 0.92rem;
    line-height: 1.16;
  }
  .m-service p {
    margin: 0;
    color: rgba(255,255,255,0.76);
    font-size: 0.72rem;
    line-height: 1.42;
  }

  .m-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(80vw, 330px);
    gap: 14px;
    margin-inline: -16px;
    padding: 2px 16px 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }
  .m-scroll::-webkit-scrollbar { display: none; }
  .m-scroll > * { scroll-snap-align: center; }

  .m-gallery-card {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 18px;
    background: #e5e7eb;
    box-shadow: 0 14px 32px rgba(0,0,0,0.13);
  }
  .m-gallery-card img { height: 100%; object-fit: cover; }

  .m-reviews { display: grid; gap: 14px; }
  .m-review {
    padding: 22px;
    color: #111827;
    background: #ffffff;
    border-radius: 17px;
  }
  .m-review p { margin: 0 0 18px; font-size: 0.94rem; }
  .m-review strong { color: #0b2b54; font-size: 0.82rem; }

  .m-storefront {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
  }
  .m-storefront img { height: 100%; object-fit: cover; object-position: center; }

  .m-feature-list { display: grid; gap: 18px; }
  .m-feature-card .m-card__image { aspect-ratio: 4 / 3; }

  .m-chip-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: 13px;
    margin-inline: -16px;
    padding: 2px 16px 16px;
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }
  .m-chip-scroll::-webkit-scrollbar { display: none; }

  .m-option {
    overflow: hidden;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.10);
    scroll-snap-align: center;
  }
  .m-option__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e5e7eb;
  }
  .m-option__image img { height: 100%; object-fit: cover; }
  .m-option h3 {
    margin: 0;
    padding: 14px;
    color: #0b2b54;
    font-size: 0.95rem;
    text-align: center;
  }

  .m-hardware-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .m-hardware {
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 16px;
    text-align: center;
  }
  .m-hardware__image {
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 11px;
    background: #edf1f5;
  }
  .m-hardware__image img { height: 100%; object-fit: contain; }
  .m-hardware h3 { margin: 0 0 3px; color: #0b2b54; font-size: 0.9rem; }
  .m-hardware p { margin: 0; color: #667085; font-size: 0.7rem; }

  .m-contact-card {
    padding: 26px 22px;
    color: #ffffff;
    background: #0b2b54;
    border-radius: 20px;
  }
  .m-contact-card h2 { margin-bottom: 10px; font-size: 1.9rem; line-height: 1.05; }
  .m-contact-card p { margin: 0; color: rgba(255,255,255,0.82); }
  .m-contact-card address {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    font-style: normal;
  }
  .m-contact-card address a,
  .m-contact-card address span { color: #ffffff; font-size: 0.95rem; }

  .m-footer {
    padding: 46px 0 28px;
    color: #ffffff;
    background: #050505;
  }
  .m-footer__logo { width: 190px; margin-bottom: 28px; }
  .m-footer h2 { margin-bottom: 16px; font-size: 1.65rem; }
  .m-footer__links { display: grid; gap: 8px; }
  .m-footer__links a,
  .m-footer__links span { color: rgba(255,255,255,0.82); font-size: 0.86rem; }
  .m-footer__social {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
  }
  .m-footer__social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%;
  }
  .m-footer__social svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
  }
  .m-footer__handle {
    margin: 0;
    color: rgba(255,255,255,0.82);
    font-size: 0.82rem;
  }
  .m-footer__bottom {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.58);
    font-size: 0.7rem;
  }

  @media (min-width: 540px) {
    .m-actions { grid-template-columns: 1fr 1fr; }
    .m-services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .m-chip-scroll { grid-auto-columns: 42%; }
  }

  @media (max-width: 370px) {
    .m-shell { width: min(100% - 24px, 560px); }
    .m-brand { width: 112px; }
    .m-call { padding-inline: 10px; font-size: 0.64rem; }
    .m-services { grid-template-columns: 1fr; }
    .m-service { display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; gap: 2px 12px; text-align: left; }
    .m-service__icon { grid-row: 1 / 3; width: 54px; height: 54px; margin: 0; }
  }
}

.m-service__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
}

.m-service__icon img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.m-service__shower-icon {
  display: block;
  width: 58px;
  height: 58px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-service__shower-icon circle {
  fill: #fff;
  stroke: none;
}

/* r5 secondary pages: mobile layout mirrors desktop content exactly. */
@media (max-width: 767px) {
  .m-shower-page {
    background: #ffffff;
  }

  .m-shower-hero {
    min-height: clamp(260px, 62vw, 390px);
    background-image: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)), url("assets/shower-doors/img/hero.jpg");
    background-size: cover;
    background-position: center;
  }

  .m-shower-feature {
    padding: 42px 0 0;
  }

  .m-shower-feature:last-of-type {
    padding-bottom: 42px;
  }

  .m-shower-feature__row {
    display: grid;
    gap: 14px;
  }

  .m-shower-copy-card {
    padding: 26px 22px;
    color: #ffffff;
    background: #0b2b54;
    border-radius: 18px;
  }

  .m-shower-copy-card h1,
  .m-shower-copy-card h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(1.65rem, 7.4vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .m-shower-copy-card p {
    margin: 0;
    color: rgba(255,255,255,0.88);
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .m-shower-feature__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #e8edf2;
  }

  .m-shower-feature__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .m-option-showcase,
  .m-hardware-options {
    padding: 54px 0;
    background: #f4f5f7;
  }

  .m-option-showcase + .m-option-showcase,
  .m-option-showcase + .m-hardware-options {
    padding-top: 0;
  }

  .m-feature-divider {
    width: min(100%, 310px);
    height: 1px;
    margin: 0 auto 42px;
    background: rgba(11,43,84,0.24);
  }

  .m-option-title {
    margin: 0 0 26px;
    color: #0b2b54;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-align: center;
  }

  .m-showcase-carousel {
    position: relative;
    padding-inline: 30px;
  }

  .m-showcase-stage {
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.12fr) minmax(0, .78fr);
    align-items: center;
    gap: 7px;
  }

  .m-showcase-card {
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: 13px;
    box-shadow: 0 10px 24px rgba(11,43,84,0.12);
    text-align: center;
  }

  .m-showcase-card.is-side {
    opacity: 0.68;
    transform: scale(.90);
  }

  .m-showcase-card.is-center {
    position: relative;
    z-index: 2;
  }

  .m-showcase-card__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e7ebef;
  }

  .m-showcase-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .m-showcase-card h3 {
    min-height: 48px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 8px 5px;
    color: #0b2b54;
    font-size: clamp(.58rem, 2.45vw, .82rem);
    line-height: 1.2;
  }

  .m-showcase-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 0 3px;
    color: #ffffff;
    background: #0b2b54;
    border: 0;
    border-radius: 50%;
    font-size: 1.75rem;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
  }

  .m-showcase-arrow--prev { left: 0; }
  .m-showcase-arrow--next { right: 0; }

  .m-hardware-duo {
    display: grid;
    gap: 18px;
  }

  .m-hardware-panel {
    padding: 22px 14px 18px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(11,43,84,0.10);
  }

  .m-hardware-panel__title {
    margin: 0 0 16px;
    color: #0b2b54;
    font-size: 1.35rem;
    text-align: center;
  }

  .m-hardware-panel__row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
  }

  .m-hardware-panel__arrow {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 0 3px;
    color: #ffffff;
    background: #0b2b54;
    border: 0;
    border-radius: 50%;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
  }

  .m-hardware-panel__content {
    min-width: 0;
    text-align: center;
  }

  .m-hardware-panel__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eef1f4;
    border-radius: 12px;
  }

  .m-hardware-panel__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .m-hardware-panel__caption {
    margin: 12px 0 0;
    color: #0b2b54;
    font-size: .83rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .m-hero--contact {
    min-height: clamp(350px, 92vw, 520px);
  }

  .m-hero--contact h1 {
    max-width: none;
  }

  .m-contact-card + .m-intro-photo {
    margin-top: 14px;
  }
}
