/* ==========================================================================
   NADA (Jouri) — base layer + chrome (Phase 1)
   Design of record: Jouri Storefront.dc.html. Logical properties only;
   rtl.css stays empty.

   TOKENS live on :root, not on a .nada island: --f is the WHOLE page ground
   (body, the gaps between islands, behind every PageBuilder band), and an
   island-scoped token cannot paint <body>.

   Four tokens come from the palette; --p and --g are fixed; --sc and every
   shadow tint are DERIVED here from --b / --d with color-mix(), so a palette
   switch — or a hub override — re-declares only the four.

   Palette = data-nada-pal on any .nada island; :root picks it up with :has().
   The default (Jouri) emits no attribute. Hub overrides
   (StorefrontController::THEME_TOKENS['nada']) land on :root:root:root (0,3,0).

   THE ONE STRUCTURAL SWITCH is `html.nada-narrow` (page width < 760px, set by
   the navbar's nadaFit()). It is not a media or container query: the dock,
   sheet and toast are position:fixed, and a measured container would become
   their containing block. Sizes inside the islands use cqi.

   Type: Changa 600 / 700 only. Body/UI 14-18px (11-13 meta), display >= 56px.
   Exempt (Ahmed 2026-11-05): the .nada-brand wordmark (23/24/26px).
   Radius: 28 cards · 22 media · 18 small · 14 row thumbs <= 64px · 9999 · 50%.
   Exempt: the 5px speech-bubble tail.
   ========================================================================== */

:root {
    --f: #DF8C9B;
    --b: #A34E60;
    --d: #6E2F3E;
    --s: #CC4860;
    --p: #FFFFFF;
    --g: rgba(255, 255, 255, .84);
    --sc: color-mix(in srgb, var(--b) 78%, transparent);
}

