/*
 * UIUX-008R — customer-wide visual convergence.
 *
 * The final shared presentation layer, loaded after UIUX-008 shell. It
 * converges components that several routes share rather than restyling a
 * single route, and it owns no behavior. Section order follows the package:
 * search controls, transient feedback, tooltips, utility bar, mega menu,
 * category rail, filters, category directory, cross-discovery, cards and
 * PDP supporting chapters. Tokens are declared once here so later sections
 * do not invent near-duplicate literals.
 */

/* Tokens (--u8r-*) are declared in the canonical token file, base/variables.css. */

/* ---------------------------------------------------------------------
 * 1. Global search control group (owner amendment)
 *    One white shell; Mic and Camera are circular icon controls, AI Mode
 *    is a compact rounded rectangle, and Search is a true charcoal circle.
 *    Active surfaces fill the whole control with no inner gaps.
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) .aanya-search {
    --u8r-control: 38px;
    --u8r-submit: 42px;
}

body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-wrapper {
    overflow: visible;
}

body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group {
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: flex-end;
    gap: 4px;
    padding-inline-end: 4px;
    overflow: visible;
}

body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > :is(.aanya-voice-search-btn, .aanya-visual-search-btn) {
    display: inline-grid;
    flex: 0 0 var(--u8r-control);
    width: var(--u8r-control);
    min-width: var(--u8r-control);
    max-width: var(--u8r-control);
    height: var(--u8r-control);
    min-height: var(--u8r-control);
    max-height: var(--u8r-control);
    align-self: center;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--u8r-ink);
}

body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > .aanya-ai-mode-btn {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    height: var(--u8r-control);
    min-height: var(--u8r-control);
    max-height: var(--u8r-control);
    align-self: center;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--u8r-ink);
    font-size: .8125rem;
    font-weight: 680;
    line-height: 1;
}

body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > :is(.aanya-voice-search-btn, .aanya-visual-search-btn, .aanya-ai-mode-btn):hover {
    background: var(--u8r-control-hover);
    color: var(--u8r-ink);
}

/* Active: one continuous filled surface; the fill itself is the state. */
body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > .aanya-voice-search-btn[aria-pressed="true"],
body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > .aanya-visual-search-btn[aria-expanded="true"],
body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > .aanya-ai-mode-btn[aria-pressed="true"] {
    background: var(--u8r-search-selected);
    color: #fff;
    font-weight: 720;
}

body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > :is(.aanya-voice-search-btn[aria-pressed="true"], .aanya-visual-search-btn[aria-expanded="true"], .aanya-ai-mode-btn[aria-pressed="true"]):hover {
    background: var(--u8r-search-selected-hover);
    color: #fff;
}

body:not(.aanya-admin) .aanya-search .aanya-search-control-group > :is(.aanya-voice-search-btn, .aanya-visual-search-btn)::after {
    content: none;
}

body:not(.aanya-admin) .aanya-search .aanya-search-control-group > .aanya-voice-search-btn[aria-pressed="true"] {
    animation: u8r-listening 1.4s ease-in-out infinite;
}

/* Capability gates win over geometry: a control withheld with [hidden]
   (for example Voice without browser speech recognition) never renders. */
body:not(.aanya-admin) .aanya-search .aanya-search-control-group > [hidden] {
    display: none !important;
}

@keyframes u8r-listening {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 82, 78, .4); }
    50% { box-shadow: 0 0 0 5px rgba(74, 82, 78, 0); }
}

body:not(.aanya-admin) .aanya-search .aanya-search-control-group > :is(button[disabled], [aria-disabled="true"]) {
    opacity: .42;
    cursor: not-allowed;
    background: transparent;
}

body:not(.aanya-admin) .aanya-search .aanya-search-control-group svg {
    width: 18px;
    height: 18px;
}

/* Search: a true 1:1 charcoal circle with a centered white glyph. */
body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > button.aanya-search-button[type="submit"] {
    display: inline-grid;
    flex: 0 0 var(--u8r-submit);
    width: var(--u8r-submit);
    min-width: var(--u8r-submit);
    max-width: var(--u8r-submit);
    height: var(--u8r-submit);
    min-height: var(--u8r-submit);
    max-height: var(--u8r-submit);
    aspect-ratio: 1;
    align-self: center;
    place-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--u8r-charcoal) !important;
    color: #fff;
    box-shadow: none;
}

body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > button.aanya-search-button[type="submit"]:hover {
    background: #3b423e !important;
}

body:not(.aanya-admin) .aanya-search .aanya-search-button svg {
    width: 19px;
    height: 19px;
    color: #fff;
}

