/* Reproductor propio: se carga únicamente en fichas con un MP4 válido. */
.ob-product-video-slide,
.ob-product-video__button,
.ob-product-video__frame,
.ob-product-video__player {
	width: 100%;
}

.ob-product-video__button {
	display: block;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: center;
}

.ob-product-video__frame,
.ob-product-video__player {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #111820;
	border-radius: 8px;
}

.ob-product-video__poster,
.ob-product-video__media {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.ob-product-video__poster {
	background: #fff;
}

.ob-product-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	transform: translate(-50%, -50%);
	border: 3px solid rgb(255 255 255 / 90%);
	border-radius: 50%;
	background: var(--ob-azul, #075d96);
	color: #fff;
	box-shadow: 0 4px 20px rgb(0 0 0 / 35%);
}

.ob-product-video__label {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	padding: 8px 14px;
	border-radius: 999px;
	background: rgb(17 24 32 / 82%);
	color: #fff;
	font-weight: 700;
	white-space: nowrap;
}

.ob-product-video__button:focus-visible {
	outline: 3px solid var(--ob-azul, #075d96);
	outline-offset: 4px;
}

.ob-product-video__button:hover .ob-product-video__play {
	transform: translate(-50%, -50%) scale(1.06);
}

.ob-product-video--description {
	max-width: 720px;
	margin: 28px auto 0;
}

.ob-product-video__title {
	margin: 0 0 14px;
	font-size: 1.25rem;
}

.ob-product-video--description .ob-product-video__button,
.ob-product-video--description .ob-product-video__player {
	max-width: 420px;
	margin-right: auto;
	margin-left: auto;
}

.ob-product-video--description .ob-product-video__frame,
.ob-product-video--description .ob-product-video__player {
	aspect-ratio: 9 / 16;
}

.ob-product-video--description .ob-product-video__player--horizontal {
	max-width: 100%;
}

.ob-product-video__error {
	margin: 12px 0 0;
	padding: 12px;
	border-radius: 8px;
	background: #fff4e5;
	color: #402600;
}

.ob-product-video__error a {
	color: inherit;
	font-weight: 700;
}

/* La segunda miniatura lleva el mismo botón de play que la vista principal. */
.ob-product .woocommerce-product-gallery.ob-product-gallery--has-video ol.flex-control-thumbs li:nth-child(2) {
	position: relative;
}

.ob-product .woocommerce-product-gallery.ob-product-gallery--has-video ol.flex-control-thumbs li:nth-child(2)::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 34px;
	height: 34px;
	transform: translate(-50%, -50%);
	border: 2px solid rgb(255 255 255 / 90%);
	border-radius: 50%;
	background: var(--ob-azul, #075d96);
	box-shadow: 0 2px 8px rgb(0 0 0 / 35%);
	pointer-events: none;
}

.ob-product .woocommerce-product-gallery.ob-product-gallery--has-video ol.flex-control-thumbs li:nth-child(2)::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	width: 0;
	height: 0;
	transform: translate(-35%, -50%);
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	border-left: 11px solid #fff;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.ob-product-video__button:hover .ob-product-video__play {
		transform: translate(-50%, -50%);
	}
}