:root:has([data-nada-pal="lavender"]) { --f: #B9A3E3; --b: #6A4CA8; --d: #3E2A6B; --s: #8660CC; }
:root:has([data-nada-pal="apricot"])  { --f: #F2A97E; --b: #9A4A1E; --d: #5E2C12; --s: #BF561F; }
:root:has([data-nada-pal="mint"])     { --f: #8FD3B8; --b: #1F6E54; --d: #12402F; --s: #1E8663; }
:root:has([data-nada-pal="berry"])    { --f: #D78FB8; --b: #96336D; --d: #561C3F; --s: #B83C84; }

/* ---------- page ground ---------------------------------------------------- */

body:has(.nada) {
    background: var(--f);
    color: var(--b);
    font-family: 'Changa', sans-serif;
    font-weight: 600;
}

html.nada-narrow body:has(.nada-dock) {
    padding-block-end: 88px; /* the dock: 58px tabs + 12px padding + 12px gap + air */
}

/* The platform's back-to-top button would sit on the dock on phones; the dock
   is the phone's bottom edge on Nada. */
html.nada-narrow body:has(.nada-dock) .back-to-top { display: none; }

/* The rose watermark (SF:80): white at 9%, behind everything, fixed to the screen.
   Its width is in vw on purpose: it is position:fixed, so the viewport IS its box. */
.nada-watermark {
    position: fixed;
    inset-block-start: 6%;
    inset-inline-start: -18%;
    z-index: -1;
    width: min(1100px, 120vw);
    aspect-ratio: 1 / 1;
    background: var(--nada-rose) center / contain no-repeat;
    filter: brightness(0) invert(1);
    opacity: .09;
    pointer-events: none;
}

/* ---------- islands -------------------------------------------------------- */

.nada {
    font-family: 'Changa', sans-serif;
    font-weight: 600;
    color: var(--b);
}

.nada *,
.nada *::before,
.nada *::after {
    box-sizing: border-box;
}

.nada button {
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nada input::placeholder,
.nada textarea::placeholder {
    color: var(--b);
    opacity: .75;
}

.nada ::selection {
    background: var(--b);
    color: var(--p);
}

/* Material Symbols. (0,2,0) so a platform span/a font rule cannot replace the
   family and print the ligature name as text (pitfall 16). */
.nada .nada-i {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ---------- atoms ---------------------------------------------------------- */

.nada .nada-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 9999px;
    font: 700 16px/1.2 'Changa', sans-serif;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.nada .nada-btn .nada-i { font-size: 20px; }

.nada .nada-btn--primary { background: var(--b); color: var(--p); }
.nada .nada-btn--primary:hover { background: var(--d); color: var(--p); }

.nada .nada-btn--ghost { border: 2px solid var(--b); background: var(--p); color: var(--b); }
.nada .nada-btn--ghost:hover { background: var(--f); color: var(--b); }

.nada .nada-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--b);
    text-decoration: none;
}
.nada .nada-iconbtn:hover { background: var(--p); color: var(--b); }
.nada .nada-iconbtn--lg { width: 48px; height: 48px; }
.nada .nada-iconbtn--lg .nada-i { font-size: 24px; }
.nada .nada-iconbtn--ring { border: 2px solid var(--f); background: var(--p); }
.nada .nada-iconbtn--ring .nada-i { font-size: 20px; }

.nada .nada-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 2px solid var(--b);
    border-radius: 9999px;
    background: var(--p);
    color: var(--b);
    font: 700 14px/1.2 'Changa', sans-serif;
    text-decoration: none;
}
.nada .nada-chip.is-active { background: var(--b); color: var(--p); }

/* Fields (SF: checkout/track): pill, 2px field-coloured border, error in --s. */
.nada .nada-field {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    border: 2px solid var(--f);
    border-radius: 9999px;
    background: var(--p);
    color: var(--b);
    font: 600 16px/1.2 'Changa', sans-serif;
    outline: none;
}
.nada .nada-field:focus { border-color: var(--b); }
.nada .nada-field.is-error { border-color: var(--s); }
.nada textarea.nada-field { padding: 14px 20px; border-radius: 22px; line-height: 1.5; resize: vertical; }

.nada .nada-badge--sale {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 9999px;
    background: var(--s);
    color: var(--p);
    font: 700 13px/1 'Changa', sans-serif;
}

.nada .nada-divider { border: 0; border-block-start: 2px dashed var(--f); margin: 0; }
.nada .nada-divider--deep { border-block-start-color: rgba(255, 255, 255, .35); }

/* The type cliff's top: white, never wraps, decorative unless it is a real title. */
.nada .nada-display {
    display: block;
    margin: 0;
    white-space: nowrap;
    font: 600 clamp(56px, 11cqi, 168px)/1.04 'Changa', sans-serif;
    color: var(--p);
}

/* Count bubble: always in the DOM, hidden while empty (pitfall 20). */
.nada .nada-count {
    position: absolute;
    inset-block-start: -2px;
    inset-inline-end: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid var(--b);
    border-radius: 9999px;
    background: var(--p);
    color: var(--b);
    font: 700 11px/16px 'Changa', sans-serif;
    text-align: center;
}
.nada .nada-count:empty { display: none; }

/* ---------- header (SF:84-112) --------------------------------------------- */

.nada-chrome {
    position: sticky;
    inset-block-start: 0; /* the 12px gap is .nada-header's own margin */
    z-index: 30;
    container-type: inline-size;
}

.nada .nada-header {
    margin: 12px 12px 0;
    border-radius: 9999px;
    background: var(--g);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px -18px color-mix(in srgb, var(--d) 55%, transparent);
}

.nada .nada-header__wide {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2cqi, 28px);
    min-height: 64px;
    padding-inline: 22px 10px;
}
.nada .nada-header__mob { display: none; }

html.nada-narrow .nada .nada-header__wide { display: none; }
html.nada-narrow .nada .nada-header__mob {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 60px;
    padding: 0 6px;
}
.nada .nada-header__mob-start { display: flex; }
.nada .nada-header__mob-end { display: flex; justify-content: flex-end; }

/* The wordmark: the shop's mark + name. 26px / 23px — exempt from the type cliff. */
.nada .nada-brand {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--b);
    font: 700 26px/1 'Changa', sans-serif;
    text-decoration: none;
}
/* Sized by HEIGHT: the seeded mark is square, but an owner's uploaded logo may
   be a wide wordmark and must not be squashed into a square. */
.nada .nada-brand img,
.nada .nada-brand .nada-brand__mark {
    width: auto;
    height: 32px;
    max-width: 120px;
    object-fit: contain;
}
.nada .nada-brand--mob { gap: 8px; padding: 0 6px; font-size: 23px; }
.nada .nada-brand--mob img,
.nada .nada-brand--mob .nada-brand__mark { height: 28px; max-width: 96px; }

.nada .nada-nav-wrap { flex: 1 1 auto; min-width: 0; }
.nada .nada-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 clamp(4px, 1.4cqi, 22px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.nada .nada-nav > li { position: relative; }
.nada .nada-nav > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 9999px;
    color: var(--b);
    font: 700 15px/1.2 'Changa', sans-serif;
    text-decoration: none;
}
.nada .nada-nav > li > a:hover { background: var(--p); }

/* A tenant's nested menu items: a small white card under the item. */
.nada .nada-nav .sub-menu {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    z-index: 2;
    display: none;
    min-width: 200px;
    margin: 0;
    padding: 8px;
    border-radius: 18px;
    background: var(--p);
    list-style: none;
    box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--d) 60%, transparent);
}
.nada .nada-nav > li:hover > .sub-menu,
.nada .nada-nav > li:focus-within > .sub-menu { display: block; }
.nada .nada-nav .sub-menu a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 9999px;
    color: var(--b);
    font: 600 15px/1.3 'Changa', sans-serif;
    text-decoration: none;
}
.nada .nada-nav .sub-menu a:hover { background: var(--f); }

