/* =========================================================
   Ambitus Ticketing – Frontend Ticket Selection
   Premium step-based responsive flow
   ========================================================= */

/* ---------- Reset & Layout ---------- */
html:has(.ticket-page),
html:has(.ticket-page) body {
    height: 100%;
    overflow: hidden;
}
html:has(.ticket-page) .container.mt-3,
html:has(.ticket-page) footer {
    display: none !important;
}
.ticket-page {
    display: flex;
    height: calc(100vh - 56px);
    background: #f0f2f5;
    overflow: hidden;
}

/* ---------- Right Panel (sidebar) ---------- */
.ticket-sidebar {
    order: 2;
    width: 340px;
    min-width: 340px;
    background: #fff;
    border-left: 1px solid #e8e8ec;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -2px 0 20px rgba(0,0,0,.04);
}
.ticket-main {
    order: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ---------- Panel: Event Hero ---------- */
.sidebar-hero {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
    flex-shrink: 0;
}
.sidebar-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .65;
}
.sidebar-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.25rem .85rem;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
    color: #fff;
}
.sidebar-hero-overlay h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .15rem;
    line-height: 1.3;
}
.sidebar-hero-overlay p {
    font-size: .8rem;
    margin-bottom: 0;
    opacity: .8;
}

/* ---------- Panel: Calendar ---------- */
.sidebar-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}
.sidebar-section h6 {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8c8c9e;
    margin-bottom: .75rem;
    font-weight: 600;
}
.session-calendar-section {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f0f0f4;
}
.cal-selected-header {
    background: linear-gradient(135deg, #1a1a2e, #2d2052);
    color: #fff;
    padding: .65rem .9rem;
    border-radius: .6rem;
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: .65rem;
    letter-spacing: .01em;
}
.cal-selected-header i {
    margin-right: .4rem;
    opacity: .65;
}

/* Change Date button (desktop dropdown toggle) */
.cal-change-btn {
    display: none; /* hidden on mobile, shown via media query */
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: .3rem .65rem;
    border-radius: 2rem;
    cursor: pointer;
    margin-left: auto;
    white-space: nowrap;
    transition: all .2s;
}
.cal-change-btn:hover {
    background: rgba(255,255,255,.25);
}
.cal-change-chevron {
    font-size: .55rem;
    margin-left: .2rem;
    transition: transform .25s;
}
.cal-dropdown-open .cal-change-chevron {
    transform: rotate(180deg);
}

/* Calendar dropdown body - on desktop hidden by default */
@media (min-width: 992px) {
    .cal-selected-header {
        display: flex;
        align-items: center;
        margin-bottom: 0;
    }
    .cal-change-btn {
        display: inline-flex;
        align-items: center;
    }
    .cal-dropdown-body {
        display: none;
        margin-top: .65rem;
    }
    .cal-dropdown-open .cal-dropdown-body {
        display: block;
    }
    .cal-dropdown-open .cal-selected-header {
        margin-bottom: .65rem;
    }
}

/* Calendar filter tabs */
.cal-filter-tabs {
    display: flex;
    gap: .35rem;
    margin-bottom: .6rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.cal-filter-tabs::-webkit-scrollbar { display: none; }
.cal-filter-btn {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #555;
    font-size: .7rem;
    font-weight: 500;
    padding: .3rem .6rem;
    border-radius: 2rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}
.cal-filter-btn:hover { background: #f5f5f7; }
.cal-filter-btn.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

/* Calendar grid */
.cal-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-bottom: .5rem;
}
.cal-month-label {
    font-weight: 700;
    font-size: .82rem;
    min-width: 140px;
    text-align: center;
    color: #1a1a2e;
}
.cal-nav-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: .8rem;
    padding: .25rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.cal-nav-btn:hover {
    background: #f0f0f4;
    color: #1a1a2e;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}
.cal-dow {
    text-align: center;
    font-size: .6rem;
    font-weight: 700;
    color: #999;
    padding: .25rem 0;
    text-transform: uppercase;
    letter-spacing: .03em;
}
#cal-days {
    display: contents;
}
.cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: .3rem .15rem;
    min-height: 44px;
    border: 2px solid transparent;
    border-radius: .4rem;
    text-decoration: none;
    color: #333;
    font-size: .75rem;
    transition: all .2s;
    cursor: default;
}
.cal-day-empty { min-height: 0; }
.cal-day-num {
    font-weight: 600;
    font-size: .72rem;
    line-height: 1;
    margin-bottom: .15rem;
}
.cal-day-info {
    font-size: .52rem;
    color: #aaa;
    line-height: 1.1;
    text-align: center;
}
.cal-day-time,
.cal-day-times {
    color: #555;
    font-weight: 500;
}
.cal-day-has-sessions {
    border-color: #28a745;
    cursor: pointer;
    background: rgba(40, 167, 69, .04);
}
.cal-day-has-sessions:hover {
    background: rgba(40, 167, 69, .1);
    transform: scale(1.04);
}
.cal-day-has-sessions .cal-day-time,
.cal-day-has-sessions .cal-day-times {
    color: #28a745;
    font-weight: 600;
}

/* Calendar: Sold out (red) */
.cal-day-sold-out {
    border-color: #dc3545;
    cursor: pointer;
    background: rgba(220, 53, 69, .06);
    opacity: .7;
}
.cal-day-sold-out:hover {
    background: rgba(220, 53, 69, .12);
    transform: scale(1.04);
    opacity: 1;
}
.cal-day-sold-out .cal-day-time,
.cal-day-sold-out .cal-day-times {
    color: #dc3545;
    font-weight: 600;
}
.cal-day-sold-out .cal-day-num { color: #dc3545; }

/* Calendar: Low availability (amber) */
.cal-day-low-avail {
    border-color: #f59e0b;
    cursor: pointer;
    background: rgba(245, 158, 11, .06);
}
.cal-day-low-avail:hover {
    background: rgba(245, 158, 11, .12);
    transform: scale(1.04);
}
.cal-day-low-avail .cal-day-time,
.cal-day-low-avail .cal-day-times {
    color: #d97706;
    font-weight: 600;
}
.cal-day-low-avail .cal-day-num { color: #b45309; }
.cal-day-selected {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef9e7, #fdf3d0);
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(245, 158, 11, .15);
}
.cal-day-selected:hover { background: #fdf3d0; }
.cal-day-selected .cal-day-time,
.cal-day-selected .cal-day-times {
    color: #d48806;
    font-weight: 700;
}

/* Time picker */
.cal-time-picker {
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px solid #eee;
}
.cal-time-label {
    font-size: .7rem;
    color: #888;
    margin-bottom: .3rem;
    font-weight: 600;
}
.cal-time-options {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}
.cal-time-opt {
    padding: .3rem .65rem;
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    font-size: .75rem;
    text-decoration: none;
    color: #333;
    transition: all .15s;
}
.cal-time-opt:hover {
    background: #f5f5f7;
    border-color: #bbb;
}
.cal-time-opt.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

/* ---------- Panel: Cart ---------- */
.sidebar-cart {
    padding: 1.1rem 1.25rem;
    background: #fafafe;
    border-top: 1px solid #f0f0f4;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sidebar-cart .cart-header {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8c8c9e;
    font-weight: 600;
    margin-bottom: .75rem;
}
.cart-items {
    font-size: .85rem;
    flex: 1;
    overflow-y: auto;
}
.cart-items .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
    border-bottom: 1px solid #f0f0f4;
}
.cart-item .remove-seat {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: .75rem;
    padding: 0 .25rem;
    opacity: .6;
    transition: opacity .15s;
}
.cart-item .remove-seat:hover { opacity: 1; }
.cart-totals {
    margin-top: .75rem;
    font-size: .85rem;
}
.cart-totals .total-row {
    display: flex;
    justify-content: space-between;
    padding: .2rem 0;
    color: #555;
}
.cart-totals .total-row.grand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a1a2e;
    border-top: 2px solid #1a1a2e;
    padding-top: .6rem;
    margin-top: .5rem;
}

/* Buy button in sidebar */
.sidebar-cart .btn-buy {
    margin-top: 1rem;
    padding: .75rem 2rem;
    font-size: .95rem;
    font-weight: 600;
    border-radius: .6rem;
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #1a1a2e, #2d2052);
    color: #fff;
    cursor: pointer;
    transition: all .2s;
    letter-spacing: .02em;
    position: relative;
    overflow: hidden;
}
.sidebar-cart .btn-buy:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26, 26, 46, .3);
}
.sidebar-cart .btn-buy:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.sidebar-cart .btn-buy i {
    margin-right: .5rem;
}

