/* ============================================================
   styles/cards.css
   Categories, stores, offers, why-delivo,
   app-download, join-partner — all sections.
   Mobile-first, tight vertical rhythm, PWA polish.
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   CATEGORIES
   ══════════════════════════════════════════════════════════ */
.categories {
    padding: var(--section-py) 0 clamp(8px, 2vw, 14px);
    overflow: hidden;
}

.categories__header { padding: 0 var(--container-pad); }
.categories__header .section-title {
    font-size: clamp(1rem, 3.2vw, 1.5rem);
}

.categories__scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: clamp(8px, 2vw, 16px);
    padding: clamp(6px, 1.5vw, 10px) var(--container-pad) clamp(4px, 1vw, 8px);
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    -webkit-tap-highlight-color: transparent;
}
.categories__scroll::-webkit-scrollbar { display: none; }
.categories__scroll.dragging {
    cursor: grabbing;
    user-select: none;
}

.category-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 1vw, 6px);
    cursor: pointer;
    min-width: clamp(54px, 14vw, 80px);
    -webkit-tap-highlight-color: transparent;
}

.category-item__circle {
    width: clamp(52px, 13vw, 72px);
    height: clamp(52px, 13vw, 72px);
    border-radius: 50%;
    background: var(--clr-gray-100);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--shadow-xs);
}
/* Hover-only on devices that actually have a mouse. Without this guard,
   touchscreens fire (and often "stick") this :hover state mid-swipe as a
   finger passes over each circle — the translateY jump plus its 0.2s
   transition firing per-item is exactly what makes the category row feel
   janky/twitchy while sliding on mobile. Tap/active feedback below covers
   touch devices instead. */
@media (hover: hover) and (pointer: fine) {
    .category-item:hover .category-item__circle {
        border-color: var(--clr-orange);
        transform: translateY(-2px);
        box-shadow: var(--shadow-orange);
    }
}
.category-item.active .category-item__circle {
    border-color: var(--clr-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}
.category-item__circle img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    border-radius: 0;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}

/* Photo-based categories (JPEGs): fill the circle like a cropped portrait */
.category-item--photo .category-item__circle {
    background: var(--clr-gray-200, #e5e5e5);
    position: relative;
    overflow: hidden;
}
.category-item--photo .category-item__circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Subtle warm vignette so the circle edge looks intentional */
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.06);
}
/* Soft orange tint on hover/active for photo circles */
@media (hover: hover) and (pointer: fine) {
    .category-item--photo:hover .category-item__circle::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: rgba(255, 92, 0, 0.12);
        pointer-events: none;
    }
}
.category-item--photo.active .category-item__circle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 92, 0, 0.12);
    pointer-events: none;
}

.category-item__label {
    font-size: clamp(0.68rem, 1.8vw, 0.88rem);
    font-weight: 800;
    color: var(--clr-black);
    text-align: center;
    white-space: nowrap;
}
.category-item.active .category-item__label {
    color: var(--clr-orange);
}

/* ── Empty category (no stores yet) ─────────────────────────
   Looks identical to an active category — full color, no dimming —
   but keeps the "قريباً" badge overlaid, and is still clickable
   (click shows a "no stores yet" message instead of opening the
   dropdown — handled in categories.js).                        */
.category-item--empty {
    cursor: pointer;
    position: relative;
}

/* ── "قريباً" badge overlaid on empty category circle ─────── */
.category-item--empty .category-item__circle {
    position: relative;
}
.category-item--empty .category-item__circle::after {
    content: 'قريباً' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    inset: auto 0 0 0 !important;
    background: rgba(0, 0, 0, 0.72) !important;
    color: #fff !important;
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    padding: 3px 0 4px !important;
    letter-spacing: 0.02em !important;
    border-radius: 0 0 50px 50px !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

/* ══════════════════════════════════════════════════════════
   SECTION SPLITTER  (between mealtime & most-requested stores)
   ══════════════════════════════════════════════════════════ */
.section-splitter {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 14px);
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(6px, 1.5vw, 10px) var(--container-pad);
    background: var(--clr-white);
}
.section-splitter__line {
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--clr-orange, #FF5C00) 50%, transparent);
    opacity: 0.35;
}
.section-splitter__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--clr-orange, #FF5C00);
    box-shadow: 0 0 0 4px rgba(255, 92, 0, 0.12);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   STORES
   ══════════════════════════════════════════════════════════ */
.stores {
    padding: var(--section-py) 0 clamp(8px, 2vw, 14px);
    background: var(--clr-white);
    overflow: hidden;
}

.stores__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(6px, 1.5vw, 12px);
    padding: 0 var(--container-pad);
}
.stores__header .section-title { margin-bottom: 0; }

.stores__see-all {
    color: var(--clr-orange);
    font-weight: 700;
    font-size: var(--fs-micro);
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    gap: 3px;
}
.stores__see-all:hover { opacity: 0.7; }

.stores__stat-total {
    font-size: clamp(0.5rem, 1.3vw, 0.62rem);
    font-weight: 700;
    color: var(--clr-orange);
    background: rgba(255,92,0,0.08);
    border: 1px solid rgba(255,92,0,0.18);
    border-radius: var(--radius-pill);
    padding: 3px 9px;
    white-space: nowrap;
}


