/* =========================================
   SINGLE EVENT PAGE STYLES
   ========================================= */

.single-event-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    min-height: 80vh;
}

.event-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    /* Image takes slightly more space */
    gap: 3rem;
}

.event-gallery {
    position: relative;
}

.main-event-img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    object-fit: cover;
    max-height: 500px;
}

.event-meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.event-title {
    margin: 0;
    line-height: 1.2;
    font-size: 2rem;
}

.event-price,
.event-date {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

.event-price {
    color: #f1b863;
    font-weight: bold;
    font-size: 2rem;
}

.event-description h3,
.location-text h3 {
    font-size: 1.25rem;
    color: #333;
}

.event-description p {
    color: #666;
    line-height: 1.6;
}

/* Purchase Box (Sticky effect on Desktop) */
.purchase-box {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: #fafafa;
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 1rem;
}

.small-note {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.5rem;
}

/* Map Section */
.map-section {
    text-align: center;
}

.map-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.map-container {
    overflow: hidden;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .event-layout {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 2rem;
    }

    .event-title {
        font-size: 2rem;
    }

    .event-gallery {
        order: 1;
        /* Image first */
    }

    .event-details {
        order: 2;
        /* Text second */
    }
}

/* --- GALLERY STYLES --- */

.event-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Space between big image and thumbnails */
}

/* Main Image Wrapper */
.main-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.main-event-img {
    width: 100%;
    height: 100%;
    /* Fixed height for consistency */
    object-fit: cover;
    /* Ensures image fills box without stretching */
    display: block;
    transition: opacity 0.3s ease;
    /* Smooth fade effect */
}

/* Thumbnails Grid */
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 images per row */
    gap: 0.75rem;
}

.thumb-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Forces perfect square shape */
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.thumb-img:hover {
    opacity: 1;
    transform: scale(1.02);
}

/* Selected Thumbnail State */
.thumb-img.active {
    opacity: 1;
    border-color: #f1b863;
    /* Your Gold Brand Color */
    box-shadow: 0 2px 8px rgba(241, 184, 99, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .main-event-img {
        height: 300px;
        /* Slightly shorter on phone */
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        /* Optional: If you have many images, use 'flex' to make it scrollable sideways: */
        /* display: flex; overflow-x: auto; */
    }
}

.location-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.location-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* The Icon Wrapper */
.loc-icon {
    background-color: #fff4e0;
    /* Very light gold bg */
    color: #ca9c38;
    /* Darker gold text */
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Prevents icon squishing */
}

.loc-content {
    display: flex;
    flex-direction: column;
}

.loc-content strong {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.1rem;
}

.loc-content span,
.loc-content a {
    font-size: 0.9rem;
    line-height: 1.4;
}

.loc-content small {
    color: #999;
    font-size: 0.8rem;
}

/* Link Styling */
.map-link {
    text-decoration: none;
    transition: color 0.2s;
    color: #ca9c38;
}

.stock-message {
    min-height: 0;
}

/* =========================================
   ALWAYS VISIBLE PURCHASE BOX
   ========================================= */

@media (max-width: 768px) {
    .purchase-box {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background-color: #fff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        border-top: 1px solid #eee;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        /* Respect iPhone/Android Bottom Safe Areas */
        padding: 1rem 1.5rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        margin: 0;
        border-radius: 0;
    }

    .btn-buy-tickets {
        flex: 1;
        margin: 0;
    }

    .quantity-selector {
        margin: 0;
    }

    .small-note,
    .stock-message {
        display: none;
        /* Hide extra text on mobile */
    }
}