/*
    Story 6.1: Site A (tbtruonghoc.com) "Xanh Lục Bảo Rạng Rỡ" shell styles.
    Loaded only by _LayoutTbTruongHoc.cshtml. Plain CSS (no gulp/SCSS step),
    desktop-first design with breakpoints at 768px (tablet) and 1024px
    (desktop nav). Token values come from ux-tbtruonghoc DESIGN.md's
    frontmatter - change them there first. Nothing here is shared with Site
    B's Mộc Trầm system.

    Bootstrap CSS is still loaded (shared partials use its utilities); its
    font/color variables are re-pointed at the tokens below so nothing on
    Site A falls back to Bootstrap's own palette or system font.

    Shadows: only the contact chip, the dropdown panel and the modal panel
    (Story 6.4's quote modal; 6.5's survey modal reuses it). The only gradient is the hero photo overlay.
*/

/* ---------- Tokens ---------- */
:root {
    --sa-bg: #FCFEFD;
    --sa-surface: #FFFFFF;
    --sa-primary: #0E7A6C;
    --sa-primary-rgb: 14, 122, 108;
    --sa-text: #123832;
    --sa-text-rgb: 18, 56, 50;
    --sa-text-muted: #4F6E68;
    --sa-border: #D3EEE7;
    --sa-border-neutral: #E3ECE9;
    --sa-banner-bg: #0E7A6C;
    --sa-banner-text: #FFFFFF;
    --sa-banner-link: #CDEDE6;
    --sa-banner-subtext: #D8F3EC;
    --sa-banner-outline: #6FBFAE;
    --sa-cta: #E3A63B;
    --sa-cta-text: #2B1B02;
    --sa-accent-soft: #FCEDD1;
    --sa-accent-ink: #8A5F14;
    --sa-trust-bg: #DFF6EE;
    --sa-trust-border: #B7E7D9;
    --sa-trust-ink: #0E7A6C;
    --sa-on-primary: #E7FBF5;
    --sa-surface-tint: #EFF8F6;
    --sa-border-tint: #BFE3DA;
    --sa-warning-bg: #FFF7E8;
    --sa-warning-border: #F0D7A0;
    --sa-warning-ink: #6B4E10;
    --sa-error: #C0511F;
    /* 6.1 walkthrough hero: amber heading/quote text (lighter than --sa-cta
       so it reads on photos), hairline for the glass box and its CTAs, and
       Zalo's brand blue (hover fill) plus a lighter tint for its text. */
    --sa-hero-heading: #FFC857;
    --sa-hero-hairline: rgba(255, 255, 255, .28);
    --sa-zalo: #0068FF;
    --sa-zalo-text: #3D8BFF;

    --sa-font: Mulish, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --sa-radius-sm: 6px;
    --sa-radius-md: 8px;
    --sa-radius-lg: 10px;
    --sa-radius-xl: 12px;
    --sa-radius-full: 9999px;

    --sa-space-1: 4px;
    --sa-space-2: 8px;
    --sa-space-3: 12px;
    --sa-space-4: 16px;
    --sa-space-5: 20px;
    --sa-space-6: 24px;
    --sa-space-8: 32px;
    --sa-gutter: 16px;
    --sa-content-max: 1200px;
    --sa-section-gap: 48px;
    --sa-card-gap: 20px;
    --sa-field-gap: 14px;

    --sa-nav-h: 64px;
    --sa-shadow-chip: 0 3px 10px rgba(0, 0, 0, .2);
    --sa-shadow-dropdown: 0 14px 30px rgba(0, 0, 0, .18);

    /* Bootstrap variable overrides */
    --bs-body-font-family: var(--sa-font);
    --bs-body-font-size: 13.5px;
    --bs-body-line-height: 1.6;
    --bs-body-color: var(--sa-text);
    --bs-body-color-rgb: var(--sa-text-rgb);
    --bs-body-bg: var(--sa-bg);
    --bs-body-bg-rgb: 252, 254, 253;
    --bs-emphasis-color: var(--sa-text);
    --bs-secondary-color: var(--sa-text-muted);
    --bs-heading-color: var(--sa-text);
    --bs-link-color: var(--sa-primary);
    --bs-link-color-rgb: var(--sa-primary-rgb);
    --bs-link-hover-color: var(--sa-primary);
    --bs-link-hover-color-rgb: var(--sa-primary-rgb);
    --bs-primary: var(--sa-primary);
    --bs-primary-rgb: var(--sa-primary-rgb);
    --bs-secondary: var(--sa-text-muted);
    --bs-secondary-rgb: 79, 110, 104;
    --bs-danger: var(--sa-error);
    --bs-danger-rgb: 192, 81, 31;
    --bs-form-invalid-color: var(--sa-error);
    --bs-form-invalid-border-color: var(--sa-error);
    --bs-border-color: var(--sa-border-neutral);
    --bs-border-radius: var(--sa-radius-sm);
    --bs-border-radius-sm: var(--sa-radius-sm);
    --bs-border-radius-lg: var(--sa-radius-lg);
    --bs-focus-ring-color: rgba(var(--sa-primary-rgb), .35);
}

@media (min-width: 768px) {
    :root {
        --sa-gutter: 24px;
    }
}

@media (min-width: 1024px) {
    :root {
        --sa-gutter: 40px;
    }
}

/* ---------- Base ---------- */
html {
    background: var(--sa-bg);
}

/* Keep focused / anchored content clear of the sticky nav. */
html:has(> body.sa-has-nav) {
    scroll-padding-top: var(--sa-nav-h);
}

body.site-a {
    font-family: var(--sa-font);
    font-size: 13.5px;
    line-height: 1.6;
    background: var(--sa-bg);
    color: var(--sa-text);
}

.site-a h1, .site-a h2, .site-a h3, .site-a h4, .site-a h5, .site-a h6 {
    font-family: var(--sa-font);
    color: var(--sa-text);
}

.site-a h1 { font-size: 25px; font-weight: 800; line-height: 1.3; }
.site-a h2 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.site-a h3 { font-size: 17px; font-weight: 800; line-height: 1.3; }
.site-a h4 { font-size: 15px; font-weight: 800; line-height: 1.3; }

.site-a a {
    color: var(--sa-primary);
}

.site-a :focus-visible {
    outline: 3px solid var(--sa-primary);
    outline-offset: 2px;
}

/* On teal surfaces the focus ring flips to white so it stays visible. */
.site-a .sa-nav :focus-visible,
.site-a .sa-hero :focus-visible,
.site-a .sa-footer :focus-visible {
    outline-color: var(--sa-banner-text);
}

.site-a .sa-dropdown :focus-visible {
    outline-color: var(--sa-primary);
}

.site-a .container,
.sa-container {
    --bs-gutter-x: calc(var(--sa-gutter) * 2);
}

