/* ============================================================
   styles/base.css
   Global variables, reset, fonts, shared utilities.
   Mobile-first PWA design system.
   ============================================================ */

/* Font is loaded via <link rel="preconnect"/"stylesheet"> in index.html
   <head> instead of @import — @import forces the browser to wait for
   this whole CSS file before it even discovers the font URL, adding a
   serial round-trip that hurts on slow connections. */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --clr-orange:        #FF5C00;
    --clr-orange-dim:    #cc4a00;
    --clr-orange-light:  #fff3ed;
    --clr-orange-glow:   rgba(255,92,0,0.14);
    --clr-black:         #0f0f0f;
    --clr-surface:       #1a1a1a;
    --clr-white:         #ffffff;
    --clr-gray-50:       #f7f7f8;
    --clr-gray-100:      #f0f0f2;
    --clr-gray-200:      #e2e2e6;
    --clr-gray-400:      #9898a6;
    --clr-gray-500:      #65657a;
    --clr-green:         #16a34a;

    /* Typography — fluid, mobile-first */
    --fs-hero:   clamp(1.3rem,  5.5vw, 2.5rem);
    --fs-h2:     clamp(0.88rem, 2.6vw, 1.25rem);
    --fs-body:   clamp(0.78rem, 2vw,   0.92rem);
    --fs-small:  clamp(0.68rem, 1.8vw, 0.80rem);
    --fs-tiny:   clamp(0.60rem, 1.5vw, 0.72rem);
    --fs-micro:  clamp(0.50rem, 1.2vw, 0.60rem);

    /* Border radius */
    --radius-xs:  4px;
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-2xl: 26px;
    --radius-pill: 50px;

    /* Shadows */
    --shadow-xs:     0 1px 3px rgba(0,0,0,0.07);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.09);
    --shadow-md:     0 6px 20px rgba(0,0,0,0.11);
    --shadow-lg:     0 12px 36px rgba(0,0,0,0.14);
    --shadow-orange: 0 4px 16px rgba(255,92,0,0.28);

    /* Layout */
    --container-max: 1400px;
    --container-pad: clamp(12px, 4vw, 3rem);

    /* Section spacing — TIGHT on mobile */
    --section-py:  clamp(10px, 2.2vh, 18px);
    --section-gap: clamp(6px,  1.8vw, 12px);

    /* Touch targets */
    --touch-min: 44px;

    /* Transitions */
    --transition:      all 0.2s ease;
    --transition-slow: all 0.32s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Almarai', sans-serif;
    background: var(--clr-white);
    color: var(--clr-black);
    direction: rtl;
    text-align: right;
    line-height: 1.55;
    overflow-x: hidden;
    font-size: var(--fs-body);
    min-width: 320px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

img  { display: block; max-width: 100%; height: auto; }
a    { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    width: 100%;
}

.section       { padding: var(--section-py) 0; }
.section--gray { background: var(--clr-gray-50); }

/* ── Scrollbar hide ───────────────────────────────────────── */
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ── Section title ────────────────────────────────────────── */
.section-title {
    font-size: var(--fs-h2);
    font-weight: 800;
    padding-right: 9px;
    border-right: 3px solid var(--clr-orange);
    margin-bottom: clamp(8px, 1.8vw, 14px);
    line-height: 1.2;
    color: var(--clr-black);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--clr-orange);
    color: var(--clr-white);
    font-family: inherit;
    font-weight: 800;
    border-radius: var(--radius-md);
    padding: clamp(7px, 1.8vw, 10px) clamp(14px, 3.5vw, 24px);
    font-size: var(--fs-small);
    min-height: var(--touch-min);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-orange);
}
.btn-primary:hover  { background: var(--clr-orange-dim); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.09);
    color: var(--clr-white);
    font-family: inherit;
    font-weight: 800;
    border-radius: var(--radius-md);
    padding: clamp(7px, 1.8vw, 10px) clamp(14px, 3.5vw, 24px);
    font-size: var(--fs-small);
    min-height: var(--touch-min);
    border: 1px solid rgba(255,255,255,0.18);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}
