/**
 * Merch Gallery Modal Styles
 * Carousel-style modal for displaying membership merch items
 */

/* Prevent body scroll when modal is open */
body.merch-modal-open {
    overflow: hidden;
}

/* Modal Overlay */
.merch-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.merch-modal-overlay.active {
    opacity: 1;
}

/* Modal Container - Lightbox */
.merch-lightbox-container {
    background: #FFFFFF;
    border-radius: 16px;
    max-width: calc(100vw - 40px);
    width: auto;
    display: inline-flex;
    flex-direction: column;
    max-height: 95vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.merch-lightbox-container.is-loading {
    width: min(720px, calc(100vw - 40px));
    min-height: 420px;
    justify-content: center;
}

.merch-modal-overlay.active .merch-lightbox-container {
    transform: scale(1);
}

/* Close Button - Light Theme */
.merch-lightbox-container .merch-modal-close {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.merch-lightbox-container .merch-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Counter Badge */
.merch-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-family: "Outfit", Sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10;
}

/* Lightbox Body */
.merch-lightbox-body {
    padding: 20px;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Lightbox Main Area */
.merch-lightbox-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 1 auto;
    min-height: 260px;
}

/* Lightbox Image Container */
.merch-lightbox-image {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
    overflow: hidden;
    position: relative;
}

.merch-main-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* Navigation Buttons - Lightbox Style */
.merch-lightbox-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.merch-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #E2A422;
    transform: scale(1.1);
}

.merch-lightbox-nav:active {
    transform:  scale(1.1);
}

.merch-nav-prev {
    left: 12px;
}

.merch-nav-next {
    right: 12px;
}

/* Thumbnail Strip */
.merch-lightbox-thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
}

.merch-lightbox-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.merch-lightbox-thumbnails::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.merch-lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.merch-lightbox-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.merch-lightbox-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.merch-lightbox-thumb:hover {
    border-color: rgba(226, 164, 34, 0.5);
    transform: translateY(-2px);
}

.merch-lightbox-thumb.active {
    border-color: #E2A422;
    box-shadow: 0 4px 12px rgba(226, 164, 34, 0.3);
}

.merch-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Close Button */
.merch-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.merch-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Modal Header - Hidden */
.merch-modal-header {
    display: none;
}

/* Modal Body */
.merch-modal-body {
    padding: 40px 24px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Carousel Container */
.merch-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Carousel Main Area */
.merch-carousel-main {
    flex: 1;
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

/* Carousel Slides */
.merch-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    animation: fadeIn 0.3s ease;
    height: 100%;
    padding: 20px;
}

.merch-slide.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Merch Image */
.merch-image-wrapper {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: #0F172A;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merch-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Merch Counter */
.merch-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-family: "Outfit", Sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #F9FAFB;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Navigation Buttons */
.merch-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.merch-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.merch-nav-btn:active {
    transform: scale(0.95);
}

.merch-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carousel Indicators */
.merch-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.merch-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.merch-indicator.active {
    background: #E2A422;
    width: 32px;
    border-radius: 5px;
}

.merch-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Thumbnails - Hidden */
.merch-thumbnails {
    display: none;
}

/* Clickable Feature Styling */
.plan-features li[data-merch-modal] {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.plan-features li[data-merch-modal]:hover {
    color: #E2A422;
    transform: translateX(4px);
}

.plan-features li[data-merch-modal]::after {
    content: "Click Here To See";
    display: block;
    font-size: 14px;
    color: #C5B68D;
    margin-top: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.plan-features li[data-merch-modal]:hover::after {
    opacity: 1;
    color: #E2A422;
}

/* Responsive Design - Lightbox */
@media (max-width: 768px) {
    .merch-lightbox-body {
        padding: 50px 16px 16px;
    }

    .merch-lightbox-main {
        flex-direction: column;
        min-height: 400px;
        gap: 12px;
    }

    .merch-lightbox-image {
        max-height: 50vh;
    }

    .merch-main-image {
        max-height: 50vh;
    }

    .merch-lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .merch-lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .merch-lightbox-thumb {
        width: 60px;
        height: 60px;
    }

    .merch-lightbox-counter {
        font-size: 12px;
        padding: 6px 12px;
    }


    .merch-info p {
        font-size: 14px;
    }

    .merch-thumbnail {
        width: 80px;
        height: 80px;
    }

    .merch-thumbnail-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .merch-modal-overlay {
        padding: 10px;
    }

    .merch-modal-container {
        border-radius: 16px;
    }

    .merch-modal-header h2 {
        font-size: 20px;
    }

    .merch-carousel-main {
        min-height: 250px;
    }

    .merch-thumbnail {
        width: 70px;
        height: 70px;
    }
}