.stores__scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: clamp(8px, 2vw, 14px);
    padding: clamp(4px, 1vw, 6px) var(--container-pad) clamp(6px, 1.5vw, 10px);
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Reserves space matching a populated card row so the section below
       doesn't jump down once stores.js fetches data and fills this in —
       this was the largest single layout shift recorded in testing. */
    min-height: clamp(170px, 32vw, 215px);
}
.stores__scroll::-webkit-scrollbar { display: none; }
.stores__scroll.dragging {
    cursor: grabbing;
    user-select: none;
}

/* ── Marquee wrapper ─────────────────────────────────────── */
.stores__marquee {
    overflow: hidden;
    padding: clamp(4px, 1vw, 6px) 0 clamp(6px, 1.5vw, 10px);
    mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.stores__marquee-track {
    display: flex;
    gap: clamp(8px, 2vw, 14px);
    width: max-content;
    animation: stores-marquee 28s linear infinite;
    cursor: pointer;
}
.stores__marquee:hover .stores__marquee-track,
.stores__marquee.paused  .stores__marquee-track {
    animation-play-state: paused;
}
@keyframes stores-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
/* Add left/right padding to first/last clone set */
.stores__marquee-track > .store-card:first-child { margin-right: var(--container-pad, 16px); }
.stores__marquee-track > .store-card:last-child  { margin-left:  var(--container-pad, 16px); }

/* Store card — compact PWA style */
.store-card {
    flex: 0 0 clamp(100px, 25vw, 140px);
    width: clamp(100px, 25vw, 140px);
    background: var(--clr-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--clr-gray-100);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.store-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.store-card:active {
    transform: scale(0.98);
}

.store-card__thumb {
    position: relative;
    height: clamp(70px, 17vw, 100px);
    flex-shrink: 0;
    overflow: hidden;
}

.store-card__wish {
    position: absolute;
    top: 5px;
    right: 5px;
    width: clamp(24px, 5.5vw, 30px);
    height: clamp(24px, 5.5vw, 30px);
    border-radius: 50%;
    background: rgba(0,0,0,0.38);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    z-index: 2;
}
.store-card__wish:hover       { background: rgba(255,92,0,0.75); }
.store-card__wish.active svg  { fill: #FF5C00; stroke: #FF5C00; }
.store-card__wish svg {
    width: clamp(11px, 2.5vw, 13px);
    height: clamp(11px, 2.5vw, 13px);
}

.store-card__rating {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(255,255,255,0.96);
    padding: 2px 5px;
    border-radius: var(--radius-pill);
    font-size: clamp(0.46rem, 1.2vw, 0.58rem);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 2px;
    box-shadow: var(--shadow-xs);
    color: var(--clr-black);
}

.store-card__time {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.58);
    color: var(--clr-white);
    font-size: clamp(0.42rem, 1.1vw, 0.52rem);
    font-weight: 700;
    padding: 2px 5px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.store-card__body {
    padding: clamp(6px, 1.4vw, 9px);
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.store-card__name {
    font-size: clamp(0.62rem, 1.8vw, 0.75rem);
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--clr-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-card__tags {
    color: var(--clr-gray-400);
    font-size: clamp(0.46rem, 1.2vw, 0.58rem);
    margin-bottom: clamp(4px, 1vw, 7px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-card__footer {
    border-top: 1px solid var(--clr-gray-100);
    padding-top: clamp(4px, 1vw, 6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-top: auto;
}

.store-card__min-label {
    font-size: clamp(0.42rem, 1vw, 0.52rem);
    color: var(--clr-gray-400);
}

.store-card__min-val {
    font-size: clamp(0.52rem, 1.4vw, 0.65rem);
    font-weight: 800;
    color: var(--clr-black);
}


/* ── Rank badge ──────────────────────────────────────────── */
.store-card {
    position: relative;
}
.store-card__rank {
    position: absolute;
    top: 7px;
    left: 7px;
    width: clamp(20px, 5vw, 26px);
    height: clamp(20px, 5vw, 26px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.5rem, 1.3vw, 0.65rem);
    font-weight: 900;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    border: 1.5px solid rgba(255,255,255,0.6);
    line-height: 1;
}

/* Top store golden glow */
.store-card--top {
    border-color: rgba(255,215,0,0.45);
    box-shadow: 0 0 0 2px rgba(255,215,0,0.2), var(--shadow-sm);
}
.store-card--top .store-card__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,215,0,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* ── Request stat bar ────────────────────────────────────── */
.store-card__stat {
    margin: clamp(4px, 1vw, 6px) 0 clamp(4px, 1vw, 6px);
}
.store-card__stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.store-card__stat-label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: clamp(0.42rem, 1.1vw, 0.54rem);
    font-weight: 700;
    color: var(--clr-gray-400);
}
.store-card__stat-pct {
    font-size: clamp(0.4rem, 1vw, 0.5rem);
    font-weight: 800;
    color: var(--clr-orange);
}
.store-card__stat-bar {
    height: 4px;
    background: var(--clr-gray-100);
    border-radius: 99px;
    overflow: hidden;
}
.store-card__stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5C00, #ff8c42);
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
    min-width: 4px;
}
.store-card__stat-fill--top {
    background: linear-gradient(90deg, #FFD700, #FF5C00);
}

/* ── Skeleton loader ─────────────────────────────────────── */
@keyframes sk-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.store-card--skeleton {
    pointer-events: none;
    cursor: default;
}
.store-card--skeleton .sk-thumb,
.store-card--skeleton .sk-line {
    background: linear-gradient(90deg,
        var(--clr-gray-100) 25%,
        #e8e8e8 50%,
        var(--clr-gray-100) 75%);
    background-size: 200% 100%;
    animation: sk-shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}
.store-card--skeleton .sk-thumb {
    height: clamp(70px, 17vw, 100px);
    border-radius: 0;
}
.sk-line { height: 8px; margin-bottom: 6px; }
.sk-line--name   { width: 70%; height: 10px; }
.sk-line--tags   { width: 50%; }
.sk-line--bar    { width: 100%; height: 14px; margin: 8px 0; }
.sk-line--footer { width: 60%; }

/* ══════════════════════════════════════════════════════════
   OFFERS — auto-play snap carousel, full-width on mobile
   ══════════════════════════════════════════════════════════ */
.offers {
    padding: var(--section-py) 0 clamp(10px, 2.5vw, 16px);
    overflow: hidden;
}

.offers__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(6px, 1.5vw, 12px);
    padding: 0 var(--container-pad);
}
.offers__header .section-title { margin-bottom: 0; }

.offers__see-all {
    color: var(--clr-orange);
    font-weight: 700;
    font-size: var(--fs-micro);
    cursor: pointer;
    white-space: nowrap;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
}

.offers__scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: clamp(4px, 1vw, 6px) var(--container-pad) clamp(6px, 1.5vw, 10px);
    gap: clamp(10px, 2.5vw, 16px);
    cursor: grab;
}
.offers__scroll::-webkit-scrollbar { display: none; }
.offers__scroll.dragging { cursor: grabbing; user-select: none; }

.offers__track {
    display: flex;
    gap: clamp(10px, 2.5vw, 16px);
}

.offer-card {
    flex: 0 0 calc(100vw - (var(--container-pad) * 2));
    min-width: calc(100vw - (var(--container-pad) * 2));
    height: clamp(110px, 28vw, 140px);
    scroll-snap-align: center;
    border-radius: var(--radius-lg);
    padding: clamp(10px, 2.5vw, 14px) clamp(14px, 3.5vw, 18px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vw, 16px);
    overflow: hidden;
    position: relative;
    color: var(--clr-white);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (min-width: 540px) {
    .offer-card {
        flex: 0 0 clamp(200px, 38vw, 280px);
        min-width: clamp(200px, 38vw, 280px);
        height: clamp(105px, 22vw, 130px);
        scroll-snap-align: start;
        padding: clamp(10px, 2.5vw, 14px) clamp(12px, 3vw, 18px);
        gap: clamp(8px, 2vw, 12px);
    }
}

.offer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Gradient backgrounds — one per card theme */
.offer-card--orange {
    background: linear-gradient(135deg, #FF5C00 0%, #ff8c00 40%, #ffb347 100%);
}
.offer-card--dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.offer-card--blue {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 60%, #1e40af 100%);
    border: 1px solid rgba(59,130,246,0.4);
}
.offer-card--blue:hover { border-color: rgba(59,130,246,0.7); }

/* ── Dynamic sale cards injected from Firebase ──────────── */
.offer-card--sale-dynamic {
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    height: auto;
    min-height: clamp(110px, 28vw, 140px);
    padding-bottom: clamp(30px, 8vw, 40px); /* room for the centered store-logo badge */
}
.offer-card--sale-dynamic:hover {
    border-color: rgba(255,255,255,0.3);
}
@media (min-width: 540px) {
    .offer-card--sale-dynamic {
        min-height: clamp(105px, 22vw, 130px);
        height: auto;
    }
}

/* Store-logo badge — bottom-center of the whole card, bigger, sits fully
   inside the card's own box (never touches the edge) so overflow:hidden
   on .offer-card can't clip it. Tap to see all this store's active sales. */
.offer-sale-store-btn {
    position: absolute;
    left: 50%;
    bottom: clamp(8px, 2vw, 12px);
    transform: translateX(-50%);
    z-index: 3;
    flex-shrink: 0;
    width: clamp(40px, 11vw, 52px);
    height: clamp(40px, 11vw, 52px);
    border-radius: 50%;
    padding: 0;
    background: #fff;
    border: 2.5px solid rgba(255,255,255,0.85);
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.offer-sale-store-btn:hover  { transform: translateX(-50%) translateY(-2px) scale(1.08); box-shadow: 0 5px 16px rgba(0,0,0,0.45); }
.offer-sale-store-btn:active { transform: translateX(-50%) scale(0.92); }
.offer-sale-store-btn img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Add-to-cart pill button inside sale card */
.offer-sale-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    color: #fff;
    font-family: 'Almarai', sans-serif;
    font-size: clamp(0.58rem, 1.6vw, 0.7rem);
    font-weight: 800;
    cursor: pointer;
    transition: background .15s, transform .1s;
    white-space: nowrap;
    align-self: flex-end;
}
.offer-sale-add-btn:hover  { background: rgba(255,255,255,0.32); }
.offer-sale-add-btn:active { transform: scale(0.95); }

/* Shimmer sweep — same animation as loyalty card */
.offer-card__sale-shimmer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.15) 50%, transparent 80%);
    background-size: 200% 100%;
    animation: sale-card-shimmer 2.8s infinite;
    border-radius: inherit;
}
@keyframes sale-card-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.offer-card--green {
    background: linear-gradient(135deg, #134e2a 0%, #1a6b3a 50%, #22943e 100%);
}
.offer-card--purple {
    background: linear-gradient(135deg, #2d1b69 0%, #4a2c8a 50%, #6d3fbd 100%);
}

/* Blurred decorative circle behind image */
.offer-card::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.10);
    filter: blur(28px);
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
}

/* Second decorative blurred orb */
.offer-card::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    filter: blur(18px);
    left: 20px;
    bottom: -10px;
    z-index: 0;
    pointer-events: none;
}

.offer-card__img-wrap {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: clamp(72px, 20vw, 110px);
    height: clamp(72px, 20vw, 110px);
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 540px) {
    .offer-card__img-wrap {
        width: clamp(65px, 14vw, 90px);
        height: clamp(65px, 14vw, 90px);
    }
}

.offer-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: right;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.offer-card__title {
    font-size: clamp(0.68rem, 3.8vw, 1.05rem);
    font-weight: 800;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    color: var(--clr-white);
    width: 100%;
}
@media (min-width: 380px) {
    .offer-card__title { font-size: clamp(0.72rem, 3.5vw, 1rem); }
}
@media (min-width: 540px) {
    .offer-card__title { font-size: clamp(0.65rem, 1.8vw, 0.88rem); line-height: 1.3; }
}

.offer-card__sub {
    font-size: clamp(0.65rem, 2vw, 0.78rem);
    line-height: 1.45;
    color: rgba(255,255,255,0.88);
    text-align: right;
}
@media (min-width: 540px) {
    .offer-card__sub { font-size: clamp(0.50rem, 1.2vw, 0.60rem); }
}

.offer-card__code {
    margin-top: 3px;
    background: rgba(0,0,0,0.38);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: clamp(0.58rem, 1.6vw, 0.68rem);
    font-weight: 800;
    white-space: nowrap;
    color: var(--clr-white);
    border: 1px solid rgba(255,255,255,0.22);
    align-self: flex-end;
}
@media (min-width: 540px) {
    .offer-card__code { font-size: clamp(0.42rem, 1vw, 0.52rem); padding: 2px 6px; }
}

.offer-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
    transform: scale(1.08);
    transition: transform 0.3s ease;
}
.offer-card:hover .offer-card__img {
    transform: scale(1.14);
}

.offers__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: clamp(8px, 2vw, 12px);
}
@media (min-width: 540px) {
    .offers__dots { display: none; }
}

.offers__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--clr-gray-200);
    transition: background 0.3s, width 0.3s;
    cursor: pointer;
}
.offers__dot.active {
    background: var(--clr-orange);
    width: 18px;
    border-radius: 3px;
}
/* ══════════════════════════════════════════════════════════
   WHY DELIVO
   ══════════════════════════════════════════════════════════ */