.btn-ghost:hover { background: rgba(255,255,255,0.16); }

/* ── Store thumb (bg-image) ───────────────────────────────── */
.store-thumb {
    background-color: var(--clr-gray-100);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* ── Section hairline divider ─────────────────────────────── */
.section-divider {
    height: 1px;
    background: var(--clr-gray-100);
    margin: 0 var(--container-pad);
}

/* ── Modal open body lock ─────────────────────────────────── */
body.modal-open { overflow: hidden; max-width: 100vw; }

/* ── FOUC guard ───────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════
   SPLASH — two-layer cinematic animation  v5
   splash-bg.png  : arc + wordmark + marker  (512×512)
   splash-moto.png: moto + rider, transparent (167×143)
   
   Sequence:
   0.0s  bg fades in (arc + wordmark + marker)
   0.12s moto launches from left off-screen
   0.12→1.17s moto travels with decel, lands at x=46% y=49%
/* ═══════════════════════════════════════════════════════════
   DELIVO SPLASH SCREEN — Professional waving flag
   1. Full-screen brand image shown perfectly (no distortion)
   2. Black corner decorations stay 100% static
   3. A masked center-layer waves like fabric in the wind
   4. Two shimmer sweeps simulate light on moving fabric
   5. Tagline pulses softly at the bottom
═══════════════════════════════════════════════════════════ */

#delivo-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #1a1a16;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}
#delivo-splash.hiding {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#delivo-splash.hidden { display: none; }

.splash__scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* ── Static base image — perfectly preserved ────────────── */
.splash__flag-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    animation: splash-popin 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
@keyframes splash-popin {
    0%   { opacity: 0; }
    55%  { opacity: 1; }
    100% { opacity: 1; }
}

/* Base image — always fills screen, centered on any viewport */
.splash__flag-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    min-width: 100%;
    min-height: 100%;
}



/* ── Corner vignette + orange ember glow ────────────────── */
.splash__flag-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    /* Layer 1: deep black corners */
    background:
        /* orange ember — top-left corner */
        radial-gradient(ellipse 55% 45% at -5% -5%,
            rgba(255,100,0,0.55) 0%,
            rgba(200,50,0,0.28) 45%,
            transparent 70%),
        /* orange ember — bottom-right corner */
        radial-gradient(ellipse 55% 45% at 105% 105%,
            rgba(255,80,0,0.50) 0%,
            rgba(180,40,0,0.22) 45%,
            transparent 70%),
        /* subtle warm hint — top-right */
        radial-gradient(ellipse 40% 35% at 108% -8%,
            rgba(255,120,0,0.30) 0%,
            transparent 60%),
        /* subtle warm hint — bottom-left */
        radial-gradient(ellipse 40% 35% at -8% 108%,
            rgba(255,90,0,0.28) 0%,
            transparent 60%),
        /* dark center-out vignette to keep logo clear */
        radial-gradient(ellipse 65% 62% at 50% 50%,
            transparent 30%,
            rgba(0,0,0,0.18) 55%,
            rgba(0,0,0,0.65) 78%,
            rgba(0,0,0,0.90) 100%);
    animation: splash-ember-pulse 3.2s ease-in-out 0.8s infinite;
}

@keyframes splash-ember-pulse {
    0%   { opacity: 1; }
    40%  { opacity: 0.72; }
    70%  { opacity: 0.92; }
    100% { opacity: 1; }
}

