.treethemes-edd-products-grid {
	--tt-edd-cols: 3;
	--tt-edd-gap: 24px;
	display: flex !important;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--tt-edd-gap);
	width: 100%;
	max-width: 100%;
	grid-template-columns: none !important;
}

.treethemes-edd-products-grid .treethemes-edd-product-card {
	box-sizing: border-box;
	flex: 0 0 calc((100% - ((var(--tt-edd-cols) - 1) * var(--tt-edd-gap))) / var(--tt-edd-cols));
	width: calc((100% - ((var(--tt-edd-cols) - 1) * var(--tt-edd-gap))) / var(--tt-edd-cols));
	max-width: calc((100% - ((var(--tt-edd-cols) - 1) * var(--tt-edd-gap))) / var(--tt-edd-cols));
}

.elementor-widget-treethemes-edd-products .treethemes-edd-products-grid {
	display: flex !important;
	flex-wrap: wrap !important;
	grid-template-columns: none !important;
	grid-auto-rows: auto !important;
}

.treethemes-edd-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
/* 	border: 1px solid #e8e8e8; */
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	transition: box-shadow 0.25s ease;
}

.treethemes-edd-product-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.treethemes-edd-product-thumb {
	position: relative;
	display: block;
	flex: 0 0 auto;
	overflow: hidden;
}

.treethemes-edd-product-thumb-link {
	display: block;
	position: relative;
	overflow: hidden;
	height: var(--tt-edd-thumb-height, 280px);
}