.site-a .container {
    max-width: var(--sa-content-max);
}

.sa-container {
    width: 100%;
    max-width: var(--sa-content-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--sa-gutter);
    padding-right: var(--sa-gutter);
}

.site-a .btn-primary {
    --bs-btn-bg: var(--sa-cta);
    --bs-btn-border-color: var(--sa-cta);
    --bs-btn-color: var(--sa-cta-text);
    --bs-btn-hover-bg: var(--sa-cta);
    --bs-btn-hover-border-color: var(--sa-cta);
    --bs-btn-hover-color: var(--sa-cta-text);
    --bs-btn-active-bg: var(--sa-cta);
    --bs-btn-active-border-color: var(--sa-cta);
    --bs-btn-active-color: var(--sa-cta-text);
    --bs-btn-disabled-bg: var(--sa-cta);
    --bs-btn-disabled-border-color: var(--sa-cta);
    --bs-btn-disabled-color: var(--sa-cta-text);
    --bs-btn-focus-shadow-rgb: var(--sa-primary-rgb);
    --bs-btn-font-weight: 700;
    --bs-btn-font-size: 14px;
    --bs-btn-border-radius: var(--sa-radius-sm);
}

.site-a .form-control,
.site-a .form-select {
    border-color: var(--sa-border-tint);
    border-radius: var(--sa-radius-sm);
}

.site-a .form-control:focus,
.site-a .form-select:focus {
    border-color: var(--sa-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--sa-primary-rgb), .2);
}

/* ---------- Buttons (DESIGN.md cta-buttons) ---------- */
.sa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sa-space-2);
    min-height: 44px;
    padding: 10px 22px;
    border: 1.5px solid transparent;
    border-radius: var(--sa-radius-sm);
    font-family: var(--sa-font);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.site-a .sa-btn--primary {
    background: var(--sa-cta);
    border-color: var(--sa-cta);
    color: var(--sa-cta-text);
}

.site-a .sa-btn--primary:hover {
    filter: brightness(.95);
    color: var(--sa-cta-text);
}

.site-a .sa-btn--secondary {
    background: transparent;
    border-color: var(--sa-primary);
    color: var(--sa-primary);
}

.site-a .sa-btn--secondary:hover {
    background: var(--sa-surface-tint);
}

/* ---------- Skip link ---------- */
.sa-skip-link {
    position: absolute;
    left: var(--sa-space-2);
    top: -100px;
    z-index: 1100;
    padding: var(--sa-space-2) var(--sa-space-4);
    background: var(--sa-cta);
    color: var(--sa-cta-text) !important;
    border-radius: var(--sa-radius-sm);
    font-weight: 700;
    text-decoration: none;
}

.sa-skip-link:focus {
    top: var(--sa-space-2);
}

.sa-main:focus {
    outline: none;
}

/* ---------- Nav (sticky on every width) ---------- */
.sa-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--sa-banner-bg);
    color: var(--sa-banner-text);
}

.sa-nav__bar {
    display: flex;
    align-items: center;
    gap: var(--sa-space-4);
    min-height: var(--sa-nav-h);
}

.site-a .sa-nav__brand {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .02em;
    color: var(--sa-banner-text);
    text-decoration: none;
    white-space: nowrap;
}

.sa-nav__toggle,
.sa-nav__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--sa-radius-sm);
    background: transparent;
    color: var(--sa-banner-text);
}

.sa-nav__list,
.sa-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-a .sa-nav__link {
    display: flex;
    align-items: center;
    gap: var(--sa-space-1);
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--sa-font);
    font-weight: 600;
    line-height: 1.2;
    color: var(--sa-banner-link);
    text-decoration: none;
    text-align: left;
}

.site-a .sa-nav__link:hover,
.site-a .sa-nav__item.is-active > .sa-nav__link {
    color: var(--sa-banner-text);
}

.sa-nav__trigger[aria-expanded="true"] .sa-nav__chevron {
    transform: rotate(180deg);
}

.sa-dropdown__divider {
    margin: var(--sa-space-2) 0;
    border: 0;
    border-top: 1px solid var(--sa-border-neutral);
    opacity: 1;
}

.site-a .sa-dropdown__link,
.site-a .sa-dropdown__all {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 8px var(--sa-space-3);
    border-radius: var(--sa-radius-sm);
    text-decoration: none;
    line-height: 1.35;
}

/* Contact chip (DESIGN.md contact-chip) - the one always-visible contact surface. */
.sa-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 2px;
    margin-left: auto;
    padding: 2px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: var(--sa-radius-full);
    box-shadow: var(--sa-shadow-chip);
}

.site-a .sa-chip__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 0 10px;
    border-radius: var(--sa-radius-full);
    color: var(--sa-banner-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}

.site-a .sa-chip__link:hover {
    background: rgba(255, 255, 255, .14);
}

/* Below desktop the chip is icon-only. */
.sa-chip__text {
    display: none;
}

/* ----- Below desktop (< 1024px): hamburger + right-side sheet ----- */
@media (max-width: 1023.98px) {
    .sa-nav__brand {
        margin-right: auto;
    }

    .sa-nav__toggle {
        order: 3;
    }

    .sa-chip {
        order: 2;
    }

    .sa-nav__menu {
        order: 4;
    }

    .js .sa-nav__menu {
        position: fixed;
        top: var(--sa-nav-h);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1030;
        overflow-y: auto;
        padding: 0 var(--sa-gutter) var(--sa-space-8);
        background: var(--sa-banner-bg);
        border-top: 1px solid rgba(255, 255, 255, .18);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }

    .js .sa-nav[data-menu-open="true"] .sa-nav__menu {
        transform: none;
        visibility: visible;
        transition: transform .25s ease, visibility 0s;
    }

    .js body:has(.sa-nav[data-menu-open="true"]) {
        overflow: hidden;
    }

    .sa-nav__sheet-head {
        display: flex;
        justify-content: flex-end;
        padding: var(--sa-space-2) 0;
    }

    html:not(.js) .sa-nav__sheet-head {
        display: none;
    }

    .sa-nav__item {
        border-bottom: 1px solid rgba(255, 255, 255, .18);
    }

    .site-a .sa-nav__link {
        width: 100%;
        min-height: 52px;
        font-size: 16px;
        justify-content: space-between;
    }

    /* "Sản phẩm" accordion: the same panel, inline. */
    .sa-dropdown {
        padding: 0 0 var(--sa-space-3) var(--sa-space-3);
    }

    .js .sa-dropdown {
        display: none;
    }

    .js .sa-nav__trigger[aria-expanded="true"] + .sa-dropdown {
        display: block;
    }

    .site-a .sa-dropdown__link,
    .site-a .sa-dropdown__all {
        min-height: 44px;
        font-size: 15px;
        color: var(--sa-banner-link);
    }

    .site-a .sa-dropdown__all {
        font-weight: 700;
        color: var(--sa-banner-text);
    }

    .sa-dropdown__divider {
        border-top-color: rgba(255, 255, 255, .18);
    }

    /* No JS: the whole list shows in normal flow under the bar. */
    html:not(.js) .sa-nav__bar {
        flex-wrap: wrap;
    }

    html:not(.js) .sa-nav__toggle {
        display: none;
    }

    html:not(.js) .sa-nav__menu {
        width: 100%;
        padding-bottom: var(--sa-space-4);
    }

    html:not(.js) .sa-nav {
        position: static;
    }
}

