:root {
    --primary: #0066cc;
    --primary-dark: #004b99;
    --accent: #f59e0b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ── Top Bar ── */
.top-bar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 100;
    padding: 12px 0;
}
.nav {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
.logo_ticket img{
    height: 120px;
}
.logo i { color: #2a5298; -webkit-text-fill-color: initial; }
.nav-links { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.nav-links a {
    text-decoration: none; font-weight: 500; color: #2c3e66;
    transition: color var(--transition); cursor: pointer;
}
.nav-links a:hover { color: var(--primary); }
.btn-outline {
    border: 1px solid var(--border); padding: 8px 20px;
    border-radius: 40px; background: white; font-weight: 600;
    transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
    background: var(--primary); color: white !important;
    padding: 8px 22px; border-radius: 40px; font-weight: 600;
    transition: background var(--transition);
}
.btn-primary:hover { background: var(--primary-dark); }

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #0b2b4a, #1a4a6e);
    padding: 64px 0 80px; color: white; margin-bottom: 48px;
    text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; font-weight: 800; }
.search-box {
    background: white; border-radius: 60px; padding: 6px 6px 6px 24px;
    display: inline-flex; gap: 12px; margin-top: 32px;
    max-width: 640px; width: 100%; box-shadow: var(--shadow-lg);
    position: relative;
}
.search-box input {
    flex: 1; border: none; padding: 14px 0; font-size: 1rem;
    outline: none; min-width: 180px;
}
.search-box button {
    background: var(--primary); border: none; padding: 12px 32px;
    border-radius: 50px; color: white; font-weight: 600; cursor: pointer;
    transition: background var(--transition);
}
.search-box button:hover { background: var(--primary-dark); }

/* ── Filtros (chips) ── */
.controls {
    display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; align-items: center;
}
.controls select {
    padding: 10px 16px; border-radius: 40px;
    border: 1px solid var(--border); background: white; font-weight: 500;
    cursor: pointer; transition: border var(--transition);
}
.controls select:focus { border-color: var(--primary); outline: none; }
.filters {
    display: flex; gap: 10px; margin: 24px 0 20px; flex-wrap: wrap;
}
.filter-chip {
    background: #eef2ff; padding: 8px 20px; border-radius: 40px;
    font-weight: 500; cursor: pointer; transition: all var(--transition);
    border: 1px solid transparent;
}
.filter-chip.active, .filter-chip:hover {
    background: var(--primary); color: white; border-color: var(--primary);
}

/* ── Grid de eventos ── */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px; margin: 32px 0 48px;
}
.event-card {
    background: var(--card-bg); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-md);
    transition: transform 0.25s, box-shadow 0.25s; cursor: pointer;
    border: 1px solid var(--border);
}
.event-card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow-lg);
}
.event-img {
    height: 200px; background-size: cover; background-position: center;
    position: relative; overflow: hidden;
}
.event-img img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.event-img .event-category {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    color: white; padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 500; z-index: 2;
}
.event-info { padding: 16px 20px 20px; }
.event-title {
    font-weight: 700; font-size: 1.15rem; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.event-meta {
    font-size: 0.8rem; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px; margin: 4px 0;
}
.price {
    font-weight: 800; font-size: 1.2rem; color: var(--primary);
    margin: 10px 0 8px;
}
.buy-btn {
    background: var(--primary); color: white; text-align: center;
    padding: 10px; border-radius: 40px; font-weight: 600;
    transition: background var(--transition); display: block; margin-top: 8px;
}
.buy-btn:hover { background: var(--primary-dark); }

/* ── Modal ── */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
    z-index: 1000; overflow-y: auto; padding: 40px 20px;
}
.modal-content {
    max-width: 1200px; margin: 0 auto; background: var(--card-bg);
    border-radius: var(--radius-lg); padding: 28px; position: relative;
    box-shadow: var(--shadow-lg);
}
.close-modal {
    position: absolute; top: 16px; right: 20px;
    font-size: 28px; cursor: pointer; color: var(--text-muted);
    transition: color var(--transition); z-index: 10;
}
.close-modal:hover { color: var(--text); }
.detail-layout { display: flex; flex-wrap: wrap; gap: 32px; }
.detail-info { flex: 1; min-width: 280px; }
.detail-info img {
    width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.seat-map-panel { flex: 1.2; min-width: 320px; }

/* ── Asientos ── */
.seat-grid {
    display: grid; gap: 6px; justify-content: center;
    grid-template-columns: repeat(14, 36px);
}
.seat {
    width: 36px; height: 36px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; color: white;
    cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.seat.occupied { background: #334155; opacity: 0.4; cursor: not-allowed; }
.seat.selected { background: #dc2626; transform: scale(1.1); box-shadow: 0 0 0 3px white; }

/* Zonas */
.seat.zone-vip       { background: #f59e0b; }
.seat.zone-palco     { background: #a855f7; }
.seat.zone-general   { background: #3b82f6; }
.seat.zone-tribuna   { background: #10b981; }
.seat.zone-accesible { background: #ec4899; }

/* ── Carrito / Pago ── */
.cart-section { background: #1e293b; margin: 1.5rem 0rem 0rem 0rem; border-radius: var(--radius-md); padding: 16px; color: white; }
.cart-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.cart-table th, .cart-table td { padding: 8px 4px; border-bottom: 1px solid #334155; text-align: left; }
.remove-seat { background: none; border: none; color: #ef4444; cursor: pointer; font-weight: bold; }
.cart-total { text-align: right; font-size: 1rem; margin-top: 12px; font-weight: 700; }
.pay-btn {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white; border: none; padding: 14px; border-radius: 40px;
    font-weight: 700; width: 100%; cursor: pointer; transition: opacity 0.2s;
    font-size: 1rem; margin-top: 16px;
}
.pay-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pay-btn:not(:disabled):hover { opacity: 0.9; }

/* ── Historial ── */
.history-panel { background: white; border-radius: var(--radius-lg); padding: 24px; margin-top: 40px; }
.history-item { border-bottom: 1px solid var(--border); padding: 16px 0; }

/* ── Footer ── */
footer {
    flex-shrink: 0;
    background: #0f172a;
    color: #cbd5e1;
    padding: 48px 0;
    text-align: center;
    margin-top: auto;
}

/* ── Loader ── */
.loader { text-align: center; padding: 40px; color: var(--primary); }
.no-results { text-align: center; padding: 60px; background: #f1f5f9; border-radius: var(--radius-lg); }

/* ── Sugerencias ── */
.suggestions-box {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-lg); margin-top: 8px;
    overflow: hidden; display: none; z-index: 200;
}
.suggestion-item {
    padding: 12px 20px; cursor: pointer; font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: #111;
    display: -webkit-box;
    transition: background 0.15s;
}
.suggestion-item:hover { background: #f1f5f9; }

/* ── Banner Mundial ── */
.wc-banner {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, #14532d, #16a34a);
    border-radius: 16px; padding: 16px 20px; margin-bottom: 24px;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
    color: white; box-shadow: 0 6px 20px rgba(22,163,74,0.3);
}
.wc-banner:hover { transform: scale(1.02); }
.wc-icon { font-size: 2.5rem; }
.wc-text { flex: 1; }
.wc-text strong { font-size: 1.2rem; }
.wc-text span { opacity: 0.9; font-size: 0.9rem; }
.wc-btn { background: #fbbf24; color: #14532d; padding: 8px 20px; border-radius: 30px; font-weight: 700; }

/* ── Badges de estado ── */
.badge {
    font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
    border-radius: 12px; display: inline-block; margin-top: 6px;
}
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-red    { background: #fee2e2; color: #dc2626; }
.badge-yellow { background: #fef9c3; color: #a16207; }

/* ── Artistas ── */
.artists-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.artist-chip {
    display: flex; align-items: center; gap: 6px;
    background: #1e293b; color: #e2e8f0; border-radius: 20px;
    padding: 4px 12px; font-size: 0.8rem;
}
.artist-chip img {
    width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
}

/* ── Mapa del recinto ── */
.venue-seatmap img { border-radius: var(--radius-md); max-height: 240px; object-fit: contain; }

/* ── Notas del evento ── */
.event-note {
    background: #1e293b; border-left: 3px solid #3b82f6;
    padding: 8px 12px; border-radius: 0 8px 8px 0;
    font-size: 0.78rem; color: #cbd5e1; margin: 6px 0;
}

/* ── Enlace a Ticketmaster ── */
.tm-link {
    display: inline-block; margin-top: 10px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff; text-decoration: none; padding: 9px 18px;
    border-radius: 24px; font-size: 0.84rem; font-weight: 600;
    transition: opacity 0.2s;
}
.tm-link:hover { opacity: 0.85; }

/* ── Leyenda de zonas ── */
.zone-legend { margin-top: 14px; }
.zone-legend h4 { font-size: 0.82rem; color: #94a3b8; margin-bottom: 6px; }
.legend-item { display: flex; align-items: center; gap: 7px; margin: 4px 0; font-size: 0.8rem; }
.legend-color { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.occupied-sample { background: #334155; }
.selected-sample { background: #dc2626; }

/* ── Etapa del escenario ── */
.stage-label {
    text-align: center; font-size: 0.72rem; color: #64748b;
    letter-spacing: 1px; padding: 6px;
    border: 1px dashed #334155; border-radius: 6px;
    margin-bottom: 8px;
}

/* ── Animaciones ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.event-card { animation: fadeInUp 0.4s ease forwards; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .detail-layout { flex-direction: column; }
    .seat-grid { grid-template-columns: repeat(10, 32px); }
    .seat { width: 32px; height: 32px; font-size: 0.55rem; }
}


/* ── Carrusel ── */
.featured-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 10px 0;
}
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.carousel-card {
    min-width: 100%;
    height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
}
.carousel-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 100%);
}
.carousel-card-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 32px;
    max-width: 600px;
}
.carousel-card-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.carousel-card-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 4px 0;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}
.carousel-btn:hover { background: rgba(255,255,255,0.4); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
}
.carousel-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.2s;
}
.carousel-dot.active { background: white; width: 24px; border-radius: 5px; }