/* ==========================================================================
   Before/After Showcase — shared front-end + editor styles
   ========================================================================== */

.bas-card-gallery {
	--bas-desktop-cols: 4;
	--bas-tablet-cols: 2;
	--bas-mobile-cols: 1;
	--bas-column-gap: 32px;
	--bas-row-gap: 40px;
	--bas-ratio: 1/1;
	--bas-accent: #f5a623;
	--bas-play-color: #f5a623;
	--bas-overlay: rgba( 255, 255, 255, 0.45 );

	position: relative;
	display: grid;
	grid-template-columns: repeat( var( --bas-mobile-cols ), 1fr );
	gap: var( --bas-row-gap ) var( --bas-column-gap );
	padding-top: 4px;
}

@media ( min-width: 600px ) {
	.bas-card-gallery {
		grid-template-columns: repeat( var( --bas-tablet-cols ), 1fr );
	}
}

@media ( min-width: 960px ) {
	.bas-card-gallery {
		grid-template-columns: repeat( var( --bas-desktop-cols ), 1fr );
	}
}

/* ------------------------------------------------------------------------
   Card
   ------------------------------------------------------------------------ */

.bas-card {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

/* Play button */

.bas-card__play {
	position: relative;
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 3px solid #fff;
	border-radius: 50%;
	background-color: #d8e6f3;
	background-size: cover;
	background-position: center;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.18 );
	cursor: pointer;
	z-index: 2;
	transition: transform 0.15s ease;
}

.bas-card__play::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var( --bas-overlay, rgba( 255, 255, 255, 0.45 ) );
}

.bas-card__play:hover {
	transform: scale( 1.07 );
}

.bas-card__play:focus-visible {
	outline: 2px solid #1e1e1e;
	outline-offset: 3px;
}

.bas-card__play-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bas-card__play-icon::before {
	content: '';
	margin-left: 3px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 8px 0 8px 14px;
	border-color: transparent transparent transparent var( --bas-play-color, #f5a623 );
}

/* Slider */

.bas-card__slider {
	position: relative;
	width: 100%;
	aspect-ratio: var( --bas-ratio, 1/1 );
	overflow: hidden;
	border-radius: 16px;
	background: #eee;
	cursor: grab;
	touch-action: pan-y;
	--bas-pos: 50%;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.08 );
}

.bas-card__slider.is-dragging {
	cursor: grabbing;
}

.bas-card__slider:focus-visible {
	outline: 2px solid var( --bas-accent, #f5a623 );
	outline-offset: 2px;
}

/* Faint "this is draggable" hint icon, shown on hover/focus. */
.bas-card__slider::after {
	content: '';
	position: absolute;
	top: 50%;
	left: var( --bas-pos, 50% );
	width: 60px;
	height: 30px;
	transform: translate( -50%, -50% );
	background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M2 12h44M2 12l8-8M2 12l8 8M46 12l-8-8M46 12l-8 8' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E" );
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	filter: drop-shadow( 0 1px 3px rgba( 0, 0, 0, 0.6 ) );
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
	z-index: 3;
}

.bas-card__slider:hover::after,
.bas-card__slider:focus-visible::after {
	opacity: 0.9;
}

.bas-card__slider.is-dragging::after {
	opacity: 0;
}

.bas-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	-webkit-user-drag: none;
	user-select: none;
}

.bas-card__clip {
	position: absolute;
	inset: 0;
	clip-path: inset( 0 calc( 100% - var( --bas-pos, 50% ) ) 0 0 );
}

.bas-card__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var( --bas-pos, 50% );
	width: 2px;
	background: #fff;
	transform: translateX( -50% );
	pointer-events: none;
	box-shadow: 0 0 4px rgba( 0, 0, 0, 0.35 );
}

.bas-card__handle-dot {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var( --bas-accent, #f5a623 );
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.35 );
}

.bas-card__title {
	margin: 0;
	text-align: center;
	font-size: 15px;
	line-height: 1.4;
}

.bas-card__placeholder,
.bas-card__placeholder--a {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	color: #757575;
	font-size: 13px;
}

.bas-card__placeholder--a {
	width: 50%;
	border-right: 2px dashed #ccc;
}

/* ------------------------------------------------------------------------
   Video modal
   ------------------------------------------------------------------------ */

.bas-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}

.bas-modal.is-open {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 24px;
	box-sizing: border-box;
}

.bas-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.8 );
}

.bas-modal__inner {
	position: relative;
	width: 960px;
	max-width: 100%;
	margin: auto; /* second layer of centering even without flex */
}

.bas-modal__frame {
	position: relative;
	padding-top: 56.25%;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.bas-modal__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.bas-modal__close {
	position: absolute;
	top: -44px;
	right: 0;
	background: none;
	border: 0;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.bas-modal__close:focus-visible {
	outline