/* ---------- Main: Header Bar ---------- */
.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e8e8ec;
    flex-shrink: 0;
}
.map-header h4 {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a2e;
}
.map-header small {
    color: #8c8c9e;
}
.map-tabs {
    display: flex;
    gap: .4rem;
}
.map-tabs .tab-btn {
    padding: .4rem 1rem;
    border-radius: .5rem;
    font-size: .78rem;
    font-weight: 500;
    border: 1px solid #e0e0e6;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all .2s;
}
.map-tabs .tab-btn:hover {
    border-color: #aaa;
    background: #f8f8fc;
}
.map-tabs .tab-btn.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* ---------- Main: Price Legend ---------- */
.price-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .55rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e8e8ec;
    flex-shrink: 0;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    color: #555;
}
.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.legend-item.status .legend-swatch {
    border: 2px solid;
    box-shadow: none;
}

/* ---------- Main: Seat Map ---------- */
.seat-map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #e8eaed 0%, #dde0e5 100%);
    cursor: grab;
}
.seat-map-container.grabbing { cursor: grabbing; }
.seat-map-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Stage */
.stage-label {
    font-size: 16px;
    font-weight: 700;
    fill: #fff;
    text-anchor: middle;
    pointer-events: none;
    letter-spacing: 2px;
}
.stage-rect {
    rx: 6;
    ry: 6;
}

