/* ============================================================
   styles/store-panel.css
   Full-screen store items panel — slides up from bottom.
   RTL-native, matches Delivo design system.
   ============================================================ */

/* ── Overlay backdrop ─────────────────────────────────────── */
.store-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.store-panel-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ── Panel itself ─────────────────────────────────────────── */
.store-panel {
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 601;
    background: var(--clr-gray-50);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.36s cubic-bezier(0.32, 1.1, 0.6, 1);
    overflow: hidden;
    /* Promotes this to its own compositor layer ahead of time, rather
       than the browser having to do it reactively the moment the close
       animation starts — this panel is full-screen and image-heavy, so
       that reactive promotion was adding real cost to the first frame. */
    will-change: transform;
}
.store-panel.active {
    transform: translateY(0);
}

/* ── Hero cover ───────────────────────────────────────────── */
.sp-hero {
    position: relative;
    height: clamp(160px, 32vw, 220px);
    background: #1a1a1a;
    flex-shrink: 0;
    overflow: visible;          /* let circle badge overflow downward */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: clamp(36px, 8vw, 50px); /* room for overlapping circle */
}

/* blurred background — the logo image stretched & blurred */
.sp-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(18px) brightness(0.45) saturate(1.4);
    transform: scale(1.08); /* hide blur edges */
    z-index: 0;
}

/* hero video — replaces blurred bg when available */
.sp-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}
.sp-hero__bg-fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2d1a0e 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    z-index: 0;
}

/* ── Circle logo badge — floats centered, overlaps into content below ── */
.sp-hero__logo-circle {
    position: absolute;
    bottom: clamp(-32px, -7vw, -44px);
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    width: clamp(76px, 18vw, 100px);
    height: clamp(76px, 18vw, 100px);
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    z-index: 5;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px var(--clr-orange, #FF5C00),
        0 8px 28px rgba(0,0,0,0.35);
    flex-shrink: 0;
    -webkit-backface-visibility: hidden;
    /* Force GPU layer for smooth circular clip */
    will-change: transform;
}
.sp-hero__logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    display: block;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}
.sp-hero__logo-emoji {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 5vw, 2.6rem);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 50%;
}

.sp-hero__gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 35%),
        linear-gradient(to top, rgba(0,0,0,0.70) 0%, transparent 55%);
    z-index: 1;
}
.sp-hero__back {
    position: absolute;
    top: clamp(10px, 3vw, 16px);
    right: clamp(12px, 3vw, 18px);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.48);
    backdrop-filter: blur(6px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.18s;
    z-index: 3;     /* above gradient */
}
.sp-hero__back:hover { background: rgba(0,0,0,0.68); }
.sp-hero__info {
    position: absolute;
    top: clamp(14px, 4vw, 22px);  /* moved up — away from the circle badge */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - clamp(112px, 28vw, 140px)); /* leave equal space for back button on both sides */
    max-width: 320px;
    z-index: 3;
    text-align: center;
}
.sp-hero__name {
    font-size: clamp(1.15rem, 4.2vw, 1.65rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.65);
}
.sp-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.sp-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-pill);
    padding: 3px 9px;
    font-size: clamp(0.62rem, 1.6vw, 0.72rem);
    font-weight: 700;
    color: #fff;
}
.sp-hero__badge--orange {
    background: var(--clr-orange);
    border-color: var(--clr-orange);
}
.sp-hero__badge--soon {
    background: rgba(255,180,0,0.85);
    border-color: transparent;
    color: #1a1100;
}

/* ── Category tabs ────────────────────────────────────────── */
.sp-tabs {
    background: var(--clr-white);
    border-bottom: 1px solid var(--clr-gray-100);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    padding-top: clamp(36px, 8vw, 50px); /* clear overlapping circle badge */
}
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tabs__inner {
    display: flex;
    gap: 0;
    padding: 0 var(--container-pad);
    min-width: max-content;
}
.sp-tab {
    padding: clamp(10px, 2.5vw, 13px) clamp(12px, 3vw, 18px);
    border: none;
    background: none;
    font-family: inherit;
    font-size: clamp(0.80rem, 2vw, 0.92rem);
    font-weight: 600;
    color: var(--clr-gray-400);
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    transition: color 0.18s, border-color 0.18s;
    white-space: nowrap;
    min-height: var(--touch-min);
}
.sp-tab.active {
    color: var(--clr-orange);
    border-bottom-color: var(--clr-orange);
    font-weight: 800;
}
.sp-tab:hover:not(.active) { color: var(--clr-gray-500); }