/* ----- Desktop (>= 1024px): inline links, dropdown, chip with text ----- */
@media (min-width: 1024px) {
    .sa-nav__toggle,
    .sa-nav__sheet-head {
        display: none;
    }

    .sa-nav__bar {
        height: var(--sa-nav-h);
        gap: var(--sa-space-8);
    }

    .sa-nav__menu {
        align-self: stretch;
    }

    .sa-nav__list {
        display: flex;
        align-items: stretch;
        gap: var(--sa-space-6);
        height: 100%;
    }

    .sa-nav__item {
        position: relative;
        display: flex;
        align-items: center;
    }

    .site-a .sa-nav__link {
        height: 100%;
        font-size: 12.5px;
        white-space: nowrap;
        border-top: 2px solid transparent;
        border-bottom: 2px solid transparent;
    }

    .site-a .sa-nav__item.is-active > .sa-nav__link {
        border-bottom-color: var(--sa-banner-text);
    }

    .sa-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: calc(var(--sa-space-3) * -1);
        z-index: 1040;
        min-width: 300px;
        padding: var(--sa-space-2);
        background: var(--sa-surface);
        border: 1px solid var(--sa-border-neutral);
        border-radius: var(--sa-radius-lg);
        box-shadow: var(--sa-shadow-dropdown);
    }

    .sa-nav__trigger[aria-expanded="true"] + .sa-dropdown,
    html:not(.js) .sa-nav__item:hover > .sa-dropdown,
    html:not(.js) .sa-nav__item:focus-within > .sa-dropdown {
        display: block;
    }

    .site-a .sa-dropdown__link {
        font-size: 13.5px;
        color: var(--sa-text);
    }

    .site-a .sa-dropdown__link:hover,
    .site-a .sa-dropdown__link:focus-visible,
    .site-a .sa-dropdown__all:hover,
    .site-a .sa-dropdown__all:focus-visible {
        background: var(--sa-surface-tint);
    }

    .site-a .sa-dropdown__all {
        font-size: 13.5px;
        font-weight: 700;
        color: var(--sa-primary);
    }

    .sa-chip__text {
        display: inline;
    }
}

/* ---------- Hero (DESIGN.md hero-carousel / hero-fallback) ----------
   6.1 walkthrough, option "A1+": full-bleed photos with no tint over them;
   every piece of text sits in one light frosted-teal box (bottom-left, ~1/3
   of the content width) that blurs only the photo behind it. Heading in
   amber, eyebrow as a solid pill, and one row of three ghost CTAs (quote /
   call / Zalo) that fill with their own colour on hover/focus. */
.sa-hero {
    position: relative;
    background: var(--sa-banner-bg);
    color: var(--sa-banner-text);
    overflow: hidden;
}

.sa-hero__inner {
    position: relative;
    z-index: 2;
    padding-top: var(--sa-space-8);
    padding-bottom: var(--sa-section-gap);
}

.sa-hero__box {
    min-width: 0;
}

/* Solid pill: white on the solid-teal fallback, teal over photos. */
.sa-hero__eyebrow {
    display: inline-block;
    margin: 0 0 var(--sa-space-4);
    padding: 5px 12px;
    border-radius: var(--sa-radius-full);
    background: var(--sa-banner-text);
    color: var(--sa-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-shadow: none;
}

.site-a .sa-hero__heading {
    max-width: 22ch;
    margin: 0 0 var(--sa-space-3);
    color: var(--sa-hero-heading);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.22;
}

.sa-hero__subtext {
    max-width: 60ch;
    margin: 0 0 var(--sa-space-5);
    color: var(--sa-banner-text);
    font-size: 15px;
    line-height: 1.6;
}

.sa-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sa-space-2);
}

/* Ghost CTA: dark frosted fill, hairline border like the box, coloured text. */
.site-a .sa-hero__cta {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--sa-hero-hairline);
    border-radius: var(--sa-radius-md);
    background: rgba(var(--sa-text-rgb), .38);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    text-shadow: none;
    transition: background-color .15s, border-color .15s, color .15s;
}

.site-a .sa-hero__cta svg {
    flex: none;
}

.site-a .sa-hero__cta--quote { color: var(--sa-hero-heading); }
.site-a .sa-hero__cta--call { color: var(--sa-banner-text); }
.site-a .sa-hero__cta--zalo { color: var(--sa-zalo-text); }

/* Hover / keyboard focus: each fills with its own colour. */
.site-a .sa-hero__cta:hover,
.site-a .sa-hero__cta:focus-visible {
    text-decoration: none;
}

.site-a .sa-hero__cta:focus-visible {
    outline: 2px solid var(--sa-banner-text);
    outline-offset: 2px;
}

.site-a .sa-hero__cta--quote:hover,
.site-a .sa-hero__cta--quote:focus-visible {
    background: var(--sa-cta);
    border-color: var(--sa-cta);
    color: var(--sa-cta-text);
}

.site-a .sa-hero__cta--call:hover,
.site-a .sa-hero__cta--call:focus-visible {
    background: var(--sa-banner-text);
    border-color: var(--sa-banner-text);
    color: var(--sa-primary);
}

.site-a .sa-hero__cta--zalo:hover,
.site-a .sa-hero__cta--zalo:focus-visible {
    background: var(--sa-zalo);
    border-color: var(--sa-zalo);
    color: #FFFFFF;
}

/* The photo layer is desktop/tablet only; phones get the solid fallback. */
.sa-hero__media {
    display: none;
}

