/* ================================================
   SCROLL STACK MENU  —  La Palma Café
   Card-stack: each CARD is sticky. Items scroll
   normally. When the next card arrives it slides
   OVER the previous items, covering them.
   ================================================ */

/* ── Wrapper ── */
.ss-menu-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 1rem 1.5rem 6rem;
}

/* ── Each category block ──
   NOT sticky — items inside scroll normally
   so you can view all items in the category.
   No position / z-index => does NOT create a
   stacking context, so cards & items share one. */
.ss-section {
    padding-bottom: 2rem;
}

/* ── Sticky card wrapper ──
   Only the CARD sticks, not the whole section.
   High z-index so it paints ON TOP of items
   from both its own section and previous ones.
   Later cards naturally paint over earlier ones
   (DOM order).                                    */
.ss-card-sticky {
    position: sticky;
    top: 72px;
    z-index: 100;
    transform-origin: top center;
    will-change: transform;
    transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.2),
        box-shadow 0.35s ease;
}

/* ── The card ── */
.ss-card {
    width: 100%;
    height: 35vh;
    min-height: 200px;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.35);
}

.ss-card-bg {
    position: absolute;
    inset: 0;
    background-image: var(--ss-img);
    background-size: cover;
    background-position: center;
    transition: transform 7s ease;
}

.ss-section:hover .ss-card-bg {
    transform: scale(1.05);
}

.ss-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.05) 35%,
            rgba(0, 0, 0, 0.65) 80%);
}

/* Ghost number */
.ss-card-num {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.13);
    line-height: 1;
    user-select: none;
}

/* ── Card footer ── */
.ss-card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.4rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.ss-card-en {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ss-card-ar {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.82);
    direction: rtl;
    font-weight: 400;
    margin-top: 0.15rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ss-card-emoji {
    font-size: 2.6rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

/* Stacking state — JS adds this */
.ss-card-sticky.is-stacked {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ── Floating category nav bar ── */
#ssBadge {
    position: fixed;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    z-index: 1000;
    background: rgba(26, 58, 66, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 40px;
    padding: 0.35rem 0.4rem;
    opacity: 0;
    pointer-events: auto;
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    max-width: min(92vw, 520px);
}

#ssBadge.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* The scrollable container */
.badge-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE / Edge */
}

.badge-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
}

/* Each category tab */
.badge-tab {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Lato', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.4rem 0.75rem;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.badge-tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
}

.badge-tab.active {
    background: #e8a84b;
    color: #1a3a42;
    transform: scale(1.05);
}

/* ── Items area ──
   Low z-index so the NEXT section's sticky card
   slides over these items when it arrives.        */
.ss-items {
    position: relative;
    z-index: 1;
    background: var(--cream, #f8f5ef);
    padding: 1.5rem 0 1rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .ss-card {
        height: 28vh;
        min-height: 160px;
    }

    .ss-card-en {
        font-size: 1.4rem;
    }

    .ss-card-ar {
        font-size: 0.95rem;
    }

    .ss-card-emoji {
        font-size: 2rem;
    }

    .ss-card-num {
        font-size: 2.8rem;
    }
}