* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* remove blue tap flash on mobile */
}

body,
html {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    overflow-x: hidden;
    /* prevent horizontal scroll on mobile */
}

/* Headings use Alternate font */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 700;
}

/* ------------------- Home Screen ------------------- */
#home-screen {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* nothing bleeds past the edge on mobile */
    max-width: 100vw;
}

#home-screen.hidden {
    display: none;
}

/* ═══════════════════════════
   HEADER
   Mobile  → centred logo only
   Desktop → seamless navbar: logo left | controls right
═══════════════════════════ */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1rem 1rem;
}

.header-logo {
    height: 60px;
}

/* Desktop header controls — hidden on mobile */
.header-controls {
    display: none;
}

/* ═══════════════════════════
   MAIN CONTENT
═══════════════════════════ */
.main-content {
    flex-grow: 1;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    /* padding doesn't push past viewport */
    overflow-x: hidden;
}

/* ═══════════════════════════
   MOBILE SEARCH SECTION
   (stacked column — hidden on desktop)
═══════════════════════════ */
.mobile-search-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ─── Search input wrapper (chip + input side by side) ─── */
.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 0 0.75rem;
    gap: 0.5rem;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
}

.search-input-wrap:focus-within {
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* The actual input inside the wrapper — no border of its own */
.search-input-wrap .search-input {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 0.75rem 0;
    background: #fff;
    box-shadow: none !important;
    outline: none;
    min-width: 0;
}

/* ─── Active filter chip ─── */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem 0.22rem 0.65rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    background: #0066CC;
    color: #fff;
    transition: background 0.2s;
}

.filter-chip.hidden {
    display: none;
}

/* Per-category chip colours */
.filter-chip[data-filter="daily"] {
    background: #0066CC;
}

.filter-chip[data-filter="weekly"] {
    background: #099250;
}

.filter-chip[data-filter="monthly"] {
    background: #7B35E3;
}

.filter-chip[data-filter="vip"] {
    background: #DC9D00;
}

.filter-chip__clear {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Filter button — blue bg + white icon when dropdown open OR filter active */
.mobile-filter-btn.is-open,
.mobile-filter-btn.has-filter {
    background: #0066CC;
    border-color: #0066CC;
    color: #fff;
    /* currentColor on SVG path becomes white */
}

/* Override hover so it doesn't fight the active state */
.mobile-filter-btn.is-open:hover,
.mobile-filter-btn.has-filter:hover {
    background: #0055b3;
    border-color: #0055b3;
    color: #fff;
}

/* ═══════════════════════════
   PROMO BANNER
═══════════════════════════ */
.promo-banner {
    width: 100%;
    margin-bottom: 1rem; /* Reduced from 2rem */
    overflow: hidden;
    transition: transform 0.3s ease;
}

.promo-banner:hover {
    transform: translateY(-2px);
}

.promo-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 !important;
    image-rendering: -webkit-optimize-contrast;
}

.promo-banner-sidebar {
    display: none; /* Shown via media query */
}

.promo-banner-mobile {
    display: block; /* Visible on mobile */
    margin: 1.5rem 0 2rem;
    padding: 0 5px;
}

@media screen and (min-width: 768px) {
    .promo-banner-sidebar {
        display: block;
    }
    .promo-banner-mobile {
        display: none;
    }
}

