
:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-light: #fff5f0;
    --secondary: #1a1a2e;
    --text: #333;
    --text-light: #666;
    --text-muted: #888;
    --border: #eee;
    --bg: #f0f2f5;
    --bg-light: #f8f9fa;
    --white: #fff;
    --danger: #ef4444;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 14px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

    /* Evitar que SweetAlert2 agregue padding al body (causa layout shift) */
    body.swal2-shown:not(.swal2-no-backdrop) {
        padding-right: 0 !important;
        overflow: hidden !important;
    }

    /* SweetAlert2 agrega la clase .swal2-height-auto al <body> con height:auto !important.
       Eso rompe el alto fijo del layout (100vh) y hace que el panel/carrito se encoja y
       "se mueva" al abrir el alert de confirmar compra. Forzamos el alto completo. */
    body.swal2-height-auto {
        height: 100vh !important;
    }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

[v-cloak] {
    display: none !important;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* ===== HEADER ===== */
.header {
    background: #ff5b00;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    z-index: 100;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 34px;
}

.event-info {
    border-left: 2px solid rgba(255,255,255,0.3);
    padding-left: 15px;
    max-width: 500px;
}

.event-name {
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-details {
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

    .event-details span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

.btn-exit {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--white);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .btn-exit:hover {
        background: var(--white);
        color: var(--primary);
    }

/* ===== LAYOUT ===== */
.main-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.map-section {
    flex: 1;
    position: relative;
    background: linear-gradient(180deg, #e8ecf1 0%, #d9dfe6 100%);
    overflow: hidden;
    min-height: 0;
}

.map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#svg-map {
    width: 100%;
    height: 100%;
    cursor: grab;
}

    #svg-map:active {
        cursor: grabbing;
    }

    #svg-map svg {
        width: 100%;
        height: 100%;
        display: block;
    }

/* ===== CONTROLES MAPA ===== */
.map-controls {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.map-btn {
    width: 38px;
    height: 38px;
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-light);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .map-btn:hover {
        background: var(--primary);
        color: var(--white);
        transform: scale(1.05);
    }

.btn-prices {
    display: none;
}

/* ===== MINIMAP ===== */
.minimap {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 180px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 10;
    border: 2px solid var(--primary);
}

.minimap-header {
    background: var(--primary);
    color: var(--white);
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.minimap-content {
    height: 106px;
    position: relative;
    background: var(--bg-light);
}

.minimap-svg {
    width: 100%;
    height: 100%;
    padding: 4px;
}

    .minimap-svg svg {
        width: 100% !important;
        height: 100% !important;
        display: block;
    }

.minimap-viewport {
    position: absolute;
    border: 2px solid var(--primary);
    background: rgba(255,107,53,0.25);
    pointer-events: none;
    border-radius: 2px;
    transition: all 0.1s ease-out;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: fixed;
    background: rgba(26,26,46,0.95);
    color: var(--white);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    max-width: 200px;
    opacity: 0;
    transition: opacity 0.2s;
}

    .tooltip.active {
        opacity: 1;
    }

.tooltip-header {
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tooltip-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.tooltip-price {
    color: var(--primary);
    font-weight: 600;
}

/* ===== LEYENDA ===== */
.legend {
    position: absolute;
    top: 12px;
    left: 60px;
    background: var(--white);
    padding: 8px 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 10;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 400px;
    cursor: pointer;
    transition: var(--transition);
}

    .legend:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-1px);
    }

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-light);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-price {
    font-weight: 600;
    color: var(--text);
}

/* ===== PANEL LATERAL ===== */
.panel {
    width: 360px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    z-index: 50;
    align-self: stretch;
    min-height: 100vh;
}

.panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary);
}

.panel-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 0.8fr 80px 32px;
    padding: 8px 14px;
    background: var(--bg-light);
    font-size: 9px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.cart-list {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr 0.8fr 80px 32px;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background 0.2s;
}

    .cart-item:hover {
        background: var(--primary-light);
    }

.cart-zone {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.cart-zone-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.cart-zone-name {
    font-weight: 600;
    font-size: 11px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-seat {
    font-size: 11px;
    color: var(--text-light);
}

.cart-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary);
}

