:root {
	--cs-red: #d80712;
	--cs-red-dark: #a8070f;
	--cs-text: #20242a;
	--cs-muted: #626870;
	--cs-line: #d9dde2;
	--cs-bg: #f6f6f5;
	--cs-surface: #ffffff;
}

.carsystem-promotions-page .site-content > .ast-container,
.carsystem-promotions-page #content > .ast-container {
	max-width: none;
	padding: 0;
}

.cs-promotions,
.cs-promotions * {
	box-sizing: border-box;
}

.cs-promotions {
	min-height: 70vh;
	background: var(--cs-bg);
	color: var(--cs-text);
	font-family: inherit;
}

.cs-promotions button,
.cs-promotions input {
	font: inherit;
}

.cs-promotions__intro {
	border-top: 4px solid var(--cs-red);
	border-bottom: 1px solid var(--cs-line);
	background: var(--cs-surface);
}

.cs-promotions__inner,
.cs-promotions__catalog {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
}

.cs-promotions__inner {
	padding: 44px 0 38px;
}

.cs-promotions__intro h1 {
	margin: 0;
	color: var(--cs-text);
	font-size: clamp(2rem, 4vw, 3.25rem);
	font-weight: 750;
	letter-spacing: -0.035em;
	line-height: 1.08;
}

.cs-promotions__intro p {
	max-width: 660px;
	margin: 12px 0 0;
	color: var(--cs-muted);
	font-size: 1rem;
	line-height: 1.6;
}

.cs-promotions__catalog {
	padding: 42px 0 64px;
}

.cs-promotions__toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
	gap: 28px;
	align-items: center;
}

.cs-promotions__toolbar h2 {
	margin: 0;
	color: var(--cs-text);
	font-size: clamp(1.35rem, 2.5vw, 1.85rem);
	font-weight: 720;
	letter-spacing: -0.02em;
}

.cs-promotions__search {
	display: block;
	width: 100%;
}

.cs-promotions__search input {
	display: block;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--cs-line);
	border-radius: 2px;
	background: var(--cs-surface);
	color: var(--cs-text);
	font-size: 1rem;
	line-height: 1.35;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.cs-promotions__search input:focus {
	border-color: var(--cs-red);
	box-shadow: 0 0 0 2px rgba(216, 7, 18, 0.1);
}

.cs-promotions__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 22px;
	margin: 28px 0 0;
	border-bottom: 1px solid var(--cs-line);
}

.cs-promotions__filters button {
	position: relative;
	min-height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--cs-muted);
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 650;
}

.cs-promotions__filters button::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	height: 2px;
	background: transparent;
}

.cs-promotions__filters button:hover,
.cs-promotions__filters button.is-active {
	color: var(--cs-text);
}

.cs-promotions__filters button.is-active::after {
	background: var(--cs-red);
}

.cs-promotions__resultbar {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin: 18px 0;
	color: var(--cs-muted);
	font-size: 0.84rem;
}

.cs-promotions__resultbar span:first-child {
	color: var(--cs-text);
	font-weight: 650;
}

.cs-promotions__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px 22px;
}

.cs-promo-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--cs-line);
	border-radius: 3px;
	background: var(--cs-surface);
}

.cs-promo-card[hidden] {
	display: none;
}

.cs-promo-card__media {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--cs-line);
	background: #fff;
	cursor: zoom-in;
	aspect-ratio: 720 / 1018;
	overflow: hidden;
}

.cs-promo-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.cs-promo-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px;
}

.cs-promo-card h3 {
	margin: 0;
	color: var(--cs-text);
	font-size: 1.03rem;
	font-weight: 720;
	letter-spacing: -0.012em;
	line-height: 1.35;
}

.cs-promo-card__price {
	margin: 10px 0 0;
	color: var(--cs-red);
	line-height: 1.25;
}

.cs-promo-card__price strong {
	font-size: 1.05rem;
	font-weight: 750;
}

.cs-promo-card__price span {
	font-size: 0.78rem;
	font-weight: 650;
}

.cs-promo-card__condition {
	margin: 8px 0 0;
	color: var(--cs-muted);
	font-size: 0.84rem;
	line-height: 1.5;
}