@media (min-width: 768px) {
    .sa-hero__inner {
        padding-top: var(--sa-section-gap);
        padding-bottom: 64px;
    }

    .site-a .sa-hero--fallback .sa-hero__heading {
        font-size: 34px;
    }

    .sa-hero--carousel {
        display: flex;
        align-items: flex-end;
        min-height: 560px;
    }

    .sa-hero--carousel .sa-hero__inner {
        width: 100%;
        padding-bottom: 72px;
    }

    /* No z-index here: a stacking context would trap the controls under
       .sa-hero__inner (z 2) and swallow their clicks. */
    .sa-hero--carousel .sa-hero__media {
        display: block;
        position: absolute;
        inset: 0;
    }

    .sa-hero__slide {
        position: absolute;
        inset: 0;
    }

    .sa-hero__slide[hidden] {
        display: none;
    }

    .sa-hero__img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* The frosted box over the photos. */
    .sa-hero--carousel .sa-hero__box {
        width: min(100%, 440px);
        padding: var(--sa-space-6);
        border: 1px solid var(--sa-hero-hairline);
        border-radius: var(--sa-radius-xl);
        background: rgba(var(--sa-primary-rgb), .22);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 12px rgba(0, 0, 0, .35);
    }

    .sa-hero--carousel .sa-hero__eyebrow {
        background: var(--sa-primary);
        color: var(--sa-banner-text);
    }

    .site-a .sa-hero--carousel .sa-hero__heading {
        font-size: 28px;
    }

    .sa-hero--carousel .sa-hero__subtext {
        font-size: 14.5px;
    }

    .sa-hero--carousel .sa-hero__ctas {
        flex-wrap: nowrap;
    }

    /* Without backdrop-filter, a denser tint keeps the text readable. */
    @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
        .sa-hero--carousel .sa-hero__box {
            background: rgba(var(--sa-primary-rgb), .6);
        }
    }

    /* Controls: bottom-right on dark chips so they read on any photo. */
    .sa-hero__controls {
        position: absolute;
        right: max(var(--sa-gutter), calc((100% - var(--sa-content-max)) / 2 + var(--sa-gutter)));
        bottom: var(--sa-space-5);
        z-index: 3;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    html:not(.js) .sa-hero__controls {
        display: none;
    }

    .sa-hero__arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: var(--sa-radius-full);
        background: rgba(var(--sa-text-rgb), .6);
        color: var(--sa-banner-text);
    }

    .sa-hero__dots {
        display: flex;
        gap: 2px;
        padding: 0 4px;
        border-radius: var(--sa-radius-full);
        background: rgba(var(--sa-text-rgb), .6);
    }

    .sa-hero__dot {
        position: relative;
        width: 24px;
        height: 40px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .sa-hero__dot::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 10px;
        height: 10px;
        margin: -5px 0 0 -5px;
        border: 1.5px solid var(--sa-banner-text);
        border-radius: var(--sa-radius-full);
    }

    .sa-hero__dot[aria-current="true"]::before {
        background: var(--sa-banner-text);
    }
}

@media (min-width: 1024px) {
    /* ~1/3 of the content width. */
    .sa-hero--carousel .sa-hero__box {
        width: calc(100% / 3);
        min-width: 360px;
    }
}

/* ---------- Image gallery block (shared template, Story 5.2) ----------
   Site A no longer loads style.min.css, so the 5.2 gallery treatment is
   repeated here: fixed 16:9 frame, photo contained (never cropped), the
   letterbox bars show a blurred copy of the same photo, controls on a dark
   chip so they read on any photo. */
.site-a .gallery-block {
    background: var(--sa-text);
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-md);
    overflow: hidden;
}

.site-a .gallery-block__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

/* Oversized so the blur has no soft, see-through edge. */
.site-a .gallery-block__backdrop {
    position: absolute;
    inset: -40px;
    background-position: center;
    background-size: cover;
    filter: blur(28px) brightness(.8);
}

.site-a .gallery-block .gallery-block__image {
    position: relative;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.site-a .gallery-block .carousel-control-prev,
.site-a .gallery-block .carousel-control-next {
    width: 56px;
    opacity: 1;
}

.site-a .gallery-block .carousel-control-prev-icon,
.site-a .gallery-block .carousel-control-next-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(var(--sa-text-rgb), .6);
    background-size: 50%;
    border-radius: var(--sa-radius-full);
}

/* ---------- Page header / blocks (Cms/Page, Post, Archive markup) ---------- */
.sa-main > header {
    position: relative;
    padding: var(--sa-space-8) 0 var(--sa-space-6);
    background: var(--sa-bg);
    border-bottom: 1px solid var(--sa-border-neutral);
}

.sa-main > header h1 {
    margin-bottom: var(--sa-space-2);
}

.sa-main > header .lead {
    font-size: 15px;
    font-weight: 400;
    color: var(--sa-text-muted);
}

.sa-main > header .dimmer {
    display: none;
}

.sa-main > header.has-image {
    background-size: cover;
    background-position: center;
    padding: var(--sa-section-gap) 0;
    border-bottom: 0;
}

.sa-main > header.has-image .dimmer {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(var(--sa-text-rgb), .6);
}

.sa-main > header.has-image .container {
    position: relative;
}

.sa-main > header.has-image h1,
.sa-main > header.has-image .lead,
.sa-main > header.has-image .post-meta,
.sa-main > header.has-image .post-meta a {
    color: var(--sa-banner-text);
}

.sa-main .post-meta {
    font-size: 12.5px;
    color: var(--sa-text-muted);
}

.sa-main .post-meta span + span {
    margin-left: var(--sa-space-3);
}

.sa-main .block {
    padding: var(--sa-space-4) 0;
}

.sa-main main {
    padding-bottom: var(--sa-section-gap);
}

.sa-main .block img {
    max-width: 100%;
    height: auto;
    border-radius: var(--sa-radius-lg);
}

.sa-main blockquote {
    margin: 0;
    padding: var(--sa-space-4) var(--sa-space-5);
    border-left: 3px solid var(--sa-primary);
    background: var(--sa-surface-tint);
    border-radius: 0 var(--sa-radius-md) var(--sa-radius-md) 0;
}

/* Generic Site A grid: 3 columns desktop, 2 tablet, 1 phone. */
.sa-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sa-card-gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .sa-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .sa-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Footer strip (DESIGN.md footer-strip) ---------- */
.sa-footer {
    background: var(--sa-primary);
    color: var(--sa-on-primary);
    padding: var(--sa-space-5) 0;
}

.sa-footer__inner {
    display: flex;
    flex-direction: column;
    gap: var(--sa-space-2);
}

.sa-footer__brand {
    margin: 0;
    color: var(--sa-banner-text);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.2;
}

.sa-footer__contact {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
}

.sa-footer__contact p {
    margin: 0;
}

.sa-footer__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--sa-space-2);
}

.sa-footer__line a + a::before {
    content: "·";
    display: inline-block;
    margin-right: var(--sa-space-2);
    text-decoration: none;
}

.site-a .sa-footer a {
    color: var(--sa-on-primary);
    text-decoration: none;
}

.site-a .sa-footer a:hover {
    color: var(--sa-banner-text);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .sa-footer__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--sa-space-6);
    }

    .sa-footer__contact {
        text-align: right;
    }

    .sa-footer__line {
        justify-content: flex-end;
    }
}

