/* ============================================================
 * Before/After Carousel
 * ============================================================ */
.bac-carousel {
	position: relative;
	width: 100%;
}

.bac-stage {
	position: relative;
	width: 100%;
}

.bac-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.bac-track {
	display: flex;
	width: 100%;
	transition: transform 0.4s ease;
	will-change: transform;
}

.bac-slide {
	flex: 0 0 100%;
	width: 100%;
	min-width: 100%;
}

/* ---- Area before/after ---- */
.bac-ba {
	position: relative;
	width: 100%;
	overflow: hidden;
	user-select: none;
	border-radius: 8px;
}

.bac-ba img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	object-fit: cover;
	pointer-events: none;
}

.bac-image-after {
	position: relative;
	width: 100%;
	z-index: 1;
}

.bac-image-before {
	position: absolute;
	top: 0;
	left: 0;
	width: 50%;
	height: 100%;
	overflow: hidden;
	z-index: 2;
}

.bac-image-before img {
	width: 200%;
	height: 100%;
}

.bac-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	background: #cba258;
	z-index: 3;
	cursor: ew-resize;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.bac-cursor {
	width: 40px;
	height: 40px;
	background: #cba258;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
	pointer-events: auto;
}

.bac-cursor svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.bac-cursor i {
	font-size: 16px;
}

/* ---- Etichette Prima / Dopo ---- */
.bac-label {
	position: absolute;
	top: 20px;
	z-index: 4;
	padding: 8px 16px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border-radius: 20px;
	font-size: 12px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;
	pointer-events: none;
}

.bac-label-before {
	left: 20px;
}

.bac-label-after {
	right: 20px;
}

/* ---- Nome coppia ---- */
.bac-name {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.bac-name-inner {
	display: inline-flex;
	align-items: center;
	gap: inherit;
	line-height: 1.2;
}

.bac-name-icon {
	display: inline-flex;
	align-items: center;
}

.bac-name-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Nome interno: overlay sopra entrambe le immagini, indipendente dalla barra */
.bac-name--internal {
	position: absolute;
	z-index: 5;
	pointer-events: none;
	max-width: 90%;
}

.bac-name--top {
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
}

.bac-name--bottom {
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
}

.bac-name--left {
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
	text-align: left;
}

.bac-name--right {
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
	text-align: right;
}

/* Nome esterno: sotto l'intero elemento */
.bac-name--outside {
	position: static;
	margin-top: 14px;
	width: 100%;
}

/* Stile pulsante */
.bac-name-inner--button {
	padding: 8px 18px;
	background: #cba258;
	color: #fff;
	border-radius: 30px;
}

/* ---- Punti (dot) ---- */
.bac-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.bac-dots-outside .bac-dots {
	position: relative;
	margin-top: 16px;
}

.bac-dots-inside .bac-dots {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	z-index: 6;
}

.bac-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(203, 162, 88, 0.4);
	cursor: pointer;
	border: 0;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.bac-dot.is-active {
	background: #cba258;
	transform: scale(1.15);
}

/* ---- Frecce ---- */
.bac-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.2em;
	height: 2.2em;
	font-size: 20px;
	color: #fff;
	background: rgba(0, 0, 0, 0.4);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	line-height: 1;
	transition: background-color 0.2s ease;
}

.bac-arrow:hover {
	filter: brightness(1.1);
}

.bac-arrow svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.bac-arrows-inside .bac-arrow-prev {
	left: 12px;
}

.bac-arrows-inside .bac-arrow-next {
	right: 12px;
}

/* Frecce esterne: nel margine ai lati dell'immagine */
.bac-arrows-outside {
	padding-left: 56px;
	padding-right: 56px;
}

.bac-arrows-outside .bac-arrow-prev {
	left: -44px;
}

.bac-arrows-outside .bac-arrow-next {
	right: -44px;
}
