/* =====================================================================
   Prime Car — Showroom shell v2 (2026-10-22) — the prototype's sidebar,
   top bar, quick-action dock and the «Prime Fluid» icon base.
   Markup: app/Views/_showroom/partials/*. Scoped to the Showroom theme.
   ===================================================================== */

/* ---------- Prime Fluid icons ---------- */
svg.pf { width: 1em; height: 1em; flex: none; display: inline-block; overflow: visible; color: inherit; vertical-align: -.14em; }
:root[dir="rtl"] :is(.pf-truck, .pf-move) { transform: scaleX(-1); }
.pf--duo { --pf-fill: var(--pc-primary-100); --pf-plate: var(--pc-primary-100); }
.pf--solid { --pf-fill: currentColor; --pf-plate: currentColor; --pf-detail: var(--pc-surface); }

[data-theme="showroom"] .sr-shell { display: flex; min-height: 100vh; }
[data-theme="showroom"] .sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- sidebar ---------- */
[data-theme="showroom"] .sr-side {
    width: 268px; flex: none; position: sticky; top: 0; height: 100vh; align-self: flex-start;
    display: flex; flex-direction: column; gap: 12px; padding: 18px 14px 16px;
    background: var(--pc-side-bg); border-inline-end: 1px solid var(--pc-side-border);
    backdrop-filter: blur(14px) saturate(1.15); overflow: hidden;
}
.sr-side__head { display: flex; align-items: center; gap: 10px; padding: 2px 6px 4px; }
.sr-side__head .brand__mark { height: 36px; width: auto; }
.sr-side__brand { font-weight: 700; font-size: 16px; line-height: 1.15; color: var(--pc-ink); white-space: nowrap; }
.sr-side__brand small { display: block; font-weight: 500; font-size: 11px; color: var(--pc-muted); }
.sr-side__toggle {
    margin-inline-start: auto; width: 30px; height: 30px; border-radius: 10px; flex: none; cursor: pointer;
    border: 1px solid var(--pc-line); background: var(--pc-surface); color: var(--pc-body); display: grid; place-items: center;
}
.sr-side__toggle .icon { font-size: 15px; }
:root[dir="ltr"] .sr-side__toggle .icon { transform: scaleX(-1); }
.sr-me { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 18px; background: var(--pc-surface); border: 1px solid var(--pc-line); }
.sr-me__av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: var(--pc-primary-600); background: var(--pc-primary-050); text-decoration: none; }
[data-mode="dark"] .sr-me__av { color: #FFB3B8; }
.sr-me__txt { min-width: 0; flex: 1; text-decoration: none; color: inherit; }
.sr-me__role { display: block; font-size: 11px; color: var(--pc-muted); line-height: 1.4; }
.sr-me__name { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.sr-me__out { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--pc-muted); }
.sr-me__out:hover { background: var(--pc-surface-2); color: var(--pc-primary); }
.sr-me__out .icon { font-size: 17px; }
.sr-side__scroll { flex: 1; min-height: 0; overflow-y: auto; margin-inline: -4px; padding-inline: 4px; scrollbar-width: thin; }
.sr-side__label { font-size: 11.5px; color: var(--pc-side-label); padding: 12px 10px 5px; font-weight: 500; }
.sr-nav { display: flex; flex-direction: column; gap: 2px; }
.sr-nav__item {
    display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 13px;
    color: var(--pc-side-text); text-decoration: none; font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s;
}
.sr-nav__item .icon { font-size: 19px; color: var(--pc-side-icon); }
.sr-nav__t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-nav__item:hover { background: var(--pc-side-hover); color: var(--pc-side-strong); }
.sr-nav__item.is-active { background: var(--pc-side-active-bg); color: var(--pc-side-active-ink); font-weight: 600; box-shadow: var(--pc-side-active-shadow); }
.sr-nav__item.is-active .icon { color: var(--pc-primary); --pf-fill: var(--pc-primary-100); --pf-plate: var(--pc-primary-100); }
.sr-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--pc-surface-2); color: var(--pc-body); }
.sr-count--hot { background: var(--pc-primary); color: #fff; }
.sr-promo { position: relative; flex: none; border-radius: 22px; background: var(--pc-dark); color: #fff; padding: 14px 14px 12px; }
.sr-promo__car { display: block; width: 76%; height: auto; margin: 0 auto 8px; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .45)); }
.sr-promo__t { display: block; font-size: 14px; font-weight: 600; }
.sr-promo__s { margin: 2px 0 12px; font-size: 12px; color: rgba(255, 255, 255, .62); line-height: 1.55; }
.sr-pill { display: flex; align-items: center; gap: 10px; height: 46px; padding-inline: 6px 16px; border-radius: 999px; background: #fff; color: #161616; font-weight: 600; font-size: 14px; text-decoration: none; }
.sr-pill__dot { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--pc-primary); color: #fff; display: grid; place-items: center; }
.sr-pill__dot .icon { font-size: 17px; }

/* collapsed rail: chosen by the user (html.sr-rail) or automatic on laptops ≤1360px */
html.sr-rail .sr-side { width: 84px; padding-inline: 12px; align-items: center; }
html.sr-rail :is(.sr-side__brand, .sr-me__txt, .sr-me__out, .sr-side__label, .sr-nav__t, .sr-promo__t, .sr-promo__s, .sr-promo__car) { display: none; }
html.sr-rail .sr-pill > span:not(.sr-pill__dot) { display: none; }
html.sr-rail .sr-side__head { flex-direction: column; padding: 0; }
html.sr-rail .sr-side__toggle { margin: 0; }
html.sr-rail .sr-side__toggle .icon { transform: scaleX(-1); }
:root[dir="ltr"].sr-rail .sr-side__toggle .icon { transform: none; }
html.sr-rail .sr-me { padding: 0; border: 0; background: none; }
html.sr-rail .sr-nav__item { justify-content: center; padding: 11px; position: relative; }
html.sr-rail .sr-count { display: none; }
html.sr-rail .sr-count--hot { display: block; position: absolute; top: 6px; inset-inline-end: 6px; min-width: 0; width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--pc-canvas); }
html.sr-rail .sr-nav + .sr-side__label + .sr-nav { border-top: 1px solid var(--pc-line); padding-top: 8px; margin-top: 8px; }
html.sr-rail .sr-promo { padding: 6px; background: none; }
html.sr-rail .sr-pill { width: 46px; padding: 0; justify-content: center; background: var(--pc-primary); }
html.sr-rail .sr-pill__dot { background: transparent; }