.treethemes-edd-product-thumb img,
.treethemes-edd-product-thumb-placeholder {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.treethemes-edd-product-card:hover .treethemes-edd-product-thumb img {
	transform: scale(1.02);
}

.treethemes-edd-product-thumb img {
	transition: transform 0.35s ease;
}

.treethemes-edd-products.is-loading .treethemes-edd-product-card:hover .treethemes-edd-product-thumb img {
	transform: none;
}

.treethemes-edd-products.is-loading .treethemes-edd-product-card {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.treethemes-edd-product-thumb-hover {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	padding: 20px 25px 15px;
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(100%);
	transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.treethemes-edd-product-card:hover .treethemes-edd-product-thumb-hover,
.treethemes-edd-product-card:focus-within .treethemes-edd-product-thumb-hover {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.treethemes-edd-product-thumb-actions {
	display: flex;
	flex: 1 1 auto;
	justify-content: flex-end;
	gap: 20px;
}

.treethemes-edd-sale-badge {
	position: absolute;
	top: 14px;
	left: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 42px;
	padding: 0;
	background: #82b440;
	color: #fff;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
	pointer-events: none;
}

.treethemes-edd-sale-badge::before {
	content: '';
	position: absolute;
	left: 0;
	bottom: -7px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 0 7px 7px;
	border-color: transparent transparent #5f9131 transparent;
}

.treethemes-edd-sale-badge::after {
	content: '';
	position: absolute;
	top: 0;
	right: -11px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 21px 0 21px 11px;
	border-color: transparent transparent transparent #82b440;
}

.treethemes-edd-sale-badge__icon {
	position: relative;
	z-index: 1;
	display: block;
	width: 20px;
	height: 20px;
	transform: rotate(-24deg);
}

.treethemes-edd-product-body {
	/* display: flex; */
	/* flex: 1 1 auto; */
	flex-direction: column;
	padding: 30px 20px 20px;
}

.treethemes-edd-product-content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px 30px;
	align-items: flex-start;
	/* min-height: 108px; */
}

.treethemes-edd-product-copy {
	min-width: 0;
	/* min-height: 88px; */
}

.treethemes-edd-product-title {
	margin: 0 0 8px;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1.3;
}

.treethemes-edd-product-title a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.treethemes-edd-product-title a:hover {
	color: #6941c6;
}

.treethemes-edd-product-name {
	color: #1a1a1a;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
}

.treethemes-edd-product-subtitle {
	display: block;
	min-height: 1.35em;
	color: #666;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.treethemes-edd-product-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 28px;
	margin: 0;
	color: #888;
	font-size: 13px;
	line-height: 1.4;
}

.treethemes-edd-product-term {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	background: #f3f4f6;
	color: #666;
	font-size: 12px;
	line-height: 1.2;
}

.treethemes-edd-product-info {
	display: flex;
	flex-direction: column;
	align-items: end;
	gap: 4px;
	min-width: 0;
	/* min-height: 72px; */
	text-align: right;
}

.treethemes-edd-product-price {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: baseline;
	gap: 6px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.treethemes-edd-price-regular {
	color: #999;
	font-size: 15px;
	font-weight: 500;
	text-decoration: line-through;
}

.treethemes-edd-price-sale,
.treethemes-edd-price-current {
	color: #1a1a1a;
}

.treethemes-edd-product-card.is-on-sale .treethemes-edd-price-sale {
	color: #10b466;
}

.treethemes-edd-product-rating {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	line-height: 1.2;
}

.treethemes-edd-stars {
	display: inline-flex;
	gap: 1px;
	letter-spacing: 0;
}

.treethemes-edd-star {
	font-size: 14px;
	line-height: 1;
}

.treethemes-edd-star.is-full {
	color: #10b466;
}

.treethemes-edd-star.is-half {
	color: #10b466;
	opacity: 0.55;
}

.treethemes-edd-star.is-empty {
	color: #ddd;
}

.treethemes-edd-rating-count {
	color: #888;
	font-size: 12px;
}

.treethemes-edd-product-sales {
	display: flex;
	justify-content: flex-end;
	color: #888;
	font-size: 12px;
	line-height: 1.2;
}

body.tt-edd-hide-service-sales .treethemes-edd-product-card.download_category-addon-services .treethemes-edd-product-sales {
	display: none !important;
}

.treethemes-edd-product-actions {
	display: none;
}

.treethemes-edd-btn {
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	background: #fff;
	color: #1a1a1a;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	cursor: pointer;
}

.treethemes-edd-btn-preview:hover {
	background: #1a1a1a;
	color: #fff;
}

.treethemes-edd-btn-see-more,
.treethemes-edd-btn-details {
	border-color: #6941c6;
	background: #6941c6;
	color: #fff;
	white-space: nowrap;
}

.treethemes-edd-btn-see-more:hover,
.treethemes-edd-btn-details:hover {
	border-color: #5b37ad;
	background: #5b37ad;
	color: #fff;
}

/* Hide any EDD purchase form markup if injected inside cards. */
.treethemes-edd-product-card .edd_purchase_submit_wrapper,
.treethemes-edd-product-card .edd_price_options,
.treethemes-edd-product-card form.edd_download_purchase_form {
	display: none !important;
}

@media (max-width: 767px) {
	.treethemes-edd-product-content {
		grid-template-columns: 1fr;
	}

	.treethemes-edd-product-info {
		align-items: flex-start;
		text-align: left;
	}

	.treethemes-edd-product-price,
	.treethemes-edd-product-rating {
		justify-content: flex-start;
	}

	.treethemes-edd-product-thumb-hover {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.treethemes-edd-product-thumb-actions {
		flex-wrap: wrap;
		justify-content: flex-start;
	}
}

/* Sidebar filter layout */
.treethemes-edd-products--sidebar-filter .treethemes-edd-products-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
	width: 100%;
}

.treethemes-edd-products--sidebar-filter .treethemes-edd-products-main {
	min-width: 0;
	width: 100%;
	max-width: 100%;
	flex: 1 1 auto;
	contain: layout style;
}

.treethemes-edd-products-grid[data-columns="1"] {
	--tt-edd-cols: 1;
}

.treethemes-edd-products-grid[data-columns="2"] {
	--tt-edd-cols: 2;
}

.treethemes-edd-products-grid[data-columns="3"] {
	--tt-edd-cols: 3;
}

.treethemes-edd-products-grid[data-columns="4"] {
	--tt-edd-cols: 4;
}

/* Theme recommendations default to 3 cols; services use data-columns="2" from PHP. */
.treethemes-edd-products--single-recommendations .treethemes-edd-products-grid[data-columns="3"] {
	--tt-edd-cols: 3;
}

.treethemes-edd-products--single-recommendations .treethemes-edd-products-grid[data-columns="2"] {
	--tt-edd-cols: 2;
}

.treethemes-edd-products--single-recommendations .treethemes-edd-products-grid[data-columns="1"] {
	--tt-edd-cols: 1;
}

.treethemes-edd-products--single-recommendations .treethemes-edd-products-grid[data-columns="4"] {
	--tt-edd-cols: 4;
}

@media (max-width: 1024px) {
	/* Themes: 3 → 2. Services already at 2 stay at 2. */
	.treethemes-edd-products--single-recommendations .treethemes-edd-products-grid[data-columns="3"],
	.treethemes-edd-products--single-recommendations .treethemes-edd-products-grid[data-columns="4"] {
		--tt-edd-cols: 2;
	}
}

@media (max-width: 767px) {
	.treethemes-edd-products--single-recommendations .treethemes-edd-products-grid[data-columns] {
		--tt-edd-cols: 1;
	}
}

.treethemes-edd-products--sidebar-filter {
	--tt-edd-thumb-height: 280px;
}

.treethemes-edd-products-sidebar {
	position: sticky;
	top: 24px;
}

.treethemes-edd-filter-heading {
	margin: 0 0 20px;
	font-size: 16px !important;
	font-weight: 500 !important;
	line-height: 1.2;
}

.treethemes-edd-filter-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.treethemes-edd-filter-option + .treethemes-edd-filter-option {
	margin-top: 8px;
}

.treethemes-edd-filter-option label,
.treethemes-edd-order-option label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	position: relative;
	cursor: pointer;
}

.treethemes-edd-filter-input,
.treethemes-edd-order-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(0, 0, 0, 0);
	overflow: hidden;
	white-space: nowrap;
}

.treethemes-edd-filter-label {
	position: relative;
	padding-left: 28px;
	font-size: 15px;
	line-height: 1.3;
	transition: opacity 0.2s ease;
}

.treethemes-edd-filter-label::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 16px;
	height: 16px;
	border: 1px solid currentColor;
	border-radius: 50%;
	transform: translateY(-50%);
	opacity: 0.45;
}

.is-active .treethemes-edd-filter-label::before{
	border: 1px solid rgb(22 183 102);
	opacity: 1;
}

.is-active .treethemes-edd-order-filter .treethemes-edd-filter-label::before{
	border: 1px solid rgb(85 58 226);
	opacity: 1;
}

.treethemes-edd-filter-label::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgb(22 183 102);
	transform: translateY(-50%) scale(0);
	transition: transform 0.2s ease;
}