.btn-delete {
    width: 24px;
    height: 24px;
    border: none;
    background: #fee2e2;
    color: var(--danger);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}

    .btn-delete:hover {
        background: var(--danger);
        color: var(--white);
    }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: #aaa;
}

    .empty-state i {
        font-size: 36px;
        margin-bottom: 10px;
        color: #ddd;
    }

    .empty-state p {
        font-size: 12px;
        text-align: center;
    }

/* ===== RESUMEN ===== */
.summary {
    border-top: 1px solid var(--border);
    padding: 14px;
    background: #fafbfc;
    flex-shrink: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    color: var(--text-light);
}

    .summary-row.total {
        border-top: 2px solid var(--border);
        margin-top: 8px;
        padding-top: 10px;
        font-size: 15px;
        font-weight: 700;
        color: var(--secondary);
    }

.btn-checkout {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary) 0%, #f7931e 100%);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-checkout:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255,107,53,0.4);
    }

    .btn-checkout:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.btn-promo {
    width: 100%;
    padding: 9px;
    background: transparent;
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: var(--transition);
}

    .btn-promo:hover {
        background: var(--primary-light);
    }

/* ===== LOADING ===== */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s;
}

/* ===== EXPIRED OVERLAY ===== */
.expired-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 20px;
    text-align: center;
}

.expired-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 20px;
}

.expired-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.expired-text {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 30px;
    max-width: 400px;
    line-height: 1.5;
}

.expired-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #f7931e 100%);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .expired-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255,107,53,0.4);
    }

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 12px;
    color: var(--text-light);
    font-size: 12px;
}

/* ===== MODALES ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

    .modal.active {
        opacity: 1;
        visibility: visible;
    }

.modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal.active .modal-box {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #f7931e 100%);
    color: var(--white);
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        font-size: 15px;
        font-weight: 700;
    }

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 22px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-seats .modal-header,
.modal-seats .modal-footer,
.modal-seats .seats-legend {
    flex-shrink: 0;
}

.btn-modal {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-modal-secondary {
    background: #f0f0f0;
    color: var(--text-light);
}

.btn-modal-primary {
    background: var(--primary);
    color: var(--white);
}

    .btn-modal-primary:hover {
        background: var(--primary-dark);
    }

/* ===== SELECTOR CANTIDAD ===== */
.qty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

.qty-btn {
    width: 42px;
    height: 42px;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .qty-btn:hover:not(:disabled) {
        background: var(--primary);
        color: var(--white);
    }

    .qty-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.qty-input {
    width: 65px;
    height: 46px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--secondary);
}

    .qty-input:focus {
        outline: none;
        border-color: var(--primary);
    }

.price-box {
    text-align: center;
    padding: 14px;
    background: var(--primary-light);
    border-radius: 10px;
}

.price-box-label {
    font-size: 11px;
    color: var(--text-muted);
}

.price-box-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
}

/* ===== MODAL ASIENTOS ===== */
.modal-seats .modal-box {
    width: 90vw;
    height: 90vh;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-seats-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.seats-stage {
    text-align: center;
    padding: 12px 15px;
    background: var(--secondary);
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.seats-grid {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-light);
    min-height: 0;
}

.seats-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    z-index: 5;
}

    .seats-loading p {
        margin-top: 15px;
        color: var(--text-light);
        font-size: 14px;
    }

#seatsSvgContainer {
    position: absolute;
    inset: 0;
    cursor: grab;
    touch-action: none;
}

    #seatsSvgContainer:active {
        cursor: grabbing;
    }

#seatsSvg {
    width: 100%;
    height: 100%;
    display: block;
}

.seat-circle {
    transition: all 0.15s ease;
}

    .seat-circle:hover {
        filter: brightness(1.3);
    }

.seat-available {
    fill: var(--secondary);
    cursor: pointer;
}

    .seat-available:hover {
        fill: #333;
    }

.seat-occupied {
    fill: #bdbdbd;
    cursor: not-allowed;
}

.seat-selected {
    fill: #048851;
    cursor: pointer;
}

    .seat-selected:hover {
        fill: #036b40;
    }

.seat-label {
    fill: var(--white);
    font-size: 7px;
    font-weight: 600;
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: central;
    font-family: 'Inter', sans-serif;
}

    .seat-label.occupied {
        fill: #777;
    }

.row-label {
    fill: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
    font-family: 'Inter', sans-serif;
}

.seat-tooltip {
    position: fixed;
    background: rgba(26,26,46,0.92);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    transform: translate(-50%, -100%);
}

    .seat-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: rgba(26,26,46,0.92);
    }

    .seat-tooltip.active {
        opacity: 1;
    }