/* ── Shimmer 1 — warm orange-white sweep at 0.9s ─────────── */
.splash__flag-shimmer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(
        112deg,
        transparent 20%,
        rgba(255,140,40,0.06) 36%,
        rgba(255,255,255,0.22) 50%,
        rgba(255,140,40,0.06) 64%,
        transparent 80%
    );
    background-size: 300% 100%;
    background-position: 140% 0;
    animation: splash-shimmer1 1.15s ease-in-out 0.9s both;
}
@keyframes splash-shimmer1 {
    0%   { background-position: 140% 0; opacity: 0; }
    8%   { opacity: 1; }
    100% { background-position: -50% 0; opacity: 0; }
}
/* Second shimmer — subtler gold tint, at 2.3s */
.splash__flag-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        108deg,
        transparent 28%,
        rgba(255,160,60,0.04) 44%,
        rgba(255,255,255,0.14) 50%,
        rgba(255,160,60,0.04) 56%,
        transparent 72%
    );
    background-size: 300% 100%;
    animation: splash-shimmer2 1.0s ease-in-out 2.3s both;
    opacity: 0;
}
@keyframes splash-shimmer2 {
    0%   { background-position: 140% 0; opacity: 0; }
    10%  { opacity: 1; }
    100% { background-position: -50% 0; opacity: 0; }
}

/* ── Corner spark particles ──────────────────────────────── */
/* Four tiny orbs that flare up in each corner independently  */
.splash__flag-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        /* top-left flare */
        radial-gradient(circle 80px at 0% 0%,
            rgba(255,120,0,0.70) 0%,
            rgba(255,60,0,0.35) 35%,
            transparent 70%),
        /* bottom-right flare */
        radial-gradient(circle 80px at 100% 100%,
            rgba(255,100,0,0.65) 0%,
            rgba(220,50,0,0.30) 35%,
            transparent 70%),
        /* top-right flare */
        radial-gradient(circle 55px at 100% 0%,
            rgba(255,80,0,0.45) 0%,
            rgba(200,40,0,0.18) 40%,
            transparent 70%),
        /* bottom-left flare */
        radial-gradient(circle 55px at 0% 100%,
            rgba(255,90,0,0.40) 0%,
            rgba(200,45,0,0.16) 40%,
            transparent 70%);
    animation: splash-sparks 2.8s ease-in-out 0.6s infinite;
}
@keyframes splash-sparks {
    0%   { opacity: 0.55; filter: blur(0px); }
    25%  { opacity: 1.00; filter: blur(1px); }
    55%  { opacity: 0.40; filter: blur(2px); }
    80%  { opacity: 0.85; filter: blur(0.5px); }
    100% { opacity: 0.55; filter: blur(0px); }
}

/* ── Tagline ─────────────────────────────────────────────── */
.splash__tagline {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.92);
    font-family: 'Almarai', 'Segoe UI', sans-serif;
    font-size: clamp(0.78rem, 2.6vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(10px);
    margin-bottom: clamp(22px, 5vh, 44px);
    animation:
        splash-tagline-in    0.5s ease-out   1.1s both,
        splash-tagline-pulse 2.4s ease-in-out 2.0s infinite;
}
@keyframes splash-tagline-in    { to { opacity: 1; transform: translateY(0); } }
@keyframes splash-tagline-pulse { 0%,100%{opacity:1} 50%{opacity:0.68} }

.splash__tagline-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,255,255,0.78); flex-shrink: 0;
    animation: splash-dot-pulse 2.4s ease-in-out 2.0s infinite;
}
@keyframes splash-dot-pulse {
    0%,100%{transform:scale(1);opacity:.78} 50%{transform:scale(1.5);opacity:1}
}

/* ── Unused legacy elements ──────────────────────────────── */
.splash__arc-layer, .splash__marker-layer,
.splash__word-layer, .splash__moto { display: none; }
.splash__spinner { display: none; }

@keyframes sp-line-run {
    0%{transform:scaleX(0);opacity:0} 55%{transform:scaleX(1);opacity:.85} 100%{transform:scaleX(1);opacity:0}
}

body        { visibility: hidden; }
body.loaded { visibility: visible; }