.treethemes-edd-order-filter .treethemes-edd-filter-label::after{
	background: rgb(85 58 226);
}


.treethemes-edd-filter-option.is-active .treethemes-edd-filter-label::after,
.treethemes-edd-filter-input:checked + .treethemes-edd-filter-label::after,
.treethemes-edd-order-option.is-active .treethemes-edd-filter-label::after,
.treethemes-edd-order-input:checked + .treethemes-edd-filter-label::after {
	transform: translateY(-50%) scale(1);
}

.treethemes-edd-order-filter {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.treethemes-edd-order-heading {
	margin-top: 0;
}

.treethemes-edd-order-option + .treethemes-edd-order-option {
	margin-top: 8px;
}

.treethemes-edd-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.treethemes-edd-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 220px;
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.treethemes-edd-load-more:hover {
	opacity: 0.85;
}

.is-active .treethemes-edd-filter-label{font-weight: 600;}

.treethemes-edd-load-more.is-loading {
	opacity: 0.6;
	cursor: wait;
}

.treethemes-edd-products.is-loading .treethemes-edd-products-grid {
	opacity: 0.55;
	transition: opacity 0.2s ease;
	min-height: var(--tt-edd-grid-min-height, auto);
}

.treethemes-edd-products.is-loading .treethemes-edd-filter-list,
.treethemes-edd-products.is-loading .treethemes-edd-order-list {
	pointer-events: none;
}

html:has(.treethemes-edd-products--sidebar-filter) {
	scrollbar-gutter: stable;
}

@media (max-width: 1024px) {
	.treethemes-edd-products--sidebar-filter .treethemes-edd-products-layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.treethemes-edd-products-sidebar {
		position: static;
	}

	.treethemes-edd-filter-list {
		display: flex;
		flex-wrap: wrap;
		gap: 12px 20px;
	}

	.treethemes-edd-filter-option + .treethemes-edd-filter-option {
		margin-top: 0;
	}
}

@media (max-width: 767px) {
	.treethemes-edd-products--sidebar-filter .treethemes-edd-products-grid {
		--tt-edd-cols: 1;
	}

	.treethemes-edd-products-grid {
		--tt-edd-cols: 1;
	}
}

.treethemes-edd-btn-details{color: #fff !important;border-color: #563BE3 !important;background: #563BE3 !important;}
.treethemes-edd-btn-details:hover{color: #fff !important;border-color: #16B766 !important;background: #16B766 !important;}

.treethemes-edd-btn-preview:hover{border-color: #16B766 !important;}
