/* ═══════════════════════════════════════════
   TicketCloudz - Main Stylesheet
   ═══════════════════════════════════════════ */

:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #818CF8;
    --secondary: #0F172A;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --bg: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-dark: #0F172A;
    --text: #1E293B;
    --text-light: #64748B;
    --text-lighter: #94A3B8;
    --border: #E2E8F0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.95rem;
    cursor: pointer; border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none; line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #1e293b; color: #fff; }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn i { font-size: 0.9em; }

/* ── Flash Messages ── */
.flash-message {
    padding: 14px 0; font-weight: 500; font-size: 0.95rem;
    position: relative; z-index: 1000;
}
.flash-message .container { display: flex; align-items: center; justify-content: space-between; }
.flash-success { background: #D1FAE5; color: #065F46; }
.flash-warning { background: #FEF3C7; color: #92400E; }
.flash-error { background: #FEE2E2; color: #991B1B; }
.flash-info { background: #DBEAFE; color: #1E40AF; }
.flash-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: inherit; opacity: 0.7; }

/* ── Navbar ── */
.navbar {
    background: #fff; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow);
}
.navbar-inner {
    display: flex; align-items: center; gap: 24px;
    height: 72px;
}
.navbar-brand {
    font-size: 1.5rem; font-weight: 800; color: var(--secondary);
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    line-height: 0;
    overflow: visible;
}
.navbar-brand .navbar-logo {
    display: block;
    height: 38px;
    width: auto;
    max-height: 42px;
    /* Preserve full wordmark aspect (~5.25:1); avoid horizontal crop */
    max-width: min(260px, 52vw);
    object-fit: contain;
    object-position: left center;
}
.navbar-brand:hover .navbar-logo { opacity: 0.92; }
.footer-brand { margin-bottom: 12px; line-height: 0; overflow: visible; }
.footer-brand img {
    height: 42px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}
.navbar-search { flex: 1; max-width: 480px; }
.search-wrapper {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 50px; padding: 10px 20px;
    transition: all var(--transition);
}
.search-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.search-wrapper i { color: var(--text-light); }
.search-wrapper input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 0.9rem; color: var(--text);
    font-family: inherit;
}
.navbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-link {
    color: var(--text); font-weight: 500; padding: 8px 12px;
    border-radius: var(--radius-sm); transition: all var(--transition);
    font-size: 0.95rem; display: flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-link:hover { color: var(--primary); background: rgba(79,70,229,0.05); }
.cart-link { position: relative; }
.cart-badge {
    position: absolute; top: 0; right: 0;
    background: var(--danger); color: #fff;
    font-size: 0.7rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.nav-dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 100%;
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    min-width: 200px; padding: 8px 0; z-index: 200;
    margin-top: 8px;
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; color: var(--text); font-size: 0.9rem;
}
.dropdown-menu a:hover { background: var(--bg); color: var(--primary); }
.navbar-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text); }

/* ── Hero Section ── */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1E293B 50%, var(--primary-dark) 100%);
    padding: 80px 0 100px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 3.2rem; font-weight: 800; margin-bottom: 16px; line-height: 1.1; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.8); margin-bottom: 32px; }
.hero-search {
    display: flex; gap: 0; max-width: 560px; margin: 0 auto;
    border-radius: 50px; overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.hero-search input {
    flex: 1; padding: 18px 28px; border: none; outline: none;
    font-size: 1rem; font-family: inherit;
}
.hero-search button {
    padding: 18px 32px; background: var(--primary); color: #fff;
    border: none; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: background var(--transition);
    font-family: inherit;
}
.hero-search button:hover { background: var(--primary-dark); }
.hero-stats {
    display: flex; justify-content: center; gap: 48px;
    margin-top: 48px;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat-number { font-size: 2rem; font-weight: 800; }
.hero-stats .stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* ── Section Titles ── */
.section { padding: 60px 0; }
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px;
}
.section-header h2 { font-size: 1.8rem; font-weight: 700; }
.section-header a { font-weight: 600; }

/* ── Category Cards ── */
.categories-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.category-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; padding: 28px 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all var(--transition);
    text-align: center;
}
.category-card:hover {
    border-color: var(--primary); transform: translateY(-4px);
    box-shadow: var(--shadow-lg); color: var(--text);
}
.category-card i {
    font-size: 2rem; color: var(--primary);
    width: 64px; height: 64px; display: flex;
    align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(79,70,229,0.08);
}
.category-card h3 { font-size: 1rem; font-weight: 600; color: var(--text); }