/* Seat nodes */
.seat-node circle {
    transition: r .12s ease, filter .12s ease;
}
.seat-node.seat-available:hover circle {
    r: 13;
    filter: brightness(1.15) drop-shadow(0 0 4px rgba(0,0,0,.2));
}
.seat-node.selected circle {
    stroke: #fff;
    stroke-width: 3;
    filter: drop-shadow(0 0 6px rgba(255,215,0,.6));
}

/* Seat fade-in animation */
.seat-node {
    opacity: 0;
    animation: seatFadeIn .3s ease forwards;
}
@keyframes seatFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
/* Large map: per-seat animation disabled, SVG container fades instead */
#seat-map-svg.no-seat-anim .seat-node {
    opacity: 1;
    animation: none;
}

/* Section labels */
.section-label {
    font-size: 13px;
    font-weight: 600;
    fill: #8c8c9e;
    text-anchor: middle;
    pointer-events: none;
}

/* ---------- Zoom Controls ---------- */
.zoom-controls {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    z-index: 10;
}
.zoom-controls button {
    width: 38px;
    height: 38px;
    border-radius: .6rem;
    border: 1px solid #d0d0d8;
    background: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    color: #333;
}
.zoom-controls button:hover {
    background: #f5f5f7;
    box-shadow: 0 3px 12px rgba(0,0,0,.12);
}

