/* Premium Product Media Viewer — modular grid gallery */

.premium-media-viewer {
    width: 100%;
}

.premium-main-image-wrap {
    position: relative;
}

.premium-main-image {
    position: relative;
    display: block;
    width: 100%;
    background: #f7f7f7;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    text-decoration: none;
}

.premium-main-image__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.premium-brand-logo {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.premium-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-zoom-icon {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.media-zoom-icon::before,
.media-zoom-icon::after {
    content: '';
    position: absolute;
    background: #222;
    border-radius: 1px;
}

.media-zoom-icon::before {
    width: 14px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.media-zoom-icon::after {
    width: 2px;
    height: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.premium-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

@media (min-width: 992px) {
    .premium-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.premium-media-tile {
    display: block;
    position: relative;
    background: #f7f7f7;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    text-decoration: none;
    color: inherit;
}

.premium-media-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
    display: block;
}

.premium-media-tile:hover img {
    transform: scale(1.03);
}

.premium-description-tile,
.premium-360-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    text-align: center;
    padding: 16px;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
}

.premium-description-tile:hover,
.premium-360-tile:hover {
    color: #fff;
    background: #222;
}

.description-tile-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.premium-description-modal {
    max-width: 640px;
    padding: 24px;
    color: #222;
    line-height: 1.6;
}

.premium-description-modal p:last-child {
    margin-bottom: 0;
}

.premium-360-modal {
    width: min(90vw, 720px);
    min-height: 320px;
    padding: 16px;
    background: #111;
}

.premium-360-modal .js-product-360-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: min(70vh, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-360-modal__loader {
    color: #fff;
    font-size: 0.95rem;
}

.premium-360-modal .pdp-viewer-frame {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.premium-media-viewer__hidden {
    display: none !important;
}

@media (max-width: 767px) {
    .premium-main-image {
        border-radius: 12px;
    }

    .premium-brand-logo {
        width: 58px;
        height: 58px;
        top: 10px;
        right: 10px;
        border-radius: 10px;
        padding: 6px;
    }

    .media-zoom-icon {
        width: 36px;
        height: 36px;
        left: 10px;
        bottom: 10px;
    }

    .premium-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

[dir="rtl"] .premium-brand-logo {
    right: 16px;
    left: auto;
}

[dir="rtl"] .media-zoom-icon {
    left: 16px;
    right: auto;
}

@media (max-width: 767px) {
    [dir="rtl"] .premium-brand-logo {
        right: 10px;
    }

    [dir="rtl"] .media-zoom-icon {
        left: 10px;
    }
}
