/**
 * =============================================================================
 * PROBAR - LA POSTAZIONE VIRTUALE (Bar Station Configurator) v2
 * -----------------------------------------------------------------------------
 * Caricato solo sul template template-bar-station.php.
 * Due layout: bancone orizzontale (desktop/tablet, con zoom per zona) e
 * colonna verticale (mobile, ariosa e senza zoom: le zone evidenziano i pin
 * e mostrano le card sotto). Aspect-ratio bloccati: niente layout shift.
 * =============================================================================
 */

.abm-bs-page {
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 16px 60px;
	color: #cdcdcd;
}

/* ---------- Intro ---------- */
.abm-bs-intro {
	text-align: center;
	max-width: 820px;
	margin: 10px auto 26px;
}

.abm-bs-kicker {
	color: #FFCE53;
	text-transform: uppercase;
	letter-spacing: 3px;
	font-size: 0.8rem;
	margin: 0 0 10px;
}

.abm-bs-title {
	font-family: "Playfair Display", Georgia, serif;
	font-size: clamp(1.7rem, 4.2vw, 2.8rem);
	line-height: 1.15;
	color: #f4f4f4;
	margin: 0 0 14px;
}

.abm-bs-sub {
	font-size: 1rem;
	line-height: 1.65;
	color: #b9b9b9;
	margin: 0;
}

/* ---------- Zone selector ---------- */
.abm-bs-zonesnav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 18px;
}

.abm-bs-zonebtn {
	min-height: 48px;
	padding: 10px 18px;
	border: 1px solid #4a3f1e;
	border-radius: 26px;
	background: #0f0f0f;
	color: #d9d9d9;
	font-size: 0.92rem;
	cursor: pointer;
	transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.abm-bs-zonebtn__num {
	display: inline-block;
	margin-right: 6px;
	color: #FFCE53;
	font-weight: 700;
}

.abm-bs-zonebtn:hover {
	border-color: #FFCE53;
	color: #fff;
}

.abm-bs-zonebtn.is-active {
	background: #FFCE53;
	border-color: #FFCE53;
	color: #0a0a0a;
	font-weight: 700;
}

.abm-bs-zonebtn.is-active .abm-bs-zonebtn__num {
	color: #0a0a0a;
}

/* ---------- Stage ---------- */
.abm-bs-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid #4a3f1e;
	border-radius: 16px;
	background:
		radial-gradient(ellipse at 50% 18%, rgba(255, 206, 83, 0.06), transparent 60%),
		#070707;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.abm-bs-world {
	position: absolute;
	inset: 0;
	transform-origin: 50% 50%;
	transition: transform 0.7s cubic-bezier(0.22, 0.8, 0.24, 1);
	will-change: transform;
}

/* Preset di zoom per zona: SOLO desktop/tablet (mobile resta arioso) */
.abm-bs-stage[data-zone="1"] .abm-bs-world {
	transform-origin: 26% 40%;
	transform: scale(1.8);
}

.abm-bs-stage[data-zone="2"] .abm-bs-world {
	transform-origin: 76% 42%;
	transform: scale(1.8);
}

.abm-bs-stage[data-zone="3"] .abm-bs-world {
	transform-origin: 52% 76%;
	transform: scale(1.45);
}

.abm-bs-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.abm-bs-svg--mobile {
	display: none;
}

/* ---------- Hotspot ---------- */
.abm-bs-pin {
	position: absolute;
	left: var(--dx);
	top: var(--dy);
	width: 48px;
	height: 48px;
	margin: -24px 0 0 -24px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.35s ease;
}

.abm-bs-pin__dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: rgba(255, 206, 83, 0.92);
	box-shadow:
		0 0 0 4px rgba(255, 206, 83, 0.16),
		0 0 12px rgba(255, 206, 83, 0.5);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.abm-bs-pin:hover .abm-bs-pin__dot,
.abm-bs-pin:focus-visible .abm-bs-pin__dot,
.abm-bs-pin.is-open .abm-bs-pin__dot {
	transform: scale(1.35);
	box-shadow:
		0 0 0 6px rgba(255, 206, 83, 0.25),
		0 0 22px rgba(255, 206, 83, 0.8);
}