/* ---------- Tooltip ---------- */
.seat-tooltip {
    position: absolute;
    background: rgba(26, 26, 46, .92);
    color: #fff;
    padding: .45rem .75rem;
    border-radius: .5rem;
    font-size: .78rem;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .15s;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.seat-tooltip.visible { opacity: 1; }

/* ---------- Find Best Tickets Panel ---------- */
.best-tickets-panel {
    padding: 2rem 1.5rem;
    display: none;
    background: linear-gradient(180deg, #f5f5f8 0%, #ecedf2 100%);
}
.best-tickets-panel.active { display: block; }
.best-tickets-panel h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
}
.best-tickets-panel .ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem;
    background: #fff;
    border-radius: .6rem;
    margin-bottom: .65rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: box-shadow .15s;
}
.best-tickets-panel .ticket-row:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* ---------- Qty Selectors ---------- */
.qty-selector {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.qty-selector button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #d0d0d8;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    color: #333;
}
.qty-selector button:hover {
    background: #f0f0f4;
    border-color: #aaa;
}
.qty-selector .qty-val {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: .95rem;
}

/* ---------- Merch Panel ---------- */
/* ---------- GA Mode ---------- */
.ga-section {
    padding: 2rem 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    flex: 1;
    overflow-y: auto;
}

/* ---------- Buy Bar (hidden on desktop, mobile step nav uses it) ---------- */
.buy-bar {
    display: none;
}

/* =========================================================
   MOBILE STEP WIZARD
   ========================================================= */

/* ---------- Step Progress Indicator ---------- */
.step-progress {
    display: none;
}

/* ---------- Method Chooser ---------- */
.method-chooser {
    display: none;
}

/* ---------- Step Navigation (mobile only) ---------- */
.step-nav {
    display: none;
}

/* =========================================================
   RESPONSIVE: TABLET (≤991px)
   ========================================================= */