.nada .nada-header__actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nada .nada-askpill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 2px solid var(--b);
    border-radius: 9999px;
    background: var(--p);
    color: var(--b);
    font: 700 14px/1 'Changa', sans-serif;
}
.nada .nada-askpill .nada-i { font-size: 19px; }
.nada .nada-askpill:hover { background: var(--b); color: var(--p); }

.nada .nada-bagbtn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--b);
    color: var(--p);
    text-decoration: none;
}
.nada .nada-bagbtn:hover { background: var(--d); color: var(--p); }

/* The platform's language / region switchers, placed by partials/navbar (Pattern F). */
.nada .nada-header__actions .ov-lang-switcher,
.nada .nada-header__actions .ov-region-switcher { margin-inline-end: 4px; }

/* ---------- category sheet (SF:1820-1847) ---------------------------------- */

.nada .nada-sheet {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.nada .nada-sheet[hidden] { display: none; }

.nada .nada-sheet__scrim {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--d) 45%, transparent);
    animation: nada-fade .25s ease both;
}

.nada .nada-sheet__panel {
    position: relative;
    max-height: 86%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 18px 22px;
    border-radius: 28px 28px 0 0;
    background: var(--p);
    color: var(--b);
    animation: nada-up .3s cubic-bezier(.2, .8, .2, 1) both;
}

.nada .nada-sheet__handle {
    align-self: center;
    width: 48px;
    height: 5px;
    margin-block-end: 6px;
    border-radius: 9999px;
    background: var(--f);
}

.nada .nada-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-end: 6px;
}
.nada .nada-sheet__title { font: 700 18px/1.2 'Changa', sans-serif; }

.nada .nada-sheet__row { display: flex; flex-direction: column; border-block-end: 2px dashed var(--f); }
.nada .nada-sheet__cat {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 60px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--b);
    text-align: start;
    font: 700 17px/1.2 'Changa', sans-serif;
    cursor: pointer;
}
.nada .nada-sheet__img { flex: none; width: 44px; height: 44px; border-radius: 14px; object-fit: cover; }
.nada .nada-sheet__name { flex: 1 1 auto; min-width: 0; }
.nada .nada-sheet__n { font: 600 14px/1 'Changa', sans-serif; }
.nada .nada-sheet__chev { font-size: 22px; }
.nada .nada-sheet__subs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-block-end: 14px;
    padding-inline-start: 56px;
}
.nada .nada-sheet__subs[hidden] { display: none; }
.nada .nada-sheet__all { margin-block-start: 14px; }
.nada .nada-sheet__ask { margin-block-start: 8px; }
.nada .nada-sheet__lang { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; }
.nada .nada-sheet__lang:empty { display: none; }

/* ---------- dock (SF:1748-1757) -------------------------------------------- */

.nada .nada-dock { display: none; }

html.nada-narrow .nada .nada-dock {
    position: fixed;
    inset-block-end: 12px;
    inset-inline: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(var(--nada-dock-cols, 5), minmax(0, 1fr));
    gap: 2px;
    padding: 6px;
    border-radius: 9999px;
    background: var(--g);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--d) 60%, transparent);
}

.nada .nada-dock__tab {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 4px 2px;
    border-radius: 9999px;
    color: var(--b);
    font: 700 14px/1.1 'Changa', sans-serif;
    text-decoration: none;
}
.nada .nada-dock__tab.is-active { background: var(--b); color: var(--p); }
.nada .nada-dock__ico { position: relative; }
.nada .nada-dock__ico .nada-i { font-size: 23px; }
.nada .nada-dock__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nada .nada-count--dock {
    inset-block-start: -6px;
    inset-inline-end: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 0;
    background: var(--b);
    color: var(--p);
    line-height: 18px;
}
.nada .nada-dock__tab.is-active .nada-count--dock { background: var(--p); color: var(--b); }

/* ---------- breadcrumb + interim page title (SF:1009) ---------------------- */

.nada-pagehead {
    container-type: inline-size;
    overflow-x: clip;
}

