/* ══════════════════════════════════════════════════════════════════════════════
   Kandy Esala Perahera — Global Stylesheet
   Theme: Royal Maroon + Metallic Gold + Cream
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
    --maroon:     #800020;
    --maroon-dark:#5a0016;
    --gold:       #FFD700;
    --gold-dark:  #c9a800;
    --cream:      #FDFBF7;
    --charcoal:   #1A1A24;
    --charcoal-2: #2c2c3a;
    --text-dark:  #2a1a1a;
    --border:     rgba(128,0,32,.2);
    --shadow:     0 4px 24px rgba(128,0,32,.15);
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

a { color: var(--maroon); }
a:hover { color: var(--maroon-dark); }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar-perahera {
    background: var(--charcoal) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.4);
    padding: .75rem 0;
}

.navbar-perahera .navbar-brand {
    color: var(--gold) !important;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .5px;
}

.navbar-perahera .brand-logo {
    height: 36px;
    width: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .navbar-perahera .brand-logo { height: 28px; width: 28px; }
}

.navbar-perahera .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    transition: color .2s;
}

.navbar-perahera .nav-link:hover,
.navbar-perahera .nav-link.active { color: var(--gold) !important; }

.navbar-perahera .btn-gold {
    background: var(--gold);
    color: var(--charcoal);
    font-weight: 700;
    border: none;
    border-radius: 6px;
    padding: .4rem 1.1rem;
    transition: background .2s, transform .1s;
}

.navbar-perahera .btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); }

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
    background: var(--charcoal);
    color: rgba(255,255,255,.65);
    padding: 2rem 0 1rem;
    margin-top: auto;
}

footer .footer-brand { color: var(--gold); font-weight: 700; font-size: 1.1rem; }

/* ── Hero Banner ───────────────────────────────────────────────────────────── */
.hero-banner {
    background: var(--charcoal);
    color: #fff;
    position: relative;
    overflow: hidden;
    height: 100vh;
    min-height: 460px;
    max-height: 700px;
}

@media (max-width: 768px) {
    .hero-banner {
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: 1536 / 813;
    }
}

.hero-banner .hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-banner .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,10,10,.15) 0%, rgba(20,10,10,.35) 60%, rgba(74,0,16,.75) 100%);
}

.hero-banner .hero-cta {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 2.5rem;
}

@media (max-width: 768px) {
    .hero-banner .hero-cta {
        padding-bottom: 1.25rem;
    }
    .hero-banner .hero-cta .btn {
        font-size: .85rem;
        padding: .5rem 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .hero-banner .hero-cta {
        padding-bottom: .75rem;
    }
    .hero-banner .hero-cta .btn {
        font-size: .75rem;
        padding: .4rem .9rem !important;
    }
}

.hero-banner h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
.hero-banner .gold-text { color: var(--gold); }
.hero-banner .lead { color: rgba(255,255,255,.8); }

/* ── Gold Divider ──────────────────────────────────────────────────────────── */
.gold-divider {
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    border-radius: 2px;
    margin: .75rem auto 1.5rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-maroon {
    background: var(--maroon);
    color: #fff;
    border: 2px solid var(--maroon);
    font-weight: 600;
    border-radius: 8px;
    padding: .55rem 1.4rem;
    transition: all .2s;
}

.btn-maroon:hover {
    background: var(--maroon-dark);
    border-color: var(--maroon-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(128,0,32,.35);
}

.btn-gold-solid {
    background: var(--gold);
    color: var(--charcoal);
    border: 2px solid var(--gold);
    font-weight: 700;
    border-radius: 8px;
    padding: .55rem 1.6rem;
    transition: all .2s;
}

.btn-gold-solid:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255,215,0,.35);
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card-perahera {
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    background: #fff;
}

.card-perahera:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(128,0,32,.22);
}

.card-perahera .card-header-gold {
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    color: #fff;
    padding: 1rem 1.25rem;
}

.card-perahera .card-header-gold .badge-gold {
    background: var(--gold);
    color: var(--charcoal);
    font-weight: 700;
    padding: .3rem .7rem;
    border-radius: 20px;
    font-size: .75rem;
}

/* ── Events Section (dark theme) ──────────────────────────────────────────── */
.events-section {
    position: relative;
    background: #100d0b;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255,215,0,.05) 0, transparent 3%),
        radial-gradient(circle at 80% 60%, rgba(255,215,0,.04) 0, transparent 3%),
        radial-gradient(circle at 45% 85%, rgba(255,215,0,.04) 0, transparent 2%),
        radial-gradient(circle at 65% 15%, rgba(255,215,0,.05) 0, transparent 2%);
    overflow: hidden;
}

.events-section::before,
.events-section::after {
    content: '';
    position: absolute;
    top: -20px;
    width: 200px;
    height: 200px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='none' stroke='%23FFD700' stroke-width='1'%3E%3Ccircle cx='40' cy='40' r='20'/%3E%3Ccircle cx='40' cy='40' r='32'/%3E%3Cpath d='M40 8 L40 72 M8 40 L72 40 M16 16 L64 64 M64 16 L16 64'/%3E%3C/g%3E%3C/svg%3E");
    opacity: .18;
    pointer-events: none;
}

.events-section::before { left: -30px; }
.events-section::after  { right: -30px; transform: scaleX(-1); }

.events-section .section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold);
}

