/* Catalog videos link to products; product-page videos remain playback controls. */
.video-stage > .video-product-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.video-stage > .video-product-link:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.video-stage > .video-product-link ~ .video-error { pointer-events: none; }
.video-tools [data-sound][data-audio-blocked] { position: relative; }
.video-tools [data-sound][data-audio-blocked]::after { content: 'Включи звук'; position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); padding: 8px 11px; border: 1px solid #ffffff45; border-radius: 8px; background: #17171df2; color: #fff; font: 600 12px/1.2 Arial, sans-serif; white-space: nowrap; }
/* Sale and video navigation share one centered row in every product surface. */
.video-stage > .video-topbar {
  position: absolute;
  inset: 16px 10px auto;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.video-stage .video-topbar > .sale-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #ffffff26;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 3px 12px #00000018;
}
.video-stage .video-topbar > .video-pager {
  position: static;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 0 2px;
  border: 1px solid #ffffff40;
  border-radius: 999px;
  background: #15151bcc;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 3px 12px #00000018;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}
.video-topbar .video-pager [data-video-index] {
  min-width: 32px;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.video-stage .video-topbar .video-pager button {
  width: 34px;
  height: 34px;
  padding: 0;
  flex: 0 0 auto;
  color: inherit;
}
@media (max-width: 760px) {
  body.theme-flow.store-page.view-grid .flow-main > [data-flow-feed] .video-topbar { top: 8px; left: 4px; right: 4px; gap: 4px; }
  body.theme-flow.store-page.view-grid .flow-main > [data-flow-feed] .video-topbar > .sale-badge { height: 28px; padding: 0 6px; font-size: 9px; border-radius: 999px; }
  body.theme-flow.store-page.view-grid .flow-main > [data-flow-feed] .video-topbar > .video-pager { height: 28px; gap: 0; font-size: 9px; }
  body.theme-flow.store-page.view-grid .flow-main > [data-flow-feed] .video-topbar .video-pager button { width: 24px; height: 24px; }
  body.theme-flow.store-page.view-grid .flow-main > [data-flow-feed] .video-topbar [data-video-index] { min-width: 25px; }
}
.video-stage .product-video { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.video-stage .video-shade { pointer-events: none; }
.cards-overlay .product-card > .card-info { pointer-events: none; }
.cards-overlay .product-card > .card-info :is(a, button, input, select, textarea) { pointer-events: auto; }
.video-stage .product-video:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.video-stage .product-video::-webkit-media-controls-start-playback-button,
.video-stage .product-video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
.video-stage > .play-button,
.video-stage > [data-play] { display: none !important; }
/* Progress and volume sliders stay out of every storefront layout, including older rendered cards. */
.video-stage [data-video-seek],
.video-stage [data-video-time],
.video-stage [data-video-volume] { display: none !important; }
.video-stage .video-timeline:not(:has(> :not([hidden], [data-video-seek], [data-video-time], [data-video-volume]))) { display: none !important; }
@media (max-width: 760px) {
  .product-grid > .product-card > .card-info { pointer-events: none; }
  .product-grid > .product-card > .card-info :is(a, button, input, select, textarea) { pointer-events: auto; }
}
@media (forced-colors: active) {
  .video-stage .product-video:focus-visible { outline-color: Highlight; }
}

.video-stage > .video-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:1}
.video-stage > .video-poster[hidden]{display:none}
.product-page .product-media .video-poster{object-fit:contain;background:#101014}
@media (max-width:760px) and (max-height:500px){
  body.theme-flow.store-page .flow-main > [data-flow-feed] .video-poster{object-fit:contain}
}

/* A separate playback action remains available above the catalog product link. */
.video-stage > .video-startup { position:absolute; inset:0; z-index:3; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.video-stage .video-startup-button { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:1px solid #ffffff80; border-radius:50%; background:#15151bc9; color:#fff; box-shadow:0 2px 8px #0003; cursor:pointer; pointer-events:auto; touch-action:manipulation; }
.video-stage .video-startup-button svg { display:block; flex:none; pointer-events:none; }
.video-stage .video-startup-button:hover { background:#292931; }
.video-stage .video-startup-button:focus-visible { outline:2px solid #fff; outline-offset:4px; }
.video-stage > .video-startup[hidden],
.video-stage .video-startup [hidden] { display:none !important; }
/* The product video itself remains the pause/resume target, without a central play badge. */
.product-page .product-media .video-stage > .video-startup[data-state="paused"] { display:none; }
@media (forced-colors:active) { .video-stage .video-startup-button { border-color:ButtonText; } .video-stage .video-startup-button:focus-visible { outline-color:Highlight; } }

/* Grid cards are image links. The runtime also detaches every video source. */
[data-catalog-card] [data-poster-fallback]{display:none}
body.view-grid [data-catalog-card] .product-video,
body.theme-flow.store-page.view-grid .flow-main > [data-flow-feed] [data-catalog-card] .video-tools [data-sound],
body.view-grid [data-catalog-card] [data-sound],
body.view-grid [data-catalog-card] .video-pager,
body.view-grid [data-catalog-card] .video-timeline,
body.view-grid [data-catalog-card] .video-startup,
body.view-grid [data-catalog-card] .video-captions,
body.view-grid [data-catalog-card] .caption-toggle{display:none!important}
body.view-grid [data-catalog-card] .video-poster,
body.view-grid [data-catalog-card] [data-poster-fallback]{display:block!important}