/* ── Event Cards ── */
.events-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.event-card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border);
    transition: all var(--transition);
}
.event-card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.event-card-image {
    position: relative; height: 200px; overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.event-card-image img { width: 100%; height: 100%; object-fit: cover; }
.event-card-image .event-date-badge {
    position: absolute; top: 12px; left: 12px;
    background: #fff; border-radius: var(--radius-sm);
    padding: 6px 12px; text-align: center;
    box-shadow: var(--shadow);
}
.event-date-badge .month { font-size: 0.7rem; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.event-date-badge .day { font-size: 1.3rem; font-weight: 800; color: var(--text); line-height: 1; }
.event-card-image .event-category-badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 4px 12px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600;
    backdrop-filter: blur(4px);
}
.event-card-body { padding: 20px; }
.event-card-body h3 {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.event-card-body h3 a { color: inherit; }
.event-card-body h3 a:hover { color: var(--primary); }
.event-card-meta {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 0.85rem; color: var(--text-light);
    margin-bottom: 16px;
}
.event-card-meta span { display: flex; align-items: center; gap: 6px; }
.event-card-meta i { width: 16px; color: var(--primary-light); }
.event-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 16px; border-top: 1px solid var(--border);
}
.event-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.event-price small { font-size: 0.75rem; color: var(--text-light); font-weight: 400; }

/* ── Cities Grid ── */
.cities-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.city-card {
    position: relative; border-radius: var(--radius); overflow: hidden;
    height: 160px; display: flex; align-items: flex-end;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    transition: all var(--transition);
}
.city-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.city-card-content {
    width: 100%; padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}
.city-card-content h3 { font-size: 1.1rem; font-weight: 700; }
.city-card-content p { font-size: 0.8rem; opacity: 0.8; }

/* ── Page Header ── */
.page-header {
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    padding: 48px 0; color: #fff;
}
.page-header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.7); }
.breadcrumb { display: flex; gap: 8px; font-size: 0.85rem; margin-bottom: 12px; }
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ── Filters Bar ── */
.filters-bar {
    background: #fff; padding: 20px 0; border-bottom: 1px solid var(--border);
    position: sticky; top: 72px; z-index: 50;
}
.filters-inner {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.filter-group select, .filter-group input {
    padding: 10px 16px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.9rem;
    font-family: inherit; color: var(--text);
    background: #fff; cursor: pointer;
    min-width: 160px;
}
.filter-group select:focus, .filter-group input:focus {
    border-color: var(--primary); outline: none;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.results-count { margin-left: auto; color: var(--text-light); font-size: 0.9rem; }

/* ── Event Detail ── */
.event-hero {
    position: relative; min-height: 400px;
    display: flex; align-items: flex-end;
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    color: #fff; overflow: hidden;
}
.event-hero-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover; background-position: center;
    opacity: 0.3;
}
.event-hero-content {
    position: relative; width: 100%; padding: 60px 0 40px;
    background: linear-gradient(transparent, rgba(15,23,42,0.95));
}
.event-hero .event-status {
    display: inline-block; padding: 4px 12px;
    background: var(--success); border-radius: 50px;
    font-size: 0.8rem; font-weight: 600;
    margin-bottom: 12px;
}
.event-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; }
.event-hero-meta {
    display: flex; gap: 24px; flex-wrap: wrap;
    font-size: 0.95rem; color: rgba(255,255,255,0.8);
}
.event-hero-meta span { display: flex; align-items: center; gap: 8px; }
.event-hero-meta i { color: var(--primary-light); }

.event-detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding: 40px 0; }
.event-description { line-height: 1.8; color: var(--text); }
.event-description h2 { font-size: 1.4rem; margin-bottom: 16px; }
.event-description p { margin-bottom: 16px; }