/* ---------- Story 6.2: category tiles, homepage featured grid, trust band ---------- */
/* DESIGN.md `category-tile`: flat card, no shadow; the whole tile is a link. */
.sa-cat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sa-card-gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

.sa-cat-grid > li {
    display: flex;
}

.sa-cat-grid > li[hidden] {
    display: none;
}

@media (min-width: 768px) {
    .sa-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .sa-cat-grid--home {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sa-cat-grid--all {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.sa-tile {
    display: flex;
    flex-direction: column;
    gap: var(--sa-space-2);
    width: 100%;
    padding: var(--sa-space-5);
    background: var(--sa-bg);
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-xl);
    color: var(--sa-text);
    text-decoration: none;
}

a.sa-tile:hover {
    border-color: var(--sa-primary);
    color: var(--sa-text);
}

a.sa-tile:hover .sa-tile__title {
    color: var(--sa-primary);
}

.sa-tile__icon {
    display: block;
    width: 48px;
    height: 48px;
    overflow: hidden;
    background: var(--sa-primary);
    border-radius: var(--sa-radius-md);
}

.sa-tile__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sa-tile__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--sa-text);
}

.sa-tile__desc {
    font-size: 13.5px;
    color: var(--sa-text-muted);
}

.sa-tile__certs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sa-space-1);
    list-style: none;
    margin: auto 0 0;
    padding: var(--sa-space-1) 0 0;
}

/* DESIGN.md `trust-badge`. */
.sa-badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--sa-trust-bg);
    border: 1px solid var(--sa-trust-border);
    border-radius: var(--sa-radius-full);
    color: var(--sa-trust-ink);
    font-size: 11px;
    font-weight: 600;
}

/* Visitor-facing placeholder: dashed outline, no icon fill (Decision Q2). */
.sa-tile--placeholder {
    justify-content: center;
    background: transparent;
    border-style: dashed;
    border-width: 1.5px;
}

.sa-featured {
    padding: var(--sa-section-gap) 0;
}

.sa-featured__title {
    margin: 0 0 var(--sa-space-6);
    font-size: 19px;
    font-weight: 700;
}

.sa-featured__all {
    display: inline-block;
    margin-top: var(--sa-space-6);
    color: var(--sa-primary);
    font-weight: 700;
    text-decoration: none;
}

.sa-featured__all:hover {
    text-decoration: underline;
}

/* DESIGN.md `trust-stat` band: below the grid, informational only. */
.sa-trust {
    padding: var(--sa-space-8) 0;
    background: var(--sa-surface-tint);
    border-top: 1px solid var(--sa-border-tint);
    border-bottom: 1px solid var(--sa-border-tint);
}

.sa-trust__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sa-space-6);
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

@media (min-width: 768px) {
    .sa-trust__list {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

.sa-trust__num {
    display: block;
    color: var(--sa-primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.sa-trust__label {
    display: block;
    color: var(--sa-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

/* ---------- Story 6.2: aggregate "Danh mục sản phẩm" page ---------- */
.sa-catalog {
    padding-bottom: var(--sa-section-gap);
}

/* DESIGN.md breadcrumb: primary links, current step plain, caption size. */
.sa-breadcrumb {
    padding-top: var(--sa-space-5);
    font-size: 11px;
    font-weight: 600;
    color: var(--sa-text-muted);
}

.sa-breadcrumb a {
    color: var(--sa-primary);
    text-decoration: none;
}

.sa-breadcrumb a:hover {
    text-decoration: underline;
}

.sa-breadcrumb__sep {
    margin: 0 var(--sa-space-1);
}

.sa-catalog__header {
    padding-top: var(--sa-space-4);
    padding-bottom: var(--sa-space-6);
}

.sa-catalog__header h1 {
    margin: 0 0 var(--sa-space-2);
    font-size: 25px;
    font-weight: 800;
}

.sa-catalog__lead {
    max-width: 720px;
    margin: 0;
    font-size: 15px;
    color: var(--sa-text-muted);
}

/* DESIGN.md `category-search`: hidden without JS (every tile shows). */
.sa-catsearch {
    display: flex;
    flex-direction: column;
    gap: var(--sa-space-3);
    margin-bottom: var(--sa-space-6);
}

html:not(.js) .sa-catsearch {
    display: none;
}

.sa-catsearch__input {
    width: 100%;
    max-width: 480px;
    min-height: 44px;
    padding: 10px 12px;
    background: var(--sa-surface);
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-sm);
    color: var(--sa-text);
    font: inherit;
}

.sa-catsearch__input:focus-visible {
    border-color: var(--sa-primary);
    outline: 2px solid rgba(var(--sa-primary-rgb), .35);
    outline-offset: 0;
}

.sa-catsearch__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sa-space-2);
}

.sa-filter-chip {
    min-height: 36px;
    padding: 6px 14px;
    background: var(--sa-surface);
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-full);
    color: var(--sa-text);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.sa-filter-chip:hover {
    border-color: var(--sa-trust-border);
}

.sa-filter-chip[aria-pressed="true"] {
    background: var(--sa-trust-bg);
    border-color: var(--sa-trust-border);
    color: var(--sa-trust-ink);
}

.sa-catsearch__empty {
    margin: var(--sa-space-4) 0 0;
    color: var(--sa-text-muted);
}

/* Never display:none - the live region must stay in the accessibility
   tree while empty, or the "no results" message may not be announced. */
.sa-catsearch__empty:empty {
    margin: 0;
}

/* ---------- Story 6.3: category page product grid, card, pager ---------- */
/* 1 / 2 / 3 columns (<768 / >=768 / >=1024). */
.sa-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sa-card-gap);
    list-style: none;
    margin: var(--sa-space-6) 0 0;
    padding: 0;
}

.sa-product-grid > li {
    display: flex;
}

@media (min-width: 768px) {
    .sa-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .sa-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Q2: one link over the whole card; flat (no shadow, no gradient). */
.sa-pcard {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: var(--sa-surface);
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-lg);
    color: var(--sa-text);
    text-decoration: none;
}

.sa-pcard:hover,
.sa-pcard:focus-visible {
    border-color: var(--sa-primary);
    color: var(--sa-text);
}

.sa-pcard:hover .sa-pcard__title,
.sa-pcard:focus-visible .sa-pcard__title {
    color: var(--sa-primary);
}

.sa-pcard__media {
    aspect-ratio: 4 / 3;
    background: var(--sa-surface-tint);
    border-bottom: 1px solid var(--sa-border-neutral);
}

.sa-pcard__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* No image: a plain teal block, never a broken image. */
.sa-pcard__media--empty {
    background: var(--sa-primary);
    border-bottom-color: var(--sa-primary);
}

.sa-pcard__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--sa-space-2);
    padding: var(--sa-space-4) var(--sa-space-5) var(--sa-space-5);
}