.cs-promo-card__actions {
	margin-top: auto;
	padding-top: 18px;
}

.cs-promo-bundle-form {
	display: block;
	margin: 0;
}

.cs-button {
	display: inline-flex;
	min-height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0 15px;
	border: 1px solid var(--cs-red);
	border-radius: 2px;
	cursor: pointer;
	font-size: 0.84rem;
	font-weight: 680;
	line-height: 1;
	text-align: center;
	text-decoration: none !important;
}

.cs-button--primary {
	background: var(--cs-red);
	color: #fff !important;
}

.cs-button--primary:hover {
	border-color: var(--cs-red-dark);
	background: var(--cs-red-dark);
}

.cs-button--secondary {
	background: transparent;
	color: var(--cs-red) !important;
}

.cs-button--secondary:hover {
	background: var(--cs-red);
	color: #fff !important;
}

.cs-promotions__empty {
	padding: 56px 20px;
	text-align: center;
}

.cs-promotions__empty h3 {
	margin: 0;
	font-size: 1.3rem;
}

.cs-promotions__empty p {
	margin: 8px 0 0;
	color: var(--cs-muted);
}

.cs-promotions__notice {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 28px;
	margin-top: 36px;
	padding-top: 22px;
	border-top: 1px solid var(--cs-line);
}

.cs-promotions__notice p {
	max-width: 850px;
	margin: 0;
	color: var(--cs-muted);
	font-size: 0.82rem;
	line-height: 1.55;
}

.cs-promotions__notice a {
	flex: 0 0 auto;
	color: var(--cs-red);
	font-size: 0.84rem;
	font-weight: 680;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cs-promo-modal[hidden] {
	display: none;
}

.cs-promo-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 18px;
}

.cs-promo-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
}

.cs-promo-modal__panel {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(760px, 100%);
	max-height: 94vh;
	flex-direction: column;
	overflow: hidden;
	border-radius: 3px;
	background: var(--cs-surface);
}

.cs-promo-modal__image-wrap {
	overflow: auto;
	background: #fff;
}

.cs-promo-modal__image-wrap img {
	display: block;
	width: 100%;
	height: auto;
}

.cs-promo-modal__caption {
	padding: 14px 18px 16px;
	border-top: 1px solid var(--cs-line);
}

.cs-promo-modal__caption strong {
	display: block;
	color: var(--cs-text);
	font-size: 0.95rem;
}

.cs-promo-modal__caption p {
	margin: 4px 0 0;
	color: var(--cs-muted);
	font-size: 0.82rem;
}

.cs-promo-modal__close {
	position: absolute;
	right: 10px;
	top: 10px;
	z-index: 3;
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.78);
	color: #fff;
	cursor: pointer;
	font-size: 1.55rem;
	line-height: 1;
}

body.cs-promo-modal-open {
	overflow: hidden;
}

body.wp-dark-mode-active,
body.wp-dark-mode-active .cs-promotions,
body.dark-mode,
body.dark-mode .cs-promotions {
	--cs-text: #f1f2f3;
	--cs-muted: #b8bdc4;
	--cs-line: #43474c;
	--cs-bg: #1f2123;
	--cs-surface: #272a2d;
}

body.wp-dark-mode-active .cs-promotions__search input::placeholder,
body.dark-mode .cs-promotions__search input::placeholder {
	color: #9da3aa;
}

@media (prefers-reduced-motion: reduce) {
	.cs-promotions *,
	.cs-promotions *::before,
	.cs-promotions *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 980px) {
	.cs-promotions__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.cs-promotions__inner,
	.cs-promotions__catalog {
		width: min(100% - 28px, 1180px);
	}

	.cs-promotions__toolbar {
		grid-template-columns: 1fr;
	}

	.cs-promotions__filters {
		gap: 2px 18px;
	}

	.cs-promotions__grid {
		grid-template-columns: 1fr;
	}

	.cs-promotions__resultbar,
	.cs-promotions__notice {
		align-items: flex-start;
		flex-direction: column;
	}

	.cs-promo-modal {
		padding: 8px;
	}

	.cs-promo-modal__panel {
		max-height: 96vh;
	}
}