.seat-tooltip-row {
    font-weight: 700;
    font-size: 13px;
}

.seat-tooltip-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    margin-top: 2px;
}

.seats-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.seats-ctrl-btn {
    width: 34px;
    height: 34px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-light);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

    .seats-ctrl-btn:hover {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

.seats-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 12px 15px;
    background: var(--white);
    border-top: 1px solid var(--border);
    font-size: 12px;
    flex-shrink: 0;
}

.seats-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seats-legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

    .seats-legend-dot.available {
        background: var(--secondary);
    }

    .seats-legend-dot.occupied {
        background: #bdbdbd;
    }

    .seats-legend-dot.selected {
        background: #048851;
    }

/* ===== MODAL PRECIOS ===== */
.modal-prices .modal-box {
    max-width: 500px;
    width: 95%;
}

.modal-prices .modal-body {
    padding: 0;
    max-height: 65vh;
    overflow-y: auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-light);
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

    .accordion-header:hover {
        background: #f0f1f3;
    }

    .accordion-header.active {
        background: var(--primary-light);
        border-left: 3px solid var(--primary);
    }

.accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary);
}

.accordion-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.accordion-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.accordion-icon {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    background: var(--white);
}

    .accordion-body.active {
        display: block;
    }

.localidad-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 12px 40px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

    .localidad-item:hover {
        background: var(--primary-light);
    }

    .localidad-item:last-child {
        border-bottom: none;
    }

.localidad-name {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .localidad-name i {
        color: #ccc;
        font-size: 10px;
    }

.localidad-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.localidad-tag {
    font-size: 10px;
    color: var(--text-muted);
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

/* ===== PRICING LIST (NON-PREMIUM) ===== */
.pricing-list-section {
    flex: 1;
    background: var(--bg);
    overflow-y: auto;
    padding: 20px;
}

.pricing-list-header {
    text-align: center;
    margin-bottom: 20px;
}

    .pricing-list-header h2 {
        font-size: 18px;
        font-weight: 700;
        color: var(--secondary);
        margin-bottom: 4px;
    }

    .pricing-list-header p {
        font-size: 12px;
        color: var(--text-muted);
    }

.pricing-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
}

.pricing-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

    .pricing-section-header:hover {
        background: #ebedf0;
    }

    .pricing-section-header.active {
        background: var(--primary-light);
        border-left: 3px solid var(--primary);
    }

.pricing-section-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pricing-section-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary);
    flex: 1;
}

.pricing-section-icon {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.pricing-section-header.active .pricing-section-icon {
    transform: rotate(180deg);
}

.pricing-section-body {
    display: none;
}

    .pricing-section-body.active {
        display: block;
    }

.pricing-loc-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    gap: 12px;
    transition: background 0.2s;
}

    .pricing-loc-item:last-child {
        border-bottom: none;
    }

    .pricing-loc-item:hover {
        background: var(--primary-light);
    }

.pricing-loc-info {
    flex: 1;
    min-width: 0;
}

.pricing-loc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.pricing-loc-type {
    font-size: 10px;
    color: var(--text-muted);
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.pricing-loc-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.pricing-loc-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

    .pricing-qty-btn:hover:not(:disabled) {
        background: var(--primary);
        color: var(--white);
    }

    .pricing-qty-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.pricing-qty-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
    min-width: 24px;
    text-align: center;
}

.pricing-loc-avail {
    font-size: 10px;
    color: #22c55e;
    margin-top: 2px;
}

    .pricing-loc-avail.low {
        color: #f59e0b;
    }

    .pricing-loc-avail.sold {
        color: var(--danger);
        font-weight: 600;
    }

@media (max-width: 768px) {
    .pricing-list-section {
        padding: 12px;
    }

    .pricing-loc-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .pricing-loc-price {
        font-size: 14px;
        min-width: auto;
    }

    .pricing-loc-qty {
        margin-left: auto;
    }
}

