/* ==========================================================================
   Themesic — EDD Cards v6
   Brand: #FF7400 (orange) · #5511F8 (purple accent) · #463F52 (purple-charcoal)
   ========================================================================== */

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

.edd_downloads_list {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}

.edd_download {
	float: none !important;
	padding: 0 15px 30px !important;
	margin: 0 !important;
}

.edd_download_columns_1 .edd_download { width: 100%; flex: 0 0 100%; }
.edd_download_columns_2 .edd_download { width: 50%; flex: 0 0 50%; }
.edd_download_columns_3 .edd_download { width: 33.333%; flex: 0 0 33.333%; }
.edd_download_columns_4 .edd_download { width: 25%; flex: 0 0 25%; }

@media (max-width: 992px) {
	.edd_download_columns_3 .edd_download,
	.edd_download_columns_4 .edd_download { width: 50%; flex: 0 0 50%; }
}
@media (max-width: 600px) {
	.edd_download_columns_2 .edd_download,
	.edd_download_columns_3 .edd_download,
	.edd_download_columns_4 .edd_download { width: 100%; flex: 0 0 100%; }
}

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

.ct-card {
	background: #fff;
	padding: 20px;
	border-radius: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
	font-family: 'Figtree', 'Inter', sans-serif;
}

.ct-card:hover {
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
	transform: translateY(-4px);
}

/* --- Image ---------------------------------------------------------------- */

.ct-card__image {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	aspect-ratio: 590 / 300;
	margin-bottom: 20px;
}

.ct-card__image-link {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
}

.ct-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 20px;
	transition: transform 0.5s ease;
}

.ct-card:hover .ct-card__image img {
	transform: scale(1.04);
}

.ct-card__image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f0f4f8 0%, #e4eaf0 100%);
}

/* --- Price badge — FIXED SIZE, NO SCALE ON HOVER -------------------------- */

.ct-card__price {
	position: absolute;
	top: 14px;
	right: 14px;
	min-width: 52px;
	height: 52px;
	padding: 0 6px;
	line-height: 52px;
	border-radius: 52px;
	background: #FF7400;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	box-shadow: 0 4px 14px rgba(255, 116, 0, 0.4);
	z-index: 2;
	pointer-events: none;
	letter-spacing: -0.2px;
	/* No transition / transform on hover — must stay identical */
}

/* --- Live Preview hover overlay ------------------------------------------- */

.ct-card__preview {
	position: absolute;
	inset: 0;
	background: rgba(70, 63, 82, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
	z-index: 1;
}

.ct-card:hover .ct-card__preview {
	opacity: 1;
	visibility: visible;
}

.ct-card__preview-holder {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	color: #463F52;
	padding: 14px 24px;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	transform: translateY(12px);
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, color 0.25s ease;
}

.ct-card:hover .ct-card__preview-holder {
	transform: translateY(0);
}

.ct-card__preview-holder:hover {
	background: #FF7400;
	color: #fff;
}

.ct-card__preview-text {
	letter-spacing: 0.2px;
	white-space: nowrap;
}

.ct-card__preview-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.ct-card__preview-holder:hover .ct-card__preview-icon {
	transform: translateX(3px);
}

/* --- Meta row ------------------------------------------------------------- */

.ct-card__meta {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 0 0 16px;
}

.ct-card__meta-text {
	flex: 1;
	min-width: 0;
}

.ct-card__title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 4px;
	color: #463F52;
}

.ct-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ct-card__title a:hover {
	color: #FF7400;
}

.ct-card__subtitle {
	font-size: 15px;
	font-weight: 400;
	color: #777;
	margin: 0;
}

.ct-card__sales {
	flex-shrink: 0;
	background: #FFB84E;
	color: #553608;
	font-size: 14px;
	font-weight: 500;
	padding: 6px 16px;
	border-radius: 8px;
	white-space: nowrap;
	line-height: 1.5;
}

