/* Favorites toggle button */
.kd-favorite-btn {
	position: relative;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #64748b;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.kd-favorite-btn:hover {
	color: #ef4444;
	transform: scale(1.05);
}

.kd-favorite-btn.is-active {
	color: #ef4444;
}

.kd-favorite-btn.is-loading {
	pointer-events: none;
	opacity: 0.65;
}

.kd-favorite-btn__icon {
	font-size: 16px;
	line-height: 1;
}

.kd-favorite-btn__icon--active {
	display: none;
}

.kd-favorite-btn.is-active .kd-favorite-btn__icon:not(.kd-favorite-btn__icon--active) {
	display: none;
}

.kd-favorite-btn.is-active .kd-favorite-btn__icon--active {
	display: inline-block;
}

/* Card placement */
.av-product-card {
	position: relative;
}

.av-product-card--recommended,
.sa-product-card-link {
	position: relative;
}

.av-product-card > .kd-favorite-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
}

/* Homepage / favorites grid — heart on product image (top-right) */
.av-product-card--recommended .av-product-card__visual .kd-favorite-btn {
	position: absolute;
	top: 8px;
	right: 8px;
	left: auto;
	z-index: 5;
}

.woocommerce ul.products li.product.kd-product-card-item {
	position: relative;
}

.woocommerce ul.products li.product.kd-product-card-item .kd-favorite-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 4;
}

.kd-favorite-single-wrap {
	margin-bottom: 1rem;
}

.kd-favorite-single-wrap .kd-favorite-btn {
	position: static;
	width: 42px;
	height: 42px;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}

/* Header badge */
.kd-favorites-link {
	position: relative;
}

.kd-favorites-badge {
	position: absolute;
	top: -2px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

.kd-favorites-badge.is-empty {
	display: none;
}

/* Shop-aligned container (matches av-shop-header) */
.av-shop-container {
	box-sizing: border-box;
	width: 100%;
	max-width: 1480px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 16px;
	padding-right: 16px;
}

@media (min-width: 640px) {
	.av-shop-container {
		padding-left: 24px;
		padding-right: 24px;
	}
}

@media (min-width: 1024px) {
	.av-shop-container {
		padding-left: 32px;
		padding-right: 32px;
	}
}

.kd-favorites-page.site-main {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.kd-favorites-page__inner.av-shop-container {
	padding-top: 40px;
	padding-bottom: 56px;
}

/* Favorites page */
.kd-favorites-page__header,
.kd-favorites-page__count,
.kd-favorites-page #favoriler-product-grid.av-product-grid--recommended {
	text-align: left;
}

.kd-favorites-page__title {
	margin: 0 0 0.5rem;
	padding: 0;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	color: #222;
}

.kd-favorites-page__count {
	margin: 0 0 1.5rem;
	padding: 0;
	font-size: 0.9375rem;
	color: #6b7280;
}

.kd-favorites-empty {
	margin-top: 2rem;
	padding: 3rem 1.5rem;
	text-align: center;
	border: 1px dashed #e5e7eb;
	border-radius: 1rem;
	background: #fafafa;
}

.kd-favorites-empty__icon {
	font-size: 2.5rem;
	color: #ef4444;
	margin-bottom: 1rem;
}

.kd-favorites-empty__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: #222;
}

.kd-favorites-empty__text {
	margin: 0 0 1.5rem;
	color: #6b7280;
}

.kd-favorites-empty__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	border-radius: 999px;
	background: #222;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease;
}

.kd-favorites-empty__cta:hover {
	background: #ef4444;
	color: #fff;
}

/* Favorites page — white background (override home.css #favoriler-product-grid grey section) */
.kd-favorites-page {
	background: #fff;
}

body.trail-theme .kd-favorites-page #favoriler-product-grid.av-product-grid--recommended.kd-favorites-grid {
	padding: 0 !important;
	background: #fff !important;
	width: 100% !important;
}

/* Favorites page grid (uses #favoriler-product-grid + .av-product-grid__list from home.css) */
.kd-favorites-page .kd-favorites-grid.av-product-grid--recommended {
	padding: 0 !important;
	background: #fff !important;
	width: 100% !important;
}

body.trail-theme .kd-favorites-page #favoriler-product-grid.av-product-grid--recommended .av-product-grid__inner,
.kd-favorites-page #favoriler-product-grid.av-product-grid--recommended .av-product-grid__inner {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

.kd-favorites-page .kd-favorites-grid .av-product-card .kd-favorite-btn {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	left: auto !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	line-height: 0 !important;
	overflow: visible;
}

.kd-favorites-page .kd-favorites-grid .av-product-card__visual .kd-favorite-btn {
	position: absolute !important;
	top: 11px !important;
    right: 52px !important;
	left: auto !important;
	z-index: 5 !important;
}

/* Favoriler grid: kalp ikonu dairenin tam ortasında */
.kd-favorites-page .kd-favorites-grid .kd-favorite-btn .kd-favorite-btn__icon,
.kd-favorites-page .kd-favorites-grid .kd-favorite-btn .kd-favorite-btn__icon--active {
	position: absolute;
	top: 50%;
	left: 50%;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1;
	transform: translate(-50%, -50%);
}

.kd-favorites-page .kd-favorites-grid .kd-favorite-btn .kd-favorite-btn__icon::before,
.kd-favorites-page .kd-favorites-grid .kd-favorite-btn .kd-favorite-btn__icon--active::before {
	display: block;
	line-height: 1;
}

.kd-favorites-page .kd-favorites-grid .kd-favorite-btn.is-active .kd-favorite-btn__icon:not(.kd-favorite-btn__icon--active) {
	display: none !important;
}

.kd-favorites-page .kd-favorites-grid .kd-favorite-btn:not(.is-active) .kd-favorite-btn__icon--active {
	display: none !important;
}

.kd-favorites-page .kd-favorites-grid .kd-favorite-btn:hover {
	transform: scale(1.05);
}

.kd-favorites-page #favoriler-product-grid.av-product-grid--recommended .av-product-grid__list {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 16px !important;
	align-items: stretch !important;
}

@media (min-width: 768px) {
	.kd-favorites-page #favoriler-product-grid.av-product-grid--recommended .av-product-grid__list {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 18px !important;
	}
}

@media (min-width: 992px) {
	.kd-favorites-page #favoriler-product-grid.av-product-grid--recommended .av-product-grid__list {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 20px !important;
	}
}