.abm-bs-pin:focus-visible {
	outline: 2px solid #FFCE53;
	outline-offset: 2px;
	border-radius: 50%;
}

/* Dentro una zona i pin si fanno discreti: il disegno resta protagonista */
.abm-bs-stage:not([data-zone="0"]) .abm-bs-pin__dot {
	width: 9px;
	height: 9px;
	box-shadow:
		0 0 0 3px rgba(255, 206, 83, 0.16),
		0 0 8px rgba(255, 206, 83, 0.45);
}

/* Zona attiva: i pin delle altre zone si attenuano */
.abm-bs-stage[data-zone="1"] .abm-bs-pin:not([data-zone="1"]),
.abm-bs-stage[data-zone="2"] .abm-bs-pin:not([data-zone="2"]),
.abm-bs-stage[data-zone="3"] .abm-bs-pin:not([data-zone="3"]) {
	opacity: 0.16;
	pointer-events: none;
}

/* Modalita' kit: si illumina solo cio' che e' incluso */
.abm-bs-stage[data-kit="1"] .abm-bs-pin:not([data-k1]),
.abm-bs-stage[data-kit="2"] .abm-bs-pin:not([data-k2]),
.abm-bs-stage[data-kit="3"] .abm-bs-pin:not([data-k3]) {
	opacity: 0.12;
	pointer-events: none;
}

.abm-bs-stage[data-kit="1"] .abm-bs-pin[data-k1] .abm-bs-pin__dot,
.abm-bs-stage[data-kit="2"] .abm-bs-pin[data-k2] .abm-bs-pin__dot,
.abm-bs-stage[data-kit="3"] .abm-bs-pin[data-k3] .abm-bs-pin__dot {
	animation: abmBsPulse 1.6s ease-in-out infinite;
}

@keyframes abmBsPulse {
	0%, 100% { box-shadow: 0 0 0 4px rgba(255, 206, 83, 0.2), 0 0 14px rgba(255, 206, 83, 0.55); }
	50%      { box-shadow: 0 0 0 9px rgba(255, 206, 83, 0.28), 0 0 26px rgba(255, 206, 83, 0.85); }
}

/* ---------- Tooltip ---------- */
.abm-bs-tip {
	position: absolute;
	z-index: 5;
	max-width: 260px;
	padding: 14px 16px;
	border: 1px solid #FFCE53;
	border-radius: 12px;
	background: rgba(7, 7, 7, 0.96);
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
	pointer-events: auto;
}

.abm-bs-tip__name {
	margin: 0 0 4px;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 1rem;
	color: #FFCE53;
}

.abm-bs-tip__benefit {
	margin: 0 0 10px;
	font-size: 0.85rem;
	line-height: 1.45;
	color: #c9c9c9;
}

.abm-bs-tip__link {
	display: inline-block;
	min-height: 34px;
	padding: 7px 14px;
	border-radius: 18px;
	background: #FFCE53;
	color: #0a0a0a;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
}

.abm-bs-tip__link:hover {
	background: #ffd873;
	color: #0a0a0a;
}

/* ---------- Card per zona (tap-to-explore) ---------- */
.abm-bs-zonecards {
	margin-top: 16px;
}

.abm-bs-zonecards__title {
	font-family: "Playfair Display", Georgia, serif;
	color: #f2f2f2;
	font-size: 1.15rem;
	margin: 6px 0 12px;
}