.events-section .text-muted { color: rgba(255,255,255,.6) !important; }

.events-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(260px, 70%);
    margin: .9rem auto 1.5rem;
}

.events-divider::before,
.events-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold));
}

.events-divider::after { background: linear-gradient(to left, transparent, var(--gold)); }

.events-divider-glyph { color: var(--gold); font-size: .8rem; line-height: 1; }

/* ── Event Cards ───────────────────────────────────────────────────────────── */
.event-card {
    position: relative;
    background: #17130f;
    border: 1px solid rgba(255,215,0,.45);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.event-card:hover, .event-card.selected {
    border-color: var(--gold);
    box-shadow: 0 10px 32px rgba(255,215,0,.2);
    transform: translateY(-4px);
}

.event-card .event-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.event-card .sold-out-ribbon {
    position: absolute;
    top: 14px;
    right: -34px;
    width: 150px;
    transform: rotate(40deg);
    background: var(--maroon);
    color: #fff;
    text-align: center;
    font-weight: 800;
    font-size: .75rem;
    letter-spacing: 1px;
    padding: .3rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    z-index: 3;
}

.event-card .event-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transform: scale(1.05);
    transition: transform .4s;
    display: block;
}

.event-card:hover .event-img { transform: scale(1.12); }

.event-card .event-meta {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 1.25rem;
    margin-top: -28px;
}

.event-card .event-badge {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #17130f;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.event-card .event-title {
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: .2rem;
}

