/**
 * İşletme detay — premium medya galerisi
 */

.media-gallery-section {
    overflow: hidden;
}

.media-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.media-gallery-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.media-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.media-tab {
    padding: 8px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #101B33;
    cursor: pointer;
    transition: 0.15s;
}

.media-tab:hover,
.media-tab.active {
    background: #FBF6EA;
    border-color: #C9A84C;
    color: #101B33;
}

.media-gallery-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 16px;
    align-items: stretch;
}

.media-main-wrap {
    min-width: 0;
}

.media-main {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 16 / 10;
    max-height: 420px;
    cursor: pointer;
}

.media-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-main-video-poster {
    position: relative;
    width: 100%;
    height: 100%;
}

.media-main-video-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.media-thumb {
    position: relative;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    background: #f3f4f6;
    aspect-ratio: 16/10;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-thumb.active,
.media-thumb:hover {
    border-color: #C9A84C;
}

.media-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 27, 51, 0.4);
    color: #fff;
    pointer-events: none;
}

.media-play-lg {
    font-size: 2.5rem;
}

.media-play i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.95);
    color: #101B33;
    border-radius: 50%;
    font-size: 1rem;
    padding-left: 3px;
}

.media-empty {
    text-align: center;
    padding: 48px 24px;
    background: #F8FAFC;
    border-radius: 18px;
    border: 1px dashed #E5E7EB;
    color: #6B7280;
}

.media-empty i {
    font-size: 2.5rem;
    color: #C9A84C;
    margin-bottom: 12px;
    display: block;
}

/* Modal */
.media-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.media-modal.is-open {
    display: flex;
}

.media-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 27, 51, 0.88);
}

.media-modal-content {
    position: relative;
    z-index: 1;
    width: min(92vw, 960px);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    box-sizing: border-box;
}

.media-modal-body {
    width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-modal-body img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    object-fit: contain;
}

.media-modal-body iframe {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 80vh;
    border: none;
    border-radius: 12px;
}

.media-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 2;
}

.media-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.media-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
}

.media-modal-nav:hover {
    background: rgba(201, 168, 76, 0.9);
    color: #101B33;
}

.media-modal-prev { left: 8px; }
.media-modal-next { right: 8px; }

.media-thumb.is-hidden {
    display: none;
}

@media (max-width: 992px) {
    .media-gallery-layout {
        grid-template-columns: 1fr;
    }

    .media-thumbnails {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
    }

    .media-thumb {
        width: 100px;
        flex-shrink: 0;
    }

    .media-main {
        max-height: 280px;
    }
}

@media (max-width: 576px) {
    .media-modal-content {
        padding: 40px 12px;
    }

    .media-modal-nav {
        width: 40px;
        height: 40px;
    }
}