.why {
    padding: var(--section-py) 0;
    background: var(--clr-gray-50);
}

.why__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(8px, 2vw, 14px);
}

.why-card {
    background: var(--clr-white);
    border: 1px solid var(--clr-gray-100);
    border-radius: var(--radius-lg);
    padding: clamp(10px, 2.5vw, 14px) clamp(12px, 3vw, 18px);
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: var(--shadow-xs);
}
.why-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.why-card__icon {
    width: clamp(32px, 8vw, 42px);
    height: clamp(32px, 8vw, 42px);
    background: var(--clr-orange-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.why-card__icon svg {
    width: clamp(15px, 4vw, 20px);
    height: clamp(15px, 4vw, 20px);
}

.why-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    flex: 1;
    min-width: 0;
}

.why-card__title {
    font-size: clamp(0.70rem, 2vw, 0.88rem);
    font-weight: 800;
    color: var(--clr-black);
    line-height: 1.2;
}

.why-card__desc {
    font-size: clamp(0.56rem, 1.5vw, 0.68rem);
    color: var(--clr-gray-400);
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════
   APP DOWNLOAD
   ══════════════════════════════════════════════════════════ */
.app-download {
    padding: var(--section-py) 0;
}

/* ── Card ──────────────────────────────────────────────── */
.app-download__card {
    position: relative;
    background: linear-gradient(135deg, #111008 0%, #1a1105 45%, #0d0d0d 100%);
    border: 1px solid rgba(255,92,0,0.2);
    border-radius: 24px;
    box-shadow: 0 16px 56px rgba(0,0,0,0.5),
                inset 0 0 100px rgba(255,92,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: clamp(220px, 58vw, 300px);
}

/* Glows */
.app-download__glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.app-download__glow--1 {
    width: 350px; height: 350px;
    top: -100px; right: -80px;
    background: radial-gradient(circle, rgba(255,92,0,0.13) 0%, transparent 65%);
}
.app-download__glow--2 {
    width: 220px; height: 220px;
    bottom: -80px; left: 15%;
    background: radial-gradient(circle, rgba(255,140,0,0.07) 0%, transparent 70%);
}

/* ── Phone — left side, landscape image fills card height ── */
.app-download__phone {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    /* Width drives the column; image is landscape so let height fill */
    width: clamp(130px, 38vw, 220px);
    align-self: stretch;
    overflow: hidden;
    border-radius: 24px 0 0 24px;
}
.app-download__phone-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.92) drop-shadow(4px 0 20px rgba(0,0,0,0.6));
    display: block;
}

/* ── Content column — right side ────────────────────────── */
.app-download__content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    padding: clamp(18px,4.5vw,32px) clamp(16px,4vw,28px)
             clamp(18px,4.5vw,32px) clamp(6px,1.5vw,12px);
    gap: clamp(5px,1.2vw,9px);
    min-width: 0;
}

/* Badge */
.app-download__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,92,0,0.18);
    border: 1px solid rgba(255,92,0,0.38);
    border-radius: 50px;
    padding: 3px 11px;
    font-size: clamp(0.56rem,1.5vw,0.68rem);
    font-weight: 800;
    color: var(--clr-orange);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* Title */