/* ---------- top bar ---------- */
[data-theme="showroom"] .sr-top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
    padding: 20px 28px 18px; background: color-mix(in srgb, var(--pc-canvas) 86%, transparent);
    backdrop-filter: blur(10px); border-bottom: 0;
}
.sr-top__menu, .sr-ibtn.sr-top__menu { display: none; }
.sr-top__titles { min-width: 0; }
.sr-top__eyebrow { font-size: 12.5px; color: var(--pc-muted); line-height: 1.5; }
.sr-top__title { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-top__tools { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.sr-date { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px; border-radius: 999px; background: var(--pc-surface); border: 1px solid var(--pc-line); white-space: nowrap; font-size: 13px; }
.sr-date .icon { font-size: 17px; color: var(--pc-body); }
.sr-date b { font-weight: 600; }
.sr-date i { width: 1px; height: 16px; background: var(--pc-line-strong); }
.sr-date__greg { color: var(--pc-muted); }
.sr-ibtn { position: relative; width: 42px; height: 42px; border-radius: 50%; flex: none; background: var(--pc-surface); border: 1px solid var(--pc-line); color: var(--pc-ink); display: grid; place-items: center; text-decoration: none; cursor: pointer; }
.sr-ibtn:hover { box-shadow: var(--pc-shadow-sm); }
.sr-ibtn .icon { font-size: 19px; }
.sr-lang { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--pc-surface); border: 1px solid var(--pc-line); }
.sr-lang a { height: 32px; min-width: 34px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--pc-muted); text-decoration: none; }
.sr-lang a.is-on { background: var(--pc-ink); color: var(--pc-canvas); }
.sr-ask { display: flex; align-items: center; gap: 8px; height: 42px; padding-inline: 6px 16px; border-radius: 999px; background: var(--pc-dark); color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; }
[data-mode="dark"] .sr-ask { background: var(--pc-surface-2); color: var(--pc-ink); box-shadow: inset 0 0 0 1px var(--pc-line-strong); }
.sr-ask__primo { width: 32px; height: 32px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }

