/* Event Detail Modal - Optimizado para móvil */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /* Mejoras para móvil */
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    touch-action: manipulation;
}

.modal-content {
    background: linear-gradient(145deg, #16213e, #0f3460);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    /* Mejoras para móvil */
    -webkit-overflow-scrolling: touch;
    will-change: transform;
    backface-visibility: hidden;
    position: relative;
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    /* Mejoras para móvil */
    min-height: 80px;
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #16213e, #0f3460);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    /* Mejoras móvil */
    word-wrap: break-word;
    line-height: 1.2;
    margin: 0;
    padding-right: 3rem;
    flex: 1;
}

.close {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    /* Mejoras táctiles */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.close:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

.close:active {
    transform: translateY(-50%) scale(0.9);
}

.modal-body {
    padding: 2rem;
    /* Mejoras móvil */
    -webkit-overflow-scrolling: touch;
}

.event-detail-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    margin-bottom: 2rem;
    /* Mejoras móvil */
    background-color: #2a2a4a;
    position: relative;
    overflow: hidden;
}

/* Loading placeholder para imágenes */
.event-detail-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Seating Chart */
.seating-section {
    margin: 2rem 0;
}

.seating-title {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    /* Mejoras móvil */
    text-align: center;
    word-wrap: break-word;
}

.venue-map {
    background: #2a2a4a;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    /* Mejoras móvil */
    position: relative;
    overflow: hidden;
}

.stage {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    color: #1a1a2e;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-weight: bold;
    font-size: 1.2rem;
    /* Mejoras móvil */
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.stage::before {
    content: '🎤';
    margin-right: 0.5rem;
}

.seating-zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.zone {
    background: rgba(255,255,255,0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Mejoras táctiles */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.zone:hover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.zone:active {
    transform: scale(0.95);
}

.zone.selected {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.zone.selected::before {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 8px;
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.2rem;
}

.zone-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #ffd700;
    /* Mejoras móvil */
    font-size: 0.9rem;
    line-height: 1.2;
}

.zone-price {
    font-size: 1.2rem;
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.zone-price::before {
    content: '$';
    font-size: 0.9rem;
}

.zone-price::after {
    content: " MXN";
    font-size: 0.9rem;
    color: #aaa;
}

.zone-available {
    font-size: 0.9rem;
    color: #aaa;
}

.zone-available::before {
    content: '👥 ';
}

/* Ticket Selection */
.ticket-selection {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    /* Mejoras móvil */
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ticket-selection h3 {
    /* Mejoras móvil */
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    /* Mejoras móvil */
    justify-content: center;
    flex-wrap: wrap;
}

.quantity-btn {
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Mejoras táctiles */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.quantity-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.quantity-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.quantity-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    min-width: 40px;
    text-align: center;
    /* Mejoras móvil */
    background: rgba(255, 215, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid #ffd700;
}

.add-to-cart-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8787);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    /* Mejoras táctiles */
    min-height: 54px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:active::before {
    width: 300px;
    height: 300px;
}

.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

.add-to-cart-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: linear-gradient(180deg, #16213e, #0f3460);
    z-index: 3000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    /* Mejoras móvil */
    -webkit-overflow-scrolling: touch;
    will-change: transform;
    backface-visibility: hidden;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Mejoras móvil */
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #16213e, #0f3460);
    z-index: 10;
    min-height: 80px;
}

.cart-title {
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: bold;
}

.cart-close {
    color: #aaa;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    /* Mejoras táctiles */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    touch-action: manipulation;
}

.cart-close:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

.cart-close:active {
    transform: scale(0.9);
}

.cart-items {
    padding: 1rem;
}

.cart-item {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    /* Mejoras móvil */
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
}

.cart-item-title {
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 0.5rem;
    /* Mejoras móvil */
    word-wrap: break-word;
    line-height: 1.2;
}

.cart-item-details {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    /* Mejoras móvil */
    word-wrap: break-word;
}

.cart-item-price {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-price::before {
    content: '$';
    font-size: 0.9rem;
}

.cart-item-price::after {
    content: " MXN";
    font-size: 0.9rem;
    color: #aaa;
}

.cart-item-remove {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    /* Mejoras táctiles */
    min-height: 32px;
    touch-action: manipulation;
}

.cart-item-remove:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.cart-item-remove:active {
    transform: scale(0.95);
}

.cart-total {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem;
    text-align: center;
    /* Mejoras móvil */
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    bottom: 80px;
}

.total-amount {
    color: #ffd700;
    font-size: 2rem;
    font-weight: bold;
    /* Mejoras móvil */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.checkout-btn {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    color: #1a1a2e;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: calc(100% - 2rem);
    margin: 1rem;
    /* Mejoras táctiles */
    min-height: 54px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    position: sticky;
    bottom: 1rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.checkout-btn:active {
    transform: scale(0.98);
}

/* Animaciones mejoradas */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-sidebar.open {
    animation: slideInRight 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    animation: fadeInUp 0.3s ease-out;
}

/* Estados de error y éxito */
.zone.unavailable {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff6b6b;
    cursor: not-allowed;
    opacity: 0.5;
}

.zone.unavailable:hover {
    transform: none;
    background: rgba(255, 0, 0, 0.1);
}

/* Mejoras para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .event-detail-image,
    .zone,
    .cart-item {
        border-width: 0.5px;
    }
}