/* ── Scrollable body ──────────────────────────────────────── */
.sp-body {
    flex: 1;
    overflow-y: auto;
    padding: clamp(12px, 3vw, 20px) var(--container-pad);
    -webkit-overflow-scrolling: touch;
    position: relative;   /* makes it a valid offsetParent */
}

/* ── Category section ─────────────────────────────────────── */
.sp-section {
    margin-bottom: clamp(18px, 4vw, 28px);
}
.sp-section__title {
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    font-weight: 800;
    color: var(--clr-black);
    margin-bottom: clamp(8px, 2vw, 12px);
    padding-bottom: 6px;
    border-bottom: 2px solid var(--clr-orange-light);
    display: flex;
    align-items: center;
    gap: 7px;
}
.sp-section__title::before {
    content: '';
    width: 4px;
    height: 1em;
    background: var(--clr-orange);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Item card ────────────────────────────────────────────── */
.sp-items {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
}

.sp-item {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 14px);
    background: var(--clr-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--clr-gray-100);
    padding: clamp(10px, 2.5vw, 14px);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.18s, transform 0.18s;
}
.sp-item:hover { box-shadow: var(--shadow-sm); }

.sp-item__img-wrap {
    width: clamp(68px, 16vw, 90px);
    height: clamp(68px, 16vw, 90px);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--clr-gray-100);
    position: relative;
}
.sp-item__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.22s;
}
.sp-item:hover .sp-item__img { transform: scale(1.04); }
.sp-item__img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: var(--clr-gray-100);
}
.sp-item__sale-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: var(--radius-pill);
}

.sp-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sp-item__name {
    font-size: clamp(0.88rem, 2.4vw, 1rem);
    font-weight: 700;
    color: var(--clr-black);
    line-height: 1.3;
}
.sp-item__cat {
    font-size: clamp(0.68rem, 1.7vw, 0.76rem);
    color: var(--clr-gray-400);
    font-weight: 500;
}
.sp-item__price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.sp-item__price {
    font-size: clamp(0.88rem, 2.4vw, 1rem);
    font-weight: 800;
    color: var(--clr-orange);
}
.sp-item__price-old {
    font-size: clamp(0.68rem, 1.7vw, 0.76rem);
    color: var(--clr-gray-400);
    text-decoration: line-through;
    font-weight: 500;
}

.sp-item__actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.sp-item__qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--clr-orange);
    border-radius: var(--radius-pill);
    overflow: hidden;
    background: var(--clr-white);
}
.sp-item__qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.sp-item__qty-btn:hover { background: var(--clr-orange-light); }
.sp-item__qty-num {
    min-width: 24px;
    text-align: center;
    font-size: clamp(0.82rem, 2vw, 0.9rem);
    font-weight: 800;
    color: var(--clr-black);
    padding: 0 2px;
}
.sp-item__add-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--clr-orange);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, transform 0.15s;
    box-shadow: var(--shadow-orange);
    color: #fff;
}
.sp-item__add-btn:hover  { background: var(--clr-orange-dim); }
.sp-item__add-btn:active { transform: scale(0.92); }

/* ── Loading skeleton ─────────────────────────────────────── */
.sp-skeleton {
    padding: 20px var(--container-pad);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sp-skeleton__item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--clr-white);
    border-radius: var(--radius-lg);
    padding: 12px;
    border: 1px solid var(--clr-gray-100);
}
.sp-skeleton__img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: var(--clr-gray-100);
    flex-shrink: 0;
    animation: skeletonPulse 1.4s ease-in-out infinite;
}
.sp-skeleton__lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sp-skeleton__line {
    height: 12px;
    border-radius: 6px;
    background: var(--clr-gray-100);
    animation: skeletonPulse 1.4s ease-in-out infinite;
}
.sp-skeleton__line:nth-child(1) { width: 65%; }
.sp-skeleton__line:nth-child(2) { width: 40%; animation-delay: 0.1s; }
.sp-skeleton__line:nth-child(3) { width: 30%; animation-delay: 0.2s; }

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
}