body:not(.aanya-admin) :is(.customer-search-overlay, main) .aanya-search .aanya-search-button .aanya-search-button-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

/* Keyboard focus follows each control's own geometry. */
body:not(.aanya-admin) :is(.site-header .header-search, .customer-search-overlay, main) .aanya-search .aanya-search-control-group > :is(.aanya-voice-search-btn, .aanya-visual-search-btn, .aanya-ai-mode-btn, .aanya-search-button):focus-visible {
    outline: 3px solid var(--u8r-focus) !important;
    outline-width: 3px !important;
    outline-style: solid !important;
    outline-offset: 2px;
}

body:not(.aanya-admin) .site-header .header-search .aanya-search-wrapper:has(.aanya-search-control-group :focus-visible) {
    outline: 0;
}

@media (max-width: 1023px) {
    body:not(.aanya-admin) .site-header .header-search {
        --search-shell-height: 48px;
    }

    /* Touch layouts keep the 44px target floor (UIUX-004 contract). */
    body:not(.aanya-admin) :is(.customer-search-overlay, main) .aanya-search {
        --u8r-submit: 44px;
    }

    /* Page-level and overlay search keep their stacked row of controls,
       aligned to the end instead of stretched into equal grid cells. */
    body:not(.aanya-admin) :is(.customer-search-overlay, main) .aanya-search .aanya-search-control-group {
        width: 100%;
        min-height: 46px;
        padding: 2px 4px 4px;
        grid-template-columns: none;
    }
}

@media (max-width: 359px) {
    body:not(.aanya-admin) .aanya-search {
        --u8r-control: 36px;
    }

    body:not(.aanya-admin) :is(.customer-search-overlay, main) .aanya-search .aanya-ai-mode-btn {
        padding-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.aanya-admin) .aanya-search .aanya-search-control-group > .aanya-voice-search-btn[aria-pressed="true"] {
        animation: none;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
    }
}

/* ---------------------------------------------------------------------
 * 2. Transient search feedback (owner amendment)
 *    A status surface, not a tooltip: rendered only while it has text,
 *    announced by its polite live region, dismissed by the shared
 *    transient-feedback contract.
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) .aanya-search .aanya-voice-search-status {
    pointer-events: none;
}

body:not(.aanya-admin) .aanya-search .aanya-voice-search-status:not(:empty) {
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    max-width: min(100%, 24rem);
    padding: .5rem .8rem;
    border: 1px solid var(--u8r-rule);
    border-radius: 12px;
    background: #fff;
    color: var(--u8r-ink);
    font-size: .8125rem;
    font-weight: 560;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 10px 28px rgba(24, 26, 25, .12);
    animation: u8r-feedback-in 160ms ease-out;
}

body:not(.aanya-admin) .aanya-search .aanya-voice-search-status:empty {
    display: none;
}

/* While feedback is showing, or the control's own panel/listening state is
   open, the control's name tooltip steps aside so the two never overlap. */
body:not(.aanya-admin) .aanya-search :is(.aanya-visual-search-btn[aria-expanded="true"], .aanya-voice-search-btn[aria-pressed="true"]) > .aanya-tooltip {
    opacity: 0 !important;
    visibility: hidden;
}

/* While feedback is showing, the control's name tooltip steps aside so the
   two never overlap. */
body:not(.aanya-admin) .aanya-search:has(.aanya-voice-search-status:not(:empty)) .aanya-voice-search-btn > .aanya-tooltip {
    opacity: 0 !important;
    visibility: hidden;
}

/* Overlay search focus follows the canonical information-blue ring. */
body:not(.aanya-admin) .customer-search-overlay .aanya-search .aanya-search-wrapper:focus-within {
    border-color: var(--u8r-rule-strong);
    outline: 3px solid var(--u8r-focus);
    outline-offset: 2px;
    box-shadow: none;
}

@keyframes u8r-feedback-in {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 1023px) {
    body:not(.aanya-admin) .aanya-search .aanya-voice-search-status:not(:empty) {
        right: 0;
        left: auto;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.aanya-admin) .aanya-search .aanya-voice-search-status:not(:empty) {
        animation: none;
    }
}