/* --- Divider -------------------------------------------------------------- */

.ct-card__divider {
	height: 1px;
	background: #E5E5E5;
	margin: 0 0 16px;
}

/* --- Footer --------------------------------------------------------------- */

.ct-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.ct-card__footer-details { flex: 0 0 auto; }

.ct-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 22px;
	border-radius: 21px;
	background: #FF7400;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
	box-shadow: 0 4px 12px rgba(255, 116, 0, 0.25);
	white-space: nowrap;
}

.ct-card__btn:hover {
	background: #E66700;
	color: #fff !important;
	box-shadow: 0 6px 16px rgba(255, 116, 0, 0.4);
	transform: translateY(-1px);
}

.ct-card__btn svg { flex-shrink: 0; transition: transform 0.25s ease; }
.ct-card__btn:hover svg { transform: translateX(3px); }

/* --- Cart icon — PURPLE ACCENT ON HOVER (was #463F52) --------------------- */

.ct-card__footer-buy {
	flex-shrink: 0;
	margin-left: auto;
}

.ct-card__cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border-radius: 50%;
	border: 1.5px solid #E5E5E5;
	color: #463F52;
	background: transparent;
	text-decoration: none;
	transition: all 0.25s ease;
	line-height: 1;
}

.ct-card__cart svg { display: block; margin: 0; }

.ct-card__cart:hover {
	background: #5511F8;
	color: #fff;
	border-color: #5511F8;
	box-shadow: 0 4px 14px rgba(85, 17, 248, 0.35);
}

/* ==========================================================================
   EDD Pagination — INHERIT Astra/brand styling
   ========================================================================== */

.edd_pagination,
.edd_download_pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 40px 0 20px;
	flex-wrap: wrap;
}

.edd_pagination .page-numbers,
.edd_download_pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border-radius: 21px;
	background: #fff;
	color: #463F52;
	border: 1.5px solid #E5E5E5;
	font-family: 'Figtree', 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1;
	transition: all 0.25s ease;
}

.edd_pagination .page-numbers:hover,
.edd_download_pagination .page-numbers:hover {
	background: #FF7400;
	color: #fff;
	border-color: #FF7400;
	box-shadow: 0 4px 12px rgba(255, 116, 0, 0.25);
	transform: translateY(-1px);
}

.edd_pagination .page-numbers.current,
.edd_download_pagination .page-numbers.current {
	background: #FF7400;
	color: #fff;
	border-color: #FF7400;
	box-shadow: 0 4px 12px rgba(255, 116, 0, 0.25);
	cursor: default;
}

.edd_pagination .page-numbers.dots,
.edd_download_pagination .page-numbers.dots {
	border: 0;
	background: transparent;
	color: #777;
}

.edd_pagination .page-numbers.dots:hover,
.edd_download_pagination .page-numbers.dots:hover {
	background: transparent;
	color: #777;
	transform: none;
	box-shadow: none;
}

/* Prev / Next arrow buttons — slightly wider for the text */
.edd_pagination .page-numbers.prev,
.edd_pagination .page-numbers.next,
.edd_download_pagination .page-numbers.prev,
.edd_download_pagination .page-numbers.next {
	padding: 0 18px;
}

/* ==========================================================================
   AJAX Pagination loading state
   ========================================================================== */

.themesic-ajax-loading {
	position: relative;
}

.themesic-ajax-loading .edd_downloads_list {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.themesic-ajax-loading::after {
	content: '';
	position: absolute;
	top: 80px;
	left: 50%;
	width: 40px;
	height: 40px;
	margin-left: -20px;
	border: 3px solid rgba(255, 116, 0, 0.2);
	border-top-color: #FF7400;
	border-radius: 50%;
	animation: tsmSpin 0.7s linear infinite;
	z-index: 10;
	pointer-events: none;
}

@keyframes tsmSpin {
	to { transform: rotate(360deg); }
}