/* ── Error / empty states ─────────────────────────────────── */
.sp-error, .sp-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--clr-gray-400);
}
.sp-error__icon, .sp-empty__icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}
.sp-error__title, .sp-empty__title {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    font-weight: 700;
    color: var(--clr-gray-500);
    margin-bottom: 6px;
}
.sp-error__sub, .sp-empty__sub {
    font-size: clamp(0.78rem, 2vw, 0.88rem);
    line-height: 1.5;
}

/* ── Sticky cart bar at bottom ────────────────────────────── */
.sp-cart-bar {
    background: var(--clr-white);
    border-top: 1px solid var(--clr-gray-100);
    padding: clamp(10px, 2.5vw, 14px) var(--container-pad);
    padding-bottom: calc(clamp(10px, 2.5vw, 14px) + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    display: none;
}
.sp-cart-bar.visible { display: block; }
.sp-cart-bar__btn {
    width: 100%;
    padding: 13px 20px;
    background: var(--clr-orange);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--clr-white);
    font-family: inherit;
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background 0.18s;
    box-shadow: var(--shadow-orange);
    min-height: 50px;
}
.sp-cart-bar__btn:hover  { background: var(--clr-orange-dim); }
.sp-cart-bar__btn:active { transform: scale(0.98); }
.sp-cart-bar__count {
    background: rgba(255,255,255,0.25);
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-size: clamp(0.75rem, 2vw, 0.84rem);
    font-weight: 700;
}
.sp-cart-bar__total {
    font-size: clamp(0.88rem, 2.2vw, 0.98rem);
    font-weight: 800;
}

/* ── Maintenance / soon state ─────────────────────────────── */
.sp-soon {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    gap: 14px;
}
.sp-soon__icon { font-size: 3rem; }
.sp-soon__title {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    font-weight: 800;
    color: var(--clr-black);
}
.sp-soon__sub {
    font-size: clamp(0.82rem, 2vw, 0.92rem);
    color: var(--clr-gray-400);
    line-height: 1.6;
    max-width: 260px;
}


/* ════════════════════════════════════════════════════════════
   ITEM DETAIL POPUP
   Full-screen. Orange top zone, large centered image,
   white rounded card slides up underneath it.
════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────────── */
.item-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.item-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ═══════════════════════════════════════════════════════════
   ITEM DETAIL POPUP
   Full-bleed rectangular hero photo up top, white rounded card
   riding up over its bottom edge — name, price + qty stepper
   on one row, notes/instructions box, then Add to Cart.
   ═══════════════════════════════════════════════════════════ */

.item-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 601;
    background: #111;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.18, 0.64, 1);
    overflow: hidden;           /* no scroll on the hero bg */
    box-sizing: border-box;
}
.item-popup.active { transform: translateY(0); }

/* ── Hero — full-bleed rectangular food photo ───────────── */
.item-popup__hero {
    position: relative;
    height: clamp(230px, 42vh, 340px);
    flex: 0 0 auto;
    overflow: hidden;
    background: #1a1a1a;
    box-sizing: border-box;
}

/* ── Back arrow / close X — same circular chip, mirrored sides ── */
.item-popup__close {
    position: absolute;
    top: clamp(10px, 2vh, 18px);
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.32);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.12s;
    z-index: 30;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.item-popup__close--x { left: auto; right: 16px; }
.item-popup__close:hover  { background: rgba(0,0,0,0.48); }
.item-popup__close:active { transform: scale(0.92); }
.item-popup__close svg {
    width: 20px; height: 20px;
    stroke: #fff; fill: none; flex-shrink: 0;
}

/* ── Sale badge — sits below the top button row ─────────── */
.item-popup__sale-hero {
    position: absolute;
    top: clamp(58px, 9vh, 74px);
    right: 16px;
    background: #fff;
    color: var(--clr-orange, #FF5C00);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 30;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

/* ── Image — fills the entire hero, edge to edge ─────────── */
.item-popup__img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.item-popup__img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.item-popup__img-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 4.5rem; line-height: 1;
}

/* ── White rounded card — overlaps the image, fills the rest ── */
.item-popup__body {
    flex: 1;
    min-height: 0;              /* critical: lets flex child shrink */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.14);
    margin-top: -22px;          /* rides up over the image's bottom edge */
    padding: 22px 24px calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.8vh, 16px);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* ── Qty stepper — small chip, sits beside the price ─────── */
