/**
 * ERŞE BREEZE — tüm diller (net ürün görselleri, ortak iyileştirmeler).
 */

/**
 * Mağaza kısa kod: tek sütun / devasa görsel düzeltmesi (tüm diller).
 * !important — tema WooCommerce sütun genişliklerini ezer.
 */
.ersebreeze-shop-grid ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 20px !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
}

.ersebreeze-shop-grid ul.products li.product {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
}

.ersebreeze-shop-grid img {
	aspect-ratio: 3 / 4 !important;
	object-fit: cover !important;
	width: 100% !important;
	height: auto !important;
}

@media (min-width: 782px) {
	.ersebreeze-shop-grid ul.products {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

/* Ana sayfa vitrin ızgarası: mobil 2, geniş ekranda 4 sütun */
.ersebreeze-home-product-sections ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 20px !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
}

.ersebreeze-home-product-sections ul.products li.product {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
}

.ersebreeze-home-product-sections ul.products li.product img {
	aspect-ratio: 3 / 4 !important;
	object-fit: cover !important;
	width: 100% !important;
	height: auto !important;
}

@media (min-width: 992px) {
	.ersebreeze-home-product-sections ul.products {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

/* Mağaza sayfası gövdesindeki WC döngüsü (kısa kod dışı) */
body.ersebreeze-lang-tr .ersebreeze-shop-page-content ul.products,
body.ersebreeze-lang-en .ersebreeze-shop-page-content ul.products,
body.ersebreeze-lang-ru .ersebreeze-shop-page-content ul.products,
body.ersebreeze-lang-ar .ersebreeze-shop-page-content ul.products,
body.ersebreeze-shop-page:not(.single-product) ul.products:not(.ersebreeze-ignore-grid) {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 20px !important;
	list-style: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100% !important;
}

body.ersebreeze-shop-page:not(.single-product) ul.products:not(.ersebreeze-ignore-grid) li.product {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin-bottom: 0 !important;
}

@media (min-width: 782px) {
	body.ersebreeze-shop-page:not(.single-product) ul.products:not(.ersebreeze-ignore-grid) {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

/* Ana sayfa hero: “Koleksiyonu keşfedin” CTA satırını TR ile aynı merkez hizada tut */
body.home .wp-block-cover .wp-block-buttons,
body.front-page .wp-block-cover .wp-block-buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	width: 100%;
	box-sizing: border-box;
}

body.home .wp-block-cover .wp-block-buttons > .wp-block-button,
body.front-page .wp-block-cover .wp-block-buttons > .wp-block-button {
	margin-inline: auto;
}

/* Ana sayfa otomatik Popüler / Yeni ürün blokları */
.ersebreeze-home-product-sections {
	margin-top: clamp(2rem, 5vw, 4rem);
	margin-bottom: clamp(2rem, 5vw, 4rem);
}

.ersebreeze-home-product-sections__title {
	text-align: center;
	font-weight: 500;
	letter-spacing: 0.04em;
	margin: 0 0 1.25rem;
	font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

.ersebreeze-home-product-sections__block {
	margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.ersebreeze-home-product-sections__block:last-child {
	margin-bottom: 0;
}

/* Vitrin + mağaza: ürün görseli netliği */
.ersebreeze-showcase-grid .woocommerce-loop-product__link img,
.ersebreeze-shop-showcase-row .woocommerce-loop-product__link img {
	image-rendering: auto;
	backface-visibility: hidden;
	transform: translateZ(0);
}

/**
 * Lüks katalog: tüm vitrin & mağaza ızgarasında 3:4 kutu, stretch yok (object-fit: cover).
 * Öncelik: vitrin kısa kodları + mağaza gövdesi + ürün kategorisi arşivi (tekil ürün hariç).
 */
.ersebreeze-home-product-sections ul.products li.product .woocommerce-loop-product__link,
.ersebreeze-shop-grid ul.products li.product .woocommerce-loop-product__link,
body.ersebreeze-shop-page:not(.single-product) ul.products li.product .woocommerce-loop-product__link,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__link,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__link {
	display: block;
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	width: 100%;
	background: rgba(0, 0, 0, 0.03);
}

.ersebreeze-home-product-sections ul.products li.product .woocommerce-loop-product__link img,
.ersebreeze-shop-grid ul.products li.product .woocommerce-loop-product__link img,
body.ersebreeze-shop-page:not(.single-product) ul.products li.product .woocommerce-loop-product__link img,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__link img,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__link img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center top;
	display: block;
}

.ersebreeze-shop-grid .ersebreeze-shop-showcase-row + .woocommerce {
	margin-top: 0;
}

.ersebreeze-shop-grid .ersebreeze-shop-showcase-row + .woocommerce ul.products {
	margin-top: 0;
	padding-top: 0;
}

/* Mağaza: az üründe sayfa “kopuk” görünmesin */
body.ersebreeze-shop-page .site-content,
body.tax-product_cat .site-content,
body.post-type-archive-product .site-content {
	min-height: 45vh;
}

.ersebreeze-shop-visual-fill {
	clear: both;
	min-height: clamp(6rem, 18vh, 14rem);
	pointer-events: none;
}

.ersebreeze-shop-visual-fill__band {
	min-height: inherit;
	margin: 2rem 0 0;
	border-radius: 2px;
	background:
		linear-gradient(180deg, rgba(201, 160, 80, 0.06), transparent 55%),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 40px,
			rgba(201, 160, 80, 0.04) 40px,
			rgba(201, 160, 80, 0.04) 41px
		);
}

/* Katalog / grid (genel): vitrin dışı sayfalar için yumuşak kural; vitrin/mağaza yukarıdaki 3:4 ile override olur */
.woocommerce ul.products li.product a img {
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	backface-visibility: hidden;
	transform: translateZ(0);
	image-rendering: auto;
}

/* Blok mağaza */
.wc-block-grid__product-image img,
.wc-block-components-product-image img {
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

/* Tekil ürün: lüks vitrin — 3:4 kutu, simetrik kırpma (tüm diller) */
.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery .flex-viewport {
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.03);
}

.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image a,
.single-product .flex-viewport .woocommerce-product-gallery__image a {
	display: block;
	height: 100%;
}

/* Tekil ürün: büyük görselin tema tarafından fazla küçültülmesini azalt */
.single-product .woocommerce-product-gallery__wrapper img,
.single-product .flex-viewport img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center top;
}

/**
 * Beden tablosu (lüks, koyu tema).
 */
.ersebreeze-size-guide {
	--ersebreeze-sg-bg: #1a1a1a;
	--ersebreeze-sg-fg: #ffffff;
	--ersebreeze-sg-line: rgba(255, 255, 255, 0.18);
	background: var(--ersebreeze-sg-bg);
	color: var(--ersebreeze-sg-fg);
	padding: 1.5rem 1.25rem 1.25rem;
	border-radius: 2px;
	margin: 0.5rem 0 1.25rem;
	font-family: inherit;
}

.ersebreeze-size-guide__title {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
}

.ersebreeze-size-guide__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ersebreeze-size-guide__table {
	width: 100%;
	border-collapse: collapse;
	text-align: center;
	font-size: 0.9rem;
}

.ersebreeze-size-guide__table th,
.ersebreeze-size-guide__table td {
	padding: 0.65rem 0.5rem;
	border: 1px solid var(--ersebreeze-sg-line);
	font-weight: 400;
}

.ersebreeze-size-guide__table thead th {
	font-weight: 600;
	background: rgba(255, 255, 255, 0.06);
}

.ersebreeze-size-guide__note {
	margin: 1rem 0 0;
	text-align: center;
	font-size: 0.85rem;
	opacity: 0.92;
	line-height: 1.45;
}

.woocommerce-tabs #tab-ersebreeze_size_guide {
	padding-top: 0.25rem;
}

/* Premium: yaklaşık kur satırı */
.ersebreeze-price-secondary {
	display: inline-block;
	margin-inline-start: 0.35em;
	vertical-align: baseline;
	font-weight: 400;
	letter-spacing: 0.02em;
	color: rgba(0, 0, 0, 0.55);
	font-size: 0.88em;
}

.ersebreeze-price-secondary__approx {
	white-space: nowrap;
}

/* RU/AR footer — tek blok, şirket → yasal → ödeme */
.ersebreeze-footer-premium-ruar {
	margin: 0 auto;
	padding: 1.5rem clamp(1rem, 4vw, 2rem) 0;
	max-width: 72rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ersebreeze-footer-premium-ruar .ersebreeze-company-footer--premium-stack {
	margin-bottom: 1rem;
}

.ersebreeze-footer-premium-ruar .ersebreeze-legal-links--premium-stack {
	margin-bottom: 0.75rem;
}

.ersebreeze-footer-premium-ruar .ersebreeze-payment-icons--premium-stack {
	opacity: 0.85;
	font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Ödeme sayfası: standart Woo iki sütun (v2.2 — kesin kurallar)
   -------------------------------------------------------------------------- */
.woocommerce-checkout #customer_details {
	width: 58% !important;
	float: left !important;
	display: block !important;
	box-sizing: border-box;
}

.woocommerce-checkout #order_review,
.woocommerce-checkout #order_review_heading {
	width: 38% !important;
	float: right !important;
	display: block !important;
	margin-top: 0 !important;
	box-sizing: border-box;
	clear: right !important;
}

.woocommerce-checkout::after {
	content: "";
	display: table;
	clear: both;
}

body.woocommerce-checkout #order_review_heading {
	font-family: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
	font-weight: 500;
	letter-spacing: 0.04em;
	margin-bottom: 0.75rem;
}

body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table,
body.woocommerce-checkout .woocommerce-checkout-review-order-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.92rem;
	letter-spacing: 0.02em;
}