/* ── PWA Install Banner ───────────────────────────────────── */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: var(--clr-white);
    border-top: 1px solid var(--clr-gray-100);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    padding: 12px var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.install-banner--visible {
    transform: translateY(0);
}
.install-banner__content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.install-banner__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--clr-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.install-banner__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.install-banner__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.install-banner__text strong {
    font-size: clamp(0.78rem, 2vw, 0.88rem);
    font-weight: 800;
    color: var(--clr-black);
}
.install-banner__text span {
    font-size: clamp(0.62rem, 1.5vw, 0.72rem);
    color: var(--clr-gray-400);
    margin-top: 1px;
}
.install-banner__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.install-banner__install {
    background: var(--clr-orange);
    color: var(--clr-white);
    border: none;
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-family: inherit;
    font-size: clamp(0.70rem, 1.8vw, 0.80rem);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s;
    white-space: nowrap;
}
.install-banner__install:hover { background: var(--clr-orange-dim); }
.install-banner__dismiss {
    background: none;
    border: none;
    color: var(--clr-gray-400);
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.18s;
    line-height: 1;
}
.install-banner__dismiss:hover { background: var(--clr-gray-100); }

/* Update-available banner reuses .install-banner's layout entirely —
   just needs to sit above it if both are ever shown at once (an update
   being available is more urgent than an install prompt). */
.update-banner { z-index: 999; }

/* ── iOS "Add to Home Screen" — bottom sheet ─────────────── */
.ios-hint {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}
.ios-hint--visible {
    pointer-events: auto;
}
.ios-hint__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
}
.ios-hint--visible .ios-hint__backdrop {
    background: rgba(0,0,0,0.5);
}
.ios-hint__sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--clr-white);
    border-radius: 24px 24px 0 0;
    padding: 12px 20px calc(28px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.1, 0.64, 1);
    max-width: 480px;
    margin: 0 auto;
}
.ios-hint--visible .ios-hint__sheet {
    transform: translateY(0);
}
.ios-hint__handle {
    width: 36px;
    height: 4px;
    background: var(--clr-gray-100, #e5e7eb);
    border-radius: 2px;
    margin: 0 auto 16px;
    flex-shrink: 0;
}
.ios-hint__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.ios-hint__logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--clr-orange);
    padding: 4px;
}
.ios-hint__header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ios-hint__header-text strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--clr-black);
}
.ios-hint__header-text span {
    font-size: 0.72rem;
    color: var(--clr-gray-400);
    font-weight: 600;
}
.ios-hint__close {
    background: var(--clr-gray-100, #f3f4f6);
    border: none;
    color: var(--clr-gray-400);
    font-size: 13px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s;
}
.ios-hint__close:hover { background: #e5e7eb; }
.ios-hint__steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
    border: 1.5px solid var(--clr-gray-100, #f3f4f6);
    border-radius: 16px;
    overflow: hidden;
}
.ios-hint__step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--clr-gray-100, #f3f4f6);
}
.ios-hint__step:last-child { border-bottom: none; }
.ios-hint__step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--clr-orange);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ios-hint__step-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ios-hint__step-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--clr-black);
}
.ios-hint__step-sub {
    font-size: 0.68rem;
    color: var(--clr-gray-400);
    font-weight: 600;
}
.ios-hint__step-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.ios-hint__got-it {
    width: 100%;
    padding: 14px;
    background: var(--clr-orange);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s;
}
.ios-hint__got-it:hover { background: var(--clr-orange-dim); }
.ios-hint__got-it:active { transform: scale(0.98); }
/* ── Exit confirm dialog ──────────────────────────────────── */
.exit-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: background 0.28s ease;
    pointer-events: none;
}
.exit-confirm-overlay--visible {
    background: rgba(0, 0, 0, 0.55);
    pointer-events: auto;
}
.exit-confirm-box {
    background: var(--clr-white);
    border-radius: 24px 24px 0 0;
    padding: 28px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 480px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.34, 1.1, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.exit-confirm-overlay--visible .exit-confirm-box {
    transform: translateY(0);
}
.exit-confirm-icon {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 2px;
}
.exit-confirm-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--clr-black);
    margin: 0;
}
.exit-confirm-msg {
    font-size: 0.85rem;
    color: var(--clr-gray-400);
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}
.exit-confirm-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}
.exit-confirm-btn {
    flex: 1;
    padding: 13px 0;
    border: none;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.12s;
}
.exit-confirm-btn:active { transform: scale(0.97); }
.exit-confirm-btn--cancel {
    background: var(--clr-gray-100, #f3f4f6);
    color: var(--clr-black);
}
.exit-confirm-btn--exit {
    background: var(--clr-orange);
    color: #fff;
}
.exit-confirm-btn--exit:hover { background: var(--clr-orange-dim); }

/* ── iOS one-line install tip banner ─────────────────────── */
#ios-top-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9998;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
    font-family: inherit;
    font-size: clamp(0.72rem, 2.2vw, 0.82rem);
    font-weight: 700;
    text-align: center;
    transform: translateY(-110%);
    transition: transform 0.38s cubic-bezier(0.34, 1.1, 0.64, 1);
    box-shadow: 0 3px 16px rgba(0,0,0,0.35);
}
#ios-top-banner.ios-top-banner--visible {
    transform: translateY(0);
}
.ios-top-banner__text {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.4;
}
.ios-top-banner__share {
    width: 15px;
    height: 15px;
    stroke: #FF5C00;
    flex-shrink: 0;
    vertical-align: middle;
}
.ios-top-banner__close {
    background: rgba(255,255,255,0.12);
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: auto;    /* push to left edge in RTL */
    transition: background 0.18s;
}
.ios-top-banner__close:hover { background: rgba(255,255,255,0.22); }
/* ── Test Mode Banner ───────────────────────────────────────── */
#test-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: linear-gradient(90deg, #e64d00 0%, #FF5C00 100%);
    border-bottom: 2px solid #ff8c4a;
    box-shadow: 0 2px 12px rgba(255,92,0,0.35);
    animation: tmb-slide-down 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes tmb-slide-down {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.tmb__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    max-width: 700px;
    margin: 0 auto;
}
.tmb__icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.4));
}
.tmb__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tmb__title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.01em;
}
.tmb__sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.85);
    opacity: 0.9;
}
@media (max-width: 480px) {
    .tmb__title { font-size: 0.76rem; }
    .tmb__sub   { font-size: 0.65rem; }
}