.item-popup__qty-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.item-popup__qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffe6d5;
    border: none;
    color: var(--clr-orange, #FF5C00);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}
.item-popup__qty-btn:hover  { background: #ffd7b8; }
.item-popup__qty-btn:active { background: #ffc79a; }
.item-popup__qty-num {
    min-width: 18px;
    text-align: center;
    color: #111;
    font-size: 0.98rem;
    font-weight: 800;
}

/* ── Name ───────────────────────────────────────────────── */
.item-popup__name {
    font-size: clamp(1.1rem, 4vw, 1.45rem);
    font-weight: 800;
    color: #111;
    text-align: right;
    line-height: 1.3;
    flex-shrink: 0;
}

/* ── Description ────────────────────────────────────────── */
.item-popup__desc {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: #777;
    line-height: 1.7;
    text-align: right;
    flex-shrink: 0;
}
.item-popup__desc-toggle {
    background: none;
    border: none;
    color: var(--clr-orange, #FF5C00);
    font-size: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    display: inline;
}

/* ── Price row — price on one side, qty stepper on the other ── */
.item-popup__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

/* ── Price block ────────────────────────────────────────── */
.item-popup__price-block {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse;
    flex-shrink: 0;
}
.item-popup__price-main {
    font-size: clamp(1.2rem, 4.5vw, 1.6rem);
    font-weight: 800;
    color: var(--clr-orange, #FF5C00);
}
.item-popup__price-old {
    font-size: 1rem;
    color: #bbb;
    text-decoration: line-through;
    font-weight: 600;
}
.item-popup__sale-pct {
    background: #fff0e8;
    color: var(--clr-orange, #FF5C00);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
}

/* ── Add to cart — pushed to bottom, never clipped ─────── */
.item-popup__add-btn {
    width: 100%;
    height: clamp(52px, 8vh, 64px);
    background: var(--clr-orange, #FF5C00);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 22px rgba(255,92,0,0.40);
    transition: background 0.15s, transform 0.12s;
    margin-top: auto;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.item-popup__add-btn:hover  { background: #e04e00; }
.item-popup__add-btn:active { transform: scale(0.97); }
.item-popup__add-btn svg    { width: 22px; height: 22px; stroke: #fff; flex-shrink: 0; }
.item-popup__add-btn.added  {
    background: #22c55e;
    box-shadow: 0 6px 20px rgba(34,197,94,0.40);
}

/* ── Wide screens: cap the popup at 550px, centered ──────────
   Above 550px the hero photo would otherwise keep stretching to
   fill the viewport. Lock hero + body to the same max-width so
   they stay visually aligned, and let the hero's height follow
   naturally from its own aspect ratio instead of the vh-based
   clamp (which would keep growing it). The dark .item-popup
   background shows as even letterboxing on both sides. ── */
@media (min-width: 551px) {
    .item-popup__hero {
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
        height: 300px;
        flex: 0 0 300px;
    }
    .item-popup__body {
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
    }
}


/* ════════════════════════════════════════════════════════════
   STORE INTRO CARD  —  animated promo before store opens
════════════════════════════════════════════════════════════ */

.store-intro {
    position: fixed;
    inset: 0;
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: all;

    /* Entry: scale up from center */
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34,1.2,0.64,1);
}
.store-intro.visible {
    opacity: 1;
    transform: scale(1);
}
/* Exit: shrink logo to hero position (driven by JS) */
.store-intro.exit {
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.32s ease, transform 0.32s ease;
    pointer-events: none;
}

/* ── Animated background ─────────────────────────────────── */
.store-intro__bg {
    position: absolute;
    inset: 0;
    background: var(--clr-orange, #FF5C00);
    z-index: 0;
}
/* Animated blobs */
.store-intro__blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    animation: si-blob 3.5s ease-in-out infinite alternate;
}
.store-intro__blob:nth-child(1) {
    width: 300px; height: 300px;
    top: -80px; left: -80px;
    animation-delay: 0s;
}
.store-intro__blob:nth-child(2) {
    width: 220px; height: 220px;
    bottom: -40px; right: -60px;
    animation-delay: 0.6s;
    background: rgba(0,0,0,0.07);
}
.store-intro__blob:nth-child(3) {
    width: 140px; height: 140px;
    top: 40%; right: 10%;
    animation-delay: 1.1s;
    background: rgba(255,255,255,0.05);
}
@keyframes si-blob {
    from { transform: scale(1) translate(0,0); }
    to   { transform: scale(1.18) translate(12px, -16px); }
}

/* ── Logo circle ─────────────────────────────────────────── */
.store-intro__logo-wrap {
    position: relative;
    z-index: 2;
    width: clamp(120px, 32vw, 160px);
    height: clamp(120px, 32vw, 160px);
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px #fff,
        0 0 0 8px var(--clr-orange, #FF5C00),
        0 16px 48px rgba(0,0,0,0.30);
    animation: si-logo-bounce 0.5s cubic-bezier(0.34,1.4,0.64,1) 0.18s both;
    overflow: hidden;
    flex-shrink: 0;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}
@keyframes si-logo-bounce {
    from { transform: scale(0.55); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.store-intro__logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}
.store-intro__logo-emoji {
    font-size: clamp(2.8rem, 8vw, 3.8rem);
    line-height: 1;
    animation: si-logo-bounce 0.5s cubic-bezier(0.34,1.4,0.64,1) 0.18s both;
}

/* ── Store name ──────────────────────────────────────────── */
.store-intro__name {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    color: #fff;
    text-align: center;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.18);
    animation: si-fade-up 0.42s ease 0.3s both;
}

/* ── Category pill ───────────────────────────────────────── */
.store-intro__cat {
    position: relative;
    z-index: 2;
    margin-top: 10px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 50px;
    backdrop-filter: blur(6px);
    animation: si-fade-up 0.42s ease 0.42s both;
}

/* ── Rating badge ────────────────────────────────────────── */
.store-intro__rating {
    position: relative;
    z-index: 2;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 800;
    animation: si-fade-up 0.42s ease 0.52s both;
}
.store-intro__rating svg {
    width: 20px; height: 20px; fill: #FFD700; flex-shrink: 0;
}

/* ── Progress bar at bottom ──────────────────────────────── */
/* Animated via transform: scaleX() instead of width — see hero.css
   for why (width is a layout property; this ran for 2.2s on every
   single store open and was likely contributing both to CLS and to
   main-thread congestion that showed up as a high INP input delay). */
.store-intro__progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 4px;
    background: rgba(255,255,255,0.9);
    border-radius: 0 2px 0 0;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform linear;
    z-index: 3;
}

/* ── "Loading" dots ──────────────────────────────────────── */
.store-intro__dots {
    position: absolute;
    bottom: 28px;
    z-index: 2;
    display: flex;
    gap: 7px;
    animation: si-fade-up 0.3s ease 0.6s both;
}
.store-intro__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
}
.store-intro__dot.active {
    background: #fff;
    transform: scale(1.25);
}
@keyframes si-dot-pulse {
    0%,100% { background: rgba(255,255,255,0.45); transform: scale(1); }
    50%      { background: #fff;                  transform: scale(1.3); }
}

@keyframes si-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* ════════════════════════════════════════════════════════════
   SUB-CATEGORY CHIPS BAR
   Sticky below the main tabs, scrollable horizontally
════════════════════════════════════════════════════════════ */

/* ── Sub-cat wrap — fixed panel row between tabs and body ── */
.sp-subcat-wrap {
    flex-shrink: 0;
    background: var(--clr-white, #fff);
    border-bottom: 1px solid var(--clr-gray-100, #f0f0f0);
    overflow: hidden;
}

.sp-subcat-bar {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 8px 16px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    direction: rtl;
}
.sp-subcat-bar::-webkit-scrollbar { display: none; }

/* ── Each chip ────────────────────────────────────────────── */
.sp-subchip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 20px;
    border: 1.5px solid var(--clr-gray-200, #e0e0e0);
    background: transparent;
    color: #666;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.sp-subchip:hover {
    border-color: var(--clr-orange, #FF5C00);
    color: var(--clr-orange, #FF5C00);
}
.sp-subchip.active {
    background: var(--clr-orange, #FF5C00);
    border-color: var(--clr-orange, #FF5C00);
    color: #fff;
    font-weight: 700;
}

/* ── Sub-section title — smaller than main ────────────────── */
.sp-section__title--sub {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--clr-orange, #FF5C00) !important;
    padding-top: 4px !important;
    margin-bottom: 2px !important;
    border-bottom: none !important;
}