/* ─── Filter dropdown panel ─── */
.filter-dropdown {
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 16px;
    padding: 1rem 1rem 0.75rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
    display: none;
    /* hidden by default */
    flex-direction: column;
    gap: 0.65rem;
    animation: dropdownSlide 0.22s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.filter-dropdown.open {
    display: flex;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-dropdown__label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.filter-dropdown__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

/* Each option pill */
.flt-opt {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.62rem 1.15rem;
    border-radius: 100px;
    border: 1.5px solid #E0E0E0;
    background: #fafafa;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.14s;
    -webkit-tap-highlight-color: transparent;
}

.flt-opt:active {
    transform: scale(0.93);
}

/* Active state per category */
.flt-opt--all.active {
    background: #0066CC;
    border-color: #0066CC;
    color: #fff;
}

.flt-opt--daily.active {
    background: #0066CC;
    border-color: #0066CC;
    color: #fff;
}

.flt-opt--weekly.active {
    background: #099250;
    border-color: #099250;
    color: #fff;
}

.flt-opt--monthly.active {
    background: #7B35E3;
    border-color: #7B35E3;
    color: #fff;
}

.flt-opt--vip.active {
    background: #DC9D00;
    border-color: #DC9D00;
    color: #fff;
}

/* Hover tints for inactive */
.flt-opt--all:not(.active):hover,
.flt-opt--daily:not(.active):hover {
    border-color: #0066CC;
    color: #0066CC;
}

.flt-opt--weekly:not(.active):hover {
    border-color: #099250;
    color: #099250;
}

.flt-opt--monthly:not(.active):hover {
    border-color: #7B35E3;
    color: #7B35E3;
}

.flt-opt--vip:not(.active):hover {
    border-color: #DC9D00;
    color: #DC9D00;
}

/* ── ticket-section fade animation ── */
.ticket-section {
    animation: sectionFadeIn 0.28s ease both;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ticket-section.hidden-section {
    display: none;
}

/* Desktop free trial block — hidden on mobile */
.desktop-free-trial {
    display: none;
}

/* ═══════════════════════════
   SEARCH BAR ROW
═══════════════════════════ */
.search-bar-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.search-input {
    flex-grow: 1;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus,
.search-input:active {
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.search-input::placeholder {
    color: #A0A0A0;
}

/* ═══════════════════════════
   CONNECT CODE FIELD
═══════════════════════════ */
.mobile-connect-wrapper {
    display: flex;
    flex-direction: column;
    /* 
       SPACING CONTROL: Using explicit margins instead of gap for 
       maximum compatibility in mobile system webviews.
    */
    width: 100%;
}

.mobile-connect-btn {
    margin-top: 1.1rem !important;
    background: #099250;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.8rem;
    font-size: 1.05rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(9, 146, 80, 0.2);
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}

.mobile-connect-btn:active {
    transform: scale(0.98);
    background: #077942;
}

.connect-code-border {
    border: 2px dashed #C0C0C0;
    border-radius: 14px;
    padding: 4px;
    /* gap between dashes and inner pill */
    width: 100%;
    background: transparent;
    box-sizing: border-box;
    display: flex;
    /* make inner div stretch full width */
}

.connect-code-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #EEF4FF;
    border-radius: 10px;
    /* slightly less than outer 14px → sits flush */
    padding: 0.75rem 1rem;
    width: 100%;
    /* fill the dashed border box */
    box-sizing: border-box;
}

.connect-icon {
    flex-shrink: 0;
    opacity: 0.65;
}

.connect-code-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    outline: none;
    min-width: 0;
}

.connect-code-input::placeholder {
    color: #A0A0A0;
    font-weight: 500;
}

/* ═══════════════════════════
   FADED SEPARATOR (mobile)
═══════════════════════════ */
.faded-separator {
    width: 100%;
    height: 1.5px;
    background: linear-gradient(to right,
            transparent 0%,
            #e4e3e3 20%,
            #e4e3e3 80%,
            transparent 100%);
    margin: 0.25rem 0;
}

/* ═══════════════════════════
   FREE TRIAL BUTTON
═══════════════════════════ */
.free-trial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 
       SPACING CONTROL: Using explicit margins instead of gap for 
       maximum compatibility in mobile system webviews.
    */
    width: 100%;
}

.free-trial-border {
    border: 2px dashed #0066CC;
    border-radius: 16px;
    padding: 5px;
    width: 100%;
    margin: 0 auto;
}

.free-trial-btn {
    background-color: #0066CC;
    color: #fff;
    border: none;
    border-radius: 12px;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.25s;
    position: relative;
    overflow: hidden;
}

/* Glistening shimmer */
.free-trial-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(105deg,
            transparent 0%,
            rgba(255, 255, 255, 0.7) 50%,
            transparent 100%);
    transform: translateX(-120px) skewX(-15deg);
    animation: shimmer-slide 5s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
}

@keyframes shimmer-slide {
    0% {
        transform: translateX(-120px) skewX(-15deg);
    }

    25% {
        transform: translateX(500px) skewX(-15deg);
    }

    100% {
        transform: translateX(500px) skewX(-15deg);
    }
}

.free-trial-btn:hover,
.free-trial-btn:active {
    background-color: #0055b3;
}

.free-trial-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    line-height: 1.4;
    padding: 0 0.25rem;
    text-align: center;
    margin: 1.1rem 0 0 0 !important;
    /* Force margin to match connect section */
}