/* ── Ticket Selector ── */
.ticket-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    position: sticky; top: 100px;
}
.ticket-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.ticket-option {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; border-bottom: 1px solid var(--border);
}
.ticket-option:last-of-type { border-bottom: none; }
.ticket-option-info h4 { font-size: 1rem; font-weight: 600; }
.ticket-option-info p { font-size: 0.85rem; color: var(--text-light); }
.ticket-option-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); text-align: right; }
.ticket-option-price small { display: block; font-size: 0.75rem; color: var(--text-light); font-weight: 400; }
.qty-selector {
    display: flex; align-items: center; gap: 12px; margin-top: 8px;
}
.qty-btn {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border); background: #fff;
    cursor: pointer; font-size: 1rem; display: flex;
    align-items: center; justify-content: center;
    transition: all var(--transition);
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-value { font-weight: 600; min-width: 24px; text-align: center; }

/* ── Seat Availability ── */
.seat-stats-bar {
    display: flex; justify-content: space-around;
    background: var(--bg); border-radius: var(--radius-sm);
    padding: 14px 8px; margin-bottom: 16px;
}
.seat-stat { text-align: center; }
.seat-stat-num { display: block; font-size: 1.4rem; font-weight: 800; }
.seat-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); }
.seat-progress-wrap {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.seat-progress-bar {
    flex: 1; height: 10px; background: var(--border);
    border-radius: 50px; overflow: hidden;
}
.seat-progress-fill {
    height: 100%; border-radius: 50px;
    transition: width 0.6s ease;
}
.seat-progress-label { font-size: 0.8rem; font-weight: 700; color: var(--text-light); white-space: nowrap; }

/* Venue Map */
.venue-map {
    background: #0F172A; border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px; overflow: hidden;
}
.venue-stage {
    text-align: center; color: rgba(255,255,255,0.8);
    font-size: 0.75rem; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(79,70,229,0.4), rgba(139,92,246,0.3));
    border: 1px solid rgba(79,70,229,0.4);
    border-radius: var(--radius-sm);
    padding: 10px; margin-bottom: 16px;
}
.venue-stage i { margin-right: 6px; }
.venue-sections {
    display: flex; flex-direction: column; gap: 10px;
}
.venue-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid var(--section-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    transition: all 0.2s ease;
    cursor: default;
}
.venue-section:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    border-left-color: var(--section-color);
}
.venue-section.sold-out {
    opacity: 0.5;
}
.venue-section-label {
    color: #fff; font-weight: 600; font-size: 0.85rem;
    margin-bottom: 8px;
}
.venue-section-seats {
    display: flex; flex-wrap: wrap; gap: 3px;
    margin-bottom: 8px;
}
.seat-dot {
    width: 8px; height: 8px; border-radius: 2px;
    display: inline-block; transition: all 0.15s ease;
}
.seat-dot.open {
    background: #10B981;
}
.seat-dot.sold {
    background: #EF4444;
}
.seat-dot.open:hover {
    transform: scale(1.6);
    box-shadow: 0 0 6px rgba(16,185,129,0.6);
}
.venue-section-info {
    display: flex; justify-content: space-between; align-items: center;
}
.venue-section-price {
    color: rgba(255,255,255,0.7); font-size: 0.85rem; font-weight: 600;
}
.venue-section-avail {
    font-size: 0.75rem; font-weight: 700; color: #10B981;
}
.venue-section-avail.text-soldout { color: #EF4444; }

/* Legend */
.seat-legend {
    display: flex; gap: 20px; justify-content: center;
    font-size: 0.8rem; color: var(--text-light);
}
.seat-legend-item {
    display: flex; align-items: center; gap: 6px;
}

/* Section Breakdown */
.section-breakdown-item {
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.section-breakdown-item:last-child { border-bottom: none; }
.section-breakdown-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.section-breakdown-header > div {
    display: flex; align-items: center; gap: 8px;
}
.section-color-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
}
.section-breakdown-footer {
    display: flex; justify-content: space-between;
    font-size: 0.8rem; color: var(--text-light);
    margin-top: 6px;
}

/* Sold-out ticket option */
.ticket-option.ticket-soldout {
    opacity: 0.5; pointer-events: none;
}

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-weight: 600; margin-bottom: 6px;
    font-size: 0.9rem; color: var(--text);
}
.form-control {
    width: 100%; padding: 12px 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.95rem; font-family: inherit; color: var(--text);
    transition: border-color var(--transition);
}
.form-control:focus {
    border-color: var(--primary); outline: none;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }
