/* Custom Boxes Home Section V2 — horizontal editorial reel */

.cbx-v2 {
	position: relative;
	padding: clamp(2.75rem, 5vw, 4.5rem) 0;
	overflow: hidden;
	background: var(--sc-custom-boxes-v2-cbx-v2-bg, var(--primary-background-color));
}

.cbx-v2__glow {
	position: absolute;
	inset: auto -20% 0 -20%;
	height: 55%;
	background: radial-gradient(
		ellipse 70% 100% at 50% 100%,
		color-mix(in srgb, var(--primary-brand-color) 22%, transparent),
		transparent 68%
	);
	pointer-events: none;
}

.cbx-v2__top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.25rem 2rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.cbx-v2__intro {
	max-width: 34rem;
}

.cbx-v2__tag {
	display: inline-block;
	margin-bottom: 0.65rem;
	padding-bottom: 0.35rem;
	border-bottom: 2px solid var(--sc-custom-boxes-v2-cbx-v2-tag-border-bottom, var(--primary-brand-color));
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sc-custom-boxes-v2-cbx-v2-tag-text, var(--primary-brand-color));
}

.cbx-v2__intro h2 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.65rem, 3.2vw, 2.15rem);
	font-weight: 800;
	line-height: 1.12;
	color: var(--sc-custom-boxes-v2-cbx-v2-intro-heading-text, var(--primary-title-color));
}

.cbx-v2__intro p {
	margin: 0;
	font-size: 0.975rem;
	line-height: 1.6;
	color: var(--sc-custom-boxes-v2-cbx-v2-intro-paragraph-text, var(--secondary-text-color));
}

.cbx-v2__all {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 0;
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--sc-custom-boxes-v2-cbx-v2-all-text, var(--primary-brand-color));
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease, gap 0.2s ease;
}

.cbx-v2__all:hover {
	border-bottom-color: var(--sc-custom-boxes-v2-cbx-v2-all-hover-border-bottom, var(--primary-brand-color));
	gap: 0.75rem;
	color: var(--sc-custom-boxes-v2-cbx-v2-all-hover-text, var(--primary-brand-color));
}

.cbx-v2__all--desktop {
	flex-shrink: 0;
}

.cbx-v2__mobile-all {
	display: none;
	margin-top: 1.5rem;
	text-align: center;
}

/* Horizontal reel */
.cbx-v2__deck-wrap {
	position: relative;
}

.cbx-v2__deck {
	display: flex;
	gap: 1.15rem;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.35rem 0.25rem 1rem;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0.25rem;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: color-mix(in srgb, var(--primary-brand-color) 40%, transparent) transparent;
}

.cbx-v2__deck::-webkit-scrollbar {
	height: 6px;
}

.cbx-v2__deck::-webkit-scrollbar-thumb {
	background: var(--sc-custom-boxes-v2-cbx-v2-deck-bg, color-mix(in srgb, var(--primary-brand-color) 45%, transparent));
	border-radius: 999px;
}

.cbx-v2__hint {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	margin: 0.35rem 0 0;
	font-size: 0.8125rem;
	color: var(--sc-custom-boxes-v2-cbx-v2-hint-text, var(--secondary-text-color));
	opacity: 0.85;
}

/* Panel card */
.cbx-v2-panel {
	flex: 0 0 min(88vw, 520px);
	scroll-snap-align: start;
	opacity: 0;
	transform: translateY(18px) scale(0.98);
	transition:
		opacity 0.55s ease calc(var(--cbx-v2-i, 0) * 0.08s),
		transform 0.55s ease calc(var(--cbx-v2-i, 0) * 0.08s);
}

.cbx-v2-panel.animate-in {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.cbx-v2-panel__link {
	display: grid;
	grid-template-columns: 1fr;
	min-height: 100%;
	text-decoration: none;
	color: inherit;
	border-radius: 22px;
	overflow: hidden;
	background: var(--sc-custom-boxes-v2-cbx-v2-panel-link-bg, color-mix(in srgb, var(--tertiary-background-color) 65%, var(--primary-background-color)));
	border: 1px solid var(--sc-custom-boxes-v2-cbx-v2-panel-link-border, color-mix(in srgb, var(--primary-brand-color) 14%, transparent));
	transition: transform 0.35s ease, border-color 0.35s ease;
}

.cbx-v2-panel__link:hover {
	transform: translateY(-4px);
	border-color: var(--sc-custom-boxes-v2-cbx-v2-panel-link-hover-border, color-mix(in srgb, var(--primary-brand-color) 40%, transparent));
}

.cbx-v2-panel__media {
	position: relative;
	min-height: 200px;
	overflow: hidden;
}

.cbx-v2-panel__image {
	width: 100%;
	height: 100%;
	min-height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

.cbx-v2-panel__link:hover .cbx-v2-panel__image {
	transform: scale(1.05);
}

.cbx-v2-panel__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	font-size: 2.75rem;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-placeholder-text, color-mix(in srgb, var(--primary-brand-color) 45%, var(--secondary-text-color)));
	background: linear-gradient(
		135deg,
		color-mix(in srgb, var(--primary-brand-color) 10%, var(--tertiary-background-color)),
		var(--tertiary-background-color)
	);
}

