.media-preview {
    float: left;
    box-sizing: border-box;
    width: clamp(320px, 38vw, 620px);
    max-width: 100%;
    margin: 0 12px 12px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.media-stage {
    position: relative;
    background: transparent;
    box-sizing: border-box;
    padding: 12px 38px;
    height: clamp(260px, 42vh, 480px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.media-slide {
    display: none;
    text-align: center;
    width: 100%;
    height: 100%;
}
.media-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-slide a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}
.media-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border: 0;
}
.media-video-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-video-wrap iframe,
.media-video-wrap video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    object-fit: contain;
}
.media-video-hit-area {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
    text-indent: -9999px;
    overflow: hidden;
    background: transparent;
    cursor: zoom-in;
}
.media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 40px;
    border: 1px solid #003399;
    background: #ffffff;
    color: #003399;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    transition: all 200ms ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-nav:hover {
    background: #003399;
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}
.media-nav:active {
    transform: translateY(-50%) scale(0.96);
}
.media-nav.prev {
    left: 6px;
}
.media-nav.next {
    right: 6px;
}
.media-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    border-top: 1px solid #c7d8f3;
    background: transparent;
}
.media-thumb {
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #003399;
}
.media-thumb.active {
    border-color: #cc3300;
}
.media-thumb img {
    max-width: 60px;
    max-height: 60px;
}
.media-thumb-video {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    background: #0b1730;
}
.media-thumb-video img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    opacity: 0.82;
}
.media-thumb-video-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    background: linear-gradient(180deg, rgba(6, 14, 28, 0.12), rgba(6, 14, 28, 0.32));
}
.media-sale-badge {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translate(-50%, 0);
    margin: 0;
    z-index: 30;
    background-color: #ffffe0;
    border: 2px solid #003399;
    border-radius: 6px;
    padding: 8px 10px;
    color: #003399;
    display: flex;
    align-items: center;
    min-width: 260px;
}
.media-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 32, 0.88);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 180ms ease;
}
.media-modal.open {
    display: flex;
    opacity: 1;
}
.media-modal.closing {
    display: flex;
    opacity: 0;
}
.media-modal-frame {
    position: relative;
    width: min(94vw, 1320px);
    height: min(90vh, 900px);
    background: #ffffff;
    border: 1px solid #6c8ac8;
    overflow: hidden;
    transform: translateY(12px) scale(0.975);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
}
.media-modal.open .media-modal-frame {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.media-modal.closing .media-modal-frame {
    transform: translateY(12px) scale(0.975);
    opacity: 0;
}
.media-modal-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}
.media-modal-image {
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 1;
    transition: transform 160ms ease, opacity 160ms ease;
}
.media-modal-image.spring {
    transition-duration: 240ms;
    transition-timing-function: cubic-bezier(0.16, 1.18, 0.34, 1);
}
.media-modal-video-wrap {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 56px 64px 44px;
    box-sizing: border-box;
}
.media-modal-video-shell {
    width: min(100%, calc((90vh - 140px) * 16 / 9));
    height: min(100%, calc((94vw - 140px) * 9 / 16));
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
.media-modal-video-shell iframe,
.media-modal-video-shell video,
.media-modal-video-shell .media-video-wrap,
.media-modal-video-shell .media-video-wrap iframe,
.media-modal-video-shell .media-video-wrap video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border: 0;
}
.media-modal-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 3;
}
.media-modal-btn {
    border: 1px solid #9fb8ea;
    background: rgba(240, 246, 255, 0.95);
    color: #042b73;
    min-width: 34px;
    height: 30px;
    font-weight: bold;
    cursor: pointer;
}
.media-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 56px;
    border: 1px solid #9fb8ea;
    background: rgba(240, 246, 255, 0.95);
    color: #042b73;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3;
}
.media-modal-nav.prev {
    left: 10px;
}
.media-modal-nav.next {
    right: 10px;
}
.media-modal-counter {
    position: absolute;
    left: 12px;
    bottom: 10px;
    color: #d5e4ff;
    font-size: 11px;
    z-index: 3;
}
@media (max-width: 1000px) and (min-width: 769px) {
    .media-stage {
        height: clamp(240px, 36vw, 360px);
        aspect-ratio: auto;
        max-height: none;
    }
}
@media (max-width: 768px) {
    .media-preview {
        width: 100%;
        margin-right: 0;
    }
    .media-stage {
        height: clamp(220px, 52vw, 320px);
        aspect-ratio: auto;
        max-height: none;
        padding: 8px 20px;
    }
    .media-nav {
        width: 36px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 22px;
    }
    .media-nav.prev {
        left: 4px;
    }
    .media-nav.next {
        right: 4px;
    }
    .media-sale-badge {
        min-width: 0;
        width: calc(100% - 24px);
    }
}
@media (max-width: 520px) {
    .media-stage {
        height: clamp(180px, 64vw, 260px);
        aspect-ratio: auto;
        max-height: none;
        padding: 6px 16px;
    }
    .media-nav {
        width: 44px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        font-size: 24px;
    }
    .media-nav.prev {
        left: 2px;
    }
    .media-nav.next {
        right: 2px;
    }
    .media-modal-frame {
        width: 100vw;
        height: 100vh;
        border: 0;
    }
    .media-modal-nav {
        width: 48px;
        height: 68px;
        font-size: 32px;
    }
    .media-modal-btn {
        min-width: 52px;
        height: 44px;
        font-size: 20px;
    }
    .media-modal-counter {
        font-size: 10px;
    }
    .media-thumb {
        width: 72px;
        height: 72px;
    }
    .media-thumb img {
        max-width: 66px;
        max-height: 66px;
    }
}
