/* ==================================================================
   Machine pages — revised layout for the categories in MP_UX2_CATEGORIES
   (includes/machine-page.php). Loaded only on those pages and scoped to
   .mp-ux2, so no other page changes. 2026-11-12, gold-testing range.

   Rules kept from site.css section "machine pages": contrast >= 4.5:1,
   targets >= 44px, visible focus, reserved image boxes (CLS 0).
   ================================================================== */

/* 1. Sticky header, sub-nav, FAQ heading and side panel actually stick.
   head.php wraps the page in .overflow-x-hidden; overflow-x:hidden makes that
   div a scroll container, which disables position:sticky for everything inside
   it. clip keeps the horizontal clipping without creating a scroll container
   (same fix as blog-post.css and store-product.css). */
body > .overflow-x-hidden:has(.mp-ux2) { overflow-x: clip !important; }

/* 2. Hero ------------------------------------------------------------ */
/* The photograph sits on the same off-white as the product photos (#fdfdfd),
   so there is no visible square inside the card. */
.mp-ux2 .mp-stage { background: #fdfdfd; }

@media (min-width: 992px) {
    /* Photo column centred against the copy column instead of hanging at the top. */
    .mp-ux2 .mp-hero-media { align-self: center; }
}

/* Actions: one primary, then two equal secondary buttons on one row. */
.mp-ux2 .mp-hero-actions {
    display: grid; gap: 12px; max-width: 62ch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mp-ux2 .mp-hero-actions > * { width: 100%; padding-left: 16px; padding-right: 16px; min-height: 48px; }
.mp-ux2 .mp-hero-actions > .btn-accent { grid-column: 1 / -1; }
@media (max-width: 479.98px) {
    .mp-ux2 .mp-hero-actions { grid-template-columns: 1fr; }
}

/* Price panel: one large figure, then the booking terms as labelled rows and chips. */
.mp-price-ux .mp-price-figure { align-items: baseline; }
.mp-price-gst {
    font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.7);   /* ≈ 9:1 on the hero */
}
/* MRP + offer price (owner, 2026-11-13): "MRP <del>₹15,00,000</del> 13% off You save ₹2,01,000". The word "MRP"
   names the struck figure for screen readers (<del> alone is often not announced); the pill stays on one line. */
.mp-price-mrp {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
    margin: 6px 0 0; font-size: .88rem; line-height: 1.5; color: rgba(255,255,255,.78);
}
.mp-price-mrp del { color: rgba(255,255,255,.72); text-decoration-thickness: 1.5px; }
.mp-price-mrp strong {
    white-space: nowrap; padding: 1px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700;
    color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3);
}
.mp-price-mrp span { white-space: nowrap; }
.mp-price-scope { margin: 6px 0 0; font-size: .84rem; line-height: 1.55; color: rgba(255,255,255,.72); }
.mp-price-terms {
    display: grid; gap: 10px; margin: 16px 0 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.mp-price-terms > div {
    padding: 12px 14px; border-radius: var(--r);
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.mp-price-terms dt {
    margin: 0 0 4px; font-size: .68rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: rgba(255,255,255,.66);
}
.mp-price-terms dd { margin: 0; font-size: .84rem; line-height: 1.45; color: rgba(255,255,255,.72); }
.mp-price-terms dd strong {
    display: block; font-family: var(--font-heading); font-weight: 400;
    font-size: 1.2rem; line-height: 1.25; color: #fff;
}
.mp-price-chips {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none;
}
.mp-price-chips li {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
}
/* A neutral dot, not a tick: the chips carry terms such as "No returns", which a tick would misstate as a benefit. */
.mp-price-chips li::before {
    content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 999px; background: var(--accent-bright);
}
.mp-price-ux .mp-price-note { margin-top: 12px; }

/* Phones: photograph first, in a shorter frame; stat tiles two by two. */
@media (max-width: 991.98px) {
    .mp-ux2 .mp-hero-media { order: -1; }
}
@media (max-width: 575.98px) {
    .mp-ux2 .mp-stage > li { aspect-ratio: 4 / 3; padding: 14px; }
    .mp-ux2 .mp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mp-ux2 .mp-stat { padding: 14px 14px; }
    .mp-ux2 .mp-stat dd { overflow-wrap: normal; }
    .mp-ux2 .mp-stat dd.is-lg { font-size: 1.32rem; }
    .mp-ux2 .mp-stat dd.is-md { font-size: 1.08rem; }
}

/* 3. Overview -------------------------------------------------------- */
@media (min-width: 992px) {
    /* Long reading column: the panels scroll with the page and only the last one
       ("Talk to a person") stays in view, because the whole stack is taller than
       most laptop screens and a sticky element taller than the viewport hides its end. */
    .mp-ux2 .mp-overview-grid:not(.mp-overview-compact) .mp-aside {
        position: static; align-self: stretch;
        display: flex; flex-direction: column; gap: 16px;
    }
    .mp-ux2 .mp-overview-grid:not(.mp-overview-compact) .mp-aside > :last-child {
        position: sticky; top: calc(var(--header-h) + 72px);
    }

    /* Short reading column: one column, panels side by side underneath it, so
       there is no empty column beside a tall stack of panels. */
    .mp-ux2 .mp-overview-compact { grid-template-columns: minmax(0, 1fr); }
    .mp-ux2 .mp-overview-compact .mp-aside {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        align-items: start;
    }
}
.mp-ux2 .mp-overview-compact .mp-main { max-width: 860px; }
