/**
 * Black Friday / Promotional Campaign Showcase Stylesheet
 *
 * Scoped under .tsbf container
 *
 * @copyright 2026 NANI.BG
 */

.tsbf {
	--tsbf-accent: #d4af37;
	background: radial-gradient(ellipse at top right, #292824 0%, transparent 65%), #111216;
	color: #ffffff;
	padding: clamp(20px, 3.5vw, 42px);
	border-radius: 16px;
	margin: 22px 0 32px 0;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
	position: relative;
	overflow: hidden;
}

.tsbf * {
	box-sizing: border-box;
}

.tsbf [hidden] {
	display: none !important;
}

/* Header */
.tsbf__header {
	text-align: center;
	margin-bottom: 28px;
}

.tsbf__eyebrow {
	display: inline-block;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--tsbf-accent);
	font-weight: 700;
	margin-bottom: 6px;
}

.tsbf__header h2 {
	font-size: clamp(24px, 3.6vw, 42px);
	color: #ffffff !important;
	line-height: 1.18;
	margin: 8px 0 12px 0;
	font-weight: 800;
}

.tsbf__header p {
	color: #cfd0d6;
	font-size: clamp(14px, 1.4vw, 16px);
	max-width: 760px;
	margin: 0 auto;
	line-height: 1.5;
}

/* Timer */
.tsbf__timer {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 18px;
	font-size: 15px;
	color: #e5e5ea;
}

.tsbf__timer strong {
	font-variant-numeric: tabular-nums;
	border: 1px solid var(--tsbf-accent);
	background: rgba(212, 175, 55, 0.12);
	border-radius: 8px;
	padding: 7px 14px;
	color: var(--tsbf-accent);
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0.05em;
}

/* Category Filter Pills */
.tsbf__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 24px;
}

.tsbf__filters button {
	border: 1px solid #4a4b52;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.05);
	color: #ffffff;
	padding: 7px 16px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	min-height: 38px;
	transition: all 0.18s ease;
}

.tsbf__filters button:hover {
	border-color: var(--tsbf-accent);
	color: var(--tsbf-accent);
}

.tsbf__filters button.is-active {
	background: var(--tsbf-accent);
	border-color: var(--tsbf-accent);
	color: #111111;
	box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

/* Cards Grid */
.tsbf__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	align-items: stretch;
}

/* Individual Card */
.tsbf__card {
	min-width: 0;
	background: #1c1d23;
	border: 1px solid #34353d;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tsbf__card:hover {
	transform: translateY(-4px);
	border-color: var(--tsbf-accent);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* Hero Card (first / highlighted product) */
.tsbf__card--hero {
	grid-column: span 2;
	grid-row: span 2;
	border-color: var(--tsbf-accent);
	background: #20222a;
}

/* Image */
.tsbf__image {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	position: relative;
	text-decoration: none !important;
}

.tsbf__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 14px;
	transition: transform 0.28s ease;
}

.tsbf__card:hover .tsbf__image img {
	transform: scale(1.04);
}

.tsbf__card--hero .tsbf__image {
	aspect-ratio: 1.15 / 1;
}

/* Card Body */
.tsbf__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
}

.tsbf__body h3 {
	font-size: 15px;
	line-height: 1.35;
	margin: 0;
	font-weight: 600;
	max-height: 2.7em;
	overflow: hidden;
}

.tsbf__body h3 a {
	color: #ffffff !important;
	text-decoration: none !important;
	transition: color 0.15s ease;
}

.tsbf__body h3 a:hover {
	color: var(--tsbf-accent) !important;
}

.tsbf__card--hero h3 {
	font-size: clamp(18px, 1.8vw, 24px);
	max-height: none;
}

/* Price Box */
.tsbf__prices {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 12px;
	margin-top: auto;
	padding-top: 6px;
}

.tsbf__old {
	color: #9b9ca6;
	font-size: 15px;
	text-decoration: line-through;
}

.tsbf__price {
	color: var(--tsbf-accent);
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
}

.tsbf__card--hero .tsbf__price {
	font-size: clamp(24px, 2.4vw, 32px);
}

.tsbf__saving {
	color: #d8cca4;
	font-size: 12.5px;
	font-weight: 600;
	background: rgba(212, 175, 55, 0.1);
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	width: fit-content;
}

/* Call to Action */
.tsbf__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	background: var(--tsbf-accent);
	color: #111111 !important;
	padding: 10px 14px;
	border-radius: 6px;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 14px;
	min-height: 40px;
	transition: filter 0.18s ease, transform 0.15s ease;
	margin-top: 4px;
}

.tsbf__cta:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	color: #000000 !important;
}

/* Badges */
.tsbf__badges {
	position: absolute;
	z-index: 2;
	top: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	pointer-events: none;
}

.tsbf__badges span {
	background: rgba(17, 18, 22, 0.9);
	color: var(--tsbf-accent);
	padding: 5px 10px;
	border-radius: 16px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tsbf__badges .tsbf__discount {
	background: var(--tsbf-accent);
	color: #111111;
	font-weight: 800;
	font-size: 12px;
}

.tsbf__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* When category filter is active, reset hero card to normal grid cell for uniform flow */
.tsbf.is-filtered .tsbf__card--hero {
	grid-column: auto;
	grid-row: auto;
}

.tsbf.is-filtered .tsbf__card--hero .tsbf__image {
	aspect-ratio: 1 / 1;
}

.tsbf.is-filtered .tsbf__card--hero h3 {
	font-size: 15px;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
	.tsbf__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.tsbf__card--hero {
		grid-column: span 2;
		grid-row: auto;
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.tsbf__card--hero .tsbf__image {
		aspect-ratio: 1 / 1;
	}

	.tsbf.is-filtered .tsbf__card--hero {
		display: flex;
	}
}

@media (max-width: 575px) {
	.tsbf {
		padding: 16px 12px;
		border-radius: 12px;
		margin: 16px 0 24px 0;
	}

	.tsbf__header h2 {
		font-size: 22px;
	}

	.tsbf__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.tsbf__card--hero {
		grid-column: span 2;
		display: flex;
	}

	.tsbf__body {
		padding: 10px;
		gap: 8px;
	}

	.tsbf__body h3 {
		font-size: 13px;
	}

	.tsbf__price {
		font-size: 18px;
	}

	.tsbf__old {
		font-size: 13px;
	}

	.tsbf__cta {
		font-size: 12px;
		padding: 8px 10px;
		min-height: 36px;
	}

	.tsbf__filters button {
		font-size: 12px;
		padding: 6px 12px;
		min-height: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tsbf__card,
	.tsbf__image img,
	.tsbf__cta {
		transition: none !important;
	}
	.tsbf__card:hover,
	.tsbf__card:hover .tsbf__image img {
		transform: none !important;
	}
}