.app-download__title {
    color: #fff;
    font-size: clamp(1.05rem,5vw,1.55rem);
    font-weight: 900;
    line-height: 1.15;
    margin: 0;
}
.app-download__title span { color: var(--clr-orange); }

/* Tagline */
.app-download__tagline {
    color: var(--clr-orange);
    font-size: clamp(0.68rem,2.2vw,0.92rem);
    font-weight: 700;
    margin: 0;
}

/* Description */
.app-download__desc {
    color: rgba(255,255,255,0.5);
    font-size: clamp(0.56rem,1.5vw,0.72rem);
    line-height: 1.55;
    margin: 0;
}

/* ── Store buttons — stacked vertically like fig 2 ─────── */
.app-download__btns {
    display: flex;
    flex-direction: column;
    gap: clamp(6px,1.4vw,9px);
    align-items: flex-end;
    margin-top: clamp(4px,1vw,8px);
    width: 100%;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px,1.3vw,10px);
    background: rgba(255,255,255,0.09);
    border: 1.5px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    padding: clamp(7px,1.5vw,10px) clamp(12px,2.5vw,18px);
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s, transform 0.14s;
    white-space: nowrap;
    min-width: clamp(130px,36vw,170px);
}
.store-btn:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,92,0,0.5);
    transform: translateY(-1px);
}
.store-btn:active { transform: scale(0.97); }

