.product-gallery-stage > [hidden] {
    display: none;
}
.product-gallery-stage > video {
    inline-size: 100%;
    block-size: 100%;
    object-fit: contain;
    background: #061c2e;
}
.product-gallery-stage[data-showing-video] .product-gallery-arrow {
    inset-block: 50% auto;
    transform: translateY(-50%);
}
.product-gallery-stage[data-showing-video] .product-gallery-count {
    inset-block: 9px auto;
}
.product-gallery-preview {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    pointer-events: none;
}
.product-gallery-video-thumb {
    position: absolute;
    inset-inline-end: 5px;
    inset-block-end: 5px;
    display: grid;
    place-items: center;
    inline-size: clamp(22px, 2.3vw, 29px);
    block-size: clamp(22px, 2.3vw, 29px);
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    background: rgba(4, 29, 47, .86);
    color: #fff;
    pointer-events: none;
}
.product-gallery-video-thumb .ico {
    inline-size: 55%;
    block-size: 55%;
    fill: currentColor;
    stroke: none;
}

.product-gallery-stage[data-showing-video] {
    background: #081d2c;
    container-type: inline-size;
}
.product-gallery-stage[data-showing-video]:has(.film-controls:not([hidden])) {
    --film-footer: 88px;
    box-sizing: content-box;
    padding-block-end: var(--film-footer);
}
.product-gallery-stage[data-showing-video]:fullscreen:has(.film-controls:not([hidden])) {
    box-sizing: border-box;
}
.product-gallery-stage > video[data-gallery-video-player] {
    display: block;
    background: radial-gradient(ellipse at 50% 35%, #1a394c, #081b2a 76%);
}
.product-gallery-stage > video[data-gallery-video-player][hidden],
.film-controls [hidden] { display: none; }
.product-gallery-stage[data-showing-video] .product-gallery-arrow {
    z-index: 2;
    inset-block-start: calc((100% - var(--film-footer, 0px)) / 2);
    width: 44px;
    height: 44px;
    border: 1px solid #ffffff69;
    border-radius: 50%;
    background: #092438dc;
}
.product-gallery-stage[data-showing-video] .product-gallery-count { z-index: 2; }
.film-controls {
    position: absolute;
    inset: 0;
    color: #fff;
    pointer-events: none;
}
.film-controls button,
.film-controls input { pointer-events: auto; }
.film-center,
.film-dock {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid #ffffff40;
    box-shadow: 0 5px 20px #010d1840;
    background: #092438ef;
    backdrop-filter: blur(12px);
}
.film-center {
    inset: 0;
    inset-block-end: var(--film-footer, 0px);
    margin: auto;
    display: grid;
    place-items: center;
    width: clamp(54px, 10%, 70px);
    height: auto;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    animation: film-center-in 220ms ease-out both;
}
.film-center .ico { width: 32%; height: 32%; fill: currentColor; transform: translateX(1px); }
.film-center::before {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid #ffffff66;
    border-radius: inherit;
}
.film-dock {
    inset-inline: clamp(8px, 2.5%, 20px);
    inset-block-end: clamp(6px, 2.5%, 17px);
    max-inline-size: 640px;
    margin-inline: auto;
    border-radius: 14px;
    padding: 4px 10px 0;
    color: #fff;
    pointer-events: auto;
    animation: film-dock-in 260ms cubic-bezier(.2,.72,.25,1) both;
}
.film-row { display: flex; align-items: center; gap: 6px; }
.film-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-inline-size: 44px;
    block-size: 44px;
    margin: 0;
    padding: 0 7px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}
.film-button .ico { inline-size: 19px; block-size: 19px; }
.film-button .ico:nth-child(2),
.film-button[data-active="true"] .ico:first-child { display: none; }
.film-button[data-active="true"] .ico:nth-child(2) { display: block; }
.film-play {
    background: #bf460a;
    border-radius: 50%;
    inline-size: 44px;
}
.film-play .ico:first-child { fill: currentColor; }
.film-play .ico:nth-child(2) { stroke-width: 3.2; }
.film-time {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding-inline: 3px;
    font: 600 13px/1.1 system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.film-divider, [data-player-duration] { color: #bad0df; }
.film-sound { margin-inline-start: auto; }
.film-seek {
    --played: 0%;
    display: block;
    width: 100%;
    height: 20px;
    min-height: 0;
    margin: -1px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    appearance: none;
    cursor: pointer;
    touch-action: none;
}
.film-seek::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(to right, #ff9155 var(--played), #8295a7 var(--played));
}
.film-seek::-moz-range-track { height: 4px; background: #8295a7; border-radius: 4px; }
.film-seek::-moz-range-progress { height: 4px; background: #ff9155; border-radius: 4px; }
.film-seek::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ff9155;
}
.film-seek::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #ff9155; }
.film-controls :focus-visible { outline: 2px solid #ffb487; outline-offset: 1px; }
.film-error {
    position: absolute;
    inset: 30% 14% auto;
    text-align: center;
    color: #fff;
    background: #092438e8;
    border-radius: 8px;
}
.product-gallery-stage:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.product-gallery-stage:fullscreen .product-gallery-arrow,
.product-gallery-stage:fullscreen .product-gallery-count { display: none; }
@container (max-width: 420px) {
    .film-sound span { display: none; }
    .film-row { gap: 3px; }
}
@media (hover: hover) {
    .film-button:hover, .film-center:hover { background: #28506a; }
    .film-play:hover { background: #d45512; }
}
.film-button:active { transform: scale(.94); }
@keyframes film-dock-in {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes film-center-in {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .film-button, .film-center, .film-dock { animation: none; transition: none; }
    .film-button:active { transform: none; }
}