/* ═══════════════════════════
    STATUS BUTTON (Active Session)
    ═══════════════════════════ */
.status-container {
    display: none !important;
}

.status-btn {
    display: none !important;
}

/* Glistening/Shimmer effect for status button */
.status-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150px;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: glist-shimmer 3s infinite;
    pointer-events: none;
}

@keyframes glist-shimmer {
    0% { left: -150px; }
    30% { left: 100%; }
    100% { left: 100%; }
}

.status-btn:hover,
.status-btn:active {
    background: #077942 !important;
    transform: scale(0.98);
}

.status-text {
    display: none !important;
}


/* ═══════════════════════════
   FILTER BUTTON
═══════════════════════════ */
.filter-btn {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    /* SVG uses currentColor → inherits this */
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.filter-btn:hover,
.filter-btn:active {
    background: #f8f9fa;
    border-color: #0066CC;
}

/* Clear code button — only visible inside the desktop header */
.clear-code-btn {
    display: none;
}

/* ═══════════════════════════
   DESKTOP FILTER PANEL
═══════════════════════════ */
.desktop-filter-panel {
    display: none;
}

/* ═══════════════════════════
   TICKETS LAYOUT
═══════════════════════════ */
.layout-split {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.left-col {
    display: none;
}

.right-col {
    width: 100%;
    max-width: 100%;
    /* never wider than parent */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-x: hidden;
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tickets-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Loading skeleton (shown while API fetch is in progress) ── */
.ticket-skeleton {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 343 / 190;
    min-height: 140px;
    border-radius: 18px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s infinite;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Error state ── */
.tickets-error {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tickets-error__title {
    font-weight: 700;
    font-size: 1rem;
    color: #444;
    margin-top: 0.5rem;
}

.tickets-error__sub {
    font-size: 0.85rem;
}

.tickets-error__retry {
    margin-top: 1.25rem;
    padding: 0.7rem 1.8rem;
    background: #0066CC;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tickets-error__retry:hover {
    background: #0055b3;
}

/* ── Connect-code helper text ── */
.connect-code-helper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    line-height: 1.4;
    padding: 0 0.25rem;
    text-align: center;
    margin: 1.1rem 0 0 0 !important;
}

.connect-code-helper svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.ticket {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    position: relative;
    /* Aspect ratio fallback for Safari prior to SVG load */
    aspect-ratio: 343 / 190;
    /* DO NOT USE overflow: hidden HERE. It forces iOS Safari to rasterize SVGs into blurry bitmaps! */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    cursor: pointer;
    border-radius: 18px;
    background-color: transparent;
}

/* Ensure the SVG inside a ticket never exceeds the card width */
.ticket svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 18px;
    transform: translateZ(0);
}

@media (hover: hover) {

    /* ── Daily / Basic — Blue (default) ── */
    #daily-tickets .ticket:hover {
        transform: translateY(-10px) scale(1.04);
        filter: drop-shadow(0 20px 36px rgba(0, 102, 204, 0.50));
    }

    /* ── Weekly — Green #099250 ── */
    #weekly-tickets .ticket:hover {
        transform: translateY(-10px) scale(1.04);
        filter: drop-shadow(0 20px 36px rgba(9, 146, 80, 0.52));
    }

    /* ── Monthly — Purple #7B35E3 ── */
    #monthly-tickets .ticket:hover {
        transform: translateY(-10px) scale(1.04);
        filter: drop-shadow(0 20px 36px rgba(123, 53, 227, 0.50));
    }

    /* ── VIP — Gold #DC9D00 ── */
    #vip-tickets .ticket:hover {
        transform: translateY(-10px) scale(1.04);
        filter: drop-shadow(0 20px 36px rgba(220, 157, 0, 0.55));
    }
}

