/**
 * Advanced Product Countdown - Styles
 * Version: 1.0.0
 */

/* Base countdown layout */
.apc-countdown {
	display: inline-flex;
/* 	gap: 6px; */
	direction: ltr;
	user-select: none;
	white-space: nowrap;
	font-family: inherit;
	font-weight: 700;
	line-height: 1.2;
	align-items: center;
	flex-direction: row;
}
/* mainpage Countdown */
.apc-cd-part-flash {
	min-width: 26px;
	text-align: center;
	letter-spacing: .02em;
/* 	border: 1px solid rgba(0, 0, 0, 0.1); */
	padding: 6px 8px;
	border-radius: 12px;
/* 	background-color: var(--apc-timer-bg, #F44336); */
	color: var(--apc-timer-flash-text, #ffffff);
}

.apc-cd-sep-flash {
	opacity: .6;
	color: #ffffff;
}

/* Countdown parts */
.apc-cd-part {
	min-width: 26px;
	text-align: center;
	letter-spacing: .02em;
/* 	border: 1px solid rgba(0, 0, 0, 0.1); */
/* 	padding: 6px 8px; */
	border-radius: 12px;
/* 	background-color: var(--apc-timer-bg, #F44336); */
	color: var(--apc-timer-text, #F44336);
}

.apc-cd-sep {
	opacity: .6;
	color: var(--apc-timer-bg, #F44336);
}

/* Loop/Archive context (product cards) */
.apc-countdown--loop {
	font-size: 16px;
}

.apc-countdown--loop .apc-cd-part {
	min-width: 26px;
/* 	padding: 6px 8px; */
	border-radius: 12px;
}

.price .apc-countdown--loop {
	display: block;
	margin-top: 8px;
}

/* Single product context */
.apc-countdown--single {
	font-size: 22px;
}

.apc-countdown--single .apc-cd-part {
	min-width: 32px;
/* 	padding: 8px 10px; */
	border-radius: 12px;
}

/* Main flash sale countdown */
.apc-countdown--main {
	font-size: 20px;
}

.apc-countdown--main .apc-cd-part {
	min-width: 30px;
	padding: 8px 10px;
	border-radius: 10px;
}

/* Flash Sale Section */
.apc-flash-sale {
	position: relative;
	margin: 16px 0;
}

.apc-flash-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	background: var(--apc-timer-bg, #ff1744);
	color: var(--apc-timer-text, #fff);
	padding: 10px 12px;
	border-radius: 10px;
}

.apc-flash-title {
	font-weight: 800;
	font-size: 18px;
}

.apc-flash-carousel {
	position: relative;
	overflow: hidden;
}

.apc-flash-track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 8px;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.apc-flash-track::-webkit-scrollbar {
	height: 6px;
}

.apc-flash-track::-webkit-scrollbar-track {
	background: transparent;
}

.apc-flash-track::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

.apc-flash-item {
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .06);
	border-radius: 12px;
	padding: 10px;
	min-width: 220px;
	max-width: 260px;
	flex: 0 0 auto;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apc-flash-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.apc-flash-item a {
	text-decoration: none!important;
	color: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 16px;
	font-weight: 700;
	gap: 8px;
	padding: 16px;
}

.apc-flash-thumb {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
	margin-bottom: 8px;
	max-height: 200px;
}

.apc-flash-name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
	margin: 6px 0;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	text-align: center;
	width: 100%;
}

.apc-flash-price {
	margin-top: 6px;
	font-size: 18px;
	font-weight: 800;
}

.apc-flash-nav {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: none;
	justify-content: space-between;
	pointer-events: none;
	padding: 0 8px;
}

.apc-flash-btn {
	pointer-events: auto;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .1);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
	font-size: 24px;
	font-weight: bold;
	line-height: 1;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.apc-flash-btn:hover {
	background: #f5f5f5;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transform: scale(1.05);
}

.apc-flash-btn:active {
	transform: scale(0.95);
}

/* Responsive */
@media (max-width: 640px) {
	.apc-flash-item {
		min-width: 160px;
		max-width: 200px;
	}
	
	.apc-countdown--main {
		font-size: 16px;
	}
	
	.apc-flash-title {
		font-size: 16px;
	}
	
	.apc-flash-thumb {
		max-height: 150px;
	}
	
	.apc-flash-name {
		font-size: 14px;
	}
	
	.apc-flash-price {
		font-size: 16px;
	}
}

/* RTL support */
[dir="rtl"] .apc-countdown {
	direction: ltr; /* Keep timer LTR even in RTL context */
}

/* Hidden state */
.apc-countdown[style*="display: none"] {
	display: none !important;
}

/* Loading state */
.apc-countdown.apc-loading {
	opacity: 0.6;
}

/* Expired state */
.apc-countdown.apc-expired {
	opacity: 0.7;
	font-size: 0.9em;
}

