/* ══════════════════════════════════════════════════════════════════════════
   BroPro Store — Native phone app shell
   Single source of truth for the phone app bar (≤ 768px), the categories
   bottom sheet and native touch behaviour. Loaded after store.css and
   store-native.css on purpose; desktop/tablet header layout is untouched.

   Layout (Amazon / Flipkart / Blinkit pattern):
     row 1  brand ........................ cart  menu      (hides on scroll-down)
     row 2  [ search bar — opens full-screen search ]     (stays pinned)
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    --shell-row1: 56px;
    --shell-row2: 54px;
    --shell-tap: 44px;
    --shell-ease: cubic-bezier(0.32, 0.72, 0, 1); /* iOS sheet curve */
}

/* Phone-only controls are hidden on larger screens. */
.store-m-searchbar {
    display: none;
}

.store-cat-sheet[hidden] {
    display: none !important;
}

/* ── Phone app bar ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        scroll-padding-top: calc(var(--safe-top, 0px) + var(--shell-row1) + var(--shell-row2) + 8px);
    }

    body.store-page {
        -webkit-tap-highlight-color: transparent;
    }

    /* A site-welcome strip is a web pattern; native shopping apps start with the app bar. */
    body.store-page .store-top-announcement {
        display: none !important;
    }

    body.store-page .store-navbar,
    body.store-page .store-navbar.scrolled {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: var(--shell-row1) var(--shell-row2);
        grid-template-areas:
            "brand actions"
            "search search";
        align-items: center !important;
        column-gap: 8px !important;
        row-gap: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: var(--safe-top, 0px) max(12px, var(--safe-right, 0px)) 0 max(12px, var(--safe-left, 0px)) !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        box-shadow: none;
        transform: translate3d(0, 0, 0);
        transition: transform 260ms var(--shell-ease), box-shadow 200ms ease !important;
        will-change: transform;
    }

    body.store-page .store-navbar.scrolled {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    }

    body.store-page[data-theme="light"] .store-navbar.scrolled {
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    /* Brand row */
    body.store-page .store-nav-brand-wrap {
        grid-area: brand;
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 0;
        transition: opacity 180ms ease;
    }

    body.store-page .store-nav-brand,
    body.store-page .store-navbar.scrolled .store-nav-brand {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 1 auto !important;
        min-height: var(--shell-tap);
    }

    body.store-page .store-nav-brand-logo,
    body.store-page .store-navbar.scrolled .store-nav-brand-logo {
        width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
    }

    body.store-page .store-nav-brand-name,
    body.store-page .store-navbar.scrolled .store-nav-brand-name {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 1.15rem !important;
        line-height: 1.2 !important;
    }

    /* Ecosystem hub links live in the drawer and the bottom tab bar on phones. */
    body.store-page .store-nav-hub-badge,
    body.store-page .store-app-launcher-wrapper,
    body.store-page #storeLangToggleBtn,
    body.store-page .store-nav-search-toggle,
    body.store-page #authContainer,
    body.store-page .store-nav-auth-btn,
    body.store-page #storeNavbar #notificationBell,
    body.store-page .store-nav-search {
        display: none !important;
    }

    /* Actions: cart + menu, both full 44px tap targets */
    body.store-page .store-nav-actions {
        grid-area: actions;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 4px !important;
        margin: 0 !important;
        min-width: 0;
        overflow: visible !important;
        transition: opacity 180ms ease;
    }

    body.store-page .store-cart-trigger,
    body.store-page .store-nav-menu-btn {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: var(--shell-tap) !important;
        min-width: var(--shell-tap) !important;
        height: var(--shell-tap) !important;
        min-height: var(--shell-tap) !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: 0 0 var(--shell-tap) !important;
        border-radius: 14px !important;
        visibility: visible !important;
        opacity: 1 !important;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
    }

    body.store-page .store-cart-trigger .store-cart-icon-svg {
        width: 22px;
        height: 22px;
        display: block;
    }

    body.store-page .store-cart-trigger .store-cart-badge {
        position: absolute !important;
        top: 3px !important;
        right: 1px !important;
        left: auto !important;
    }

    /* Search row */
    body.store-page .store-m-searchbar {
        grid-area: search;
        align-self: start;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        height: 44px;
        margin: 0;
        padding: 0 14px;
        border: 1px solid var(--store-border-hover, rgba(255, 255, 255, 0.14));
        border-radius: 12px;
        background: var(--store-bg-raised, #0b1322);
        color: var(--store-text-muted, #94a3b8);
        /* 1.5 line-height: Devanagari vowel marks sit above the glyph box and clip at 1.0. */
        font: 500 0.92rem/1.5 var(--store-font);
        text-align: left;
        cursor: text;
        overflow: hidden;
        box-sizing: border-box;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
        transition: border-color 160ms ease, background 160ms ease, transform 120ms ease;
    }

    body.store-page .store-m-searchbar:active {
        transform: scale(0.985);
    }

    body.store-page .store-m-searchbar:focus-visible {
        outline: 3px solid rgba(13, 148, 136, 0.55);
        outline-offset: 2px;
    }

    body.store-page[data-theme="light"] .store-m-searchbar {
        border-color: rgba(15, 23, 42, 0.14);
        background: #f1f5f9;
        color: #64748b;
    }

    .store-m-searchbar-icon {
        flex: 0 0 auto;
        color: var(--store-text-primary, #fff);
        opacity: 0.85;
    }

    .store-m-searchbar-text {
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        padding-block: 2px;
        line-height: 1.5;
    }

    .store-m-searchbar-term {
        display: inline-block;
        color: var(--store-text-primary, #fff);
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .store-m-searchbar-term.is-rolling {
        animation: shellTermRoll 360ms var(--shell-ease);
    }

    @keyframes shellTermRoll {
        from { opacity: 0; transform: translateY(70%); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Scroll-down: tuck the brand row away, keep the search row pinned. */
    body.store-page.store-appbar-tucked .store-navbar {
        transform: translate3d(0, calc(-1 * var(--shell-row1)), 0);
    }

    body.store-page.store-appbar-tucked .store-nav-brand-wrap,
    body.store-page.store-appbar-tucked .store-nav-actions {
        opacity: 0;
        pointer-events: none;
    }

    /* Sticky category chips sit flush under whatever part of the bar is visible. */
    body.store-page .store-cat-nav-wrapper {
        top: calc(var(--safe-top, 0px) + var(--shell-row1) + var(--shell-row2)) !important;
        margin-inline: calc(-1 * var(--store-app-gutter, 0.7rem)) !important;
        border-radius: 0 !important;
        border-inline: 0 !important;
        background: var(--store-bg, #060b13) !important;
        transition: top 260ms var(--shell-ease);
    }

    body.store-page[data-theme="light"] .store-cat-nav-wrapper {
        background: #ffffff !important;
    }

    body.store-page.store-appbar-tucked .store-cat-nav-wrapper {
        top: calc(var(--safe-top, 0px) + var(--shell-row2)) !important;
    }

    /* Delivery location: one compact, fully tappable line (Amazon "Deliver to"). */
    body.store-page .store-hub-location-bar {
        padding: 6px max(12px, var(--safe-right, 0px)) 6px max(12px, var(--safe-left, 0px)) !important;
    }

    body.store-page .store-hub-bar-container {
        gap: 8px !important;
    }

    body.store-page .store-hub-bar-trigger {
        min-height: 40px;
        min-width: 0;
        gap: 10px !important;
    }

    body.store-page .store-hub-details-col {
        min-width: 0;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }

    body.store-page .store-hub-meta-row {
        flex: 0 0 auto;
        margin: 0 !important;
    }

    body.store-page .store-hub-title-row {
        min-width: 0;
        flex: 1 1 auto;
    }

    body.store-page .store-hub-active-name {
        max-width: none !important;
        min-width: 0;
    }

    body.store-page .store-hub-actions-wrap {
        display: none !important;
    }

    /* Bottom tab bar: identical label sizing on every tab, link or button. */
    body.store-page .store-native-tab,
    body.store-page a.store-native-tab {
        font: 700 0.68rem/1.1 var(--store-font) !important;
        letter-spacing: 0;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
    }

    body.store-page .store-native-tab > span:not(.store-native-tab-icon):not(.store-native-cart-badge) {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Native press feedback, no grey tap flash. */
    body.store-page button,
    body.store-page a,
    body.store-page [role="button"] {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Very narrow phones (≤ 340px, e.g. iPhone SE 1st gen, small Androids) */
@media (max-width: 340px) {
    body.store-page .store-navbar,
    body.store-page .store-navbar.scrolled {
        column-gap: 4px !important;
        padding-inline: max(8px, var(--safe-left, 0px)) max(8px, var(--safe-right, 0px)) !important;
    }

    body.store-page .store-nav-brand-name,
    body.store-page .store-navbar.scrolled .store-nav-brand-name {
        font-size: 1.02rem !important;
    }

    body.store-page .store-nav-brand-logo,
    body.store-page .store-navbar.scrolled .store-nav-brand-logo {
        width: 30px !important;
        height: 30px !important;
        flex-basis: 30px !important;
    }

    body.store-page .store-nav-actions {
        gap: 2px !important;
    }

    body.store-page .store-native-tab {
        font-size: 0.62rem !important;
    }
}

/* ── Categories bottom sheet ───────────────────────────────────────────── */
.store-cat-sheet {
    position: fixed;
    inset: 0;
    z-index: 100060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.store-cat-sheet.open {
    pointer-events: auto;
}

.store-cat-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(2, 6, 12, 0.56);
    opacity: 0;
    cursor: pointer;
    transition: opacity 260ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.store-cat-sheet.open .store-cat-sheet-backdrop {
    opacity: 1;
}

.store-cat-sheet-panel {
    position: relative;
    width: min(100%, 560px);
    max-height: min(82dvh, 640px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0 16px calc(16px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    border: 1px solid var(--store-border, rgba(255, 255, 255, 0.08));
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: var(--store-bg-raised, #0b1322);
    color: var(--store-text-primary, #fff);
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.45);
    transform: translateY(105%);
    transition: transform 320ms var(--shell-ease);
    outline: none;
    overscroll-behavior: contain;
}

.store-cat-sheet.open .store-cat-sheet-panel {
    transform: translateY(0);
}

.store-cat-sheet-panel.dragging {
    transition: none;
}

body.store-page[data-theme="light"] .store-cat-sheet-panel {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.18);
}

.store-cat-sheet-grabber {
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
    cursor: grab;
    touch-action: none;
}

.store-cat-sheet-grabber span {
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: var(--store-text-muted, #94a3b8);
    opacity: 0.45;
}

.store-cat-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0 12px;
    touch-action: none;
}

.store-cat-sheet-title {
    margin: 0;
    font: 700 1.12rem/1.25 var(--store-font);
    color: inherit;
}

.store-cat-sheet-close {
    width: var(--shell-tap);
    height: var(--shell-tap);
    flex: 0 0 var(--shell-tap);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--store-border, rgba(255, 255, 255, 0.08));
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

.store-cat-sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 4px;
}

.store-cat-sheet-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 6px;
    border: 1px solid var(--store-border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    background: var(--store-bg-card, #0d172a);
    color: inherit;
    font: 600 0.76rem/1.25 var(--store-font);
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 120ms ease, border-color 160ms ease, background 160ms ease;
}

.store-cat-sheet-tile:active {
    transform: scale(0.95);
}

.store-cat-sheet-tile:focus-visible,
.store-cat-sheet-close:focus-visible {
    outline: 3px solid rgba(13, 148, 136, 0.6);
    outline-offset: 2px;
}

.store-cat-sheet-tile.active {
    border-color: rgba(13, 148, 136, 0.75);
    background: rgba(13, 148, 136, 0.16);
}

body.store-page[data-theme="light"] .store-cat-sheet-tile {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

body.store-page[data-theme="light"] .store-cat-sheet-tile.active {
    background: rgba(13, 148, 136, 0.1);
    border-color: rgba(13, 148, 136, 0.6);
}

.store-cat-sheet-icon {
    font-size: 1.85rem;
    line-height: 1;
}

.store-cat-sheet-label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}

/* Lock the viewport (root), not body: an overflow on body would break the sticky app bar. */
html.store-sheet-lock {
    overflow: hidden;
}

body.store-sheet-open .bhai-container:not(.bhai-dragging) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (min-width: 769px) {
    .store-cat-sheet {
        align-items: center;
    }

    .store-cat-sheet-panel {
        border-radius: 24px;
        border-bottom: 1px solid var(--store-border, rgba(255, 255, 255, 0.08));
        padding-bottom: 20px;
    }

    .store-cat-sheet-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    body.store-page .store-navbar,
    .store-cat-sheet-panel,
    .store-cat-sheet-backdrop,
    body.store-page .store-cat-nav-wrapper {
        transition: none !important;
    }

    .store-m-searchbar-term.is-rolling {
        animation: none;
    }
}

/* Cart icon (all sizes): consistent SVG instead of a platform-specific emoji. */
.store-cart-trigger .store-cart-icon-svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: block;
}

/* Drawer header: keep the brand on one line next to the action buttons. */
.store-drawer-header-brand {
    min-width: 0;
}

.store-drawer-header-brand > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ── Tablets (769–1100px, e.g. iPad portrait): two-row header ─────────────
   Row 1 keeps every desktop action; row 2 gives the live search box the full
   width instead of squeezing it between the brand and the actions. */
@media (min-width: 769px) and (max-width: 1100px) {
    body.store-page .store-navbar,
    body.store-page .store-navbar.scrolled {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "search search";
        grid-template-rows: 64px auto;
        align-items: center;
        column-gap: 12px !important;
        height: auto !important;
        min-height: 0 !important;
        padding: var(--safe-top, 0px) max(16px, var(--safe-right, 0px)) 10px max(16px, var(--safe-left, 0px)) !important;
        overflow: visible !important;
    }

    body.store-page .store-nav-brand-wrap {
        grid-area: brand;
        min-width: 0;
    }

    body.store-page .store-nav-brand {
        min-width: 0;
    }

    body.store-page .store-nav-brand-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.store-page .store-nav-hub-badge {
        display: none !important;
    }

    body.store-page .store-nav-actions {
        grid-area: actions;
        flex-wrap: nowrap;
        gap: 8px !important;
        margin: 0 !important;
    }

    body.store-page .store-nav-search {
        grid-area: search;
        display: flex !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        min-width: 0;
    }

    body.store-page .store-cat-nav-wrapper {
        top: calc(var(--safe-top, 0px) + 130px) !important;
    }
}

/* Parked (closed) side drawers sit just off the right edge; their drop shadow
   must not bleed onto the page as a dark band. */
.store-wishlist-drawer:not(.open),
.bp-notification-drawer:not(.active) {
    box-shadow: none !important;
}

/* ── Physical motion support (BroProMotion) ────────────────────────────── */
/* Odometer digits clip inside their own box so the roll never overlaps text. */
.stepper-qty,
.store-cart-badge,
.store-native-cart-badge {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
}

/* Elements that springs drive must not also run a CSS transform transition. */
.stepper-control,
.store-cart-trigger,
.store-native-tab {
    transform-origin: 50% 60%;
}

.bpm-flying-item {
    background: var(--store-bg-card, #0d172a);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ── Bottom-sheet cart (phones): transform-driven so a finger can carry it ──
   The legacy sheet animated `bottom`, which forces layout every frame and
   cannot follow a drag. Closed sheets are also hidden from assistive tech. */
@media (max-width: 768px) {
    body.store-page .store-cart-drawer {
        bottom: 0 !important;
        transform: translate3d(0, 105%, 0);
        visibility: hidden;
        transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.5s !important;
        will-change: transform;
        overscroll-behavior: contain;
        touch-action: none;           /* the sheet frame belongs to the finger… */
    }

    body.store-page .store-cart-items {
        touch-action: pan-y;          /* …while the item list still scrolls natively */
    }

    body.store-page .store-cart-drawer.open {
        bottom: 0 !important;
        transform: translate3d(0, 0, 0);
        visibility: visible;
        transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s !important;
    }

    body.store-page .store-cart-overlay {
        transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    }
}

/* While a finger (or a spring) carries a sheet, CSS must not interpolate. */
.bpm-dragging {
    transition: none !important;
}

.store-hero-banner,
.store-nav-drawer {
    touch-action: pan-y;              /* horizontal drags are ours, vertical scroll stays native */
}

.store-cat-sheet-panel {
    touch-action: none;
}

.store-cat-sheet-grid {
    touch-action: pan-y;
}

/* ── Order journey visuals ──────────────────────────────────────────────── */
.bpm-check,
.bpm-box {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    margin: 0 auto;
}

.bpm-check svg {
    width: 92px;
    height: 92px;
    overflow: visible;
    transform-origin: 50% 50%;
}

.bpm-check-disc {
    fill: #0d9488;
    transform-origin: 44px 44px;
    animation: bpmDiscFill 0.36s cubic-bezier(0.2, 0.9, 0.3, 1) 0.42s both;
}

.bpm-check--delivered .bpm-check-disc {
    fill: #10b981;
}

.bpm-check-ring {
    fill: none;
    stroke: #2dd4bf;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 227;      /* 2πr for r = 36 */
    stroke-dashoffset: 227;
    transform: rotate(-90deg);
    transform-origin: 44px 44px;
    animation: bpmDraw 0.55s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.bpm-check-mark {
    fill: none;
    stroke: #ffffff;
    stroke-width: 6.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: bpmDraw 0.32s cubic-bezier(0.3, 0, 0.2, 1) 0.62s forwards;
}

@keyframes bpmDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes bpmDiscFill {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Cardboard box: each flap falls shut under gravity, overshoots and settles
   (keyframes sampled from a damped pendulum, ζ ≈ 0.35). Then tape is drawn. */
.bpm-box svg {
    width: 128px;
    height: 112px;
    overflow: visible;
}

.bpm-box-back { fill: #b45309; }
.bpm-box-front { fill: #d97706; }
.bpm-box-flap path { fill: #f59e0b; }
.bpm-box-flap-l { transform-origin: 18px 40px; animation: bpmFlapL 0.9s linear 0.1s both; }
.bpm-box-flap-r { transform-origin: 102px 40px; animation: bpmFlapR 0.9s linear 0.28s both; }

.bpm-box-tape {
    stroke: #fde68a;
    stroke-width: 9;
    stroke-linecap: butt;
    stroke-dasharray: 56;
    stroke-dashoffset: 56;
    animation: bpmDraw 0.38s cubic-bezier(0.55, 0, 0.3, 1) 1.15s forwards;
}

.bpm-box-label {
    stroke: rgba(255, 255, 255, 0.75);
    stroke-width: 3;
    stroke-linecap: round;
}

@keyframes bpmFlapL {
    0%   { transform: rotate(-120deg); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
    38%  { transform: rotate(6deg);    animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
    56%  { transform: rotate(-2.4deg); }
    72%  { transform: rotate(1deg); }
    86%  { transform: rotate(-0.4deg); }
    100% { transform: rotate(0deg); }
}

@keyframes bpmFlapR {
    0%   { transform: rotate(120deg); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
    38%  { transform: rotate(-6deg);  animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
    56%  { transform: rotate(2.4deg); }
    72%  { transform: rotate(-1deg); }
    86%  { transform: rotate(0.4deg); }
    100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bpm-check-disc,
    .bpm-check-ring,
    .bpm-check-mark,
    .bpm-box-flap-l,
    .bpm-box-flap-r,
    .bpm-box-tape {
        animation: none !important;
        stroke-dashoffset: 0 !important;
        transform: none !important;
    }
}

/* ── Sound & vibration switches (side menu) ── */
.drawer-feedback-section {
    display: grid;
    gap: 8px;
    margin: 0 0 1rem;
}

.drawer-feedback-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 10px 14px;
    border: 1px solid var(--store-border, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    background: var(--store-bg-card, #0d172a);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
}

.drawer-feedback-row[hidden] { display: none; }

.drawer-feedback-text { display: grid; gap: 2px; min-width: 0; }
.drawer-feedback-text strong { font-size: 0.9rem; }
.drawer-feedback-text span { font-size: 0.75rem; color: var(--store-text-muted, #94a3b8); }

.drawer-switch {
    position: relative;
    flex: 0 0 46px;
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    transition: background-color 0.2s ease;
}

.drawer-switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.32s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.drawer-feedback-row[aria-checked="true"] .drawer-switch { background: #0d9488; }
.drawer-feedback-row[aria-checked="true"] .drawer-switch span { transform: translateX(18px); }

.drawer-feedback-row:focus-visible {
    outline: 3px solid rgba(13, 148, 136, 0.6);
    outline-offset: 2px;
}

/* ── Calm by default ─────────────────────────────────────────────────────
   Endless motion is reserved for LIVE states (loading, a rider on the road,
   live dots, a paused store). Decoration plays a few times and settles, as
   on Apple, Google and Blinkit: a still screen means nothing needs attention. */
.store-hero-slide::before { animation-iteration-count: 1 !important; }
.store-hero-badge,
.store-wishlist-empty-icon,
.anim-radar-ring,
.anim-pickup-counter,
.tracker-speed-celebration-badge,
.speed-lightning-icon,
.flash-icon-pulse,
.store-hub-beacon-pulse { animation-iteration-count: 3 !important; }
.store-badge-few-left,
.store-stock-low,
.omni-free-tier-fill::after,
.anim-victory-ring,
.anim-sad-emblem,
.anim-teardrop { animation-iteration-count: 2 !important; }

/* Packed stage: room for the drawn box; the quality badge sits on its corner. */
.anim-packed-hero {
    width: 160px !important;
    height: 124px !important;
}

.anim-packed-hero .anim-verify-badge {
    white-space: nowrap;
    right: -10px !important;
    bottom: 2px !important;
}
