/* Before & after */
.h-ba__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.h-ba__panel { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; }
.h-ba__panel[hidden] { display: none; }

/* Comparison */
.h-ba__compare {
	--pos: 50%;
	position: relative; flex: 999 1 560px; min-width: 0;
	aspect-ratio: 4 / 3; overflow: hidden;
	border-radius: var(--h-r-xl); background: #3A322F;
	-webkit-user-select: none; user-select: none; touch-action: pan-y;
}
.h-ba__img { position: absolute; inset: 0; }
.h-ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.h-ba__img .h-img { width: 100%; height: 100%; object-fit: cover; }
.h-ba__ph {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: center;
}
/* Photo-placeholder neutrals: they stand in for photos, in both looks. */
.h-ba__ph--after { background: #8A7A70 repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 22px); color: rgba(255, 255, 255, .88); }
.h-ba__ph--before { background: #4A403C repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 22px); color: rgba(255, 255, 255, .8); }
.h-ba__ph-label { padding: 0 16px; }

.h-ba__tag {
	position: absolute; top: 16px; z-index: 2;
	padding: 7px 12px; border-radius: 999px;
	font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
	pointer-events: none;
}
.h-ba__tag--before { left: 16px; background: rgba(26, 22, 20, .72); color: #FFFFFF; }
.h-ba__tag--after { right: 16px; background: #FFFFFF; color: #1A1614; }
.h-ba__line {
	position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2;
	width: 2px; margin-left: -1px; background: #FFFFFF; pointer-events: none;
}
.h-ba__knob {
	position: absolute; top: 50%; left: var(--pos); z-index: 3;
	display: flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 999px;
	background: #FFFFFF; color: #1A1614;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
	transform: translate(-50%, -50%);
	pointer-events: none;
	transition: transform .15s ease;
}
.h-ba__compare.is-dragging .h-ba__knob { transform: translate(-50%, -50%) scale(.94); }
.h-ba__compare.is-dragging { cursor: ew-resize; }
.h-ba__range {
	position: absolute; inset: 0; z-index: 4;
	width: 100%; height: 100%; margin: 0; padding: 0;
	opacity: 0; cursor: ew-resize;
	-webkit-appearance: none; appearance: none; background: transparent;
}
.h-ba__compare:has(.h-ba__range:focus-visible) .h-ba__knob { outline: 2px solid #FFFFFF; outline-offset: 4px; }

/* Info column */
.h-ba__info { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.h-ba__copy { display: flex; flex-direction: column; gap: 12px; }
.h-ba__cat { font-size: 13px; color: var(--h-accent); }
.h-w .h-ba__name { font-size: 30px; line-height: 1.15; }
.h-ba__text { font-size: 15px; line-height: 1.7; color: var(--h-muted); }
.h-ba__rows { display: flex; flex-direction: column; margin: 6px 0 0; padding: 0; }
.h-ba__row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--h-line); font-size: 14px; }
.h-ba__row:last-child { border-bottom: 1px solid var(--h-line); }
.h-ba__row dt { color: var(--h-muted); }
.h-ba__row dd { margin: 0; text-align: right; }
.h-ba__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Thumbnails */
.h-ba__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; margin-top: 40px; }
.h-w .h-ba__thumb {
	display: flex; flex-direction: column; padding: 0; overflow: hidden;
	border-radius: var(--h-r-md); border: 2px solid transparent; background: transparent;
	color: var(--h-ink); font-family: inherit; text-align: left; cursor: pointer;
	transition: border-color .2s ease;
}
.h-w .h-ba__thumb[aria-pressed="true"] { border-color: var(--h-ink); }
.h-ba__thumb-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); aspect-ratio: 2 / 1; }
.h-ba__thumb-pic { position: relative; overflow: hidden; }
.h-ba__thumb-pic .h-ba__ph, .h-ba__thumb-pic .h-img { position: absolute; inset: 0; }
.h-ba__thumb-label { padding: 10px 12px; font-size: 13px; font-weight: 500; background: color-mix(in srgb, var(--h-ink) 6%, transparent); }
@media (hover: hover) and (pointer: fine) {
	.h-w .h-ba__thumb:hover { border-color: color-mix(in srgb, var(--h-ink) 45%, transparent); }
	.h-w .h-ba__thumb[aria-pressed="true"]:hover { border-color: var(--h-ink); }
}

@media (max-width: 640px) {
	.h-ba__compare { aspect-ratio: 4 / 5; }
	.h-w .h-ba__name { font-size: 26px; }
	.h-ba__actions .h-btn { flex: 1 1 100%; }
	/* The tabs above already switch looks; the thumbnail row only adds length on a phone. */
	.h-ba__thumbs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.h-ba__knob, .h-w .h-ba__thumb { transition: none; }
	.h-ba__compare.is-dragging .h-ba__knob { transform: translate(-50%, -50%); }
}