.store-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.store-btn__icon svg {
    width: clamp(16px,3.2vw,22px);
    height: clamp(16px,3.2vw,22px);
}
.store-btn__label { display: flex; flex-direction: column; }
.store-btn__small {
    font-size: clamp(0.4rem,0.95vw,0.52rem);
    color: rgba(255,255,255,0.52);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}
.store-btn__name {
    font-size: clamp(0.65rem,1.7vw,0.88rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}

/* ── Soon / disabled state ─────────────────────────────── */
.store-btn--soon {
    position: relative;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.3);
}
.store-btn--soon:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.16);
    transform: none;
}
.store-btn__soon-badge {
    position: absolute;
    top: -9px;
    left: -6px;
    background: var(--orange, #ff5c00);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 50px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 6px rgba(255,92,0,0.45);
    pointer-events: none;
}

/* ── QR row ─────────────────────────────────────────────── */
.app-download__qr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: clamp(4px,1vw,8px);
    justify-content: flex-end;
}
.app-download__qr-wrap {
    width: clamp(64px,14vw,90px);
    height: clamp(64px,14vw,90px);
    background: #fff;
    border-radius: 8px;
    padding: clamp(4px,1vw,6px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.app-download__qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.app-download__qr-label {
    font-size: clamp(0.5rem,1.3vw,0.62rem);
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    max-width: 60px;
    line-height: 1.35;
    text-align: right;
}

/* ══════════════════════════════════════════════════════════
   JOIN PARTNER
   ══════════════════════════════════════════════════════════ */
.join-partner {
    padding: var(--section-py) 0;
}

.join-partner__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(7px, 1.8vw, 14px);
}

.join-card {
    position: relative;
    background: var(--clr-white);
    border: 1px solid var(--clr-gray-100);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: clamp(88px, 22vw, 160px);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}
.join-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.join-card__img {
    flex-shrink: 0;
    width: clamp(65px, 17vw, 140px);
    height: 100%;
    min-height: clamp(88px, 22vw, 160px);
    object-fit: contain;
    object-position: center;
    display: block;
    align-self: stretch;
    background: var(--clr-gray-50);
    padding: clamp(6px, 1.5vw, 11px);
}

.join-card__body {
    flex: 1;
    padding: clamp(8px, 2vw, 20px) clamp(8px, 1.5vw, 16px);
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.8vw, 7px);
    text-align: right;
    min-width: 0;
}

