.product-videos {
    padding: 40px 0;
    color: #1f1f1f;
}

/* Header */

.product-videos__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.product-videos__header h2 {
    margin: 0 0 5px;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 700;
}

.product-videos__header p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.product-videos__count {
    flex-shrink: 0;
    padding: 7px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    color: #666;
    background: #fafafa;
    font-size: 12px;
}

/* Layout */

.product-videos__content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 28px;
    align-items: start;
}

/* Main video */

.product-videos__main {
    min-width: 0;
}

.product-videos__player {
    display: flex;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: #111;
}

.product-videos__player video {
    display: block;
    width: 100%;
    height: min(620px, 72vh);
    object-fit: contain;
    background: #111;
}

/* Video information */

.product-videos__info {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 15px 2px 5px;
}

.product-videos__number {
    flex-shrink: 0;
    color: #f10c33;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.product-videos__info h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
}

/* Gallery */

.product-videos__gallery {
    min-width: 0;
}

.product-videos__gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.product-videos__gallery-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.product-videos__gallery-header span {
    color: #999;
    font-size: 12px;
}

.product-videos__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
    max-height: 600px;
    overflow-y: auto;
    padding: 2px;
}

/* Card */

.product-videos__item {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    color: inherit;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.product-videos__thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #eee;
    transition:
        border-color .2s ease,
        transform .2s ease;
}

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

.product-videos__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    transform: translate(-50%, -50%);
    transition:
        background .2s ease,
        transform .2s ease;
}

.product-videos__play svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Selected */

.product-videos__item[aria-pressed="true"] .product-videos__thumb {
    border-color: #f10c33;
}

.product-videos__item:hover .product-videos__thumb {
    transform: translateY(-2px);
}

.product-videos__item:hover .product-videos__play {
    background: #f10c33;
    transform: translate(-50%, -50%) scale(1.05);
}

.product-videos__item:focus-visible .product-videos__thumb {
    outline: 2px solid #f10c33;
    outline-offset: 3px;
}

/* Title */

.product-videos__item-title {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
    color: #555;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Message */

.product-videos__message {
    margin: 10px 0 0;
    color: #a33116;
    font-size: 13px;
}

.product-videos__message[hidden] {
    display: none;
}

/* Mobile */

@media (max-width: 700px) {

    .product-videos {
        padding: 30px 0;
    }

    .product-videos__header {
        align-items: flex-start;
    }

    .product-videos__header h2 {
        font-size: 21px;
    }

    .product-videos__content {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .product-videos__player video {
        height: auto;
        max-height: 70vh;
        aspect-ratio: 9 / 16;
    }

    .product-videos__list {
        display: flex;
        gap: 12px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
        scroll-snap-type: x proximity;
    }

    .product-videos__item {
        flex: 0 0 115px;
        scroll-snap-align: start;
    }

}
