/* Видео в галерее товара.
   Скрипт галереи умел показывать видео с самого начала, но оформления
   для него не было: плеер растягивался и вылезал из блока. */

.product__thumb--video {
    position: relative;
}

.product__thumb--video img {
    filter: brightness(0.82);
}

/* Кружок с треугольником «плей» поверх обложки */
.product__thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.product__thumb-play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 52%;
    width: 0;
    height: 0;
    margin: -6px 0 0 -4px;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent var(--color-accent-primary, #6a3e3e);
}

/* Плеер внутри карточки товара — по размеру блока, без обрезки кадра */
.product__media-inner video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: inherit;
}

/* Плеер в полноэкранном просмотрщике */
.gallery-viewer__video {
    display: none;
    max-width: min(92vw, 1100px);
    max-height: 86vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    outline: none;
}

@media (max-width: 767px) {
    .gallery-viewer__video {
        max-width: 96vw;
        max-height: 74vh;
    }

    .product__thumb-play {
        width: 22px;
        height: 22px;
        margin: -11px 0 0 -11px;
    }

    .product__thumb-play::after {
        border-width: 5px 0 5px 8px;
        margin: -5px 0 0 -3px;
    }
}

/* Справочный пересчёт рядом с суммой к оплате */
.price-approx {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.82em;
    font-weight: 400;
    color: #7a7a7a;
    white-space: nowrap;
}

/* Товар, которого нет в наличии: кнопка неактивна */
.product__cart--disabled {
    background: #e6e2dc;
    color: #8a8178;
    border-color: #e6e2dc;
    cursor: not-allowed;
}

.product__cart--disabled:hover {
    background: #e6e2dc;
    color: #8a8178;
}

.product__oos-note {
    margin: 10px 0 0;
    color: #7a7a7a;
    max-width: 420px;
}