body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
	border-width: 1px;
	border-style: solid;
	border-color: rgba(0, 0, 0, 0.1);
	padding: 0.65rem 0.5rem;
	vertical-align: top;
}

body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table thead th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th {
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	border-color: rgba(0, 0, 0, 0.85);
	background: rgba(0, 0, 0, 0.02);
}

body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table .order-total th,
body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table .order-total td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td {
	border-color: rgba(0, 0, 0, 0.85);
	font-weight: 600;
}

body.woocommerce-checkout .ersebreeze-checkout-consents--legal-stack {
	margin-bottom: 0.65rem;
	line-height: 1.45;
	font-size: 0.88rem;
}

@media (max-width: 768px) {
	.woocommerce-checkout #customer_details,
	.woocommerce-checkout #order_review {
		width: 100% !important;
		float: none !important;
	}

	.woocommerce-checkout #order_review_heading {
		width: 100% !important;
		float: none !important;
	}
}

/* Astra: üst pembe/mor duyuru şeridi — sade ana beyaz header kalsın */
.ast-above-header-bar,
.ast-above-header-wrap .ast-above-header-bar,
.ast-header-below-markup .ast-above-header,
.ast-desktop .ast-above-header-section,
.site-header-section.ast-above-header-section,
.ast-announcement-bar-wrap {
	display: none !important;
}