/* ---------------------------------------------------------------------
 * 3. Tooltips: Escape hides the tooltip of the hovered/focused control
 *    (WCAG 1.4.13) until the next genuine hover or focus.
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) [data-aanya-tooltip][data-tooltip-dismissed] > .aanya-tooltip {
    opacity: 0 !important;
    visibility: hidden;
}

/* ---------------------------------------------------------------------
 * 4. Ecosystem utility bar — icon-only controls (owner amendment)
 *    At rest: a compact white circle, thin neutral outline, dark
 *    monochrome glyph. Hover and keyboard focus fill the whole circle with
 *    the platform/pathway colour and switch the glyph to white. Only
 *    colour properties transition, so nothing resizes or shifts. Two
 *    visible group labels frame the groups; each control stays icon-only.
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) .ecosystem-utility {
    min-height: 44px;
    border-bottom: 1px solid var(--u8r-rule);
    background: #fff;
}

body:not(.aanya-admin) .ecosystem-utility__inner {
    min-height: 44px;
}

body:not(.aanya-admin) .ecosystem-utility__left,
body:not(.aanya-admin) .ecosystem-utility__connect {
    gap: 6px;
    overflow: visible;
}

body:not(.aanya-admin) .ecosystem-utility__heading {
    flex: 0 0 auto;
    margin-inline-end: 6px;
    color: var(--u8r-muted);
    font-size: .6875rem;
    font-weight: 740;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

body:not(.aanya-admin) .ecosystem-utility__left > a.ecosystem-utility__link,
body:not(.aanya-admin) .ecosystem-utility__connect > .ecosystem-connect-link {
    position: relative;
    display: inline-grid;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--u8r-ink);
    text-decoration: none;
}

/*
 * A 44 x 44px pointer target around each 30px circle without widening the
 * row (UIUX-009 owner default 6): the target reaches 7px past the circle on
 * every side, i.e. only into the gap between neighbouring shortcuts, never
 * over another circle. The visual circle is unchanged.
 */
body:not(.aanya-admin) .ecosystem-utility__left > a.ecosystem-utility__link::after,
body:not(.aanya-admin) .ecosystem-utility__connect > .ecosystem-connect-link::after {
    content: "";
    position: absolute;
    inset: calc((var(--u8r-icon-target, 44px) - 30px) / -2);
}