/* ── iOS AGGRESSIVE ANTI-BLUR FIX ── */
/* Apples GPU compositor rasterizes SVGs with 'filter', causing permanent blur. */
@supports (-webkit-touch-callout: none) {
    .ticket {
        filter: none !important;
    }

    @media (hover: hover) {
        #daily-tickets .ticket:hover {
            box-shadow: 0 20px 36px rgba(0, 102, 204, 0.35);
            filter: none !important;
        }

        #weekly-tickets .ticket:hover {
            box-shadow: 0 20px 36px rgba(9, 146, 80, 0.35);
            filter: none !important;
        }

        #monthly-tickets .ticket:hover {
            box-shadow: 0 20px 36px rgba(123, 53, 227, 0.35);
            filter: none !important;
        }

        #vip-tickets .ticket:hover {
            box-shadow: 0 20px 36px rgba(220, 157, 0, 0.35);
            filter: none !important;
        }
    }
}

/* ═══════════════════════════════════════════════════════
   DESKTOP LAYOUT  (≥ 768 px)
   • Header becomes a seamless navbar
   • Logo sits left, search + connect code right
   • Free Trial lives below navbar, centred
═══════════════════════════════════════════════════════ */
@media screen and (min-width: 768px) {

    /* ── Navbar: 3-column grid ──
       [logo]  |  [search — centred]  |  [connect + free-trial + filter]
    */
    .header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 0.85rem 2rem;
        border-bottom: 1px solid #F0F0F0;
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        gap: 1rem;
    }

    .header-logo {
        height: 50px;
        flex-shrink: 0;
    }

    /* header-controls spans cols 2+3 combined in the grid */
    .header-controls {
        display: contents;
        /* children participate in the grid directly */
    }

    /* Centre column: search */
    .header-search {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .header-search .search-bar-row {
        width: 100%;
        max-width: 460px;
    }

    .header-search .search-input {
        padding: 0.82rem 1.1rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    /* Right column: connect + free-trial + filter */
    .header-right {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        justify-content: flex-end;
    }

    /* Connect code inside header */
    .header-right .connect-code-border {
        flex: 0 1 200px;
        min-width: 140px;
    }

    .header-right .connect-code-input-wrap {
        padding: 0.72rem 0.9rem;
    }

    /* Clear code button — show on desktop */
    .clear-code-btn {
        display: inline-flex;
        align-items: center;
        align-self: stretch;
        /* match height of adjacent connect code border */
    }

    /* ── nav Free Trial wrapper ── */
    .nav-free-trial {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-free-trial .free-trial-border {
        width: auto;
        margin: 0;
    }

    .nav-free-trial .free-trial-btn {
        padding: 0.72rem 1.6rem;
        font-size: 0.95rem;
        border-radius: 11px;
        white-space: nowrap;
    }

    /* Tooltip — hidden by default, fades in on hover */
    .nav-free-trial-tip {
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%) translateY(-4px);
        background: #fff;
        border: 1px solid #E0E0E0;
        border-radius: 8px;
        padding: 5px 10px;
        font-size: 0.72rem;
        color: #555;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-weight: 500;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 200;
    }

    .nav-free-trial:hover .nav-free-trial-tip {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    /* ── Hide mobile-only elements on desktop ── */
    .mobile-search-section,
    .mobile-filter-btn {
        display: none;
    }

    .desktop-filter-panel {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        background: #f8f9fa;
        padding: 1.5rem;
        border-radius: 16px;
        border: 1px solid #E0E0E0;
    }

    /* Sticky wrapper that makes filter + ad carousel scroll with the page */
    .left-sticky {
        position: sticky;
        top: 82px;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .filter-title {
        font-family: 'Montserrat Alternates', sans-serif;
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-label {
        font-weight: 600;
        font-size: 0.95rem;
        color: #333;
    }

    /* ── Desktop sort/filter pills ── */
    .desktop-sort-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .sort-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.52rem 1rem;
        border-radius: 100px;
        border: 1.5px solid #E0E0E0;
        background: #fafafa;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.8rem;
        font-weight: 600;
        color: #444;
        cursor: pointer;
        transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.14s;
        white-space: nowrap;
    }

    .sort-pill:active {
        transform: scale(0.93);
    }

    /* Sort — Recent/Popular/Old active: blue */
    .sort-pill--recent.active,
    .sort-pill--popular.active,
    .sort-pill--old.active {
        background: #0066CC;
        border-color: #0066CC;
        color: #fff;
    }

    .sort-pill--recent:not(.active):hover,
    .sort-pill--popular:not(.active):hover,
    .sort-pill--old:not(.active):hover {
        border-color: #0066CC;
        color: #0066CC;
    }

    /* Category pills — colour per type */
    .sort-pill--all.active {
        background: #0066CC;
        border-color: #0066CC;
        color: #fff;
    }

    .sort-pill--daily.active {
        background: #0066CC;
        border-color: #0066CC;
        color: #fff;
    }

    .sort-pill--weekly.active {
        background: #099250;
        border-color: #099250;
        color: #fff;
    }

    .sort-pill--monthly.active {
        background: #7B35E3;
        border-color: #7B35E3;
        color: #fff;
    }

    .sort-pill--vip.active {
        background: #DC9D00;
        border-color: #DC9D00;
        color: #fff;
    }

    .sort-pill--all:not(.active):hover,
    .sort-pill--daily:not(.active):hover {
        border-color: #0066CC;
        color: #0066CC;
    }

    .sort-pill--weekly:not(.active):hover {
        border-color: #099250;
        color: #099250;
    }

    .sort-pill--monthly:not(.active):hover {
        border-color: #7B35E3;
        color: #7B35E3;
    }

    .sort-pill--vip:not(.active):hover {
        border-color: #DC9D00;
        color: #DC9D00;
    }

    /* ── Glistening blue "Clear" button beside connect code ── */
    .clear-code-btn {
        background: #0066CC;
        color: #fff;
        border: none;
        border-radius: 10px;
        padding: 0.72rem 1.2rem;
        font-size: 0.85rem;
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        position: relative;
        overflow: hidden;
        flex-shrink: 0;
        transition: background 0.2s;
    }

    .clear-code-btn::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 50px;
        height: 100%;
        background: linear-gradient(105deg,
                transparent 0%,
                rgba(255, 255, 255, 0.65) 50%,
                transparent 100%);
        transform: translateX(-80px) skewX(-15deg);
        animation: shimmer-slide 4s ease-in-out infinite;
        pointer-events: none;
    }

    .clear-code-btn:hover {
        background: #0055b3;
    }

    /* ── Layout split ── */
    .layout-split {
        flex-direction: row;
        gap: 2rem;
        padding-top: 0;
        align-items: flex-start;
    }

    .main-content {
        padding: 1.5rem 1.5rem 1.5rem;
    }

    .left-col {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 28%;
        padding-top: 0;
    }

    .right-col {
        width: 72%;
        padding-top: 0;
    }

    .tickets-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .tickets-grid>div {
        width: calc(50% - 0.75rem);
    }

    .section-title {
        text-align: center;
        grid-column: 1 / -1;
        margin-bottom: 1.5rem;
    }

    /* First section title lines up with the Filter heading */
    .right-col .ticket-section:first-child .section-title {
        padding-top: 1.25rem;
    }

    /* Give each section extra top breathing room so hovered cards never clip the title */
    .ticket-section {
        padding-top: 0.5rem;
    }

    /* Desktop always shows all sections — override JS mobile filter */
    .ticket-section.hidden-section {
        display: block;
    }


    /* ── Ad Carousel ── */
    .ad-carousel-wrap {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }

    .ad-carousel-label {
        font-size: 0.68rem;
        font-weight: 700;
        color: #bbb;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        padding-left: 2px;
    }

    .ad-carousel {
        width: 100%;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
    }

    .ad-track {
        display: flex;
        transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }

    .ad-slide {
        flex: 0 0 100%;
        width: 100%;
    }

    .ad-image {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 20px;
        object-fit: cover;
    }

    /* Dot indicator row */
    .ad-dots {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 6px;
        z-index: 5;
    }

    .ad-dot {
        width: 28px;
        height: 7px;
        border-radius: 4px;
        border: none;
        background: rgba(255, 255, 255, 0.45);
        cursor: pointer;
        padding: 0;
        transition: background 0.25s, width 0.25s;
    }

    .ad-dot.active {
        background: rgba(255, 255, 255, 0.92);
        width: 42px;
    }
}

/* ── Ad carousel hidden on mobile ── */
.ad-carousel-wrap {
    display: none;
}

@media screen and (min-width: 768px) {
    .ad-carousel-wrap {
        display: flex;
    }
}

/* ══════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
   • Floating pill nav — mobile only (< 768px)
   • White fade gradient above it
   • Fully hidden on desktop
══════════════════════════════════════════ */

/* ── White fade gradient that sits above the nav ── */
.mobile-nav-fade {
    display: none;
    /* hidden on mobile by default, shown via JS/class */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 130px;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.72) 40%,
            rgba(255, 255, 255, 0.96) 75%,
            rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
    z-index: 900;
}

/* ── Show fade only on mobile ── */
@media screen and (max-width: 767px) {
    .mobile-nav-fade {
        display: block;
    }
}

/* ── The floating pill container ── */
.mobile-bottom-nav {
    display: none;
    /* hidden on desktop */
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #0066CC;
    border-radius: 28px;
    padding: 8px 8px;
    gap: 0;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 32px);
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0, 102, 204, 0.38), 0 2px 8px rgba(0, 0, 0, 0.12);
    /* Entrance animation */
    animation: mnavSlideUp 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@media screen and (max-width: 767px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Add bottom padding to main content so last ticket isn't hidden behind nav */
    .main-content {
        padding-bottom: 100px;
    }
}

