/* ==========================================================================
   Shoppers Clearance — Sale Products Grid + Countdown
   Brand palette matches the vendor wizard (red #c81e1e).
   ========================================================================== */

.scw-sale-wrap {
	--scw-brand: #c81e1e;
	--scw-brand-2: #e23b3b;
	--scw-ink: #0f172a;
	--scw-muted: #64748b;
	--scw-line: #e6e8ee;
	--scw-cols: 4;
	color: var(--scw-ink);
	font-size: 15px;
}
.scw-sale-wrap *, .scw-sale-wrap *::before, .scw-sale-wrap *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------  Grid  */

.scw-sale-grid {
	display: grid;
	grid-template-columns: repeat(var(--scw-cols, 4), minmax(0, 1fr));
	gap: 24px;
	margin: 0 0 28px;
}
@media (max-width: 1100px) { .scw-sale-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .scw-sale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .scw-sale-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------  Card  */

.scw-sale-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--scw-line);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 12px 30px -20px rgba(15, 23, 42, .3);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.scw-sale-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 26px 44px -24px rgba(15, 23, 42, .45);
	border-color: #d9dee7;
}

.scw-sale-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #f6f7f9;
	overflow: hidden;
}
.scw-sale-card__media img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.scw-sale-card:hover .scw-sale-card__media img { transform: scale(1.05); }

.scw-sale-badge {
	position: absolute;
	top: 12px; left: 12px;
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .02em;
	color: #fff;
	background: linear-gradient(135deg, var(--scw-brand-2), var(--scw-brand));
	box-shadow: 0 8px 16px -8px rgba(200, 30, 30, .8);
}

.scw-sale-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 16px 18px;
	flex: 1;
}
.scw-sale-card__title {
	margin: 0;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -.01em;
}
.scw-sale-card__title a { color: var(--scw-ink); text-decoration: none; }
.scw-sale-card__title a:hover { color: var(--scw-brand); }

/* WooCommerce price html: <del> regular, <ins> sale */
.scw-sale-card__price { font-size: 15px; line-height: 1.2; }
.scw-sale-card__price del { color: var(--scw-muted); font-weight: 500; margin-right: 6px; opacity: .85; }
.scw-sale-card__price ins { text-decoration: none; color: var(--scw-brand); font-weight: 800; font-size: 18px; }
.scw-sale-card__price .amount { font-weight: 700; }

.scw-sale-card__ends { font-size: 12.5px; color: var(--scw-muted); font-weight: 600; }
.scw-sale-card__ends--flash { color: var(--scw-brand); }

.scw-sale-card__btn {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	color: #fff;
	background: linear-gradient(135deg, var(--scw-brand-2), var(--scw-brand));
	box-shadow: 0 12px 22px -12px rgba(200, 30, 30, .8);
	transition: transform .1s ease, box-shadow .18s ease;
}
.scw-sale-card__btn:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(200, 30, 30, .85); color: #fff; }

/* ----------------------------------------------------------------  Slider  */

.scw-sale-wrap--slider { --scw-slides: 4; position: relative; }
.scw-slider { position: relative; }
.scw-slider__viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}
.scw-slider__viewport::-webkit-scrollbar { display: none; }
.scw-slider__track { display: flex; gap: 24px; padding: 6px 2px 14px; }
.scw-slide {
	display: flex;
	flex: 0 0 calc((100% - (var(--scw-slides, 4) - 1) * 24px) / var(--scw-slides, 4));
	min-width: 0;
	scroll-snap-align: start;
}
.scw-slide > .scw-sale-card { width: 100%; }

@media (max-width: 1100px) { .scw-sale-wrap--slider { --scw-slides: 3; } }
@media (max-width: 820px)  { .scw-sale-wrap--slider { --scw-slides: 2; } }
@media (max-width: 480px)  { .scw-sale-wrap--slider { --scw-slides: 1; } }

.scw-slider__nav {
	position: absolute;
	top: 34%;
	transform: translateY(-50%);
	z-index: 3;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid var(--scw-line);
	background: #fff;
	color: var(--scw-brand);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 26px -12px rgba(15, 23, 42, .45);
	transition: all .15s ease;
}
.scw-slider__nav:hover { background: linear-gradient(135deg, var(--scw-brand-2), var(--scw-brand)); color: #fff; border-color: transparent; }
.scw-slider__nav--prev { left: -14px; }
.scw-slider__nav--next { right: -14px; }
.scw-slider__nav:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 560px) {
	.scw-slider__nav--prev { left: 2px; }
	.scw-slider__nav--next { right: 2px; }
}

/* --------------------------------------------------------------  Countdown  */

.scw-countdown {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.scw-cd {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 46px;
	padding: 7px 6px 5px;
	border-radius: 10px;
	background: linear-gradient(180deg, #1b1830, #0e1120);
	color: #fff;
	line-height: 1;
}
.scw-cd__n {
	font-size: 18px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: .02em;
}
.scw-cd__l {
	margin-top: 4px;
	font-size: 9.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: rgba(255, 255, 255, .55);
}
.scw-countdown.is-urgent .scw-cd { background: linear-gradient(135deg, var(--scw-brand-2), var(--scw-brand)); }
.scw-countdown.is-urgent .scw-cd__l { color: rgba(255, 255, 255, .8); }
.scw-countdown__ended {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--scw-muted);
	background: #f1f3f7;
}

/* Larger variant on the single product page */
.scw-single-timer {
	margin: 18px 0 22px;
	padding: 16px 18px;
	border: 1px solid var(--scw-line, #e6e8ee);
	border-radius: 14px;
	background: linear-gradient(180deg, #fff7f7, #fff1f1);
}
.scw-single-timer__head {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .01em;
	color: #8a1c1c;
}
.scw-countdown--lg { gap: 12px; }
.scw-countdown--lg .scw-cd { min-width: 66px; padding: 12px 10px 9px; border-radius: 12px; }
.scw-countdown--lg .scw-cd__n { font-size: 28px; }
.scw-countdown--lg .scw-cd__l { font-size: 11px; margin-top: 6px; }

/* ----------------------------------------------------------  Pagination  */

.scw-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 10px;
}
.scw-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1.5px solid var(--scw-line);
	background: #fff;
	color: #334155;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: all .15s ease;
}
.scw-page:hover { border-color: #b6bcc7; background: #f8fafc; color: var(--scw-brand); }
.scw-page.is-current {
	background: linear-gradient(135deg, var(--scw-brand-2), var(--scw-brand));
	border-color: transparent;
	color: #fff;
	box-shadow: 0 10px 20px -10px rgba(200, 30, 30, .75);
}
.scw-page--nav { font-size: 18px; }
.scw-page-gap { color: var(--scw-muted); padding: 0 2px; }

.scw-sale-empty {
	padding: 34px;
	text-align: center;
	color: #64748b;
	font-size: 15px;
	border: 1px dashed #d5d9e0;
	border-radius: 14px;
	background: #fafbfc;
}

@media (prefers-reduced-motion: reduce) {
	.scw-sale-card, .scw-sale-card__media img, .scw-sale-card__btn, .scw-page { transition: none; }
}