.form-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Auth Pages ── */
.auth-page {
    min-height: 80vh; display: flex; align-items: center;
    justify-content: center; padding: 40px 20px;
}
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 48px;
    width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; text-align: center; }
.auth-card .subtitle { text-align: center; color: var(--text-light); margin-bottom: 32px; }
.auth-card .divider {
    text-align: center; color: var(--text-lighter);
    margin: 24px 0; position: relative;
}
.auth-card .divider::before, .auth-card .divider::after {
    content: ''; position: absolute; top: 50%;
    width: 40%; height: 1px; background: var(--border);
}
.auth-card .divider::before { left: 0; }
.auth-card .divider::after { right: 0; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--text-light); }

/* ── Cart Page ── */
.cart-page { padding: 40px 0; }
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
    display: flex; gap: 20px; padding: 20px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); align-items: center;
}
.cart-item-image {
    width: 120px; height: 90px; border-radius: var(--radius-sm);
    overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-info p { font-size: 0.85rem; color: var(--text-light); }
.cart-item-actions { display: flex; align-items: center; gap: 16px; }
.cart-item-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.cart-item-remove {
    background: none; border: none; color: var(--text-lighter);
    cursor: pointer; font-size: 1.1rem; transition: color var(--transition);
}
.cart-item-remove:hover { color: var(--danger); }
.cart-summary {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    position: sticky; top: 100px; height: fit-content;
}
.cart-summary h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.cart-summary-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; font-size: 0.95rem;
}
.cart-summary-row.total {
    border-top: 2px solid var(--border); margin-top: 8px;
    padding-top: 16px; font-size: 1.1rem; font-weight: 700;
}
.promo-form { display: flex; gap: 8px; margin: 16px 0; }
.promo-form input { flex: 1; }
.promo-form button { white-space: nowrap; }

/* ── Checkout Page ── */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding: 40px 0; }
.payment-tabs { display: flex; gap: 0; margin-bottom: 24px; }
.payment-tab {
    flex: 1; padding: 16px; text-align: center;
    border: 2px solid var(--border); background: #fff;
    cursor: pointer; font-weight: 600; font-size: 0.95rem;
    transition: all var(--transition); font-family: inherit;
}
.payment-tab:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.payment-tab:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.payment-tab.active { border-color: var(--primary); background: rgba(79,70,229,0.05); color: var(--primary); }
.payment-tab i { margin-right: 8px; }
.payment-section { display: none; }
.payment-section.active { display: block; }
#card-element {
    padding: 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: #fff;
}

/* ── Order Confirmation ── */
.confirmation-page { text-align: center; padding: 60px 0; }
.confirmation-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--success); color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px; font-size: 2rem;
    animation: confirmPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes confirmPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.tickets-list { max-width: 600px; margin: 32px auto; text-align: left; }
.ticket-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    margin-bottom: 12px; display: flex;
    align-items: center; justify-content: space-between;
}
.ticket-code {
    font-family: 'Courier New', monospace;
    font-weight: 700; font-size: 1.1rem;
    color: var(--primary); letter-spacing: 1px;
}