.sa-pcard__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--sa-text);
}

.sa-pcard__price {
    margin-top: auto;
    color: var(--sa-primary);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.sa-pcard__price--contact {
    font-size: 14px;
}

.sa-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sa-space-4);
    margin-top: var(--sa-space-8);
}

.sa-pager__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1.5px solid var(--sa-primary);
    border-radius: var(--sa-radius-sm);
    color: var(--sa-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.sa-pager__link:hover,
.sa-pager__link:focus-visible {
    background: var(--sa-surface-tint);
    color: var(--sa-primary);
}

.sa-pager__status {
    color: var(--sa-text-muted);
    font-weight: 600;
}

/* ---------- Story 7.1: "Tin tức" listing grid, blog card, empty state ---------- */
/* Mirrors sa-product-grid: 1 / 2 / 3 columns (<768 / >=768 / >=1024). */
.sa-blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sa-card-gap);
    list-style: none;
    margin: var(--sa-space-6) 0 0;
    padding: 0;
}

.sa-blog-grid > li {
    display: flex;
    min-width: 0;
}

@media (min-width: 768px) {
    .sa-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .sa-blog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* One link over the whole card; flat like sa-pcard. */
.sa-bcard {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: var(--sa-surface);
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-lg);
    color: var(--sa-text);
    text-decoration: none;
}

.sa-bcard:hover,
.sa-bcard:focus-visible {
    border-color: var(--sa-primary);
    color: var(--sa-text);
}

.sa-bcard:hover .sa-bcard__title,
.sa-bcard:focus-visible .sa-bcard__title {
    color: var(--sa-primary);
}

.sa-bcard__media {
    aspect-ratio: 4 / 3;
    background: var(--sa-surface-tint);
    border-bottom: 1px solid var(--sa-border-neutral);
}

.sa-bcard__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* No image: a plain teal block, never a broken image. */
.sa-bcard__media--empty {
    background: var(--sa-primary);
    border-bottom-color: var(--sa-primary);
}

.sa-bcard__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--sa-space-2);
    padding: var(--sa-space-4) var(--sa-space-5) var(--sa-space-5);
}

.sa-bcard__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--sa-text);
    overflow-wrap: anywhere;
}

