/* =========================================================================
   TABELAMATIK ÜRÜN SAYFASI — dağınık aksiyon butonlarını hizalar.
   Kaynaklar: WooCommerce (Sepete Ekle) + özel WhatsApp butonu +
   YITH Wishlist (Favorilere Ekle) + YITH Compare (Karşılaştır).
   Site genelinde yüklenir; yalnızca ürün sayfasını etkiler.
   ========================================================================= */

/* ---- 1. sıra: Adet + Sepete Ekle + WhatsApp — eşit yükseklik, tek hiza --- */

.single-product div.product .quantity .qty {
	height: 46px;
}

.single-product div.product .single_add_to_cart_button,
.single-product .custom-whatsapp-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 46px;
	padding: 0 22px !important;
	line-height: 1 !important;
	border-radius: 8px;
	vertical-align: middle;
	margin: 0 !important;
	box-sizing: border-box;
}

.single-product .custom-whatsapp-btn { margin-left: 10px !important; }

/* Varyasyonlu ürünlerde adet + buton satırı düzgün dizilsin */
.single-product .woocommerce-variation-add-to-cart {
	display: flex;
	align-items: stretch;
	gap: 10px;
	flex-wrap: wrap;
}

/* Meta (stok kodu, kategori, etiket) bloğuna nefes payı */
.single-product .product_meta {
	margin: 16px 0 4px;
	padding-top: 14px;
	border-top: 1px solid #e8e6da;
}

/* ---- 2. sıra: Favorilere Ekle + Karşılaştır — yan yana, aynı boy --------- */

.single-product .summary .yith-wcwl-add-to-wishlist--single,
.single-product .summary a.compare.button {
	display: inline-flex !important;
	vertical-align: middle;
	float: none !important;
	margin: 14px 12px 0 0 !important;
}

/* Favori sarmalayıcısına SABİT yükseklik: içindeki gizli öğeler
   yüksekliği şişirip butonu aşağı itemez — iki buton kesin aynı hizada */
.single-product .summary .yith-wcwl-add-to-wishlist--single {
	height: 44px;
	overflow: visible;
}

.single-product .summary .yith-wcwl-add-to-wishlist--single .yith-wcwl-add-button,
.single-product .summary .yith-wcwl-add-to-wishlist--single .yith-wcwl-wishlistaddedbrowse,
.single-product .summary .yith-wcwl-add-to-wishlist--single .yith-wcwl-wishlistexistsbrowse {
	margin: 0 !important;
}

.single-product .summary .yith-wcwl-add-to-wishlist--single a,
.single-product .summary a.compare.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	padding: 0 20px !important;
	line-height: 1 !important;
	border-radius: 999px;
	margin: 0 !important;
	box-sizing: border-box;
}

/* Favori butonundaki kalp ikonu boyutu */
.single-product .summary .yith-wcwl-add-to-wishlist--single a svg,
.single-product .summary .yith-wcwl-add-to-wishlist--single a i {
	width: 18px;
	height: 18px;
	font-size: 18px;
	flex: 0 0 auto;
}

/* ---- Ürün listeleri (Hoşunuza gidebilir, arşiv/kategori sayfaları) -------
   Favori: yazısız kalp, ürün GÖRSELİNİN sağ üst köşesine bindirilir
   (anasayfa kartlarıyla aynı dil). Astra/YITH DOM sırasından bağımsız,
   her listelemede aynı yerde durur. */

ul.products li.product {
	position: relative;
}

ul.products li.product .yith-wcwl-add-to-wishlist {
	display: inline-flex !important;
	position: absolute !important;
	top: 10px;
	right: 10px;
	margin: 0 !important;
	float: none !important;
	z-index: 5;
	height: auto !important;
}

ul.products li.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button,
ul.products li.product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse,
ul.products li.product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse {
	margin: 0 !important;
}

ul.products li.product .yith-wcwl-add-to-wishlist a,
ul.products li.product .yith-wcwl-add-to-wishlist button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	font-size: 0 !important; /* "Favorilere Ekle" yazısını gizle */
	line-height: 1 !important;
	box-sizing: border-box;
	/* Görsel üstünde okunur beyaz yuvarlak (anasayfa kartlarıyla aynı) */
	background: rgba(255, 255, 255, .95) !important;
	border: 1px solid #e3e1d6 !important;
	box-shadow: 0 2px 8px rgba(35, 36, 30, .14);
	color: #23241e !important;
}

ul.products li.product .yith-wcwl-add-to-wishlist a:hover,
ul.products li.product .yith-wcwl-add-to-wishlist button:hover {
	color: #d64848 !important;
	border-color: #d64848 !important;
	background: #fff !important;
}

ul.products li.product .yith-wcwl-add-to-wishlist a span,
ul.products li.product .yith-wcwl-add-to-wishlist button span { display: none !important; }

ul.products li.product .yith-wcwl-add-to-wishlist a svg,
ul.products li.product .yith-wcwl-add-to-wishlist button svg {
	width: 18px;
	height: 18px;
	margin: 0 !important;
	flex: 0 0 auto;
}

ul.products li.product .yith-wcwl-add-to-wishlist a i,
ul.products li.product .yith-wcwl-add-to-wishlist button i {
	font-size: 18px !important;
	margin: 0 !important;
}

/* Sepete Ekle / Seçenekler butonu: Astra bunu BLOK yapar (satırı tek kaplar),
   satır içine çevir ki kalp yanına oturabilsin. Satır, kartta ortalanır. */
ul.products li.product a.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	float: none !important;
	margin: 10px 0 0 !important;
	height: 42px;
	line-height: 1 !important;
	box-sizing: border-box;
}