/* ── When test banner is active, offset everything that anchors to top:0 ── */
body.tmb-active {
    padding-top: var(--tmb-h, 0px);
}
/* fixed panels must shift down by banner height */
body.tmb-active .store-panel,
body.tmb-active .store-panel-header,
body.tmb-active .cart-sidebar,
body.tmb-active .cart-sidebar-header,
body.tmb-active .bb-nav,
body.tmb-active .modal,
body.tmb-active .delivo-modal,
body.tmb-active .oh-sheet {
    top: var(--tmb-h, 0px) !important;
}
/* oh-sheet anchors bottom:0 and uses height:100vh — shrink it to fit below banner */
body.tmb-active .oh-sheet {
    height: calc(100vh - var(--tmb-h, 0px)) !important;
}
/* modal-overlay is inset:0 — keep it full screen but pad top so content isn't under banner */
body.tmb-active .modal-overlay {
    padding-top: calc(var(--tmb-h, 0px) + clamp(16px, 4vw, 24px)) !important;
}
/* overlays stay inset:0 so they still cover full screen incl. banner area */
body.tmb-active .store-panel-overlay,
body.tmb-active .cart-overlay,
body.tmb-active .oh-sheet-overlay {
    top: 0 !important;
}

/* ── Maintenance Overlay ────────────────────────────────────── */
#maintenance-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0a00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.mnt__card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    animation: mnt-fade-in 0.5s ease both;
}
@keyframes mnt-fade-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mnt__icon {
    font-size: 3.5rem;
    animation: mnt-spin 3s linear infinite;
    display: inline-block;
}
@keyframes mnt-spin {
    0%,100% { transform: rotate(-12deg); }
    50%      { transform: rotate(12deg); }
}
.mnt__title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.3px;
}
.mnt__sub {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    max-width: 280px;
    line-height: 1.6;
}
.mnt__logo {
    margin-top: 10px;
    width: 110px;
    height: auto;
    opacity: 0.92;
    filter: drop-shadow(0 2px 12px rgba(255,92,0,0.35));
}