/* EPAS PRO Bayi Fiyatlandırma - Frontend */

/* =========================================================
   STOK GİZLEME (bayi olmayan ziyaretçiler)
   Sunucu tarafı filtre WooCommerce stok HTML'ini zaten
   boşaltır; bu kural, Woodmart temasının kendi stok
   kutularını da (wd-product-stock / .stock) gizler.
   ========================================================= */
body.epas-hide-stock .wd-product-stock,
body.epas-hide-stock p.stock,
body.epas-hide-stock .stock.in-stock,
body.epas-hide-stock .stock.out-of-stock {
	display: none !important;
}

/* =========================================================
   BAYİ KADEMELİ STOK - TİTREME (FLASH) ÖNLEME
   JS sayıyı maskeleyene kadar stok kutusu gizli tutulur;
   böylece bayi gerçek adedi (ör. 40) bir an dahi görmez.
   JS ilgili elemanı işleyip data-epas-masked ekleyince görünür olur.
   ========================================================= */
body.epas-stock-masking .wd-product-stock,
body.epas-stock-masking p.stock,
body.epas-stock-masking .stock.in-stock {
	visibility: hidden;
}
body.epas-stock-masking .wd-product-stock[data-epas-masked],
body.epas-stock-masking p.stock[data-epas-masked],
body.epas-stock-masking .stock[data-epas-masked] {
	visibility: visible;
}


.epas-dealer-price-box {
	display: block;
	line-height: 1.7;
}

/* Sağ boşluk yalnızca tekil ürün sayfasında; listede kaymaya yol açıyordu. */
.single-product .epas-dealer-price-box {
	padding-right: 50px;
}

/* Ürün detay sayfasında fiyat alanı biraz daha büyük */
.single-product .epas-dealer-price-box .epas-regular-price {
	font-size: 17px;
}

.single-product .epas-dealer-price-box .epas-dealer-price-label {
	font-size: 14px;
}

.single-product .epas-dealer-price-box .epas-dealer-price {
	font-size: 22px;
}

/* =========================================================
   ÜRÜN LİSTELEME (ARŞİV/KATEGORİ) ALANINA ÖZEL AYARLAR
   Sadece liste/grid kartlarını etkiler, ürün detayını değil.
   Boyutları buradan rahatça değiştirebilirsin.
   ========================================================= */

/* Liste kartındaki tüm fiyat kutusu */
.woocommerce ul.products li.product .epas-dealer-price-box,
.products .product-element-bottom .epas-dealer-price-box,
.product-grid-item .product-element-bottom .epas-dealer-price-box,
.wd-product .product-element-bottom .epas-dealer-price-box {
	text-align: left;   /* hizalama: center / left / right */
}

/* "Liste Fiyatı: 1.000,00 ₺" (üstü çizili eski fiyat) */
.woocommerce ul.products li.product .epas-dealer-price-box .epas-regular-price,
.products .product-element-bottom .epas-dealer-price-box .epas-regular-price,
.product-grid-item .product-element-bottom .epas-dealer-price-box .epas-regular-price,
.wd-product .product-element-bottom .epas-dealer-price-box .epas-regular-price {
	font-size: 13px;      /* yazı boyutu */
	color: #6b7280;       /* renk */
}

/* "Size Özel Fiyat:" etiketi (liste görünümü) */
.woocommerce ul.products li.product .epas-dealer-price-box .epas-dealer-price-label,
.products .product-element-bottom .epas-dealer-price-box .epas-dealer-price-label,
.product-grid-item .product-element-bottom .epas-dealer-price-box .epas-dealer-price-label,
.wd-product .product-element-bottom .epas-dealer-price-box .epas-dealer-price-label {
	font-size: 13px;
	font-weight: 600;
	color: #00acff;
}

/* Bayi fiyatı (liste görünümü) */
.woocommerce ul.products li.product .epas-dealer-price-box .epas-dealer-price,
.products .product-element-bottom .epas-dealer-price-box .epas-dealer-price,
.product-grid-item .product-element-bottom .epas-dealer-price-box .epas-dealer-price,
.wd-product .product-element-bottom .epas-dealer-price-box .epas-dealer-price {
	font-size: 16px;      /* yazı boyutu */
	font-weight: 700;     /* kalınlık */
	color: #00acff;       /* renk */
}

/* "%20 bayi indirimi uygulandı" (with_rate seçiliyse görünür) */
.woocommerce ul.products li.product .epas-dealer-price-box .epas-discount-rate,
.products .product-element-bottom .epas-dealer-price-box .epas-discount-rate,
.product-grid-item .product-element-bottom .epas-dealer-price-box .epas-discount-rate,
.wd-product .product-element-bottom .epas-dealer-price-box .epas-discount-rate {
	font-size: 12px;      /* yazı boyutu */
	color: #2271b1;       /* renk */
}

.epas-dealer-price-box .epas-regular-price {
	display: block;
	font-size: 18px;
	color: #6b7280;
}

.epas-dealer-price-box .epas-regular-price del {
	color: #9ca3af;
}

.epas-dealer-price-box .epas-dealer-price-wrap {
	display: block;
	margin-top: 2px;
}

.epas-dealer-price-box .epas-dealer-price-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #00acff;
	line-height: 1.3;
}

.epas-dealer-price-box .epas-dealer-price {
	display: block;
	font-size: 20px;
	color: #00acff;
	line-height: 1.3;
}

.epas-dealer-price-box .epas-discount-rate {
	display: block;
	margin-top: 2px;
	font-size: 0.8em;
	font-weight: 600;
	color: #2271b1;
}

.epas-dealer-note {
	display: inline-block;
	margin-left: 6px;
	font-size: 0.8em;
	font-weight: 600;
	color: #2271b1;
}

/* Bayi bilgi bloğu / shortcode */
.epas-dealer-info {
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 16px 20px;
	background: #fff;
	margin: 12px 0;
}

.epas-dealer-info--guest {
	background: #fff8e5;
	border-color: #f0c36d;
	color: #7a5b00;
}

.epas-dealer-info-table {
	margin: 0 0 10px;
}

.epas-dealer-info-table th {
	text-align: left;
	padding: 4px 16px 4px 0;
	color: #6b7280;
	font-weight: 600;
}

.epas-dealer-info-table td {
	padding: 4px 0;
}

.epas-dealer-discount-list {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
}

.epas-dealer-discount-list li {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px dashed #e2e4e7;
}

.epas-dealer-discount-list .epas-pct {
	font-weight: 700;
	color: #1e7e34;
}

.epas-dealer-info .epas-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
}

.epas-dealer-info .epas-status--active {
	background: #e6f4ea;
	color: #1e7e34;
}

.epas-dealer-info .epas-status--inactive {
	background: #fbeaea;
	color: #b32d2e;
}

/* İndirim tanımsız markada gizlenen fiyat notu */
.epas-dealer-price-hidden {
	display: inline-block;
	font-size: 13px;
	font-style: italic;
	color: #6b7280;
}