/* Mobil: butonlar tam genişlik, alt alta düzenli */
@media (max-width: 560px) {
	.single-product div.product .single_add_to_cart_button,
	.single-product .custom-whatsapp-btn {
		width: 100%;
		margin: 8px 0 0 !important;
	}

	.single-product .summary .yith-wcwl-add-to-wishlist--single,
	.single-product .summary a.compare.button {
		width: 100%;
		margin: 10px 0 0 !important;
	}

	.single-product .summary .yith-wcwl-add-to-wishlist--single a,
	.single-product .summary a.compare.button {
		width: 100%;
	}
}

/* =========================================================================
   FAVORİ LİSTEM (YITH Wishlist) — sayfa düzeni, site diliyle uyumlu
   Masaüstü: tablo sadeleşir. Mobil: her ürün bir KART (li tabanlı mobil şablon).
   ========================================================================= */

/* Sayfa başlığı ile listenin kendi başlığı çakışmasın: liste başlığı gizli */
.yith-wcwl-form .wishlist-title-container,
.yith-wcwl-form .wishlist-title { display: none !important; }

/* Tablo (masaüstü) */
.yith-wcwl-form table.wishlist_table {
	border: 1px solid #e3e1d6 !important;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(35,36,30,.05), 0 4px 14px rgba(35,36,30,.06);
}
.yith-wcwl-form table.wishlist_table thead th {
	background: #f7f5ec !important;
	font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6f6f66;
	border-bottom: 1px solid #e3e1d6 !important;
}
.yith-wcwl-form table.wishlist_table td { vertical-align: middle; border-color: #efeee6 !important; }
.yith-wcwl-form table.wishlist_table td.product-name a { font-weight: 700; color: #23241e !important; }
.yith-wcwl-form table.wishlist_table td.product-thumbnail img { border-radius: 10px; }
.yith-wcwl-form table.wishlist_table .add_to_cart.button,
.yith-wcwl-form table.wishlist_table a.button {
	background: #cbd50e !important; color: #26270e !important; border-radius: 999px !important;
	font-weight: 800 !important; padding: 10px 18px !important; line-height: 1 !important;
}
.yith-wcwl-form table.wishlist_table .remove_from_wishlist { color: #6f6f66 !important; }
.yith-wcwl-form table.wishlist_table .remove_from_wishlist:hover { color: #d64848 !important; }

/* Mobil kart görünümü (YITH mobil şablonu: ul > li) */
@media (max-width: 921px) {
	.yith-wcwl-form ul.wishlist_table.mobile {
		list-style: none; margin: 0; padding: 0;
		display: grid; grid-template-columns: 1fr; gap: 12px;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li {
		position: relative;
		background: #fff;
		border: 1px solid #e3e1d6;
		border-radius: 14px;
		box-shadow: 0 1px 2px rgba(35,36,30,.05), 0 4px 14px rgba(35,36,30,.06);
		padding: 14px 14px 14px 14px;
		display: grid;
		grid-template-columns: 84px 1fr;
		grid-template-areas:
			"thumb name"
			"thumb price"
			"thumb cta";
		gap: 6px 14px;
		align-items: start;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .item-wrapper { display: contents; }
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-thumbnail {
		grid-area: thumb; margin: 0 !important; width: 84px !important; float: none !important;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-thumbnail img,
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-thumbnail a img {
		width: 84px !important; height: 84px !important; object-fit: cover; border-radius: 10px; display: block;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .item-details { display: contents; }
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-name {
		grid-area: name; margin: 0 !important; padding-right: 34px; /* çöp ikonu için yer */
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-name h3,
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-name a {
		font-size: 15px !important; font-weight: 700 !important; line-height: 1.35 !important;
		color: #23241e !important; margin: 0 !important;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .item-details-table,
	.yith-wcwl-form ul.wishlist_table.mobile > li table.item-details-table {
		grid-area: price; margin: 0 !important; width: auto !important; border: none !important;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .item-details-table td { padding: 0 !important; border: none !important; }
	.yith-wcwl-form ul.wishlist_table.mobile > li .item-details-table .label { display: none !important; } /* "Price:" etiketi gizli */
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-price,
	.yith-wcwl-form ul.wishlist_table.mobile > li .item-details-table .value {
		font-size: 15px !important; font-weight: 800 !important; color: #23241e !important;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-add-to-cart {
		grid-area: cta; margin: 4px 0 0 !important; text-align: left !important;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-add-to-cart .button,
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-add-to-cart a {
		display: inline-flex !important; align-items: center; justify-content: center;
		background: #cbd50e !important; color: #26270e !important;
		border-radius: 999px !important; font-weight: 800 !important; font-size: 13.5px !important;
		padding: 9px 16px !important; line-height: 1 !important; text-decoration: none !important;
	}
	/* Çöp (kaldır) ikonu: kartın sağ üst köşesi */
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-remove {
		position: absolute; top: 10px; right: 10px; margin: 0 !important; width: auto !important;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .product-remove a,
	.yith-wcwl-form ul.wishlist_table.mobile > li .remove_from_wishlist {
		display: inline-flex !important; align-items: center; justify-content: center;
		width: 32px; height: 32px; border-radius: 50%; background: #f5f4ee; color: #6f6f66 !important;
		font-size: 15px !important; text-decoration: none !important;
	}
	.yith-wcwl-form ul.wishlist_table.mobile > li .remove_from_wishlist:hover { background: #fdecec; color: #d64848 !important; }
	/* Alt paylaşım/eylem alanı */
	.yith-wcwl-form .yith_wcwl_wishlist_footer, .yith-wcwl-form .wishlist-actions { margin-top: 14px; }
	.yith-wcwl-form .yith-wcwl-share { margin-top: 12px; }
}