/* ── Visual Tickets ── */
.ticket-cards-list { max-width: 620px; margin: 0 auto; }
.visual-ticket {
    display: flex; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); margin-bottom: 24px;
    overflow: hidden; border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: ticketAppear 0.5s ease-out both;
}
.visual-ticket:nth-child(1) { animation-delay: 0.1s; }
.visual-ticket:nth-child(2) { animation-delay: 0.2s; }
.visual-ticket:nth-child(3) { animation-delay: 0.3s; }
.visual-ticket:nth-child(4) { animation-delay: 0.4s; }
@keyframes ticketAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.visual-ticket:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); }
.visual-ticket-left {
    width: 180px; flex-shrink: 0; position: relative;
    background-size: cover; background-position: center;
    background-color: var(--primary);
}
.visual-ticket-left-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, rgba(15,23,42,0.85) 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 16px; color: #fff;
}
.visual-ticket-date {
    display: flex; flex-direction: column; align-items: center;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(4px);
    border-radius: var(--radius-sm); padding: 8px 12px;
    margin-bottom: 12px; align-self: flex-start;
}
.vtd-month { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; }
.vtd-day { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.vtd-year { font-size: 0.6rem; opacity: 0.7; }
.visual-ticket-event {
    font-size: 0.85rem; font-weight: 700; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.visual-ticket-divider {
    width: 24px; position: relative; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center;
}
.vt-notch {
    width: 24px; height: 12px; background: var(--bg);
    border-radius: 50%;
    position: absolute; left: 50%; transform: translateX(-50%);
    z-index: 1;
}
.vt-notch-top { top: -6px; }
.vt-notch-bottom { bottom: -6px; }
.vt-dashes {
    flex: 1; width: 0; margin: 14px 0;
    border-left: 2px dashed var(--border);
}
.visual-ticket-right {
    flex: 1; padding: 20px; display: flex;
    flex-direction: column; justify-content: space-between;
    min-width: 0;
}
.visual-ticket-details { margin-bottom: 16px; }
.vtd-row { display: flex; gap: 16px; margin-bottom: 10px; }
.vtd-field { flex: 1; min-width: 0; }
.vtd-label {
    display: block; font-size: 0.6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-lighter); margin-bottom: 2px;
}
.vtd-value {
    display: block; font-size: 0.85rem; font-weight: 600;
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.visual-ticket-barcode {
    border-top: 1px solid var(--border); padding-top: 12px;
    text-align: center;
}
.barcode-bars {
    display: flex; align-items: flex-end; justify-content: center;
    gap: 1px; height: 36px; margin-bottom: 6px;
}
.barcode-bars span {
    display: inline-block; background: var(--text);
    height: 100%; border-radius: 0.5px;
}
.barcode-bars span:nth-child(odd) { height: 80%; }
.barcode-bars span:nth-child(3n) { height: 60%; }
.barcode-text {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem; font-weight: 700;
    letter-spacing: 2px; color: var(--text);
}

/* Print styles */
@media print {
    .navbar, .site-footer, .page-header, .purchase-toast-container,
    .btn, .flash-message, .confirmation-icon, .mobile-nav { display: none !important; }
    main { padding: 0 !important; }
    .confirmation-page { padding: 10px 0 !important; }
    .confirmation-page > h1, .confirmation-page > p { display: none; }
    .visual-ticket {
        break-inside: avoid; page-break-inside: avoid;
        box-shadow: none !important; border: 2px solid #000 !important;
        margin-bottom: 16px !important;
    }
    .visual-ticket:hover { transform: none !important; }
    .visual-ticket-left { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .barcode-bars span { background: #000 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

@media (max-width: 640px) {
    .visual-ticket { flex-direction: column; }
    .visual-ticket-left { width: 100%; height: 140px; }
    .visual-ticket-divider { display: none; }
    .vtd-row { flex-direction: column; gap: 8px; }
}

/* ── Account Page ── */
.account-page { padding: 40px 0; }
.account-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.account-sidebar {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px;
    height: fit-content; position: sticky; top: 100px;
}
.account-sidebar a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    color: var(--text); font-weight: 500; font-size: 0.95rem;
}
.account-sidebar a:hover, .account-sidebar a.active {
    background: rgba(79,70,229,0.08); color: var(--primary);
}
.account-sidebar a i { width: 20px; }
.order-list { display: flex; flex-direction: column; gap: 16px; }
.order-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
}
.order-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.order-number { font-weight: 700; font-size: 1rem; }
.order-status {
    padding: 4px 12px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600;
}
.status-completed { background: #D1FAE5; color: #065F46; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-failed { background: #FEE2E2; color: #991B1B; }
.status-refunded { background: #E0E7FF; color: #3730A3; }

/* ── Empty State ── */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-light);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 1.3rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { margin-bottom: 24px; }

/* ── Pagination ── */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; margin-top: 40px;
}
.pagination a, .pagination span {
    padding: 10px 16px; border-radius: var(--radius-sm);
    font-weight: 500; font-size: 0.9rem;
    border: 1px solid var(--border); color: var(--text);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Footer ── */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 60px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h3 { color: #fff; font-size: 1.3rem; margin-bottom: 16px; }
.footer-col h3 span { color: var(--primary); }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col ul li a { color: rgba(255,255,255,0.6); }
.footer-col ul li a:hover { color: #fff; }
.footer-col ul li i { width: 20px; margin-right: 6px; color: var(--primary-light); }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.08); color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.social-links a:hover { background: var(--primary); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 0; margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}
.payment-icons { display: flex; gap: 12px; font-size: 1.5rem; color: rgba(255,255,255,0.4); }

/* ── SVG Placeholder ── */
.placeholder-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.5); font-size: 3rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.event-card-image img,
.cart-item-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.event-card:hover .event-card-image img { transform: scale(1.05); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .event-detail-grid { grid-template-columns: 1fr; }
    .ticket-card { position: static; }
    .checkout-grid { grid-template-columns: 1fr; }
    .cart-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .navbar-search { display: none; }
    .navbar-actions .nav-link:not(.cart-link) { display: none; }
    .navbar-actions .btn { display: none; }
    .navbar-actions .nav-dropdown { display: none; }
    .navbar-toggle { display: block; }

    .hero h1 { font-size: 2rem; }
    .hero-search { flex-direction: column; border-radius: var(--radius); }
    .hero-search input { border-radius: var(--radius-sm); }
    .hero-search button { border-radius: var(--radius-sm); }
    .hero-stats { gap: 24px; }
    .hero-stats .stat-number { font-size: 1.5rem; }

    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .cities-grid { grid-template-columns: repeat(2, 1fr); }
    .events-grid { grid-template-columns: 1fr; }

    .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

    .event-hero h1 { font-size: 1.8rem; }
    .event-hero-meta { flex-direction: column; gap: 8px; }

    .account-grid { grid-template-columns: 1fr; }
    .account-sidebar { position: static; }

    .auth-card { padding: 32px 24px; }

    .form-row { grid-template-columns: 1fr; }
    .filters-inner { flex-direction: column; align-items: stretch; }
    .results-count { margin-left: 0; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

    .cart-item { flex-direction: column; text-align: center; }
    .cart-item-actions { justify-content: center; }
}

/* ── Mobile Nav Overlay ── */
.mobile-nav {
    display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: #fff; z-index: 99; padding: 24px;
    flex-direction: column; gap: 8px;
    overflow-y: auto;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-sm);
    color: var(--text); font-weight: 500; font-size: 1.05rem;
}
.mobile-nav a:hover { background: var(--bg); color: var(--primary); }
.mobile-nav .mobile-search {
    margin-bottom: 16px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.mobile-nav .mobile-search .search-wrapper {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 50px; padding: 12px 20px;
}
.mobile-nav .mobile-search input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 1rem; font-family: inherit;
}

/* ── Purchase Toast Notifications ── */
.purchase-toast-container {
    position: fixed; bottom: 24px; left: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none; max-width: 380px;
}
.purchase-toast {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1);
    pointer-events: auto; cursor: pointer;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom left;
    text-decoration: none; color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative; overflow: hidden;
}
.purchase-toast:hover {
    transform: translateY(-2px); box-shadow: 0 16px 50px rgba(0,0,0,0.18);
    color: var(--text);
}
.purchase-toast::before {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: var(--primary);
    animation: toastTimer 3.5s linear forwards;
}
.purchase-toast.toast-leaving {
    animation: toastSlideOut 0.35s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}
.purchase-toast-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
    font-size: 0.95rem;
}
.purchase-toast-body { flex: 1; min-width: 0; }
.purchase-toast-title {
    font-size: 0.8rem; font-weight: 700; color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.purchase-toast-detail {
    font-size: 0.75rem; color: var(--text-light); line-height: 1.4;
}
.purchase-toast-detail strong { color: var(--primary); font-weight: 600; }
.purchase-toast-time {
    font-size: 0.65rem; color: var(--text-lighter);
    white-space: nowrap; flex-shrink: 0;
    align-self: flex-start; margin-top: 2px;
}
.purchase-toast-close {
    position: absolute; top: 6px; right: 8px;
    background: none; border: none; color: var(--text-lighter);
    cursor: pointer; font-size: 0.8rem; padding: 2px 4px;
    opacity: 0; transition: opacity 0.15s;
}
.purchase-toast:hover .purchase-toast-close { opacity: 1; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(-40px) scale(0.92); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(-60px) scale(0.9); }
}
@keyframes toastTimer {
    from { width: 100%; }
    to   { width: 0%; }
}

@media (max-width: 480px) {
    .purchase-toast-container {
        left: 12px; right: 12px; bottom: 12px; max-width: none;
    }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
