/* Стили для модального окна кейсов мерча */

/* Модальное окно */

.modal-slider .f-carousel__thumbs {
	--f-thumb-width: 144px;
	--f-thumb-height: 173px;
    --f-thumb-border-radius: 0;
    --f-button-next-pos: -32px;
    --f-button-width: 28px;
    --f-button-height: 28px;
    overflow: visible;
    width: 100%;
}

#merch-cases-gallery .gallery__item {
    margin-right: 1px;
}

@media (min-width: 768px) {
	.modal-slider .f-thumbs__track {
		flex-direction: column;
	}
	.modal-slider .f-carousel__thumbs {
        width: auto;
		flex-direction: column;
		--f-thumb-width: 115px;
		--f-thumb-height: 171px;
	}
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    width: 998px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-body .f-thumbs.is-vertical {
    margin-right: 32px;
    flex: 1;
}
.modal-body .f-thumbs.is-vertical .f-thumbs__track {
    padding-left: 0;
    padding-right: 0px;
}

h3.modal-title {
    margin: 0;
    font-family: Acrom;
    font-weight: 500;
    font-size: 28px;
    line-height: 32px;
    color: #1C1C1E;
    margin-bottom: 32px;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 64px;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    gap: 32px;
}

.modal-content-info {
    flex-direction: column;
    flex: 1;
}
@media (min-width: 1024px) {
    .modal-content-info {
        width: none;
        min-width: 334px;
        max-width: 334px;
    }
}


.case-description {
    margin-bottom: 24px;
}

.case-description p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
}

/* Галерея изображений */
.case-gallery {
    margin-top: 24px;
}

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

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.lightbox-image-container {
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    color: white;
}

.lightbox-nav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.lightbox-nav:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lightbox-counter {
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95%;
    }


    .modal-title {
        font-size: 20px;
    }

    .modal-body {
        padding: 16px;
        max-height: 80vh;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .gallery-item img {
        height: 150px;
    }

    .lightbox-controls {
        gap: 16px;
    }

    .lightbox-nav {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-image-container {
        max-height: 70vh;
    }
}

/* Анимации */
.modal-overlay {
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-slider {
    display: flex;
    flex-direction: column;
    height: 300px;
}

@media (min-width: 768px) {
    .modal-slider {
        flex-direction: row-reverse;
    }
}

@media (min-width: 1024px) {
    .modal-slider {
        height: 533px;
    }
}



