/* Ticket System Custom CSS */

:root {
    --travel-color: #4e73df;
    --bus-color: #1cc88a;
    --train-color: #f6c23e;
    --flight-color: #e74a3b;
}

/* Category Cards */
.cat-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.cat-card.active {
    border: 2px solid var(--travel-color);
    background-color: #f8f9fc;
}

.cat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

/* Ticket Cards */
.ticket-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.ticket-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.ticket-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.ticket-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ticket-card:hover .ticket-img-wrapper img {
    transform: scale(1.1);
}

.ticket-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ticket-body {
    padding: 20px;
}

.ticket-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.route-point {
    text-align: center;
    flex: 1;
}

.route-time {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.route-place {
    font-size: 0.85rem;
    color: #888;
}

.route-arrow {
    color: #ccc;
    font-size: 1.2rem;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.seat-info {
    font-size: 0.9rem;
    color: #666;
}

.ticket-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--travel-color);
}

/* Seat Map */
.seat-map-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

/* Bus Layout 2-2 */
.seat-grid.layout-2-2 {
    grid-template-columns: repeat(5, 1fr); /* 2 seats, aisle, 2 seats */
}

.seat-grid.layout-2-2 .seat-item:nth-child(4n+3) {
    grid-column: 3; /* Aisle */
    visibility: hidden;
    pointer-events: none;
}

.seat-item {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border: 2px solid #e3e6f0;
    color: #5a5c69;
    position: relative;
}

.seat-item:hover:not(.disabled) {
    border-color: var(--travel-color);
    color: var(--travel-color);
    transform: scale(1.05);
}

.seat-item.selected {
    background: var(--travel-color);
    border-color: var(--travel-color);
    color: white;
}

.seat-item.disabled {
    background: #eaecf4;
    border-color: #eaecf4;
    color: #b7b9cc;
    cursor: not-allowed;
}

.seat-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-route {
        flex-direction: column;
        gap: 10px;
    }
    
    .route-arrow {
        transform: rotate(90deg);
    }
    
    .seat-grid {
        gap: 10px;
    }
}