/* ===== SEAT HIGHLIGHT ON CART HOVER ===== */
.seat-circle.seat-highlight {
    filter: brightness(1.8) drop-shadow(0 0 6px #048851);
    stroke: #fff;
    stroke-width: 2;
}

/* ===== SVG STATES ===== */
.seccion {
    cursor: pointer;
    transition: opacity 0.2s, filter 0.2s;
}

    .seccion:hover {
        opacity: 0.8;
        filter: brightness(1.1);
    }

.disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ===== MODAL PRECIOS GRID ===== */
.modal-prices-grid .modal-box {
    max-width: 820px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-prices-grid .modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.pg-section {
    border-bottom: 1px solid var(--border);
}

.pg-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-light);
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

    .pg-section-header:hover {
        background: #ebedf0;
    }

    .pg-section-header.active {
        background: var(--primary-light);
        border-left: 3px solid var(--primary);
    }

.pg-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary);
}

.pg-section-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pg-section-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.pg-section-icon {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform 0.3s;
    width: 20px;
    text-align: center;
}

.pg-section-header.active .pg-section-icon {
    transform: rotate(45deg);
}

.pg-section-body {
    display: none;
    padding: 14px 18px;
    background: var(--white);
}

    .pg-section-body.active {
        display: block;
    }

.pg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.pg-card {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .pg-card:hover {
        border-color: var(--primary);
        background: var(--primary-light);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255,107,53,0.15);
    }

.pg-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pg-card-avail {
    font-size: 10px;
    color: var(--text-muted);
}

    .pg-card-avail span {
        color: #22c55e;
        font-weight: 600;
    }

    .pg-card-avail.low span {
        color: var(--danger);
    }

.pg-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.pg-card-type {
    font-size: 9px;
    color: var(--text-muted);
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    align-self: center;
}

.pg-card-disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(1);
}

.pg-card-avail.sold span {
    color: var(--danger);
    font-weight: 700;
}

/* ===== LOGIN MODAL ===== */
.login-form-group {
    margin-bottom: 14px;
}

    .login-form-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 5px;
    }

.login-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

    .login-form-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
    }

.login-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

    .login-error.visible {
        display: block;
    }

.btn-login-passwordless {
    display: block;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin-top: 10px;
    transition: var(--transition);
}

    .btn-login-passwordless:hover {
        background: var(--primary-light);
        border-color: var(--primary);
    }

.login-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .panel {
        width: 300px;
    }

    .event-details, .legend {
        display: none;
    }

    .btn-prices {
        display: flex;
    }

    .pg-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    html, body {
        height: auto;
        overflow: auto;
    }

    body {
        height: auto;
    }

    /* En móvil el body crece con el contenido; no forzar 100vh durante SweetAlert2. */
    body.swal2-height-auto {
        height: auto !important;
    }

    #app {
        height: auto;
        min-height: 100vh;
    }

    .header {
        height: 50px;
        padding: 0 12px;
    }

    .main-container {
        flex-direction: column;
        overflow: visible;
    }

    .map-section {
        flex: none;
        height: 65vh;
        height: 65dvh;
    }

    /* Sin mapa (no premium): la lista de Secciones y Precios fluye arriba del carrito
       y la página completa hace scroll, en lugar de colapsar dentro de un flex:1. */
    .pricing-list-section {
        flex: none;
        overflow: visible;
        width: 100%;
    }

    .panel {
        width: 100%;
        flex: none;
        max-height: none;
        border-top: 3px solid var(--primary);
        overflow: visible;
    }

    .cart-list {
        flex: none;
        overflow: visible;
    }

    .minimap {
        width: 130px;
        bottom: 8px;
        left: 8px;
    }

    .minimap-content {
        height: 71px;
    }

    .map-controls {
        top: 8px;
        left: 8px;
    }

    .map-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .modal-seats .modal-box {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: 100vw;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .modal-seats .modal-header {
        padding: 12px 14px;
    }

        .modal-seats .modal-header h3 {
            font-size: 13px;
        }

        .modal-seats .modal-header small {
            font-size: 11px;
        }

    .modal-seats .seats-stage {
        padding: 8px 12px;
        font-size: 11px;
    }

    .modal-seats .seats-legend {
        gap: 12px;
        padding: 8px 10px;
        font-size: 10px;
    }

    .modal-seats .seats-legend-dot {
        width: 12px;
        height: 12px;
    }

    .modal-seats .modal-footer {
        padding: 10px 14px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    .event-info {
        display: none;
    }

    .minimap {
        width: 110px;
    }

    .minimap-content {
        height: 56px;
    }

    .pg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .pg-card {
        padding: 10px 8px;
    }

    .pg-card-name {
        font-size: 11px;
    }

    .pg-card-price {
        font-size: 13px;
    }

    .modal-prices-grid .modal-box {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }
}