/* Общие стили для видео-обложек записей */
.featured-video-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    line-height: 0;
    width: 100%;
    height: auto;
}

.featured-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Кнопка воспроизведения для записей */
.nstone-manual-play {
    position: absolute;
    top: 38px;
    right: 38px;
    z-index: 3;
    background: rgba(116, 143, 171, 0.24);
    color: #ffffff;
    font-size: 22px;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.nstone-manual-play:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nstone-manual-play::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -40px;
    bottom: -50px;
    left: -40px;
    background: transparent;
}

.nstone-manual-play::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* WooCommerce видео-обложка */
.wcfeat-video-wrapper {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    line-height: 0 !important;
    width: 100% !important;
    height: auto !important;
}

.wcfeat-video {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover !important;
}

/* Кнопка воспроизведения для WooCommerce */
.wcfeat-play-btn {
    position: absolute !important;
    top: 38px !important;
    right: 38px !important;
    z-index: 999 !important;
    background: rgba(255, 181, 209, 0.44) !important;
    color: #ffffff !important;
    font-size: 22px !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.wcfeat-play-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.wcfeat-play-btn::before {
    content: "" !important;
    position: absolute !important;
    top: -44px !important;
    right: -44px !important;
    bottom: -44px !important;
    left: -44px !important;
    background: transparent !important;
}

.wcfeat-play-btn::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15) !important;
    pointer-events: none !important;
}

/* Скрывать картинку товара, если уже есть видео-обложка */
.product-img:has(.wcfeat-video-wrapper) img {
    display: none !important;
    visibility: hidden !important;
}

/* Слайдер NSTONE */
.video-slider-nstone {
    width: 100%;
    max-width: 100%;
}

.video-slider-nstone .swiper-slide {
    text-align: center;
}

.video-slider-nstone .swiper-button-next,
.video-slider-nstone .swiper-button-prev {
    color: plum !important;
}

/* Обёртка видео внутри слайдера */
.nstone-slider-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.nstone-slider-video-wrapper .nstone-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    border-radius: 12px;
}

/* Отключение стандартных контролов */
.nstone-player::-webkit-media-controls,
.nstone-player::-moz-media-controls {
    display: none !important;
}

/* Иконка Play */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #ffffff;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 1;
}

/* Кнопка полноэкранного режима */
.fullscreen-btn {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 20px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 4;
}

/* Полоса прогресса */
.progress-bar-track {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: 3;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: plum;
    transition: width 0.1s linear;
}