.join-card__label {
    display: flex;
    align-items: center;
    gap: 5px;
}
.join-card__label-line {
    width: 12px;
    height: 2px;
    background: var(--clr-orange);
    border-radius: 2px;
    flex-shrink: 0;
}
.join-card__label-text {
    color: var(--clr-orange);
    font-size: clamp(0.44rem, 1.8vw, 0.62rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.join-card__title {
    font-size: clamp(0.65rem, 3vw, 1.1rem);
    font-weight: 800;
    color: var(--clr-black);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.join-card__desc {
    color: var(--clr-gray-500);
    font-size: clamp(0.50rem, 1.6vw, 0.70rem);
    line-height: 1.5;
}

.join-card .btn-primary {
    align-self: flex-start;
    padding: clamp(5px, 1.2vw, 8px) clamp(10px, 2vw, 20px);
    font-size: clamp(0.52rem, 1.4vw, 0.72rem);
    min-height: unset;
    margin-top: clamp(2px, 0.5vw, 5px);
    box-shadow: none;
}
/* ══════════════════════════════════════════════════════════
   CATEGORY STORES MODAL — full-screen bottom-sheet, grid layout
   Every store in the category is visible at once (scrollable grid),
   no auto-scroll/marquee — built so narrow mobile screens can browse
   the whole list comfortably with one thumb.
   ══════════════════════════════════════════════════════════ */

.cat-stores-dropdown {
    position: fixed;
    inset: 0;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.cat-stores-dropdown.open {
    opacity: 1;
    pointer-events: all;
}

/* Dimmed backdrop behind the sheet */
.cat-stores-dropdown__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 18, 0.55);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}

/* The sheet itself — slides up from the bottom of the screen */
.cat-stores-dropdown__inner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--clr-white);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 32px rgba(0,0,0,0.22);
    z-index: 2;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.32, 1.05, 0.6, 1);
    will-change: transform;
}
.cat-stores-dropdown.open .cat-stores-dropdown__inner {
    transform: translateY(0);
}

/* Little grab handle so the sheet reads as swipeable, mobile-app style */
.cat-stores-dropdown__handle {
    width: 40px;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--clr-gray-200);
    margin: 10px auto 2px;
    flex-shrink: 0;
}

/* Header row: title + count pill + close button */
.cat-stores-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: clamp(6px, 1.5vw, 10px) var(--container-pad) clamp(10px, 2.5vw, 14px);
    border-bottom: 1px solid var(--clr-gray-100);
    flex-shrink: 0;
}
.cat-stores-dropdown__title {
    font-size: clamp(0.92rem, 2.8vw, 1.1rem);
    font-weight: 800;
    color: var(--clr-black);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.cat-stores-dropdown__title-emoji {
    font-size: 1.15em;
    flex-shrink: 0;
}
.cat-stores-dropdown__count {
    font-size: clamp(0.66rem, 1.7vw, 0.76rem);
    font-weight: 700;
    color: var(--clr-gray-400);
    background: var(--clr-gray-100);
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    flex-shrink: 0;
    white-space: nowrap;
}
.cat-stores-dropdown__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--clr-gray-100);
    color: var(--clr-gray-500);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.cat-stores-dropdown__close:hover  { background: var(--clr-gray-200); color: var(--clr-black); }
.cat-stores-dropdown__close:active { transform: scale(0.9); }

/* Scrollable body: responsive grid of store cards, all visible at once */
.cat-stores-dropdown__scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Without this, a flex column parent with overflow:auto treats this
       item's minimum height as 0 (per spec), which lets the grid get
       silently squashed to fit the sheet's max-height instead of
       overflowing — cards would compress until their text disappeared.
       minmax(min-content, auto) pins every row to its natural content
       height no matter how tall the list gets, so long categories
       genuinely overflow and scroll instead of collapsing. */
    grid-auto-rows: minmax(min-content, auto);
    flex: 1 1 auto;
    min-height: 0;
    gap: clamp(10px, 2.6vw, 16px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(12px, 3vw, 16px) calc(var(--container-pad) - 2px) calc(env(safe-area-inset-bottom, 0px) + 46px) var(--container-pad);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    cursor: grab;
    /* Firefox: slim always-visible scrollbar in the brand color */
    scrollbar-width: thin;
    scrollbar-color: var(--clr-orange-light, #ffd8bd) transparent;
}
.cat-stores-dropdown__scroll.dragging {
    cursor: grabbing;
    user-select: none;
}

/* ── "More stores below" hint — a soft white fade with a bouncing
   chevron, pinned over the bottom edge of the sheet. Purely a visual
   cue layered on top of the scroll area (pointer-events:none so it
   never blocks taps); categories.js toggles it via the .visible class
   based on whether the list actually overflows and how far the person
   has scrolled, so it disappears the moment they reach the last card. */
.cat-stores-dropdown__more-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 54px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--clr-white) 82%);
    color: var(--clr-orange);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}