/* caption token: 11/600 text-muted. */
.sa-bcard__date {
    color: var(--sa-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.sa-bcard__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: 0;
    color: var(--sa-text);
    font-size: 13.5px;
    line-height: 1.55;
}

.sa-empty {
    margin: var(--sa-space-6) 0 0;
    color: var(--sa-text-muted);
}

/* ---------- Story 7.2: "Tin tức" article page (reading column, related, back-link) ---------- */
/* ~720px reading column, left-aligned in sa-container (not full-bleed). */
.sa-article__column {
    max-width: 720px;
    min-width: 0;
}

.sa-article__header {
    padding-top: var(--sa-space-4);
    padding-bottom: var(--sa-space-2);
}

/* Size/weight from the base .site-a h1 (heading-lg 25/800). */
.sa-article__header h1 {
    margin: 0 0 var(--sa-space-2);
    overflow-wrap: anywhere;
}

/* caption token: 11/600 text-muted. */
.sa-article__date {
    display: block;
    color: var(--sa-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.sa-article__body {
    overflow-wrap: break-word;
}

/* Blocks sit flush in the column (no container gutter of their own). */
.sa-article__body > .block {
    padding: var(--sa-space-2) 0;
}

/* In-body subheads (base .site-a h2/h3 tokens): vertical rhythm only. */
.sa-article__body h2 {
    margin: var(--sa-space-8) 0 var(--sa-space-3);
}

.sa-article__body h3 {
    margin: var(--sa-space-6) 0 var(--sa-space-2);
}

.sa-article__body > .block:first-child h2:first-child,
.sa-article__body > .block:first-child h3:first-child {
    margin-top: var(--sa-space-2);
}

.sa-article__body p,
.sa-article__body ul,
.sa-article__body ol {
    margin: 0 0 var(--sa-space-4);
}

.sa-article__body ul,
.sa-article__body ol {
    padding-left: var(--sa-space-6);
}

.sa-article__body li + li {
    margin-top: var(--sa-space-1);
}

.sa-article__body img,
.sa-article__body iframe,
.sa-article__body video,
.sa-article__body table {
    max-width: 100%;
}

.sa-article__body table {
    display: block;
    overflow-x: auto;
}

.sa-backlink {
    margin: var(--sa-space-6) 0 0;
    font-weight: 700;
}

.sa-backlink a {
    color: var(--sa-primary);
    text-decoration: none;
}

.sa-backlink a:hover {
    text-decoration: underline;
}

/* Related strip: full sa-container width, reuses sa-blog-grid (1 / 2 / 3). */
.sa-related {
    margin-top: var(--sa-section-gap);
    padding-top: var(--sa-space-6);
    border-top: 1px solid var(--sa-border-neutral);
}

.sa-related__title {
    margin: 0;
}

.sa-related .sa-blog-grid {
    margin-top: var(--sa-space-5);
}

/* Walkthrough (option 4): sidebar ("Bài viết mới" + "Danh mục sản phẩm").
   DOM order column -> related -> aside: one column below 1024px (aside
   last); from 1024px the aside takes the right column beside the reading
   column and the related strip spans both below. */
.sa-article__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.sa-article__aside {
    display: grid;
    align-content: start;
    gap: var(--sa-space-5);
    margin-top: var(--sa-section-gap);
}

@media (min-width: 1024px) {
    .sa-article__layout.has-aside {
        grid-template-columns: minmax(0, 720px) minmax(0, 340px);
        justify-content: space-between;
        column-gap: var(--sa-section-gap);
    }

    .has-aside > .sa-article__column {
        grid-column: 1;
        grid-row: 1;
    }

    .has-aside > .sa-article__aside {
        grid-column: 2;
        grid-row: 1;
        margin-top: var(--sa-space-4);
    }

    .has-aside > .sa-related {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.sa-aside-box {
    background: var(--sa-surface);
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-xl);
    padding: var(--sa-space-4) var(--sa-space-5);
}

/* Two classes: the base .site-a h2 (19/700) would win over one. */
.sa-aside-box .sa-aside-box__title {
    margin: 0 0 var(--sa-space-1);
    color: var(--sa-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.sa-aside-posts,
.sa-aside-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sa-aside-posts li + li,
.sa-aside-links li + li {
    border-top: 1px solid var(--sa-border-neutral);
}

.sa-aside-post {
    display: flex;
    align-items: flex-start;
    gap: var(--sa-space-3);
    padding: var(--sa-space-3) 0;
    color: var(--sa-primary);
    text-decoration: none;
}

.sa-aside-post__thumb {
    flex: none;
    width: 64px;
    height: 48px;
    border-radius: var(--sa-radius-sm);
    object-fit: cover;
}

.sa-aside-post__thumb--empty {
    background: var(--sa-surface-tint);
}

.sa-aside-post__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.sa-aside-post:hover .sa-aside-post__title {
    text-decoration: underline;
}

.sa-aside-links a,
.sa-aside-box__more {
    color: var(--sa-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.sa-aside-links a {
    display: block;
    padding: var(--sa-space-3) 0;
}

.sa-aside-box__more {
    display: inline-block;
    padding: var(--sa-space-3) 0 var(--sa-space-1);
}

.sa-aside-links a:hover,
.sa-aside-box__more:hover {
    text-decoration: underline;
}

/* ---------- Shared quote form (_QuoteRequestForm) under Site A tokens ---------- */
.site-a .quote-request-form {
    max-width: 560px;
    margin: var(--sa-space-6) 0 var(--sa-section-gap);
}

.site-a .quote-request-form .mb-3 {
    margin-bottom: var(--sa-field-gap) !important;
}

.site-a .quote-request-form label {
    display: block;
    margin-bottom: var(--sa-space-1);
    font-weight: 700;
}

.site-a .quote-request-form label span {
    color: var(--sa-error);
}

.site-a .quote-request-form input,
.site-a .quote-request-form textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sa-border-tint);
    border-radius: var(--sa-radius-sm);
    background: var(--sa-surface);
    color: var(--sa-text);
    font: inherit;
}

.site-a .quote-request-form input:focus-visible,
.site-a .quote-request-form textarea:focus-visible {
    border-color: var(--sa-primary);
    outline-offset: 0;
}

.site-a .quote-request-form__error,
.site-a .quote-request-form__submit-error {
    display: block;
    color: var(--sa-error);
    font-size: 12.5px;
}

.site-a .quote-request-form button[type="submit"] {
    min-height: 44px;
    padding: 10px 22px;
    border: 1.5px solid var(--sa-cta);
    border-radius: var(--sa-radius-sm);
    background: var(--sa-cta);
    color: var(--sa-cta-text);
    font-size: 14px;
    font-weight: 700;
}

/* ---------- Story 6.4: Site A product detail page (shared scaffold) ---------- */
.sa-pdp {
    padding-bottom: var(--sa-section-gap);
}

/* Stacked below 1024px: gallery -> info. */
.sa-pdp__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sa-space-6);
    padding-top: var(--sa-space-4);
}

@media (min-width: 1024px) {
    .sa-pdp__layout--gallery {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 46px;
    }
}

.sa-pdp__figure {
    position: relative;
}

.sa-pdp__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--sa-border-neutral);
    border-radius: var(--sa-radius-lg);
    background: var(--sa-surface-tint);
}

.sa-pdp__figure .sa-photo-badge {
    position: absolute;
    left: var(--sa-space-3);
    bottom: var(--sa-space-3);
}

.sa-pdp__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: var(--sa-space-3) 0 0;
    padding: 0;
}

.sa-pdp__thumb {
    position: relative;
    display: block;
    width: 78px;
    height: 78px;
    border: 2px solid transparent;
    border-radius: var(--sa-radius-md);
    overflow: hidden;
}

.sa-pdp__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sa-pdp__thumb[aria-current="true"] {
    border-color: var(--sa-primary);
}

.sa-pdp__title {
    margin: 0 0 var(--sa-space-2);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.3;
}

.sa-pdp__sku {
    margin: 0 0 var(--sa-space-2);
    color: var(--sa-text-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.sa-pdp__excerpt {
    margin: 0 0 var(--sa-space-5);
    color: var(--sa-text-muted);
    font-size: 13.5px;
    line-height: 1.65;
}

/* DESIGN.md `price-block`: one block, same position, for both states. */
.sa-price-block {
    margin-bottom: var(--sa-space-5);
    padding: var(--sa-space-4) 18px;
    background: var(--sa-surface-tint);
    border: 1px solid var(--sa-border-tint);
    border-radius: var(--sa-radius-lg);
}

.sa-price-block p {
    margin: 0;
}

.sa-price-block .sa-price-block__label {
    margin-bottom: var(--sa-space-1);
    color: var(--sa-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.sa-price-block__price {
    color: var(--sa-primary);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.sa-price-block__price--fallback {
    color: var(--sa-text);
    font-size: 20px;
}

.sa-price-block .sa-price-block__note {
    margin-top: 6px;
    color: var(--sa-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

/* DESIGN.md `shipping-note`. */
.sa-shipping-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 var(--sa-space-5);
    padding: 10px 14px;
    background: var(--sa-surface-tint);
    border: 1px solid var(--sa-border-tint);
    border-radius: var(--sa-radius-md);
    color: var(--sa-primary);
    font-size: 12.5px;
    font-weight: 700;
}

.sa-shipping-note svg {
    flex-shrink: 0;
}

.sa-pdp__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sa-space-3);
    margin-bottom: var(--sa-space-5);
}

/* Phones: full-width stacked CTAs. */
@media (max-width: 767.98px) {
    .sa-pdp__ctas {
        flex-direction: column;
    }

    .sa-pdp__ctas .sa-btn {
        width: 100%;
    }
}

/* DESIGN.md `trust-badge` chips and the photo badge: informational spans. */
.sa-pdp__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sa-space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.sa-trust-chip,
.sa-photo-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--sa-trust-bg);
    border: 1px solid var(--sa-trust-border);
    border-radius: var(--sa-radius-full);
    color: var(--sa-trust-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.sa-photo-badge[hidden] {
    display: none;
}

/* On a 78px thumbnail: one clipped line pinned to the bottom edge. */
.sa-pdp__thumb .sa-photo-badge--thumb {
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 3px;
    padding: 1px 5px;
    font-size: 8.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sa-pdp__specs {
    margin-top: var(--sa-section-gap);
}

.sa-pdp__specs h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
}

.sa-spec-table {
    width: 100%;
    border-collapse: collapse;
}

.sa-spec-table tr {
    border-bottom: 1px solid var(--sa-border-neutral);
}

.sa-spec-table th,
.sa-spec-table td {
    padding: 12px 16px;
    font-size: 13px;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.sa-spec-table th {
    width: 220px;
    background: var(--sa-surface-tint);
    color: var(--sa-text);
    font-weight: 700;
    text-align: left;
}

@media (max-width: 767.98px) {
    .sa-spec-table th {
        width: 40%;
    }
}

/* ---------- Story 6.5: installation-required PDP (service-area, process-strip) ---------- */
.sa-service-area {
    margin-top: var(--sa-section-gap);
    padding: var(--sa-space-5) var(--sa-space-6);
    background: var(--sa-bg);
    border: 1px solid var(--sa-border-tint);
    border-radius: var(--sa-radius-lg);
    font-size: 12.5px;
    color: var(--sa-text-muted);
}

.sa-service-area__title {
    display: flex;
    align-items: center;
    gap: var(--sa-space-2);
    margin: 0 0 var(--sa-space-2);
    color: var(--sa-primary);
    font-size: 15px;
    font-weight: 800;
}

.sa-service-area p {
    margin: 0 0 var(--sa-space-3);
}

.sa-service-area .sa-service-area__note {
    margin: 0;
    padding: 10px 12px;
    background: var(--sa-warning-bg);
    border: 1px solid var(--sa-warning-border);
    border-radius: var(--sa-radius-sm);
    color: var(--sa-warning-ink);
}

.sa-process-strip {
    margin-top: var(--sa-space-6);
    padding: var(--sa-space-6);
    background: var(--sa-surface-tint);
    border: 1px solid var(--sa-border-tint);
    border-radius: var(--sa-radius-xl);
}

.sa-process-strip__title {
    margin: 0 0 var(--sa-space-4);
    font-size: 17px;
    font-weight: 800;
}

.sa-process-strip__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sa-process-strip__step {
    position: relative;
}

/* Chevron between steps (decorative, no text for screen readers). */
.sa-process-strip__step + .sa-process-strip__step::before {
    content: "";
    position: absolute;
    top: 12px;
    left: -26px;
    width: 10px;
    height: 10px;
    border-top: 2.5px solid var(--sa-banner-outline);
    border-right: 2.5px solid var(--sa-banner-outline);
    transform: rotate(45deg);
}

.sa-process-strip__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--sa-radius-full);
    background: var(--sa-primary);
    color: #FFFFFF;
    font-weight: 800;
}

.sa-process-strip__step h3 {
    margin: var(--sa-space-2) 0 var(--sa-space-1);
    font-size: 15px;
    font-weight: 800;
}

.sa-process-strip__step p {
    margin: 0;
    font-size: 12.5px;
    color: var(--sa-text-muted);
}

@media (max-width: 767.98px) {
    .sa-service-area,
    .sa-process-strip {
        padding: var(--sa-space-4);
    }

    .sa-process-strip__steps {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--sa-space-6);
    }

    /* Stacked: the chevron points down, centred above the next number. */
    .sa-process-strip__step + .sa-process-strip__step::before {
        top: -20px;
        left: 12px;
        transform: rotate(135deg);
    }
}

/* ---------- Story 6.5: survey form (inside the survey <dialog>) ---------- */
.sa-modal__sub {
    margin: calc(-1 * var(--sa-space-2)) 0 var(--sa-space-4);
    font-size: 12.5px;
    color: var(--sa-text-muted);
}

.site-a .sa-survey-form input.sa-survey-form__linked {
    background: var(--sa-surface-tint);
    border-color: var(--sa-border-tint);
    color: var(--sa-primary);
    font-weight: 700;
}

.sa-survey-form__hint {
    display: block;
    margin-top: var(--sa-space-1);
    font-size: 11px;
    color: var(--sa-text-muted);
}

.site-a .sa-survey-form input.sa-survey-form__field--warn {
    background: var(--sa-warning-bg);
    border-color: var(--sa-warning-border);
}

.sa-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: calc(-1 * var(--sa-space-1)) 0 var(--sa-field-gap);
    padding: 10px 12px;
    background: var(--sa-warning-bg);
    border: 1px solid var(--sa-warning-border);
    border-radius: var(--sa-radius-sm);
    color: var(--sa-warning-ink);
    font-size: 12.5px;
}

.sa-warning-banner[hidden] {
    display: none;
}

.sa-warning-banner__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: var(--sa-radius-full);
    background: var(--sa-cta);
    color: var(--sa-cta-text);
    font-weight: 800;
}

.sa-warning-banner__text {
    margin: 0;
}

.sa-warning-banner__text strong {
    display: block;
    margin-bottom: 2px;
}

.sa-survey-form__note {
    margin: var(--sa-space-2) 0 0;
    text-align: center;
    font-size: 11px;
    color: var(--sa-text-muted);
}

/* ---------- Story 6.4: modal (native <dialog>; 6.5's survey modal reuses it) ---------- */
body.site-a:has(dialog.sa-modal[open]) {
    overflow: hidden;
}

/* No padding on the <dialog> itself: the panel fills it, so a click whose
   target is the dialog element is a backdrop click (site-a.js). */
.sa-modal {
    width: min(560px, calc(100% - 2 * var(--sa-gutter)));
    max-width: none;
    max-height: calc(100% - 2 * var(--sa-space-8));
    padding: 0;
    border: 0;
    border-radius: var(--sa-radius-xl);
    background: var(--sa-surface);
    color: var(--sa-text);
    box-shadow: 0 24px 60px rgba(var(--sa-text-rgb), .35);
}

.sa-modal::backdrop {
    background: rgba(18, 56, 50, .62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.sa-modal__panel {
    padding: var(--sa-space-6);
}

.sa-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sa-space-4);
    margin-bottom: var(--sa-space-4);
}

.sa-modal__title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
}