.nada.nada-pagehead { /* island element itself: compound, not descendant */
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.6cqi, 18px);
    max-width: calc(1320px + 2 * clamp(14px, 4cqi, 64px));
    margin-inline: auto;
    padding: clamp(18px, 3cqi, 40px) clamp(14px, 4cqi, 64px) 0;
}

.nada .nada-crumb {
    align-self: flex-start;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    border-radius: 9999px;
    background: var(--p);
    color: var(--b);
    font: 700 14px/1.2 'Changa', sans-serif;
}
.nada .nada-crumb a,
.nada .nada-crumb [aria-current] {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 6px;
    color: inherit;
    text-decoration: none;
}
.nada .nada-crumb [aria-current] {
    max-width: 32ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nada .nada-crumb .nada-crumb__sep { font-size: 16px; }

/* ---------- footer (SF:1723-1745) ------------------------------------------ */

.nada-footer-island { container-type: inline-size; }

.nada .nada-footer {
    position: relative;
    overflow: clip;
    padding: clamp(28px, 4cqi, 64px) clamp(14px, 4cqi, 64px) 14px;
}

.nada .nada-footer__inner {
    max-width: 1320px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
}

.nada .nada-footer__card { border-radius: 28px; background: var(--p); color: var(--b); }

.nada .nada-footer__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(46%, 180px), 1fr));
    gap: clamp(18px, 3cqi, 40px);
    padding: clamp(20px, 3cqi, 40px);
}
.nada .nada-footer__cols:empty { display: none; }

.nada .nada-footer__col { display: flex; flex-direction: column; gap: 2px; border-radius: 18px; }
.nada .nada-footer__head { margin-block-end: 8px; font: 700 15px/1.2 'Changa', sans-serif; }
.nada .nada-footer__links,
.nada .nada-footer__links .sub-menu { margin: 0; padding: 0; list-style: none; }
.nada .nada-footer__links a {
    display: flex;
    align-items: center;
    min-height: 40px;
    color: var(--b);
    font: 600 16px/1.3 'Changa', sans-serif;
    text-align: start;
    text-decoration: none;
}
.nada .nada-footer__links a:hover { color: var(--d); }

/* The shop name, huge and white — decorative (aria-hidden in the blade). */
.nada .nada-footer__mark {
    display: block;
    margin-block: clamp(10px, 2cqi, 24px) -.08em;
    white-space: nowrap;
    pointer-events: none;
    font: 600 clamp(140px, 34cqi, 480px)/.82 'Changa', sans-serif;
    color: var(--p);
}

.nada .nada-footer__bottom {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
}
.nada .nada-footer__copy { font: 600 14px/1.5 'Changa', sans-serif; }

.nada .nada-pay { display: flex; flex-wrap: wrap; gap: 6px; border-radius: 18px; }
.nada .nada-pay__chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 2px solid var(--f);
    border-radius: 18px;
    font: 700 13px/1 'Changa', sans-serif;
}

/* ---------- toast (SF:1807-1818) ------------------------------------------- */

.nada .nada-toast {
    position: fixed;
    inset-block-start: 88px;
    inset-inline: 0;
    z-index: 45;
    display: flex;
    justify-content: center;
    padding: 0 12px;
    pointer-events: none;
}
.nada .nada-toast[hidden] { display: none; }

.nada .nada-toast__card {
    position: relative;
    width: min(460px, 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding-block: 10px;
    padding-inline: 16px 10px;
    border-radius: 28px;
    background: var(--p);
    color: var(--b);
    box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--d) 70%, transparent);
    pointer-events: auto;
}
.nada .nada-toast.is-in .nada-toast__card { animation: nada-drop .3s ease both; }

.nada .nada-toast__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nada .nada-toast__title { font: 700 15px/1.3 'Changa', sans-serif; }
.nada .nada-toast__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1.3 'Changa', sans-serif; }
.nada .nada-toast__cta { flex: none; min-height: 44px; padding: 0 16px; font-size: 14px; }
.nada .nada-toast__cta[hidden] { display: none; }
/* Platform notices (toastr → nadaToast): warnings / errors carry an icon in the signal colour. */
.nada .nada-toast__ico { flex: none; font-size: 24px; color: var(--s); }
.nada .nada-toast__ico[hidden] { display: none; }
.nada .nada-toast[data-tone="info"] .nada-toast__ico { color: var(--b); }

/* ---------- motion --------------------------------------------------------- */

@keyframes nada-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nada-up   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes nada-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nada-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    .nada *,
    .nada *::before,
    .nada *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