@media (max-width: 991px) {
    html:has(.ticket-page),
    html:has(.ticket-page) body {
        overflow: auto;
    }
    .ticket-page {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 56px);
        overflow: visible;
    }

    /* Step progress indicator */
    .step-progress {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: .6rem 1rem;
        background: #fff;
        border-bottom: 1px solid #e8e8ec;
        position: sticky;
        top: 0;
        z-index: 100;
        gap: 0;
    }
    .step-pip {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .15rem;
        background: none;
        border: none;
        cursor: pointer;
        padding: .2rem .4rem;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }
    .pip-num {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .72rem;
        font-weight: 700;
        background: #e8e8ec;
        color: #8c8c9e;
        transition: all .3s ease;
    }
    .pip-label {
        font-size: .6rem;
        font-weight: 600;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: .04em;
        transition: color .3s ease;
    }
    .pip-line {
        width: 28px;
        height: 2px;
        background: #e0e0e6;
        margin: 0 .15rem;
        margin-bottom: 14px;
        border-radius: 1px;
        transition: background .3s ease;
    }
    .step-pip.completed .pip-num {
        background: #28a745;
        color: #fff;
    }
    .step-pip.completed ~ .pip-line,
    .pip-line.completed {
        background: #28a745;
    }
    .step-pip.active .pip-num {
        background: #1a1a2e;
        color: #fff;
        box-shadow: 0 2px 8px rgba(26, 26, 46, .25);
        transform: scale(1.1);
    }
    .step-pip.active .pip-label {
        color: #1a1a2e;
    }

    /* Sidebar becomes full-width on mobile */
    .ticket-sidebar {
        order: unset;
        width: 100%;
        min-width: 0;
        border-left: none;
        box-shadow: none;
        overflow: visible;
    }
    .ticket-main {
        order: unset;
        min-height: 0;
    }

    /* Calendar compact on tablet */
    .sidebar-hero { height: 140px; }
    .sidebar-hero-overlay h3 { font-size: .95rem; }
    .sidebar-hero-overlay p { font-size: .75rem; }
    .sidebar-section { padding: .6rem .85rem; }
    .session-calendar-section { padding: .6rem .75rem; }
    .cal-selected-header { font-size: .72rem; padding: .5rem .7rem; }
    .cal-day { min-height: 38px; padding: .2rem .1rem; }
    .cal-day-num { font-size: .66rem; }
    .cal-day-info { font-size: .5rem; }
    .cal-time-opt { font-size: .68rem; padding: .2rem .5rem; }

    /* Map header compact */
    .map-header { padding: .5rem .85rem; }
    .map-header h4 { font-size: .88rem; }
    .price-legend { padding: .4rem .85rem; gap: .4rem; }
    .legend-item { font-size: .68rem; }
    .legend-swatch { width: 10px; height: 10px; }

    /* Seat map takes proper space */
    .seat-map-container {
        min-height: 55vh;
    }

    /* Step navigation */
    .step-nav {
        display: flex;
        padding: .75rem 1rem;
        gap: .5rem;
        background: #fff;
        border-top: 1px solid #e8e8ec;
    }
    .step-nav .btn-step {
        flex: 1;
        padding: .75rem 1rem;
        border-radius: .6rem;
        font-size: .88rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all .2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
    }
    .step-nav .btn-step-back {
        background: #f0f0f4;
        color: #555;
        flex: 0 0 auto;
        padding: .75rem 1.25rem;
    }
    .step-nav .btn-step-back:hover { background: #e4e4ea; }
    .step-nav .btn-step-next {
        background: linear-gradient(135deg, #1a1a2e, #2d2052);
        color: #fff;
    }
    .step-nav .btn-step-next:hover {
        box-shadow: 0 3px 12px rgba(26, 26, 46, .3);
    }

    /* Method chooser (mobile step 2) */
    .method-chooser {
        padding: 1.5rem 1.25rem;
        text-align: center;
        background: linear-gradient(180deg, #f8f8fc 0%, #f0f0f6 100%);
        min-height: 60vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .method-chooser h4 {
        font-size: 1.15rem;
        font-weight: 700;
        color: #1a1a2e;
        margin-bottom: .35rem;
    }
    .method-chooser .method-subtitle {
        font-size: .85rem;
        color: #8c8c9e;
        margin-bottom: 1.5rem;
    }
    .method-cards {
        display: flex;
        flex-direction: column;
        gap: .85rem;
        max-width: 380px;
        margin: 0 auto;
        width: 100%;
    }
    .method-card {
        background: #fff;
        border: 2px solid #e8e8ec;
        border-radius: .85rem;
        padding: 1.4rem 1.25rem;
        cursor: pointer;
        transition: all .25s ease;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        -webkit-tap-highlight-color: transparent;
    }
    .method-card:hover,
    .method-card:active {
        border-color: #1a1a2e;
        box-shadow: 0 4px 20px rgba(26, 26, 46, .1);
        transform: translateY(-2px);
    }
    .method-card .method-icon {
        width: 52px;
        height: 52px;
        border-radius: .7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        flex-shrink: 0;
    }
    .method-card.method-best .method-icon {
        background: linear-gradient(135deg, #fef3c7, #fde68a);
        color: #d97706;
    }
    .method-card.method-map .method-icon {
        background: linear-gradient(135deg, #dbeafe, #bfdbfe);
        color: #2563eb;
    }
    .method-card .method-text h5 {
        font-size: .95rem;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0 0 .15rem;
    }
    .method-card .method-text p {
        font-size: .78rem;
        color: #8c8c9e;
        margin: 0;
        line-height: 1.4;
    }

    /* Hide sidebar cart on mobile (shown only in review step) */
    .sidebar-cart { display: none; }

    /* Fixed buy button always visible at bottom on mobile when items in cart */
    .mobile-buy-bar {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 250;
        padding: .65rem 1rem;
        background: #fff;
        border-top: 1px solid #e0e0e6;
        box-shadow: 0 -4px 20px rgba(0,0,0,.1);
    }
    .mobile-buy-bar.has-items { display: block; }
    .mobile-buy-bar .btn-buy-mobile {
        width: 100%;
        padding: .75rem 2rem;
        font-size: .95rem;
        font-weight: 600;
        border-radius: .6rem;
        border: none;
        background: linear-gradient(135deg, #1a1a2e, #2d2052);
        color: #fff;
        cursor: pointer;
        transition: all .2s;
        letter-spacing: .02em;
    }
    .mobile-buy-bar .btn-buy-mobile:hover:not(:disabled) {
        box-shadow: 0 4px 16px rgba(26, 26, 46, .3);
    }
    .mobile-buy-bar .btn-buy-mobile:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

    /* ===== STEP VISIBILITY (SEATED EVENTS) ===== */

    /* Step 1: Date - show hero, calendar, step nav */
    body[data-step="1"] .ticket-main { display: none !important; }
    body[data-step="1"] .sidebar-cart { display: none !important; }
    body[data-step="1"] .sidebar-hero { display: block; }
    body[data-step="1"] .session-calendar-section { display: block; }

    /* Step 2 (seated): Method - show method chooser */
    body.is-seated[data-step="2"] .sidebar-hero { display: none !important; }
    body.is-seated[data-step="2"] .session-calendar-section { display: none !important; }
    body.is-seated[data-step="2"] .sidebar-cart { display: none !important; }
    body.is-seated[data-step="2"] .ticket-main { display: flex !important; }
    body.is-seated[data-step="2"] .map-header { display: none !important; }
    body.is-seated[data-step="2"] .price-legend { display: none !important; }
    body.is-seated[data-step="2"] .seat-map-container { display: none !important; }
    body.is-seated[data-step="2"] .best-tickets-panel { display: none !important; }
    body.is-seated[data-step="2"] .method-chooser { display: flex !important; }
    body.is-seated[data-step="2"] .ga-section { display: none !important; }

    /* Step 2 (GA): Tickets - show GA ticket selectors */
    body.is-ga[data-step="2"] .sidebar-hero { display: none !important; }
    body.is-ga[data-step="2"] .session-calendar-section { display: none !important; }
    body.is-ga[data-step="2"] .sidebar-cart { display: none !important; }
    body.is-ga[data-step="2"] .ticket-main { display: flex !important; }
    body.is-ga[data-step="2"] .method-chooser { display: none !important; }

    /* Step 3 (seated): Tickets - show map or best seats */
    body.is-seated[data-step="3"] .sidebar-hero { display: none !important; }
    body.is-seated[data-step="3"] .session-calendar-section { display: none !important; }
    body.is-seated[data-step="3"] .sidebar-cart { display: none !important; }
    body.is-seated[data-step="3"] .ticket-main { display: flex !important; }
    body.is-seated[data-step="3"] .method-chooser { display: none !important; }

    /* Step 3 (GA): Review & Buy - show cart */
    body.is-ga[data-step="3"] .ticket-main { display: none !important; }
    body.is-ga[data-step="3"] .sidebar-hero { display: none !important; }
    body.is-ga[data-step="3"] .session-calendar-section { display: none !important; }
    body.is-ga[data-step="3"] .method-chooser { display: none !important; }
    body.is-ga[data-step="3"] .sidebar-cart {
        display: flex !important;
        flex: 1;
        min-height: 50vh;
    }

    /* Step 4 (seated): Review & Buy - show cart */
    body.is-seated[data-step="4"] .ticket-main { display: none !important; }
    body.is-seated[data-step="4"] .sidebar-hero { display: none !important; }
    body.is-seated[data-step="4"] .session-calendar-section { display: none !important; }
    body.is-seated[data-step="4"] .method-chooser { display: none !important; }
    body.is-seated[data-step="4"] .sidebar-cart {
        display: flex !important;
        flex: 1;
        min-height: 50vh;
    }
    body[data-step="4"] .step-nav { display: flex; }

    /* Review step cart gets premium treatment */
    body.is-seated[data-step="4"] .sidebar-cart,
    body.is-ga[data-step="3"] .sidebar-cart {
        padding: 1.5rem;
        background: linear-gradient(180deg, #fafafe 0%, #f5f5f8 100%);
    }
    body.is-seated[data-step="4"] .sidebar-cart .cart-header,
    body.is-ga[data-step="3"] .sidebar-cart .cart-header {
        font-size: .85rem;
    }

    /* Ensure step nav shows on all steps */
    body[data-step="1"] .step-nav,
    body[data-step="2"] .step-nav,
    body[data-step="3"] .step-nav,
    body[data-step="4"] .step-nav { display: flex; }
}

/* =========================================================
   RESPONSIVE: PHONE (≤575px)
   ========================================================= */
@media (max-width: 575px) {
    .sidebar-hero { height: 110px; }
    .sidebar-hero-overlay { padding: .6rem .85rem; }
    .sidebar-hero-overlay h3 { font-size: .88rem; }
    .sidebar-hero-overlay p { font-size: .72rem; }

    .step-progress { padding: .5rem .5rem; }
    .pip-num { width: 26px; height: 26px; font-size: .68rem; }
    .pip-label { font-size: .55rem; }
    .pip-line { width: 20px; }

    .map-header {
        flex-direction: column;
        gap: .3rem;
        align-items: flex-start;
        padding: .4rem .75rem;
    }
    .map-header > div:first-child small { display: none; }
    .map-header h4 { font-size: .82rem; }
    .map-tabs { width: 100%; }
    .map-tabs .tab-btn {
        flex: 1;
        text-align: center;
        padding: .3rem .5rem;
        font-size: .7rem;
    }
    .map-tabs .tab-btn i { display: none; }

    .price-legend { padding: .3rem .5rem; gap: .3rem; }
    .legend-item { font-size: .62rem; gap: .2rem; }
    .legend-swatch { width: 8px; height: 8px; }

    .zoom-controls { bottom: .75rem; right: .75rem; }
    .zoom-controls button { width: 34px; height: 34px; font-size: .9rem; }

    /* Method chooser on phone */
    .method-chooser { padding: 1.25rem 1rem; min-height: 50vh; }
    .method-chooser h4 { font-size: 1.05rem; }
    .method-card { padding: 1.15rem 1rem; }
    .method-card .method-icon { width: 46px; height: 46px; font-size: 1.15rem; }

    /* Cart on step 4 */
    body[data-step="4"] .sidebar-cart { padding: 1.25rem 1rem; }

    /* Mobile cart drawer (for step 3 quick access) */
    .mobile-cart-drawer { display: block !important; }
}

/* ---------- Mobile Bottom Cart Drawer ---------- */
.mobile-cart-drawer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border-top: 1px solid #e0e0e6;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    max-height: 50vh;
    transition: transform .25s ease;
    border-radius: 1rem 1rem 0 0;
}
.mobile-cart-drawer.collapsed .cart-drawer-body {
    display: none;
}
.cart-drawer-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1rem;
    cursor: pointer;
    background: #fafafe;
    border-bottom: 1px solid #f0f0f4;
    -webkit-tap-highlight-color: transparent;
    font-size: .88rem;
    font-weight: 500;
}
.cart-drawer-handle .badge {
    font-size: .72rem;
}
.cart-drawer-body {
    padding: .6rem 1rem;
    overflow-y: auto;
    max-height: 35vh;
}

@media (max-width: 575px) {
    .buy-bar { display: none; }
}

/* =========================================================
   ANIMATIONS & POLISH
   ========================================================= */

/* Step transition */
@media (max-width: 991px) {
    .ticket-sidebar,
    .ticket-main {
        animation: stepFadeIn .3s ease;
    }
}
@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Seat button fallback */
.seat-btn {
    width: 36px;
    height: 36px;
    font-size: .7rem;
    padding: 2px;
}
.seat-btn.selected {
    background-color: #198754 !important;
    color: #fff !important;
}