body:not(.aanya-admin) .ecosystem-utility__glyph,
body:not(.aanya-admin) .ecosystem-utility .ecosystem-connect-link__icon {
    display: inline-grid;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border: 1px solid var(--u8r-rule-strong);
    border-radius: 50%;
    background: #fff;
    background-origin: border-box;
    color: var(--u8r-ink);
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

body:not(.aanya-admin) .ecosystem-utility__glyph :is(svg, .aanya-icon),
body:not(.aanya-admin) .ecosystem-utility .ecosystem-connect-link__icon :is(svg, .aanya-icon) {
    width: 14px;
    height: 14px;
    color: currentColor;
}

/* Platform and pathway colours, applied only on interaction. */
body:not(.aanya-admin) .ecosystem-utility__link--contact { --u8r-brand: var(--u8r-accent); }
body:not(.aanya-admin) .ecosystem-utility__link--social-facebook { --u8r-brand: #1877f2; }
body:not(.aanya-admin) .ecosystem-utility__link--social-instagram { --u8r-brand: #d6249f; }
body:not(.aanya-admin) .ecosystem-utility__link--social-linkedin { --u8r-brand: #0a66c2; }
body:not(.aanya-admin) .ecosystem-utility__link--social-youtube { --u8r-brand: #e62117; }
body:not(.aanya-admin) .ecosystem-utility__link--social-x { --u8r-brand: #000; }
body:not(.aanya-admin) .ecosystem-connect-link[data-accent="coral"] { --u8r-brand: #c94745; }
body:not(.aanya-admin) .ecosystem-connect-link[data-accent="amber"] { --u8r-brand: #986000; }
body:not(.aanya-admin) .ecosystem-connect-link[data-accent="green"] { --u8r-brand: #2e7835; }
body:not(.aanya-admin) .ecosystem-connect-link[data-accent="teal"] { --u8r-brand: #007467; }
body:not(.aanya-admin) .ecosystem-connect-link[data-accent="violet"] { --u8r-brand: #6848ad; }
body:not(.aanya-admin) .ecosystem-connect-link[data-accent="sky"] { --u8r-brand: #146b9f; }
body:not(.aanya-admin) .ecosystem-connect-link[data-accent="indigo"] { --u8r-brand: #4f5aa8; }

body:not(.aanya-admin) .ecosystem-utility__left > a.ecosystem-utility__link:is(:hover, :focus-visible),
body:not(.aanya-admin) .ecosystem-utility__connect > .ecosystem-connect-link:is(:hover, :focus-visible) {
    background: transparent;
    text-decoration: none;
}

body:not(.aanya-admin) .ecosystem-utility__left > a.ecosystem-utility__link:is(:hover, :focus-visible) .ecosystem-utility__glyph,
body:not(.aanya-admin) .ecosystem-utility__connect > .ecosystem-connect-link:is(:hover, :focus-visible) .ecosystem-connect-link__icon {
    border-color: var(--u8r-brand, var(--u8r-accent));
    background-color: var(--u8r-brand, var(--u8r-accent));
    color: #fff;
}

/* Instagram's recognizable gradient, painted only on interaction. */
body:not(.aanya-admin) .ecosystem-utility__link--social-instagram:is(:hover, :focus-visible) .ecosystem-utility__glyph {
    border-color: transparent;
    background-image: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 42%, #d6249f 62%, #285aeb 92%);
}

body:not(.aanya-admin) .ecosystem-utility__left > a.ecosystem-utility__link:focus-visible,
body:not(.aanya-admin) .ecosystem-connect-link:focus-visible {
    outline: 3px solid var(--u8r-focus);
    outline-offset: 2px;
    border-radius: 50%;
}

/* The bar paints below the sticky header (z 10030); lift it only while one
   of its own tooltips is showing so the tooltip is never hidden. */
body:not(.aanya-admin) .ecosystem-utility:has([data-aanya-tooltip]:is(:hover, :focus-visible)) {
    z-index: 10040;
}

/* Tooltips drop below the bar, clear of the header search. */
body:not(.aanya-admin) .ecosystem-utility [data-aanya-tooltip] > .aanya-tooltip {
    top: calc(100% + 8px);
    z-index: 1300;
    max-width: 15rem;
    padding: .42rem .6rem;
    border-radius: 8px;
    background: var(--u8r-ink);
    color: #fff;
    font-size: .75rem;
    font-weight: 620;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
}

body:not(.aanya-admin) .ecosystem-utility .aanya-tooltip strong,
body:not(.aanya-admin) .ecosystem-utility .aanya-tooltip small {
    display: block;
}

body:not(.aanya-admin) .ecosystem-utility .aanya-tooltip small {
    margin-top: .1rem;
    color: #d5dbd7;
    font-size: .6875rem;
    font-weight: 520;
}

/* Edge icons keep their tooltip inside the viewport. */
body:not(.aanya-admin) .ecosystem-utility__connect > .ecosystem-connect-link:nth-last-child(-n+2) > .aanya-tooltip {
    right: 0;
    left: auto;
    transform: none;
}

body:not(.aanya-admin) .ecosystem-utility__left > .ecosystem-utility__heading + a.ecosystem-utility__link > .aanya-tooltip {
    left: 0;
    transform: none;
}

/* Medium widths compress spacing instead of scrolling or wrapping. */
@media (max-width: 1279px) {
    body:not(.aanya-admin) .ecosystem-utility__connect {
        overflow: visible;
        padding-block: 0;
    }

    body:not(.aanya-admin) .ecosystem-utility__left,
    body:not(.aanya-admin) .ecosystem-utility__connect {
        gap: 5px;
    }
}

/* Mobile: compact Contact + AANYA Connect, full names in the drawer and
   gateway. The same outlined circle grammar carries through. */
@media (max-width: 899px) {
    body:not(.aanya-admin) .ecosystem-utility__mobile {
        -webkit-mask-image: none;
        mask-image: none;
        background: transparent;
    }

    body:not(.aanya-admin) .ecosystem-utility__mobile a {
        gap: .5rem;
        color: var(--u8r-ink);
        font-size: .8125rem;
        font-weight: 680;
    }

    body:not(.aanya-admin) .ecosystem-utility__mobile-icon {
        display: inline-grid;
        box-sizing: border-box;
        width: 28px;
        height: 28px;
        place-items: center;
        border: 1px solid var(--u8r-rule-strong);
        border-radius: 50%;
        background: #fff;
        color: var(--u8r-ink);
        transition: background-color .18s ease, border-color .18s ease, color .18s ease;
    }

    body:not(.aanya-admin) .ecosystem-utility__mobile a:is(:hover, :focus-visible) .ecosystem-utility__mobile-icon {
        border-color: var(--u8r-accent);
        background: var(--u8r-accent);
        color: #fff;
    }

    body:not(.aanya-admin) .ecosystem-utility__mobile-icon svg {
        width: 13px;
        height: 13px;
        color: currentColor;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.aanya-admin) .ecosystem-utility__glyph,
    body:not(.aanya-admin) .ecosystem-utility .ecosystem-connect-link__icon,
    body:not(.aanya-admin) .ecosystem-utility__mobile-icon {
        transition: none;
    }
}

/* ---------------------------------------------------------------------
 * 5. Primary navigation mega menus
 *    Readable featured actions, legible status labels, honest brand
 *    initials (never the AANYA mark), rounded controls and final type.
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) .mega-menu {
    border: 1px solid var(--u8r-rule);
    border-radius: var(--u8r-radius-panel);
    background: #fff;
    box-shadow: 0 22px 48px rgba(24, 26, 25, .14);
    color: var(--u8r-ink);
}

body:not(.aanya-admin) .mega-menu .mega-menu-header {
    border-bottom-color: var(--u8r-rule);
}

body:not(.aanya-admin) .mega-menu .mega-menu-heading h3 {
    color: var(--u8r-ink);
    font-size: 1.25rem;
    font-weight: 730;
    letter-spacing: -.015em;
}

body:not(.aanya-admin) .mega-menu .mega-menu-heading p {
    color: var(--u8r-muted);
}

body:not(.aanya-admin) .mega-menu .mega-column-title {
    color: var(--u8r-muted);
    font-size: .6875rem;
    font-weight: 760;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body:not(.aanya-admin) .mega-menu :is(.mega-card, .mega-rich-link, .mega-link) {
    border-radius: 12px;
}

body:not(.aanya-admin) .mega-menu :is(.mega-card, .mega-rich-link, .mega-link):hover {
    background: var(--u8r-surface-muted);
}

body:not(.aanya-admin) .mega-menu :is(.mega-card, .mega-rich-link, .mega-link, .mega-menu-browse-all, .mega-menu-close, .btn):focus-visible {
    outline: 3px solid var(--u8r-focus);
    outline-offset: 2px;
}

body:not(.aanya-admin) .mega-menu .mega-rich-link__icon {
    border-radius: 50%;
    background: var(--u8r-surface-muted);
    color: var(--u8r-ink);
}

/* Status labels: ink on a quiet neutral chip (was 1.19:1). */
body:not(.aanya-admin) .mega-menu .mega-rich-link__status,
body:not(.aanya-admin) .mega-menu .aanya-planned-badge {
    border: 1px solid var(--u8r-rule);
    border-radius: 999px;
    background: #fff !important;
    color: var(--u8r-muted) !important;
    font-size: .6875rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

/* Planned is communicated by its text; the chip stays neutral. */
body:not(.aanya-admin) .mega-menu .mega-rich-link__status--planned {
    border-style: dashed;
    border-color: var(--u8r-rule-strong);
}

/* Honest brand fallback in card lists: a small neutral initial. */
body:not(.aanya-admin) .mega-menu .mega-card-initial {
    display: inline-grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--u8r-rule);
    border-radius: 12px;
    background: var(--u8r-surface-muted);
    color: var(--u8r-ink);
    font-size: 1rem;
    font-weight: 760;
    line-height: 1;
}

body:not(.aanya-admin) .mega-menu .mega-card-image {
    border: 1px solid var(--u8r-rule);
    border-radius: 12px;
    background: #fff;
}

body:not(.aanya-admin) .mega-menu .mega-card-image img {
    object-fit: contain;
}

/* Family geometry (owner amendment: spotlight redesign). Every desktop
   mega menu shares one width and one column system; main navigation
   columns take the space, a spotlight gets a bounded column. Column
   titles are sentence-case labels, not tiny tracked capitals. */
body:not(.aanya-admin) .mega-menu {
    --mega-target-width: 1180px;
}

body:not(.aanya-admin) .mega-menu .mega-column-title {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

body:not(.aanya-admin) .mega-menu .mega-menu-column {
    min-width: 0;
    border: 0 !important;
}

body:not(.aanya-admin) .mega-menu .mega-menu-column--featured {
    padding-inline: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

@media (min-width: 1024px) {
    body:not(.aanya-admin) .mega-menu .mega-menu-columns--4:has(> .mega-menu-column--featured) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(15rem, 17.5rem);
    }

    body:not(.aanya-admin) .mega-menu .mega-menu-columns--3:has(> .mega-menu-column--featured) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(15rem, 17.5rem);
    }

    body:not(.aanya-admin) .mega-menu .mega-menu-column--featured {
        grid-column: auto !important;
        max-width: none;
    }
}

/* The shared spotlight: one link, restrained surface, quiet action. */
body:not(.aanya-admin) .mega-menu .mega-spotlight {
    margin: 0;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__link {
    display: grid;
    gap: .75rem;
    padding: 1rem;
    border-radius: 16px;
    background: #f6f6f6;
    color: var(--u8r-ink);
    text-decoration: none;
    transition: background-color .16s ease, box-shadow .16s ease;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__link:hover {
    background: #f0f0f0;
    box-shadow: inset 0 0 0 1px var(--u8r-rule-strong);
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__link:focus-visible {
    outline: 3px solid var(--u8r-focus);
    outline-offset: 2px;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__media {
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 9rem;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    color: #8a918d;
}

/* Missing media stays a quiet neutral slot, never a large empty panel. */
body:not(.aanya-admin) .mega-menu .mega-spotlight__media--empty:not(.mega-spotlight--brand .mega-spotlight__media) {
    aspect-ratio: auto;
    height: 4.5rem;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__media svg {
    width: 28px;
    height: 28px;
}

/* Brand: the logo or a restrained initial supports the name, never dominates. */
body:not(.aanya-admin) .mega-menu .mega-spotlight--brand .mega-spotlight__media {
    width: 56px;
    height: 56px;
    aspect-ratio: auto;
    border: 1px solid var(--u8r-rule);
    border-radius: 14px;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__initial {
    color: #4a524e;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--u8r-rule-strong);
    color: var(--u8r-ink);
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__icon svg {
    width: 19px;
    height: 19px;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__body {
    display: grid;
    gap: .25rem;
    min-width: 0;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__label {
    color: #4a524e;
    font-size: .75rem;
    font-weight: 650;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__title {
    color: var(--u8r-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__meta {
    color: #4a524e;
    font-size: .8125rem;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__text {
    display: -webkit-box;
    overflow: hidden;
    color: #4a524e;
    font-size: .8125rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

body:not(.aanya-admin) .mega-menu .mega-spotlight__action {
    margin-top: .375rem;
    color: var(--u8r-ink);
    font-size: .8125rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
}

@media (prefers-reduced-motion: reduce) {
    body:not(.aanya-admin) .mega-menu .mega-spotlight__link {
        transition: none;
    }
}

body:not(.aanya-admin) .mega-menu .mega-menu-browse-all {
    border-radius: 999px;
    color: var(--u8r-ink);
    font-weight: 700;
}

/* Header: one menu-level action and a 40px Close aligned with the title. */
body:not(.aanya-admin) .mega-menu .mega-menu-header {
    align-items: center;
}

body:not(.aanya-admin) .mega-menu .mega-menu-header__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

body:not(.aanya-admin) .mega-menu .mega-menu-browse-all {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    min-height: 40px;
    padding: 0 .875rem;
    border: 1px solid var(--u8r-rule-strong);
    font-size: .875rem;
}

body:not(.aanya-admin) .mega-menu .mega-menu-browse-all:hover {
    border-color: var(--u8r-ink);
    background: #f6f6f6;
}

body:not(.aanya-admin) .mega-menu .mega-menu-close {
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    place-items: center;
    padding: 0;
    border-radius: 50%;
}

/* ---------------------------------------------------------------------
 * 6. Customer container roles (owner amendment)
 *    One outer page edge for shell and every route: the wide role
 *    (90rem incl. gutter, gutter clamp(1rem,3vw,2rem)). At 1440 the
 *    content anchors are 32/1408; at 1920 they are 272/1648. Standard and
 *    reading become inner measures that start on the same left line.
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) {
    --u8r-page-max: 90rem;
    --u8r-gutter: clamp(1rem, 3vw, 2rem);
    --u8r-measure-standard: 80rem;
    --u8r-measure-reading: 45rem;
}

body:not(.aanya-admin) :is(.container, .container--wide, .container--commerce):not(.container--full):not(.container--reading) {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--u8r-page-max);
    margin-inline: auto;
    padding-inline: var(--u8r-gutter);
}

/* ---------------------------------------------------------------------
 * 7. Foreground convergence (owner amendment: remaining green text)
 *    Ordinary navigation and action text is charcoal. Declared on the
 *    customer body so root-derived semantic tokens (--color-success,
 *    --color-focus) keep their evergreen value; accent colour remains for
 *    focus, selected state and genuine status meaning.
 * ------------------------------------------------------------------- */
/* The customer-scope token overrides (charcoal action/search text, true
   neutral canvas, container widths) live in base/variables.css. */
body:not(.aanya-admin) :is(.connect-kicker, .trust-eyebrow, .section-eyebrow, .certification-intelligence-directory__eyebrow, .directory-page-header__result-count) {
    color: var(--u8r-muted);
}

body:not(.aanya-admin) :is(.certification-intelligence-directory, .certification-taxonomy) :is(a, label, h1, h2, h3, strong):not(.btn) {
    color: var(--u8r-ink);
}

body:not(.aanya-admin) :is(.aanya-planned-badge, .platform-module-card__status:not(.platform-module-card__status--active)) {
    border-color: var(--u8r-rule-strong);
    background: #fff;
    color: var(--u8r-muted);
}

body:not(.aanya-admin) :is(.aanya-search-icon, .pdp-hero-decision__icon, .platform-explore__hero-icon) {
    color: var(--u8r-ink);
}

/* ---------------------------------------------------------------------
 * 8. Related destination cards (owner correction)
 *    One grammar for every related-destination cross-link, rendered by
 *    template-parts/components/related-destination-card.php inside a
 *    <ul class="related-destinations">. Zones: icon | content (title +
 *    one short description) | upper-right metadata slot (text status and/or
 *    arrow). In multi-column grids the metadata slot shares the icon row;
 *    in the single-column layout it shares the title row, so a status never
 *    adds a row. Grid items stretch, so every card in a rendered row has the
 *    same height and content stays top-aligned. White true-neutral surface,
 *    neutral rule, no resting shadow; hover/focus never move the card.
 *    Planned destinations are non-interactive <div>s with the same geometry.
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) .related-destinations {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

body:not(.aanya-admin) .related-destinations > li {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
}

body:not(.aanya-admin) .related-destination-card {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "icon . meta"
        "title title title"
        "description description description";
    align-items: start;
    column-gap: .75rem;
    box-sizing: border-box;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--u8r-rule);
    border-radius: var(--u8r-radius-tile);
    background: #fff;
    color: var(--u8r-ink);
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

body:not(.aanya-admin) .related-destination-card__icon {
    display: grid;
    grid-area: icon;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 50%;
    background: var(--u8r-surface-muted);
    color: var(--u8r-ink);
    transition: color .16s ease;
}

body:not(.aanya-admin) :is(.related-destination-card__icon, .related-destination-card__arrow) .aanya-icon {
    display: inline-flex;
}

body:not(.aanya-admin) .related-destination-card__icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

body:not(.aanya-admin) .related-destination-card__title {
    grid-area: title;
    margin-top: .75rem;
    color: var(--u8r-ink);
    font-size: .9375rem;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: break-word;
}

body:not(.aanya-admin) .related-destination-card__description {
    grid-area: description;
    margin-top: .25rem;
    color: var(--u8r-muted);
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.45;
}

body:not(.aanya-admin) .related-destination-card__meta {
    display: inline-flex;
    grid-area: meta;
    align-items: center;
    align-self: center;
    justify-self: end;
    gap: .375rem;
}

body:not(.aanya-admin) .related-destination-card__status {
    display: inline-flex;
    align-items: center;
    min-height: 1.375rem;
    padding: 0 .5rem;
    border: 1px solid var(--u8r-rule-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--u8r-ink);
    font-size: .6875rem;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

body:not(.aanya-admin) .related-destination-card__status--planned {
    border-style: dashed;
    color: var(--u8r-muted);
}

body:not(.aanya-admin) .related-destination-card__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

body:not(.aanya-admin) .related-destination-card__arrow {
    display: inline-flex;
    color: var(--u8r-muted);
    transition: color .16s ease;
}

body:not(.aanya-admin) .related-destination-card__arrow svg {
    width: 1rem;
    height: 1rem;
}

body:not(.aanya-admin) .related-destination-card--link:hover {
    border-color: var(--u8r-rule-strong);
    box-shadow: 0 4px 14px rgb(24 26 25 / 6%);
}

body:not(.aanya-admin) .related-destination-card--link:hover :is(.related-destination-card__icon, .related-destination-card__arrow) {
    color: var(--u8r-accent);
}

body:not(.aanya-admin) .related-destination-card--link:focus-visible {
    border-color: var(--u8r-rule-strong);
    outline: 3px solid var(--u8r-focus);
    outline-offset: 2px;
}

body:not(.aanya-admin) .related-destination-card--planned {
    cursor: default;
}

body:not(.aanya-admin) .related-destination-card--planned .related-destination-card__icon {
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--u8r-rule);
    color: var(--u8r-muted);
}

/* Stacked list (gateway pathway groups side by side on wide desktop): one
   column of compact rows — icon | title + description | status on the title
   row. Below 1200px the list falls back to the responsive grid above. */
@media (min-width: 1200px) {
    body:not(.aanya-admin) .related-destinations.related-destinations--stack {
        grid-template-columns: minmax(0, 1fr);
        gap: .5rem;
    }

    body:not(.aanya-admin) .related-destinations--stack .related-destination-card {
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "icon title meta"
            "icon description description";
        padding: .875rem 1rem;
    }

    body:not(.aanya-admin) .related-destinations--stack .related-destination-card__title {
        margin-top: 0;
    }

    body:not(.aanya-admin) .related-destinations--stack .related-destination-card__meta {
        align-self: start;
        height: 1.21875rem;
    }
}

@media (max-width: 1199px) {
    body:not(.aanya-admin) .related-destinations {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    body:not(.aanya-admin) .related-destinations {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body:not(.aanya-admin) .related-destinations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Single column: icon | title + description | status, one compact row. */
@media (max-width: 34rem) {
    body:not(.aanya-admin) .related-destinations {
        grid-template-columns: minmax(0, 1fr);
        gap: .5rem;
    }

    body:not(.aanya-admin) .related-destination-card {
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "icon title meta"
            "icon description description";
        padding: .875rem 1rem;
    }

    body:not(.aanya-admin) .related-destination-card__title {
        margin-top: 0;
    }

    /* The meta slot is exactly one title line tall, so a status chip never
       makes its card taller than a peer without one. */
    body:not(.aanya-admin) .related-destination-card__meta {
        align-self: start;
        height: 1.21875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.aanya-admin) :is(.related-destination-card, .related-destination-card__icon, .related-destination-card__arrow) {
        transition: none;
    }
}

/* ---------------------------------------------------------------------
 * 9. Header control cluster (owner amendment: round Compare + Account)
 *    Market | Compare | Account share one 40px control height, one 1px
 *    neutral border and one charcoal interaction language. Compare and
 *    Account are exact 40px circles; an account photo is cropped to the
 *    same circle. Market keeps its wider shape for flag, country and
 *    currency. Geometry only: which controls show at each width is
 *    unchanged (Compare stays hidden in the compact header).
 * ------------------------------------------------------------------- */
body:not(.aanya-admin) .site-header .header-actions {
    column-gap: .5rem;
    align-items: center;
}

/* The account control sits inside the workspace switcher <details>; centre
   that wrapper so the circle shares the cluster's vertical centre. */
body:not(.aanya-admin) .site-header .workspace-context-switcher {
    display: flex;
    align-items: center;
    align-self: center;
}

body:not(.aanya-admin) .site-header :is(.header-actions [data-aanya-compare-link], .header-account-link) {
    box-sizing: border-box;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    place-items: center;
    border: 1px solid rgb(31 35 40 / 16%);
    border-radius: 50%;
    background: #fff;
    color: #1f2328;
    line-height: 1;
    transition: background-color .15s ease, border-color .15s ease;
}

body:not(.aanya-admin) .site-header :is(.header-actions [data-aanya-compare-link], .header-account-link):hover {
    border-color: rgb(31 35 40 / 42%);
    background: #f2f2f2;
    color: #1f2328;
}

/* The site-wide focus utility forces outline-color: var(--color-focus); the
   round controls re-point that token to charcoal instead of fighting it. */
body:not(.aanya-admin) .site-header :is(.header-actions [data-aanya-compare-link], .header-account-link):focus-visible {
    --color-focus: #1f2328;
    outline: 2px solid #1f2328;
    outline-offset: 2px;
}

body:not(.aanya-admin) .site-header .header-account-link img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
}

body:not(.aanya-admin) .site-header .header-market-slot .market-selector__trigger {
    box-sizing: border-box;
    min-height: 40px;
    height: 40px;
    max-height: 40px;
    border: 1px solid rgb(31 35 40 / 16%);
}

body:not(.aanya-admin) .site-header .header-market-slot .market-selector__trigger:hover {
    border-color: rgb(31 35 40 / 42%);
}

@media (prefers-reduced-motion: reduce) {
    body:not(.aanya-admin) .site-header :is(.header-actions [data-aanya-compare-link], .header-account-link) {
        transition: none;
    }
}

/*
 * UIUX-009 canonical icon system: registry glyphs that replaced text glyphs
 * and emoji. Each keeps the footprint the character had.
 */
/* Market: the globe for "no market chosen" sits in the 24 x 18 flag slot. */
body:not(.aanya-admin) :is([data-market-trigger-flag-fallback], [data-mobile-market-flag-fallback], [data-footer-market-flag-fallback]):not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body:not(.aanya-admin) :is([data-market-trigger-flag-fallback], [data-mobile-market-flag-fallback], [data-footer-market-flag-fallback]) .aanya-icon {
    width: var(--u8r-icon-inline, 16px);
    height: var(--u8r-icon-inline, 16px);
    color: var(--u8r-ink);
}

/* Remove-filter chips: the close glyph replaces the text multiplication sign. */
body:not(.aanya-admin) .archive-filters__active .archive-filters__remove-icon {
    width: var(--u8r-icon-compact, 14px);
    height: var(--u8r-icon-compact, 14px);
}

/* Scroll to top: the chevron replaces the text arrow inside the same circle. */
body:not(.aanya-admin) .scroll-to-top .aanya-icon {
    width: var(--u8r-icon-control, 20px);
    height: var(--u8r-icon-control, 20px);
}
