/**
 * SMT Flash Sale — Frontend styles (standalone, prefix .smt-fs-)
 */

.smt-fs-bar-wrap {
	margin: 12px 0;
}

.smt-fs-bar {
	position: relative;
	height: 30px;
	border-radius: 8px;
	background: #e0e0e0;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.smt-fs-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: var(--smt-pct, 0%);
	background: var(--smt-color, #2e7d32);
	border-radius: 8px;
	transition: width 0.5s ease;
}

.smt-fs-label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	z-index: 1;
	gap: 8px;
}

.smt-fs-label strong {
	font-weight: 700;
}

.smt-fs-bar-placeholder {
	display: none;
}

.smt-fs-bar.smt-fs-bar-sm {
	height: 22px;
	border-radius: 5px;
}

.smt-fs-bar.smt-fs-bar-sm .smt-fs-label {
	font-size: 14px;
	padding: 0 8px;
}

.smt-fs-cart-notice {
	font-size: 14px;
	color: #c62828;
	margin-top: 4px;
}

/* Widget slider */
.smt-fs-widget {
	--smt-primary: #ff6d00;
	font-family: inherit;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #eee;
	margin: 16px 0;
}

.smt-fs-widget-header {
	background: var(--smt-primary);
	color: #fff;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	border-radius: 10px 10px 0 0;
	flex-wrap: wrap;
}

.smt-fs-widget-title {
	font-size: 16px;
	font-weight: 600;
}

.smt-fs-see-all {
	margin-left: auto;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	text-decoration: none;
}

.smt-fs-see-all:hover {
	color: #fff;
}

.smt-fs-countdown {
	display: flex;
	gap: 4px;
	align-items: center;
}

.smt-fs-seg {
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
	font-family: monospace;
	font-size: 14px;
	padding: 3px 8px;
	border-radius: 4px;
	min-width: 28px;
	text-align: center;
	display: inline-block;
}

.smt-fs-sep {
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
}

.smt-fs-slider {
	display: grid;
	grid-template-columns: repeat(var(--smt-cols, 5), minmax(140px, 1fr));
	gap: 10px;
	padding: 12px;
	background: #f9f9f9;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	border-radius: 0 0 10px 10px;
	scrollbar-width: none;
}

.smt-fs-slider::-webkit-scrollbar {
	display: none;
}

/* Product card */
.smt-fs-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	scroll-snap-align: start;
	transition: box-shadow 0.2s;
}

.smt-fs-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	color: inherit;
}

.smt-fs-card-img {
	position: relative;
	aspect-ratio: 1;
	background: #f5f5f5;
}

.smt-fs-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.smt-fs-pct-badge {
	position: absolute;
	top: 6px;
	left: 6px;
	background: #c62828;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 3px;
	z-index: 1;
}

.smt-fs-card-body {
	padding: 8px 10px;
}

.smt-fs-card-name {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	margin-bottom: 5px;
	color: #333;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.8em;
}

.smt-fs-prices {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.smt-fs-price-flash {
	font-size: 14px;
	font-weight: 700;
	color: var(--smt-primary, #ff6d00);
}

.smt-fs-price-orig {
	font-size: 14px;
	color: #999;
	text-decoration: line-through;
}

/* Flash page */
.smt-fs-page {
	--smt-primary: #ff6d00;
	max-width: 1200px;
	margin: 0 auto 40px;
}

.smt-fs-page-banner {
	padding: 24px 20px;
	background: #0d2137;
	border-radius: 10px 10px 0 0;
}

.smt-fs-page-banner img {
	max-height: 200px;
	width: 100%;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: 12px;
	display: block;
}

.smt-fs-page-title {
	color: #fff;
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 600;
}

.smt-fs-page-sub {
	color: rgba(255, 255, 255, 0.65);
	margin: 0 0 10px;
	font-size: 14px;
}

.smt-fs-page-cta {
	display: inline-block;
	margin-top: 12px;
	background: var(--smt-primary, #ff6d00);
	color: #fff;
	padding: 8px 16px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
}

.smt-fs-page-cta:hover {
	color: #fff;
	opacity: 0.92;
}

.smt-fs-page-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	padding: 16px;
	background: #f9f9f9;
	border-radius: 0 0 10px 10px;
}

@media (max-width: 991px) {
	.smt-fs-page-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.smt-fs-slider {
		grid-template-columns: repeat(3, minmax(140px, 1fr));
	}
}

@media (max-width: 767px) {
	.smt-fs-slider {
		grid-template-columns: repeat(2, minmax(140px, 1fr));
	}

	.smt-fs-page-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.smt-fs-label {
		font-size: 14px;
		padding: 0 8px;
	}

	.smt-fs-bar {
		height: 26px;
	}
}