@keyframes mnavSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ── Each tab button ── */
.mnav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    min-height: 40px;
    border-radius: 20px;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    gap: 4px;
    position: relative;
}

.mnav-tab:active {
    transform: scale(0.90);
}

/* ── Active tab: white pill ── */
.mnav-tab--active {
    flex: 0 0 auto;
    /* let the active pill take natural width */
}

.mnav-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border-radius: 20px;
    padding: 8px 18px 8px 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.mnav-icon {
    flex-shrink: 0;
    display: block;
}

.mnav-label {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0066CC;
    letter-spacing: -0.01em;
}

/* ── Inactive tab: icon + small label ── */
.mnav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.mnav-icon-inactive {
    display: block;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.mnav-tab:hover .mnav-icon-inactive,
.mnav-tab:focus .mnav-icon-inactive {
    opacity: 1;
}

.mnav-label-inactive {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(120, 174, 228, 0.9);
    letter-spacing: 0.01em;
    margin-top: 0px;
    display: block;
}

/* ── Tab switch animation ── */
@keyframes mnavPillExpand {
    from {
        opacity: 0;
        transform: scale(0.82);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mnav-tab--active .mnav-pill {
    animation: mnavPillExpand 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Desktop: hide everything ── */
@media screen and (min-width: 768px) {

    .mobile-bottom-nav,
    .mobile-nav-fade {
        display: none !important;
    }

    .main-content {
        padding-bottom: 1.5rem;
    }
}

/* ══════════════════════════════════════════
   BONS PAGE STYLES
   Input field, button (Free Trial style),
   helper text, history section, empty state
══════════════════════════════════════════ */

/* ── Input field wrapper — white card with solid grey border, matching image design ── */
.bons-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #D0D0D0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    width: 100%;
    box-sizing: border-box;
    gap: 0.6rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.bons-input-wrapper:focus-within {
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.bons-input-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.5;
}

.bons-code-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #333;
    min-width: 0;
}

.bons-code-input::placeholder {
    color: #A8A8A8;
    font-weight: 400;
}

/* ── Submit button — identical to .free-trial-btn ── */
.bons-btn-border {
    border: 2px dashed #0066CC;
    /* same as .free-trial-border */
    border-radius: 16px;
    padding: 5px;
    width: 100%;
    margin: 1rem 0 0 0;
}

.bons-submit-btn {
    background-color: #c5d8f0;
    /* muted disabled colour */
    color: #fff;
    border: none;
    border-radius: 12px;
    /* same as .free-trial-btn */
    width: 100%;
    padding: 1rem;
    /* same as .free-trial-btn */
    font-size: 1.1rem;
    /* same as .free-trial-btn */
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
    transition: background-color 0.25s;
    letter-spacing: 0.01em;
}

/* Active/enabled state: same blue + shimmer as Free Trial */
.bons-submit-btn--active,
.bons-submit-btn:not([disabled]) {
    background-color: #0066CC;
    cursor: pointer;
}

.bons-submit-btn--active:hover,
.bons-submit-btn--active:active,
.bons-submit-btn:not([disabled]):hover,
.bons-submit-btn:not([disabled]):active {
    background-color: #0055b3;
}

/* Glistening shimmer — only when active (same as Free Trial) */
.bons-submit-btn--active::after,
.bons-submit-btn:not([disabled])::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(105deg,
            transparent 0%,
            rgba(255, 255, 255, 0.7) 50%,
            transparent 100%);
    transform: translateX(-120px) skewX(-15deg);
    animation: shimmer-slide 5s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
}

/* ── Helper text ── */
.bons-helper-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    margin: 1rem 0 0 0 !important;
}

/* ── Historique title — identical to .section-title (Billets Journaliers) ── */
.bons-history-title {
    font-size: 1.5rem;
    /* same as .section-title */
    font-family: 'Montserrat', sans-serif;
    /* same as .section-title (inherits from body) */
    font-weight: 700;
    /* bold like section title */
    color: #1a1a1a;
    /* same near-black */
    text-align: center;
    letter-spacing: -0.02em;
    /* same as .section-title */
    margin: 2rem 0 0 0;
    padding: 0;
}

/* ── Empty state ── */
.bons-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.8rem 0 0 0;
}