.event-card .event-date {
    color: var(--gold);
    font-weight: 600;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-card .event-body {
    position: relative;
    margin-top: auto;
    padding: 1rem 1.25rem 1.25rem;
}

.event-card .event-body p { color: rgba(255,255,255,.65) !important; }
.event-card .event-stats { color: rgba(255,255,255,.55); }

.events-section .step-label {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: .8rem;
    text-transform: uppercase;
}

.event-card .btn-gold-solid {
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: .85rem;
}

/* ── Seat Map ──────────────────────────────────────────────────────────────── */
.seat-map-container {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stage-banner {
    background: linear-gradient(90deg, var(--maroon), var(--maroon-dark));
    color: #fff;
    text-align: center;
    padding: .6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.seat-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}

.row-label {
    position: absolute;
    left: -3.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .7rem;
    font-weight: 700;
    color: var(--maroon);
    white-space: nowrap;
    text-align: right;
    width: 3rem;
}

.seat-btn {
    width: 48px;
    height: 48px;
    border-radius: 8px 8px 4px 4px;
    border: 2px solid transparent;
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.seat-btn::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background: inherit;
    filter: brightness(.7);
    border-radius: 0 0 3px 3px;
}

.seat-available {
    background: #22c55e;
    border-color: #16a34a;
    color: #fff;
}

.seat-available:hover {
    background: #16a34a;
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 4px 12px rgba(34,197,94,.4);
}

.seat-booked {
    background: #ef4444;
    border-color: #b91c1c;
    color: #fff;
    cursor: not-allowed;
    opacity: .75;
}

.seat-selected {
    background: var(--gold);
    border-color: var(--gold-dark);
    color: var(--charcoal);
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 4px 16px rgba(255,215,0,.5);
}

.seat-reserved {
    background: #a855f7;
    border-color: #7c3aed;
    color: #fff;
    cursor: not-allowed;
}

/* Legend */
.seat-legend {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 600;
}

.legend-dot {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* ── Price Info Panel ──────────────────────────────────────────────────────── */
.price-panel {
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    color: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}

.price-panel h5 { color: var(--gold); font-weight: 700; }

.hold-timer {
    background: rgba(255,215,0,.12);
    border: 1px solid rgba(255,215,0,.4);
    border-radius: 8px;
    padding: .6rem .8rem;
    font-size: .8rem;
    color: var(--gold);
    transition: background .3s, border-color .3s, color .3s;
}

.hold-timer.hold-timer-danger {
    background: rgba(239,68,68,.18);
    border-color: rgba(239,68,68,.6);
    color: #fecaca;
    animation: holdTimerPulse 1s infinite;
}

@keyframes holdTimerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

.price-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(255,255,255,.15);
    font-size: .88rem;
}

.price-row-item:last-child { border-bottom: none; }

.price-badge {
    background: rgba(255,215,0,.2);
    color: var(--gold);
    padding: .2rem .65rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: .8rem;
}

/* Selection summary */
.selection-summary {
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: 14px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.selected-seat-tag {
    display: inline-block;
    background: var(--gold);
    color: var(--charcoal);
    padding: .25rem .65rem;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    margin: .2rem;
}

.total-amount-display {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--maroon);
}

/* ── Stats Cards (Admin) ───────────────────────────────────────────────────── */
.stat-card {
    border-radius: 14px;
    padding: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: .85;
}

.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-card .stat-label { font-size: .8rem; opacity: .8; }

.stat-card.sc-maroon  { background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); }
.stat-card.sc-gold    { background: linear-gradient(135deg, #b8860b, #8b6914); }
.stat-card.sc-teal    { background: linear-gradient(135deg, #0d9488, #0f766e); }
.stat-card.sc-purple  { background: linear-gradient(135deg, #7c3aed, #5b21b6); }

/* ── Ticket / Confirmation ──────────────────────────────────────────────────── */
.ticket-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(128,0,32,.18);
    max-width: 700px;
    margin: 0 auto;
}

.ticket-header {
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.ticket-header .ref-badge {
    background: var(--gold);
    color: var(--charcoal);
    font-weight: 800;
    font-size: 1.1rem;
    padding: .4rem 1.2rem;
    border-radius: 8px;
    display: inline-block;
    margin-top: .5rem;
    letter-spacing: 1px;
}

.ticket-body { padding: 2rem; }

.ticket-divider {
    display: flex;
    align-items: center;
    position: relative;
    margin: 1.5rem 0;
}

.ticket-divider::before {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 8px, transparent 8px, transparent 14px);
}

.ticket-divider .circle-left, .ticket-divider .circle-right {
    width: 24px; height: 24px;
    background: var(--cream);
    border-radius: 50%;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ticket-info-item .label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--maroon);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ticket-info-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.qr-section {
    text-align: center;
    background: var(--cream);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.qr-section img { border-radius: 8px; }

/* ── Block Selector Tabs ────────────────────────────────────────────────────── */
.block-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.block-tab {
    padding: .35rem .75rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--text-dark);
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
}

.block-tab:hover { border-color: var(--maroon); color: var(--maroon); }
.block-tab.active {
    background: var(--maroon);
    border-color: var(--maroon);
    color: #fff;
}

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table-perahera thead {
    background: linear-gradient(90deg, var(--maroon), var(--maroon-dark));
    color: #fff;
}

.table-perahera thead th { font-weight: 600; border: none; padding: .9rem 1rem; }
.table-perahera tbody tr:hover { background: rgba(128,0,32,.05); }

/* ── Progress / Availability Bar ───────────────────────────────────────────── */
.avail-bar { height: 8px; border-radius: 4px; background: #e5e7eb; overflow: hidden; }
.avail-bar-fill { height: 100%; border-radius: 4px; transition: width .5s; }

/* ── Form Controls ──────────────────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px rgba(128,0,32,.15);
}

.form-label { font-weight: 600; color: var(--text-dark); }

/* ── Section Heading ────────────────────────────────────────────────────────── */
.section-heading {
    font-weight: 800;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--maroon);
}

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.text-gold  { color: var(--gold) !important; }
.text-maroon { color: var(--maroon) !important; }
.bg-maroon  { background: var(--maroon) !important; }
.border-gold { border-color: var(--gold) !important; }

/* ══════════════════════════════════════════════════════════════════════════════
   E-TICKET (v2) — boarding-pass style
   ══════════════════════════════════════════════════════════════════════════════ */

.eticket-wrap {
    max-width: 740px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(128,0,32,.2);
    border: 1px solid rgba(128,0,32,.12);
}

/* ── Header ── */
.eticket-header {
    position: relative;
    background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon) 60%, #a80030 100%);
    min-height: 120px;
    overflow: hidden;
}

.eticket-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .35;
    display: block;
}

.eticket-header-overlay {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 1.4rem 2rem 1rem;
}

.eticket-ref-badge {
    background: var(--gold);
    color: var(--charcoal);
    font-weight: 800;
    font-size: 1rem;
    padding: .4rem 1.1rem;
    border-radius: 8px;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.eticket-ornament {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 2px;
    opacity: .7;
}

/* ── Body (info + QR side-by-side) ── */
.eticket-body {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 0;
    padding: 1.75rem 2rem 1.5rem;
}

.eticket-info {
    padding-right: 1.5rem;
    border-right: 1px dashed var(--border);
}

.eticket-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem 1rem;
    margin-bottom: 1.1rem;
}

.eticket-label {
    font-size: .68rem;
    font-weight: 800;
    color: var(--maroon);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: .15rem;
}

.eticket-value {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

/* ── QR column ── */
.eticket-qr-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 1.5rem;
    text-align: center;
}

.eticket-qr-img {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    border: 3px solid var(--maroon);
    padding: 3px;
    background: #fff;
}

.eticket-qr-label {
    font-size: .65rem;
    font-weight: 800;
    color: var(--maroon);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: .6rem;
}

.eticket-qr-ref {
    font-size: .65rem;
    color: #888;
    margin-top: .2rem;
    word-break: break-all;
}

/* ── Tear line ── */
.eticket-tear {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 .5rem;
    margin: 0 -.5rem;
}

.eticket-dash-line {
    flex: 1;
    border-top: 2px dashed var(--border);
    margin: 0 .5rem;
}

.eticket-hole {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cream);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.eticket-hole.left  { margin-left: -14px; }
.eticket-hole.right { margin-right: -14px; }

/* ── Seats section ── */
.eticket-seats-section {
    padding: 1.4rem 2rem 1.5rem;
    background: #fafafa;
}

.eticket-seats-title {
    font-size: .85rem;
    font-weight: 800;
    color: var(--maroon);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.eticket-seats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.25rem;
}

.eticket-seat-chip {
    background: #fff;
    border: 2px solid var(--maroon);
    border-radius: 10px;
    padding: .45rem .9rem;
    text-align: center;
    min-width: 80px;
}

.chip-seat {
    font-size: 1rem;
    font-weight: 800;
    color: var(--maroon);
    line-height: 1;
}

.chip-row {
    font-size: .65rem;
    color: #888;
    margin-top: .1rem;
}

.chip-price {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: .1rem;
}

/* ── Total bar ── */
.eticket-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, var(--maroon), var(--maroon-dark));
    color: #fff;
    border-radius: 10px;
    padding: .8rem 1.25rem;
}

.eticket-total-label {
    font-weight: 700;
    font-size: .9rem;
    opacity: .9;
}

.eticket-total-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
}

/* ── Footer strip ── */
.eticket-footer-strip {
    background: linear-gradient(90deg, var(--charcoal), var(--charcoal-2));
    color: rgba(255,255,255,.75);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 2rem;
    font-size: .75rem;
    flex-wrap: wrap;
    gap: .5rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .eticket-body {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    .eticket-info {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px dashed var(--border);
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }
    .eticket-qr-col { padding-left: 0; }
    .eticket-field-row { grid-template-columns: 1fr; }
    .eticket-header-overlay { padding: 1rem; }
    .eticket-ref-badge { font-size: .8rem; padding: .3rem .7rem; }
    .eticket-seats-section { padding: 1rem; }
    .eticket-footer-strip { padding: .6rem 1rem; }
}

/* ── Print: Ticket ──────────────────────────────────────────────────────────── */
@media print {
    .navbar-perahera, footer, .no-print { display: none !important; }
    .ticket-card { box-shadow: none; }

    body { background: #fff !important; }
    .eticket-wrap {
        box-shadow: none !important;
        border: 2px solid #333 !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .eticket-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .eticket-total  { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .eticket-footer-strip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .eticket-seat-chip { break-inside: avoid; }
    .eticket-qr-img { width: 120px !important; height: 120px !important; }
}

/* ── Responsive Adjustments ─────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .seat-btn { width: 40px; height: 40px; font-size: .6rem; }
    .seat-row { gap: 7px; }
    .row-label { display: none; }
    .ticket-info-grid { grid-template-columns: 1fr; }
}