.sa-modal__close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 14px;
    background: transparent;
    border: 1.5px solid var(--sa-border-tint);
    border-radius: var(--sa-radius-sm);
    color: var(--sa-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.sa-modal__close:hover {
    background: var(--sa-surface-tint);
}

.site-a .sa-modal .quote-request-form {
    max-width: none;
    margin: 0;
}

.site-a .sa-modal .quote-request-form button[type="submit"] {
    width: 100%;
}

.site-a .sa-modal .quote-request-form__success {
    padding: var(--sa-space-4);
    background: var(--sa-surface-tint);
    border: 1px solid var(--sa-border-tint);
    border-radius: var(--sa-radius-md);
    font-weight: 700;
}

/* Phones: full-screen bottom sheet. */
@media (max-width: 767.98px) {
    .sa-modal {
        width: 100%;
        height: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
    }

    /* Fill the sheet so blank space below the form is never a "backdrop" click. */
    .sa-modal__panel {
        box-sizing: border-box;
        min-height: 100%;
        padding: var(--sa-space-5) var(--sa-gutter);
    }

    .sa-modal[open] {
        animation: sa-sheet-up .2s ease-out;
    }
}

@keyframes sa-sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Cookie-consent banner (shared partial): dark text-colour panel instead of Bootstrap's bg-dark. */
.site-a .cookie-consent {
    background: var(--sa-text) !important;
}

@media (prefers-reduced-motion: reduce) {
    .js .sa-nav__menu,
    .js .sa-nav[data-menu-open="true"] .sa-nav__menu {
        transition: none;
    }

    .sa-modal[open] {
        animation: none;
    }
}