.bons-illustration {
    display: block;
    width: 240px;
    /* enlarged to balance page */
    height: auto;
    max-width: 80%;
    object-fit: contain;
}

.bons-empty-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: #AABDD1;
    margin: 0.8rem 0 0 0;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Desktop: hide bons page styles removed */

/* ══════════════════════════════════════════
   AIDE PAGE STYLES (Support / Contact form)
══════════════════════════════════════════ */

/* Subject input — same look as aide image */
.aide-subject-input {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #D0D0D0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    margin-bottom: 0.85rem;
    display: block;
}

.aide-subject-input::placeholder {
    color: #A8A8A8;
    font-weight: 400;
}

.aide-subject-input:focus {
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Message textarea wrapper */
.aide-textarea-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 0.85rem;
}

.aide-message-input {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #D0D0D0;
    border-radius: 12px;
    padding: 0.85rem 1rem 2rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #333;
    background: #fff;
    outline: none;
    resize: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    display: block;
}

.aide-message-input::placeholder {
    color: #A8A8A8;
    font-weight: 400;
}

.aide-message-input:focus {
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.aide-char-counter {
    position: absolute;
    bottom: 0.6rem;
    right: 0.9rem;
    font-size: 0.72rem;
    color: #B0B0B0;
    font-family: 'Montserrat', sans-serif;
    pointer-events: none;
}

/* Image upload component */
.aide-upload-wrap {
    width: 100%;
    margin-bottom: 0.6rem;
    /* reduced space between upload and submit button */
}

/* Drag & drop zone — dotted border, centred column layout */
.aide-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dotted #C8D6E5;
    border-radius: 14px;
    padding: 1.3rem 1rem;
    background: #F8FBFF;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    gap: 0.15rem;
    position: relative;
    overflow: hidden;
}

