/*! SASU Fashions Product Experience - video shopping (v1.0.0). Loaded only on products with a usable local video. */

:root {
	--sasu-pe-video-primary: var(--wd-primary-color, #da3c3c);
}

/* ================================================================ mini floating preview */
.sasu-pe-mini {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 850; /* below the fullscreen feed and the sticky bar's toast, above ordinary content */
	width: 104px;
	overflow: hidden;
	border-radius: 12px;
	background: #000;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
	opacity: 0;
	transform: translateY(12px) scale(.94);
	transition: opacity .3s cubic-bezier(.2, .8, .2, 1), transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sasu-pe-mini[data-pos="bottom-left"] { right: auto; left: 16px; }
.sasu-pe-mini.is-in { opacity: 1; transform: none; }
.sasu-pe-mini[hidden] { display: none; }
/* Keep clear of the sticky purchase bar and the theme's scroll-to-top button. */
body.sasu-pe-bar-on .sasu-pe-mini { bottom: calc(var(--sasu-pe-tb, 0px) + var(--sasu-pe-bar-h, 0px) + 16px); }

.sasu-pe-mini__stage {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 9 / 16;
	margin: 0;
	padding: 0;
	border: 0;
	background: #000 center / cover no-repeat;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.sasu-pe-mini__el { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; pointer-events: none; }
.sasu-pe-mini__badge {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	color: #fff;
}
.sasu-pe-mini__badge svg { width: 13px; height: 13px; }
.sasu-pe-mini__bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 4px;
	background: #000;
}
.sasu-pe-mini__btn {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}
.sasu-pe-mini__btn svg { width: 16px; height: 16px; }
.sasu-pe-mini__btn:hover { background: rgba(255, 255, 255, .16); }
.sasu-pe-mini__btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

@media (max-width: 767px) {
	.sasu-pe-mini { width: 84px; right: 10px; bottom: 10px; }
	.sasu-pe-mini[data-pos="bottom-left"] { left: 10px; }
	.sasu-pe-mini__btn { height: 24px; }
}

/* ================================================================ fullscreen video shopping feed */
.sasu-pe-feed {
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow: hidden;
	background: #000;
	opacity: 0;
	transition: opacity .25s ease;
}
.sasu-pe-feed[hidden] { display: none; }
.sasu-pe-feed.is-open { opacity: 1; }
html.sasu-pe-lock,
html.sasu-pe-lock body { overflow: hidden; height: 100%; overscroll-behavior: none; }

.sasu-pe-feed__slides { position: relative; width: 100%; height: 100%; }

.sasu-pe-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	width: 100%;
	height: 100%;
	transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.sasu-pe-slide__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #000;
	cursor: pointer; /* tap/click anywhere on the video to play or pause */
}
.sasu-pe-slide__scrim {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 46%;
	background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
	pointer-events: none;
}

/* centre play/pause indicator, visible while paused (and doubles as the Replay button once the video has ended) */
.sasu-pe-slide__big {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin: -34px 0 0 -34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	cursor: pointer;
	transition: transform .15s, background-color .2s;
}
.sasu-pe-slide__big svg { width: 30px; height: 30px; }
.sasu-pe-slide__big:hover { background: var(--sasu-pe-video-primary); }
.sasu-pe-slide__big:active { transform: scale(.94); }
.sasu-pe-slide__big[hidden] { display: none; }

/* right-side control rail: mute/unmute, replay (once ended) - kept clear of the bottom info/Buy area */
.sasu-pe-slide__side {
	position: absolute;
	right: 12px;
	bottom: calc(150px + env(safe-area-inset-bottom, 0px));
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.sasu-pe-slide__ctl {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s, transform .15s;
}
.sasu-pe-slide__ctl:hover { background: rgba(0, 0, 0, .65); }
.sasu-pe-slide__ctl:active { transform: scale(.92); }
.sasu-pe-slide__ctl:focus-visible,
.sasu-pe-slide__big:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sasu-pe-slide__ctl[hidden] { display: none; }

.sasu-pe-slide__info {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: 100%;
	padding: 0 16px calc(22px + env(safe-area-inset-bottom, 0px));
	color: #fff;
}
.sasu-pe-slide__title {
	display: block;
	overflow: hidden;
	margin: 0 0 4px;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.sasu-pe-slide__price { margin: 0 0 2px; font-size: 20px; font-weight: 700; }
.sasu-pe-slide__oos { margin: 0 0 6px; color: #ffb4b4; font-size: 13px; font-weight: 700; }
.sasu-pe-slide__row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.sasu-pe-slide__buy {
	flex: 0 0 auto;
	box-sizing: border-box;
	min-width: 150px;
	height: 46px;
	margin: 0;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background: var(--sasu-pe-video-primary);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform .15s, opacity .2s;
}
.sasu-pe-slide__buy:active { transform: scale(.97); }
.sasu-pe-slide__buy:disabled { background: #555; color: #ccc; cursor: not-allowed; }
.sasu-pe-slide__buy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sasu-pe-slide__ig {
	display: inline-flex;
	align-items: center;
	height: 46px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, .55);
	border-radius: 999px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.sasu-pe-slide__ig:hover { background: rgba(255, 255, 255, .12); }

.sasu-pe-feed__close {
	position: absolute;
	top: calc(14px + env(safe-area-inset-top, 0px));
	right: 14px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	cursor: pointer;
}
.sasu-pe-feed__close:hover { background: rgba(0, 0, 0, .65); }
.sasu-pe-feed__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.sasu-pe-feed__hint {
	position: absolute;
	bottom: calc(150px + env(safe-area-inset-bottom, 0px));
	left: 50%;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	color: rgba(255, 255, 255, .85);
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	transform: translateX(-50%);
	transition: opacity .3s;
	animation: sasu-pe-feed-bounce 1.6s ease-in-out infinite;
}
.sasu-pe-feed__hint.is-hidden { opacity: 0; }
@keyframes sasu-pe-feed-bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }

@media (max-width: 480px) {
	.sasu-pe-slide__title { font-size: 14px; }
	.sasu-pe-slide__price { font-size: 18px; }
	.sasu-pe-slide__buy { min-width: 130px; height: 42px; padding: 0 20px; font-size: 13px; }
	.sasu-pe-slide__ig { height: 42px; padding: 0 12px; }
	.sasu-pe-slide__side { right: 8px; bottom: calc(140px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
	.sasu-pe-slide__ctl { width: 38px; height: 38px; }
	.sasu-pe-slide__big { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
	.sasu-pe-slide__big svg { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
	.sasu-pe-mini,
	.sasu-pe-feed,
	.sasu-pe-slide,
	.sasu-pe-feed__hint { transition: none !important; animation: none !important; }
}

/* Wider viewports (tablet/desktop): the popup previously stretched to the full window and cropped
   portrait video heavily with object-fit:cover. Keep the video's own full frame visible (letterboxed,
   never cropped or stretched) instead of filling the whole viewport. Mobile is unchanged. */
@media (min-width: 768px) {
	.sasu-pe-slide__video { object-fit: contain; }
}

/* Share control (fullscreen rail, directly under mute): the same circular button as mute/replay; the icon lifts slightly on hover/focus. */
.sasu-pe-slide__share { position: relative; }
.sasu-pe-slide__share svg { transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.sasu-pe-slide__share:hover svg,
.sasu-pe-slide__share:focus-visible svg { transform: translateY(-1px) scale(1.08); }
/* Out-ranks the theme's blanket "[type=button]:focus { outline: 0 }", which otherwise hides the keyboard focus ring. */
.sasu-pe-slide__ctl.sasu-pe-slide__share:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 480px) {
	.sasu-pe-slide__share::after { content: ""; position: absolute; inset: -3px; } /* 38px visual circle, 44px touch target */
}
@media (prefers-reduced-motion: reduce) {
	.sasu-pe-slide__share,
	.sasu-pe-slide__share svg { transition: none !important; }
	.sasu-pe-slide__share:hover svg,
	.sasu-pe-slide__share:focus-visible svg,
	.sasu-pe-slide__share:active { transform: none; }
}

/* ================================================================ share panel (opened by the Share button; additive) */
.sasu-pe-vshare { position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .55); }
.sasu-pe-vshare[hidden] { display: none; }
.sasu-pe-vshare__sheet {
	box-sizing: border-box;
	width: 100%;
	max-width: 440px;
	padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
	border-radius: 18px 18px 0 0;
	background: #1c1c1e;
	color: #fff;
	box-shadow: 0 -10px 30px rgba(0, 0, 0, .4);
	animation: sasu-pe-vshare-in .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sasu-pe-vshare-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.sasu-pe-vshare__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 4px 8px; }
.sasu-pe-vshare__heading { min-width: 0; }
.sasu-pe-vshare__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.sasu-pe-vshare__sub { overflow: hidden; margin-top: 2px; color: rgba(255, 255, 255, .7); font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.sasu-pe-vshare .sasu-pe-vshare__x {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
}
.sasu-pe-vshare .sasu-pe-vshare__x:hover { background: rgba(255, 255, 255, .22); }
.sasu-pe-vshare__sheet:focus { outline: none; } /* the dialog itself takes focus on open; no row looks pre-selected */
.sasu-pe-vshare__list { display: flex; flex-direction: column; gap: 2px; }
.sasu-pe-vshare .sasu-pe-vshare__row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	height: auto;
	margin: 0;
	padding: 8px 12px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.25;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	transition: background-color .15s;
}
.sasu-pe-vshare .sasu-pe-vshare__row:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.sasu-pe-vshare .sasu-pe-vshare__row:active:not(:disabled) { background: rgba(255, 255, 255, .16); }
.sasu-pe-vshare .sasu-pe-vshare__row:disabled { opacity: .6; cursor: progress; }
.sasu-pe-vshare__ico { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.sasu-pe-vshare__txt { display: flex; flex-direction: column; min-width: 0; }
.sasu-pe-vshare__hint { margin-top: 2px; color: rgba(255, 255, 255, .65); font-size: 12px; font-weight: 400; line-height: 1.3; }
.sasu-pe-vshare__note { min-height: 18px; padding: 8px 8px 0; color: rgba(255, 255, 255, .85); font-size: 13px; word-break: break-all; }
.sasu-pe-vshare .sasu-pe-vshare__row:focus-visible,
.sasu-pe-vshare .sasu-pe-vshare__x:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
@media (min-width: 768px) {
	.sasu-pe-vshare { align-items: center; }
	.sasu-pe-vshare__sheet { border-radius: 18px; padding-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.sasu-pe-vshare__sheet { animation: none; }
	.sasu-pe-vshare .sasu-pe-vshare__row { transition: none; }
}