.cbx-v2-panel__media-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, color-mix(in srgb, var(--charcoal-black, #000) 55%, transparent), transparent 55%);
	pointer-events: none;
}

.cbx-v2-panel__stats {
	position: absolute;
	left: 1rem;
	bottom: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	z-index: 1;
}

[dir='rtl'] .cbx-v2-panel__stats {
	left: auto;
	right: 1rem;
}

.cbx-v2-panel__stats span {
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-stats-text-text, var(--primary-button-text-color));
	background: var(--sc-custom-boxes-v2-cbx-v2-panel-stats-text-bg, color-mix(in srgb, var(--charcoal-black, #000) 55%, transparent));
	backdrop-filter: blur(8px);
	border: 1px solid var(--sc-custom-boxes-v2-cbx-v2-panel-stats-text-border, color-mix(in srgb, var(--primary-background-color) 25%, transparent));
}

.cbx-v2-panel__content {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 1.15rem 1.25rem 1.25rem;
}

.cbx-v2-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}

.cbx-v2-panel__title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-title-text, var(--primary-title-color));
}

.cbx-v2-panel__deal {
	flex-shrink: 0;
	padding: 0.25rem 0.55rem;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 800;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-deal-text, var(--discount_badge_text_color, #fff));
	background: var(--discount_badge_background_color, #d32f2f);
}

.cbx-v2-panel__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.cbx-v2-panel__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-chip-text, var(--primary-title-color));
	background: var(--sc-custom-boxes-v2-cbx-v2-panel-chip-bg, var(--primary-background-color));
	border: 1px solid var(--sc-custom-boxes-v2-cbx-v2-panel-chip-border, color-mix(in srgb, var(--primary-brand-color) 18%, transparent));
}

.cbx-v2-panel__chip em {
	font-style: normal;
	font-size: 0.6875rem;
	font-weight: 800;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-chip-em-text, var(--primary-brand-color));
}

.cbx-v2-panel__chip--more {
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-chip-more-text, var(--secondary-text-color));
	background: var(--sc-custom-boxes-v2-cbx-v2-panel-chip-more-bg, transparent);
}

.cbx-v2-panel__bottom {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--sc-custom-boxes-v2-cbx-v2-panel-bottom-border-top, color-mix(in srgb, var(--primary-brand-color) 12%, transparent));
}

.cbx-v2-panel__price {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.cbx-v2-panel__price-was {
	font-size: 0.75rem;
	text-decoration: line-through;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-price-was-text, var(--secondary-text-color));
	opacity: 0.8;
}

.cbx-v2-panel__price-now {
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-price-now-text, var(--primary-title-color));
}

.cbx-v2-panel__action {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--sc-custom-boxes-v2-cbx-v2-panel-action-text, var(--primary-brand-color));
	transition: gap 0.2s ease;
}

.cbx-v2-panel__link:hover .cbx-v2-panel__action {
	gap: 0.65rem;
}

/* Wide screens — split panel inside each slide */
@media (min-width: 640px) {
	.cbx-v2-panel {
		flex-basis: min(78vw, 640px);
	}

	.cbx-v2-panel__link {
		grid-template-columns: 42% 1fr;
		min-height: 260px;
	}

	.cbx-v2-panel__media {
		min-height: 100%;
	}

	.cbx-v2-panel__image,
	.cbx-v2-panel__placeholder {
		min-height: 100%;
		height: 100%;
	}

	.cbx-v2-panel__media-shade {
		background: linear-gradient(to right, transparent 40%, color-mix(in srgb, var(--charcoal-black, #000) 35%, transparent));
	}

	[dir='rtl'] .cbx-v2-panel__media-shade {
		background: linear-gradient(to left, transparent 40%, color-mix(in srgb, var(--charcoal-black, #000) 35%, transparent));
	}

	.cbx-v2-panel__stats {
		left: auto;
		right: 1rem;
		bottom: auto;
		top: 1rem;
	}

	[dir='rtl'] .cbx-v2-panel__stats {
		right: auto;
		left: 1rem;
	}
}

@media (min-width: 992px) {
	.cbx-v2-panel {
		flex-basis: min(62vw, 680px);
	}
}

@media (max-width: 767px) {
	.cbx-v2__all--desktop {
		display: none;
	}

	.cbx-v2__mobile-all {
		display: block;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cbx-v2-panel,
	.cbx-v2-panel__link,
	.cbx-v2-panel__image,
	.cbx-v2-panel__action,
	.cbx-v2__all {
		transition: none;
	}

	.cbx-v2-panel {
		opacity: 1;
		transform: none;
	}
}