.aide-upload-zone:hover {
    border-color: #0066CC;
    background: #EEF4FF;
}

/* Drag-over state */
.aide-upload-zone--drag {
    border-color: #0066CC;
    background: #E0EDFF;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

/* Filled (image selected) state */
.aide-upload-zone--filled {
    border-color: #0066CC;
    border-style: solid;
    background: #EEF4FF;
}

.aide-upload-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0066CC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.aide-upload-subtext {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    color: #A0B0C4;
}

/* Thumbnail preview inside zone */
.aide-discard-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: transform 0.2s, background 0.2s;
}

.aide-discard-btn:active {
    transform: scale(0.9);
    background: #e04345;
}


.aide-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1.5px solid #C8D6E5;
}

/* Centred upload hint text */
.aide-upload-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #888;
    font-family: 'Montserrat', sans-serif;
    margin: 0.5rem 0 0 0;
    text-align: center;
}

/* Spacing utility for faded-separator inside aide page */
.aide-separator-spacing {
    margin: 1.2rem 0;
    /* equal breathing room above and below */
}


/* Submit button — matches free-trial-btn exactly */
.aide-submit-btn {
    background-color: #0066CC;
    color: #fff;
    border: none;
    border-radius: 12px;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color 0.25s;
    letter-spacing: 0.01em;
    margin-bottom: 1.4rem;
}

.aide-submit-btn:hover,
.aide-submit-btn:active {
    background-color: #0055b3;
}

/* Shimmer on submit */
.aide-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.7) 50%, transparent 100%);
    transform: translateX(-120px) skewX(-15deg);
    animation: shimmer-slide 5s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
}

/* Contact links */
.aide-contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.aide-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: #444;
    font-weight: 500;
}

.aide-whatsapp span {
    color: #128C7E;
    font-weight: 600;
}

.aide-whatsapp:hover span {
    text-decoration: underline;
}

/* Desktop: hide aide page styles removed */

.nav-icon-link:hover {
    color: #0066CC !important;
    transform: translateY(-2px);
}

.nav-icon-link:hover svg {
    stroke: #0066CC;
}

.dnav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #555;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 13px;
    min-width: 60px;
    padding: 5px;
    border-radius: 8px;
}

.dnav-tab:hover {
    background: #EEF4FF;
}

.dnav-tab--active .mnav-icon,
.dnav-tab--active .mnav-icon-wrap svg {
    transform: scale(1.15);
    filter: drop-shadow(0px 2px 4px rgba(0, 102, 204, 0.3));
}

.dnav-tab--active span {
    color: #0066CC !important;
    font-weight: 700;
}