/* ---------- content spacing ---------- */
[data-theme="showroom"] .sr-main .app-content { padding: 8px 28px 120px; max-width: 1480px; width: 100%; margin-inline: auto; }

/* ---------- quick-action dock ---------- */
.sr-dock {
    position: fixed; z-index: 45; bottom: 18px; left: calc(50% - 134px); transform: translateX(-50%);
    display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px;
    background: color-mix(in srgb, var(--pc-surface) 90%, transparent); border: 1px solid var(--pc-line);
    backdrop-filter: blur(12px); box-shadow: var(--pc-shadow-lg);
}
:root[dir="ltr"] .sr-dock { left: calc(50% + 134px); }
html.sr-rail .sr-dock { left: calc(50% - 42px); }
:root[dir="ltr"].sr-rail .sr-dock { left: calc(50% + 42px); }
.sr-dock__btn { height: 44px; padding: 0 14px; border-radius: 999px; display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; color: var(--pc-body); text-decoration: none; white-space: nowrap; }
.sr-dock__btn .icon { font-size: 18px; }
.sr-dock__btn:hover { background: var(--pc-surface-2); color: var(--pc-ink); }
.sr-dock__btn--main { background: var(--pc-primary); color: #fff; font-weight: 600; padding-inline: 16px 18px; }
.sr-dock__btn--main:hover { background: var(--pc-primary-600); color: #fff; }
.sr-dock__sep { width: 1px; height: 22px; background: var(--pc-line); margin-inline: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) and (min-width: 1025px) {
    html:not(.sr-rail) .sr-side { width: 84px; padding-inline: 12px; align-items: center; }
    html:not(.sr-rail) :is(.sr-side__brand, .sr-me__txt, .sr-me__out, .sr-side__label, .sr-nav__t, .sr-promo__t, .sr-promo__s, .sr-promo__car, .sr-side__toggle) { display: none; }
    html:not(.sr-rail) .sr-pill > span:not(.sr-pill__dot) { display: none; }
    html:not(.sr-rail) .sr-side__head { flex-direction: column; padding: 0; }
    html:not(.sr-rail) .sr-me { padding: 0; border: 0; background: none; }
    html:not(.sr-rail) .sr-nav__item { justify-content: center; padding: 11px; position: relative; }
    html:not(.sr-rail) .sr-count { display: none; }
    html:not(.sr-rail) .sr-count--hot { display: block; position: absolute; top: 6px; inset-inline-end: 6px; min-width: 0; width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--pc-canvas); }
    html:not(.sr-rail) .sr-nav + .sr-side__label + .sr-nav { border-top: 1px solid var(--pc-line); padding-top: 8px; margin-top: 8px; }
    html:not(.sr-rail) .sr-promo { padding: 6px; background: none; }
    html:not(.sr-rail) .sr-pill { width: 46px; padding: 0; justify-content: center; background: var(--pc-primary); }
    html:not(.sr-rail) .sr-pill__dot { background: transparent; }
    .sr-dock { left: calc(50% - 42px); }
    :root[dir="ltr"] .sr-dock { left: calc(50% + 42px); }
    .sr-date__greg, .sr-date i { display: none; }
}
@media (max-width: 1024px) {
    [data-theme="showroom"] .sr-side {
        position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: 286px;
        background: var(--pc-surface); transform: translateX(100%); transition: transform .28s var(--pc-ease-out); box-shadow: none;
    }
    :root[dir="ltr"][data-theme="showroom"] .sr-side { transform: translateX(-100%); }
    [data-theme="showroom"] .app-shell.drawer-open .sr-side { transform: none; box-shadow: var(--pc-shadow-lg); }
    html.sr-rail .sr-side { width: 286px; align-items: stretch; padding-inline: 14px; }
    .sr-side__toggle { display: none; }
    .sr-top__menu, .sr-ibtn.sr-top__menu { display: grid; }
    .sr-dock, :root[dir="ltr"] .sr-dock { left: 50%; }
    .sr-date__greg, .sr-date i { display: none; }
    [data-theme="showroom"] .app-shell.drawer-open .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(20, 20, 18, .42); }
}
@media (max-width: 760px) {
    [data-theme="showroom"] .sr-top { flex-wrap: wrap; padding: 14px 16px 10px; gap: 10px; }
    .sr-top__titles { flex: 1; }
    .sr-top__title { font-size: 21px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .sr-top__tools { width: 100%; margin: 0; gap: 8px; }
    .sr-date { flex: 1; min-width: 0; overflow: hidden; }
    .sr-ask span { display: none; }
    .sr-ask { padding: 0 5px; }
    .sr-lang { display: none; }
    [data-theme="showroom"] .sr-main .app-content { padding: 4px 16px 110px; }
    .sr-dock { bottom: 12px; max-width: calc(100vw - 24px); }
    .sr-dock__btn:not(.sr-dock__btn--main) span { display: none; }
    .sr-dock__btn:not(.sr-dock__btn--main) { padding: 0 12px; }
}
@media print { .sr-side, .sr-top, .sr-dock { display: none !important; } }

/* Primo, the mascot: the eyelid is folded away and only drops during a blink (showroom.js) */
.primo { overflow: visible; }
.primo .lid { transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 0; transition: transform .08s ease-in; }
.primo.blink .lid { transform: scaleY(1); }
.primo .pupil { transition: transform .12s ease-out; }
@media (prefers-reduced-motion: reduce) { .primo .lid, .primo .pupil { transition: none; } }

/* ---------- page header (2026-10-22 rev): title first, description under it; phones: one row ---------- */
[data-theme="showroom"] .sr-top { align-items: center; }
.sr-top__sub { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--pc-muted); max-width: 62ch; }
@media (max-width: 760px) {
    [data-theme="showroom"] .sr-top { flex-wrap: nowrap; gap: 8px; padding: 12px 16px 6px; align-items: center; }
    .sr-top__titles { flex: 1; min-width: 0; }
    .sr-top__title { font-size: 19px; line-height: 1.3; -webkit-line-clamp: 1; }
    .sr-top__eyebrow { font-size: 11.5px; line-height: 1.4; }
    .sr-top__sub { font-size: 11.5px; line-height: 1.45; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .sr-top__tools { width: auto; margin: 0; gap: 6px; flex: none; }
    /* the date chip and «اسأل برايمو» live elsewhere on phones (dashboard, sidebar) — the header stays one row */
    .sr-top .sr-date, .sr-top .sr-ask { display: none !important; }
    .sr-top .sr-ibtn { width: 38px; height: 38px; }
}
/* shipping sub-nav: one row on a laptop (smaller pills; icons return on wide screens) */
@media (min-width: 761px) {
    [data-theme="showroom"] .ship-tabs { flex-wrap: wrap; gap: 6px !important; }
    [data-theme="showroom"] .ship-tabs > .chip { padding: 6px 11px !important; font-size: 12.5px !important; }
}
@media (min-width: 761px) and (max-width: 1600px) {
    [data-theme="showroom"] .ship-tabs > .chip > :is(svg, .icon) { display: none; }
}

/* active menu item (rev 2026-10-22): a solid, unmistakable fill — no floating shadow */
.sr-nav__item.is-active { background: var(--pc-dark) !important; color: #fff !important; box-shadow: none !important; font-weight: 600; }
.sr-nav__item.is-active .icon { color: #fff !important; --pf-fill: rgba(255, 255, 255, .18); --pf-plate: transparent; }
.sr-nav__item.is-active .sr-count:not(.sr-count--hot) { background: rgba(255, 255, 255, .16); color: #fff; }
[data-mode="dark"] .sr-nav__item.is-active { background: var(--pc-ink) !important; color: var(--pc-canvas) !important; }
[data-mode="dark"] .sr-nav__item.is-active .icon { color: var(--pc-canvas) !important; --pf-fill: rgba(0, 0, 0, .12); }
[data-mode="dark"] .sr-nav__item.is-active .sr-count:not(.sr-count--hot) { background: rgba(0, 0, 0, .12); color: var(--pc-canvas); }
.sr-nav__item:active { transform: none; }
.sr-nav__item:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--pc-primary-100) !important; }
.sr-side__scroll { padding-bottom: 10px; }