.cat-stores-dropdown__more-hint.visible {
    opacity: 1;
}
.cat-stores-dropdown__more-hint svg {
    animation: catMoreHintBounce 1.4s ease-in-out infinite;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
}
@keyframes catMoreHintBounce {
    0%, 100% { transform: translateY(0);   opacity: 0.55; }
    50%      { transform: translateY(5px); opacity: 1;    }
}
@media (prefers-reduced-motion: reduce) {
    .cat-stores-dropdown__more-hint svg { animation: none; }
}
/* Chrome/Safari/Edge: slim always-visible scrollbar, thumb only paints on
   the track (no arrows/box) so it reads as a clean rail, not a UI relic.
   Kept visible at every width — on narrow screens especially, it's the
   clearest signal to people that the grid has more stores below. */
.cat-stores-dropdown__scroll::-webkit-scrollbar {
    width: 5px;
}
.cat-stores-dropdown__scroll::-webkit-scrollbar-track {
    background: transparent;
}
.cat-stores-dropdown__scroll::-webkit-scrollbar-thumb {
    background: var(--clr-orange-light, #ffd8bd);
    border-radius: var(--radius-pill);
}
.cat-stores-dropdown__scroll::-webkit-scrollbar-thumb:hover {
    background: var(--clr-orange, #FF5C00);
}
@media (min-width: 420px) {
    .cat-stores-dropdown__scroll { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 640px) {
    .cat-stores-dropdown__scroll { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
    .cat-stores-dropdown__scroll { grid-template-columns: repeat(5, 1fr); }
}
.cat-stores-dropdown__scroll .store-card { width: 100%; }

/* Skeleton shimmer cards shown while fetching */
.cat-skeleton-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--clr-gray-100);
}
.cat-skeleton-card__thumb {
    height: clamp(78px, 20vw, 110px);
    background: var(--clr-gray-100);
    animation: skeletonPulse 1.4s ease-in-out infinite;
}
.cat-skeleton-card__body {
    padding: 8px;
    background: var(--clr-white);
}
.cat-skeleton-card__line {
    height: 10px;
    border-radius: 5px;
    background: var(--clr-gray-100);
    animation: skeletonPulse 1.4s ease-in-out infinite;
    margin-bottom: 6px;
}
.cat-skeleton-card__line:nth-child(1) { width: 70%; }
.cat-skeleton-card__line:nth-child(2) { width: 50%; animation-delay: 0.1s; }
.cat-skeleton-card__line:nth-child(3) { width: 40%; animation-delay: 0.2s; }

/* Empty / error message inside dropdown */
.cat-stores-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: var(--clr-gray-400);
    font-size: var(--fs-small);
    font-weight: 600;
}

/* Active state on pressed category circle */
.category-item.active .category-item__circle {
    border-color: var(--clr-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
    background: var(--clr-orange-light);
}
.category-item.active .category-item__label {
    color: var(--clr-orange);
    font-weight: 800;
}

/* "قريباً" overlay on coming-soon store cards */
.store-card--soon {
    opacity: 0.68;
    pointer-events: none;
}
.store-card__soon-badge {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    font-size: clamp(0.68rem, 1.8vw, 0.78rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Store thumb image (local assets) */
.store-card__thumb {
    background-color: var(--clr-gray-100);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.store-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    image-rendering: auto;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}
/* ══════════════════════════════════════════════════════════════
   CLOSED STORE — cards.css addition
   Applied to store cards in both categories dropdown and top-5 section
══════════════════════════════════════════════════════════════ */

/* Base closed card state */
.store-card--closed {
    cursor: not-allowed !important;
    pointer-events: none;
    user-select: none;
}

/* Thumb overlay — subtle dark veil over the image */
.store-card--closed .store-card__thumb,
.store-card--closed .store-card__thumb.store-thumb {
    filter: grayscale(0.6) brightness(0.75);
    transition: filter 0.3s;
}

/* Closed badge — replaces the "soon" badge on the thumb */
.store-card__closed-badge {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(10, 10, 18, 0.62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: inherit;
    z-index: 2;
}
.store-card__closed-badge__icon {
    font-size: 1.35rem;
    line-height: 1;
    filter: grayscale(0.3);
}
.store-card__closed-badge__label {
    font-size: clamp(0.58rem, 1.6vw, 0.68rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(239, 68, 68, 0.85);
    border-radius: 50px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* Opening-time chip — shown in the card body */
.store-card__opens-chip {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: clamp(0.52rem, 1.3vw, 0.64rem);
    font-weight: 700;
    color: var(--clr-gray-500);
    background: var(--clr-gray-100);
    border: 1px solid var(--clr-gray-200);
    border-radius: 10px;          /* pill → rounded rect so text can wrap */
    padding: 4px 7px;
    margin-top: 4px;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;          /* allow wrapping */
    line-height: 1.35;
    word-break: break-word;
}
.store-card__opens-chip svg {
    flex-shrink: 0;
    margin-top: 2px;              /* align icon with first line of text */
    color: var(--clr-gray-400);
}

/* Reason text in footer of closed card */
.store-card__closed-reason {
    font-size: clamp(0.52rem, 1.3vw, 0.62rem);
    color: #ef4444;
    font-weight: 600;
    margin-top: 3px;
    line-height: 1.35;
    word-break: break-word;      /* full text, no clamp */
}

/* ══════════════════════════════════════════════════════════════
   MEAL-TIME SECTION  (mealtime.js)
══════════════════════════════════════════════════════════════ */
#mealtime-section {
    padding: var(--section-py, 2rem) 0;
    background: var(--clr-white, #fff);
    overflow: hidden;
}

/* Gradient banner strip */
.mt-banner {
    margin: 0 var(--container-pad, 1rem) clamp(8px,1.5vw,14px);
    border-radius: 18px;
    padding: clamp(12px,2.5vw,18px) clamp(14px,3vw,22px);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.mt-banner--breakfast { background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%); }
.mt-banner--lunch     { background: linear-gradient(135deg, #FF5C00 0%, #c0392b 100%); }
.mt-banner--snack     { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); }
.mt-banner--dinner    { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
                        border: 1px solid rgba(255,255,255,0.08); }

.mt-banner__icon {
    font-size: clamp(2rem, 5vw, 2.8rem);
    flex-shrink: 0;
    line-height: 1;
    position: relative;
    z-index: 1;
}
.mt-banner__text {
    flex: 1;
    position: relative;
    z-index: 1;
}
.mt-banner__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.mt-banner__title {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}
.mt-banner__sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}
.mt-banner__time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.18);
    border-radius: 20px;
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Horizontal scroll row */
.mt-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px var(--container-pad, 1rem) 14px;
    scroll-snap-type: x proximity;   /* proximity = snaps but doesn't fight drag */
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
    /* always show scrollbar track so user knows it scrolls */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.mt-scroll::-webkit-scrollbar        { height: 4px; }
.mt-scroll::-webkit-scrollbar-track  { background: transparent; }
.mt-scroll::-webkit-scrollbar-thumb  { background: rgba(0,0,0,0.18); border-radius: 4px; }


/* Store card — smaller, portrait-ish */
.mt-card {
    flex: 0 0 clamp(100px, 26vw, 120px);   /* narrower than before */
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
}
.mt-card:hover  { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.mt-card:active { transform: scale(0.96); }

.mt-card__thumb {
    width: 100%;
    aspect-ratio: 1 / 1;          /* square icon area, but card is narrower so icon is small */
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
}
.mt-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: auto;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}
.mt-card__meal-tag {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.52);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
.mt-card__meal-tag:empty { display: none; }

.mt-card__body {
    padding: 6px 8px;
}
.mt-card__name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mt-card__tags {
    font-size: 0.65rem;
    color: #999;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ══════════════════════════════════════════════════════════
   STORE SALES PANEL — bottom sheet listing all active sales
   for one store, opened from the store-logo button on a
   sale card. Same slide-up mechanics as the item detail popup.
   ══════════════════════════════════════════════════════════ */
.store-sales-overlay {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.store-sales-overlay.active { opacity: 1; pointer-events: all; }

.store-sales-panel {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 701;
    max-height: 78vh;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.18, 0.64, 1);
    overflow: hidden;
}
.store-sales-panel.active { transform: translateY(0); }
@media (min-width: 551px) {
    .store-sales-panel {
        max-width: 480px;
        margin: 0 auto;
        left: 50%;
        transform: translate(-50%, 100%);
        border-radius: 24px 24px 0 0;
    }
    .store-sales-panel.active { transform: translate(-50%, 0); }
}

.store-sales-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid #f0f0f2;
    flex-shrink: 0;
}
.store-sales-panel__store {
    display: flex;
    align-items: center;
    gap: 10px;
}
.store-sales-panel__logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--clr-gray-100, #f0f0f2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.store-sales-panel__logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.store-sales-panel__title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--clr-orange, #FF5C00);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.store-sales-panel__store-name {
    font-size: 1rem;
    font-weight: 800;
    color: #111;
    margin-top: 2px;
}
.store-sales-panel__close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f5f5f7;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.store-sales-panel__close svg { width: 18px; height: 18px; stroke: #666; }
.store-sales-panel__close:hover { background: #ececee; }

.store-sales-panel__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.store-sales-panel__loading,
.store-sales-panel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}
.store-sales-panel__spinner {
    width: 26px; height: 26px;
    border: 3px solid #f0f0f2;
    border-top-color: var(--clr-orange, #FF5C00);
    border-radius: 50%;
    animation: ssp-spin 0.8s linear infinite;
}
@keyframes ssp-spin { to { transform: rotate(360deg); } }

.store-sales-item {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    border-radius: 16px;
    padding: 14px 16px;
    color: #fff;
    text-align: right;
    overflow: hidden;
}
.store-sales-item__badge {
    display: inline-block;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-bottom: 6px;
}
.store-sales-item__title {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
}
.store-sales-item__sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.8);
    margin-top: 3px;
}
.store-sales-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px;
}
.store-sales-item__price { display: flex; align-items: baseline; gap: 6px; }
.store-sales-item__price-new { font-size: 1.05rem; font-weight: 900; color: #fff; }
.store-sales-item__price-old { font-size: 0.68rem; color: rgba(255,255,255,0.55); text-decoration: line-through; }
.store-sales-item__add {
    flex-shrink: 0;
    padding: 6px 14px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    color: #fff;
    font-family: 'Almarai', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .1s;
}
.store-sales-item__add:hover  { background: rgba(255,255,255,0.32); }
.store-sales-item__add:active { transform: scale(0.95); }