.abm-bs-zonecards__row {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(210px, 1fr);
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 10px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.abm-bs-card {
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 120px;
	padding: 14px 16px;
	border: 1px solid #333;
	border-radius: 12px;
	background: #0f0f0f;
	text-decoration: none;
	transition: border-color 0.25s ease, transform 0.25s ease;
}

.abm-bs-card:hover {
	border-color: #FFCE53;
	transform: translateY(-2px);
}

.abm-bs-card__name {
	color: #f2f2f2;
	font-weight: 700;
	font-size: 0.95rem;
}

.abm-bs-card__benefit {
	color: #9f9f9f;
	font-size: 0.82rem;
	line-height: 1.4;
	flex: 1;
}

.abm-bs-card__cta {
	color: #FFCE53;
	font-size: 0.82rem;
	font-weight: 700;
}

/* ---------- Sezione kit ---------- */
.abm-bs-kitsec {
	margin-top: 60px;
}

.abm-bs-h2 {
	font-family: "Playfair Display", Georgia, serif;
	font-size: clamp(1.4rem, 3vw, 2rem);
	color: #f4f4f4;
	text-align: center;
	margin: 0 0 10px;
}

.abm-bs-lead {
	text-align: center;
	color: #b0b0b0;
	max-width: 680px;
	margin: 0 auto 28px;
}

.abm-bs-kitgrid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.abm-bs-kitcard {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
	border: 1px solid #4a3f1e;
	border-radius: 16px;
	background: linear-gradient(180deg, #101010, #0a0a0a);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.abm-bs-kitcard.is-active {
	border-color: #FFCE53;
	box-shadow: 0 0 0 1px #FFCE53, 0 14px 40px rgba(255, 206, 83, 0.12);
}

.abm-bs-kitcard__name {
	font-family: "Playfair Display", Georgia, serif;
	color: #FFCE53;
	font-size: 1.15rem;
	margin: 0;
}

.abm-bs-kitcard__tag {
	color: #d6d6d6;
	font-size: 0.92rem;
	line-height: 1.5;
	margin: 0;
}

.abm-bs-kitcard__per {
	color: #8f8f8f;
	font-size: 0.82rem;
	line-height: 1.45;
	margin: 0;
	flex: 1;
}

.abm-bs-kitcard__meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	border-top: 1px solid #262626;
	padding-top: 12px;
}

.abm-bs-kitcard__count {
	color: #9f9f9f;
	font-size: 0.85rem;
	white-space: nowrap;
}

.abm-bs-kitcard__pricewrap {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1.25;
}

.abm-bs-kitcard__full {
	color: #7c7c7c;
	font-size: 0.82rem;
}

.abm-bs-kitcard__price {
	color: #FFCE53;
	font-weight: 700;
	font-size: 1.15rem;
}

.abm-bs-kitcard__promo {
	margin: 0;
	color: #9adf9f;
	font-size: 0.8rem;
}

.abm-bs-kitcard__sel {
	min-height: 48px;
	border: 1px solid #FFCE53;
	border-radius: 26px;
	background: transparent;
	color: #FFCE53;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease;
}

.abm-bs-kitcard__sel:hover,
.abm-bs-kitcard.is-active .abm-bs-kitcard__sel {
	background: #FFCE53;
	color: #0a0a0a;
}

/* Pannello dettaglio kit */
.abm-bs-kitpanel {
	margin-top: 18px;
	border: 1px solid #4a3f1e;
	border-radius: 16px;
	background: #0c0c0c;
	padding: 22px;
}

.abm-bs-kitpanel__head {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}

.abm-bs-kitpanel__head h3 {
	font-family: "Playfair Display", Georgia, serif;
	color: #FFCE53;
	margin: 0;
	font-size: 1.2rem;
}

.abm-bs-kitpanel__close {
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid #444;
	border-radius: 22px;
	background: transparent;
	color: #bbb;
	cursor: pointer;
}

.abm-bs-kitpanel__close:hover {
	background: #FFCE53;
	border-color: #FFCE53;
	color: #000;
}

.abm-bs-kitpanel__list {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 10px 18px;
}

.abm-bs-kitpanel__list li {
	padding: 10px 12px;
	border: 1px solid #232323;
	border-radius: 10px;
	background: #101010;
}

.abm-bs-kitpanel__list a {
	color: #f0f0f0;
	font-weight: 600;
	text-decoration: none;
	display: block;
	font-size: 0.92rem;
}

.abm-bs-kitpanel__list a:hover {
	color: #FFCE53;
}

.abm-bs-kitpanel__list span {
	display: block;
	color: #8d8d8d;
	font-size: 0.78rem;
	margin-top: 2px;
}

.abm-bs-kitpanel__foot {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-start;
}

.abm-bs-addkit {
	min-height: 52px;
	padding: 14px 30px;
	border: none;
	border-radius: 28px;
	background: #FFCE53;
	color: #0a0a0a;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.abm-bs-addkit:hover {
	background: #ffd873;
	box-shadow: 0 10px 30px rgba(255, 206, 83, 0.25);
}

.abm-bs-addkit:active {
	transform: translateY(1px);
}

.abm-bs-addkit[disabled] {
	opacity: 0.6;
	cursor: default;
}

.abm-bs-kitmsg {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
}

.abm-bs-kitmsg.is-ok { color: #7dd58f; }
.abm-bs-kitmsg.is-error { color: #ff9b8a; }
.abm-bs-kitmsg a { color: #FFCE53; }

/* ---------- Narrativa ---------- */
.abm-bs-story {
	margin-top: 64px;
}

.abm-bs-story__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 22px;
	margin-top: 24px;
}

.abm-bs-story__grid h3 {
	font-family: "Playfair Display", Georgia, serif;
	color: #FFCE53;
	font-size: 1.1rem;
	margin: 0 0 8px;
}

.abm-bs-story__grid p {
	color: #b5b5b5;
	font-size: 0.95rem;
	line-height: 1.65;
	margin: 0;
}

/* ---------- FAQ ---------- */
.abm-bs-faq {
	margin-top: 64px;
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
}

.abm-bs-faq__item {
	border-top: 1px solid #232323;
	padding: 4px 0;
}

.abm-bs-faq__item:last-child {
	border-bottom: 1px solid #232323;
}

.abm-bs-faq__item summary {
	list-style: none;
	cursor: pointer;
	min-height: 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	color: #f0f0f0;
	font-weight: 700;
	font-size: 0.98rem;
	padding: 12px 4px;
}

.abm-bs-faq__item summary::-webkit-details-marker { display: none; }

.abm-bs-faq__item summary::after {
	content: "+";
	color: #FFCE53;
	font-size: 1.4rem;
	line-height: 1;
	transition: transform 0.25s ease;
}

.abm-bs-faq__item[open] summary::after {
	transform: rotate(45deg);
}

.abm-bs-faq__item p {
	color: #ababab;
	font-size: 0.92rem;
	line-height: 1.65;
	margin: 0 0 14px;
	padding: 0 4px;
}

/* =====================================================================
 * MOBILE: layout verticale dedicato, arioso, senza zoom
 * ===================================================================== */
@media (max-width: 781px) {
	.abm-bs-stage {
		aspect-ratio: 4 / 7;
		border-radius: 12px;
	}

	.abm-bs-svg--desktop { display: none; }
	.abm-bs-svg--mobile { display: block; }

	/* Coordinate mobile per i pin */
	.abm-bs-pin {
		left: var(--mx);
		top: var(--my);
	}

	/* Niente zoom su mobile: la zona evidenzia i pin e mostra le card */
	.abm-bs-stage[data-zone="1"] .abm-bs-world,
	.abm-bs-stage[data-zone="2"] .abm-bs-world,
	.abm-bs-stage[data-zone="3"] .abm-bs-world {
		transform: none;
	}

	/* Pin a piena misura anche dentro le zone (non c'e' zoom da compensare) */
	.abm-bs-stage:not([data-zone="0"]) .abm-bs-pin__dot {
		width: 14px;
		height: 14px;
	}

	/* Tooltip come scheda ancorata in basso al riquadro */
	.abm-bs-tip {
		left: 10px !important;
		right: 10px;
		top: auto !important;
		bottom: 10px;
		max-width: none;
	}

	.abm-bs-kitpanel__foot { align-items: stretch; }
	.abm-bs-addkit { width: 100%; }
}

/* Desktop: le card zona restano nascoste finche' non si entra in una zona */
@media (min-width: 782px) {
	.abm-bs-zonecards__group[hidden] { display: none; }
}

/* Riduzione del movimento */
@media (prefers-reduced-motion: reduce) {
	.abm-bs-world { transition: none; }
	.abm-bs-pin__dot { animation: none !important; }
}
