/*
 * Fivorno Badge System
 * Mevcut rozet işaretlemesinin (Etsy Style Product Cards + Flatsome) görünümünü tek tasarım sistemine bağlar.
 * İşaretleme ve rozet koşulları değişmez. Özgüllük, eski kuralları (.fk-fav-grid ..., @media !important ...)
 * geçmek için sınıfı iki kez yazarak yükseltilmiştir. "display" bilerek !important değildir; böylece
 * mevcut gizleme kuralları (ana sayfada "Yeni Tasarım" vb.) çalışmaya devam eder.
 */

:root {
	--fbs-ink: #17211D;
	--fbs-charcoal: #2B3732;
	--fbs-muted: #6E756F;
	--fbs-gold: #B88746;
	--fbs-ivory: #F8F5EF;
	--fbs-white: #FFFFFF;
	--fbs-warm: #F5F1EA;
	--fbs-warm-border: #D8C9B5;
	--fbs-status: #EEF1EE;
	--fbs-status-border: #C8D0CA;
	--fbs-neutral-border: #BFC5C1;
	--fbs-font: "Manrope", Arial, sans-serif;
}

/* ============ Ortak: kart rozetleri ============ */

html body .fv-bestseller-badge.fv-bestseller-badge,
html body .fv-new-design-badge.fv-new-design-badge,
html body .fv-stock-question-badge.fv-stock-question-badge {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 5px;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 22px;
	margin: 8px 0 0 !important;
	padding: 4px 8px !important;
	border-width: 1px !important;
	border-style: solid !important;
	border-radius: 4px !important;
	font: 600 10px/12px var(--fbs-font) !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none !important;
	position: static !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	vertical-align: middle;
}

/* 1. Yeni Tasarım */
html body .fv-new-design-badge.fv-new-design-badge {
	background: var(--fbs-warm) !important;
	color: var(--fbs-charcoal) !important;
	border-color: var(--fbs-warm-border) !important;
	order: 2;
}

/* 2. En Çok Satan */
html body .fv-bestseller-badge.fv-bestseller-badge {
	background: var(--fbs-ink) !important;
	color: var(--fbs-ivory) !important;
	border-color: var(--fbs-ink) !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em !important;
	order: 1;
}

/* 3. Stok Sorunuz */
html body .fv-stock-question-badge.fv-stock-question-badge {
	background: var(--fbs-white) !important;
	color: var(--fbs-charcoal) !important;
	border-color: var(--fbs-neutral-border) !important;
	margin-right: 100% !important; /* kendi satırında kalsın */
	order: 4;
}

html body .fv-stock-question-badge.fv-stock-question-badge:hover {
	background: var(--fbs-warm) !important;
	color: var(--fbs-ink) !important;
	border-color: var(--fbs-gold) !important;
}

html body .fv-stock-question-badge.fv-stock-question-badge:focus-visible,
html body .fv-single-stock-question-badge.fv-single-stock-question-badge:focus-visible {
	outline: 2px solid var(--fbs-gold);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	html body .fv-stock-question-badge.fv-stock-question-badge,
	html body .fv-single-stock-question-badge.fv-single-stock-question-badge {
		transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	}
}

/* Rozet ikonları (inline SVG, dekoratif) */
.fbs-ico {
	display: block;
	flex: 0 0 auto;
	width: 11px;
	height: 11px;
}

html body .fv-new-design-badge .fbs-ico,
html body .fv-bestseller-badge .fbs-ico,
html body .fv-single-new-design-badge .fbs-ico,
html body .fv-single-bestseller-badge .fbs-ico {
	color: var(--fbs-gold);
}

html body .fv-stock-question-badge .fbs-ico,
html body .fv-single-stock-question-badge .fbs-ico,
html body .fv-single-free-ship-badge .fbs-ico {
	color: var(--fbs-muted);
}

/* Eski WhatsApp ikonu (yalnızca ikon dönüşümü çalışmadıysa yedek) */
html body .fv-wa-icon {
	width: 11px;
	height: 11px;
	color: var(--fbs-muted) !important;
	fill: currentColor;
}

/* ============ Fiyat altı rozet satırı ============ */

/* Masaüstü: eklentinin JS'i rozetleri .price içine koyar; fiyat ilk satır, rozetler altında.
   .price.price.price: ürün sayfasındaki ".single-product div.product .price {display:block !important}"
   gibi özel CSS kuralları "Hoşunuza gidebilir" bölümündeki rozetleri fiyatın yanına itmesin diye. */
html body .price.price.price:has(> .fv-bestseller-badge, > .fv-new-design-badge, > .fv-stock-question-badge, > .fivorno-seri-rozet) {
	display: flex !important; /* Modern Price Style vb. .price'a display:block !important basıyor */
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	column-gap: 6px;
}

html body .price.price.price:has(> .fv-bestseller-badge, > .fv-new-design-badge, > .fv-stock-question-badge, > .fivorno-seri-rozet) > :not(.fv-bestseller-badge):not(.fv-new-design-badge):not(.fv-stock-question-badge):not(.fivorno-seri-rozet) {
	flex: 0 0 100%;
	max-width: 100%;
}

/* Mobil işaretleme: rozetler .price-wrapper içinde fiyattan önceki .fv-mobile-badge-wrap'tedir; fiyatın altına al */
@media (max-width: 768px) {
	html body .price-wrapper:has(> .fv-mobile-badge-wrap) {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}

	html body .price-wrapper > .price {
		order: 1;
	}

	html body .price-wrapper > .fv-mobile-badge-wrap {
		order: 2;
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		column-gap: 5px;
		margin: 0 !important;
		line-height: 12px !important;
		text-align: left !important;
	}
}

/* ============ 4. Stokta yok (görsel üstü) ============ */
/* Etkileşim: favori kalbi sağ üstte (6px, 26px) olduğundan etiket onun hemen altına yerleşir. */

html body .box-image .out-of-stock-label {
	display: inline-flex !important;
	align-items: center;
	position: absolute !important;
	top: 38px !important;
	right: 10px !important;
	bottom: auto !important;
	left: auto !important;
	width: auto !important;
	height: auto !important;
	min-height: 24px;
	margin: 0 !important;
	padding: 5px 8px !important;
	box-sizing: border-box;
	background: var(--fbs-ink) !important;
	color: var(--fbs-ivory) !important;
	border-radius: 2px !important;
	font: 700 10px/12px var(--fbs-font) !important;
	letter-spacing: 0.02em !important;
	text-transform: none !important;
	white-space: nowrap;
	opacity: 1 !important;
	box-shadow: none !important;
	pointer-events: none;
	z-index: 8;
}

/* ============ 5. Yeni (Flatsome görsel rozeti) ============ */

html body .badge-container:has(.badge-inner.new-bubble, .badge-inner.new-bubble-auto) {
	margin: 0 !important;
	top: 10px !important;
	left: 10px !important;
}

html body .badge:has(> .badge-inner.new-bubble, > .badge-inner.new-bubble-auto) {
	display: block;
	width: auto !important;
	height: auto !important;
	min-width: 0;
	margin: 0 !important;
	opacity: 1 !important;
}

html body .badge-inner.new-bubble.new-bubble,
html body .badge-inner.new-bubble-auto.new-bubble-auto {
	display: inline-flex !important;
	align-items: center;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 24px !important;
	box-sizing: border-box;
	padding: 5px 8px !important;
	background: var(--fbs-ivory) !important;
	color: var(--fbs-ink) !important;
	border: 1px solid var(--fbs-gold) !important;
	border-radius: 2px !important;
	font: 700 10px/12px var(--fbs-font) !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	white-space: nowrap;
	box-shadow: none !important;
}

/* ============ Ürün sayfası ============ */

html body .fv-single-top-badges.fv-single-top-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: 12px 0 12px !important;
}

html body .fv-single-bestseller-badge.fv-single-bestseller-badge,
html body .fv-single-new-design-badge.fv-single-new-design-badge,
html body .fv-single-free-ship-badge.fv-single-free-ship-badge,
html body .fv-single-stock-question-badge.fv-single-stock-question-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 28px;
	margin: 0;
	padding: 6px 10px !important;
	border-width: 1px !important;
	border-style: solid !important;
	border-radius: 4px !important;
	font: 600 12px/14px var(--fbs-font) !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	white-space: nowrap;
	box-shadow: none !important;
}

html body .fv-single-top-badges .fbs-ico,
html body .fv-single-stock-question-badge .fbs-ico {
	width: 12px;
	height: 12px;
}

html body .fv-single-free-ship-badge .fbs-ico {
	width: 13px;
	height: 13px;
}

/* 6. Yeni Tasarım */
html body .fv-single-new-design-badge.fv-single-new-design-badge {
	background: var(--fbs-warm) !important;
	color: var(--fbs-charcoal) !important;
	border-color: var(--fbs-warm-border) !important;
}

/* 7. Ücretsiz Kargo */
html body .fv-single-free-ship-badge.fv-single-free-ship-badge {
	background: var(--fbs-status) !important;
	color: var(--fbs-charcoal) !important;
	border-color: var(--fbs-status-border) !important;
}

/* Aynı ailedeki diğer ürün sayfası rozetleri (şartnamede yok, tutarlılık için) */
html body .fv-single-bestseller-badge.fv-single-bestseller-badge {
	background: var(--fbs-ink) !important;
	color: var(--fbs-ivory) !important;
	border-color: var(--fbs-ink) !important;
	font-weight: 700 !important;
}

html body .fv-single-stock-question-badge.fv-single-stock-question-badge {
	background: var(--fbs-white) !important;
	color: var(--fbs-charcoal) !important;
	border-color: var(--fbs-neutral-border) !important;
}

html body .fv-single-stock-question-badge.fv-single-stock-question-badge:hover {
	background: var(--fbs-warm) !important;
	color: var(--fbs-ink) !important;
	border-color: var(--fbs-gold) !important;
}

/* ============ Mobil (en fazla 549px) ============ */

@media (max-width: 549px) {
	html body .fv-bestseller-badge.fv-bestseller-badge,
	html body .fv-new-design-badge.fv-new-design-badge,
	html body .fv-stock-question-badge.fv-stock-question-badge {
		min-height: 20px;
		padding: 3px 7px !important;
		font-size: 10px !important;
	}

	html body .fv-bestseller-badge .fbs-ico,
	html body .fv-new-design-badge .fbs-ico,
	html body .fv-stock-question-badge .fbs-ico {
		width: 10px;
		height: 10px;
	}

	html body .price.price.price:has(> .fv-bestseller-badge, > .fv-new-design-badge, > .fv-stock-question-badge, > .fivorno-seri-rozet) {
		column-gap: 5px;
	}

	html body .box-image .out-of-stock-label {
		right: 8px !important;
		min-height: 22px;
		padding: 4px 7px !important;
	}

	html body .badge-container:has(.badge-inner.new-bubble, .badge-inner.new-bubble-auto) {
		top: 8px !important;
		left: 8px !important;
	}

	html body .badge-inner.new-bubble.new-bubble,
	html body .badge-inner.new-bubble-auto.new-bubble-auto {
		min-height: 22px !important;
		padding: 4px 7px !important;
	}

	html body .fv-single-bestseller-badge.fv-single-bestseller-badge,
	html body .fv-single-new-design-badge.fv-single-new-design-badge,
	html body .fv-single-free-ship-badge.fv-single-free-ship-badge,
	html body .fv-single-stock-question-badge.fv-single-stock-question-badge {
		min-height: 26px;
		padding: 5px 9px !important;
		font-size: 11px !important;
	}

	html body .fv-single-top-badges .fbs-ico,
	html body .fv-single-stock-question-badge .fbs-ico {
		width: 11px;
		height: 11px;
	}

	html body .fv-single-free-ship-badge .fbs-ico {
		width: 12px;
		height: 12px;
	}
}

/* ============ Favori Ürünlerim sayfası ============ */
/* favori-kampanya eklentisi bu sayfada .price-wrapper'ı tek satıra (display:flex; nowrap) kilitler ve
   "Yeni Tasarım" rozetini .price'ın DIŞINA, yanına koyar. Rozetler fiyatın altında, aynı satırda
   ve solda dursun: .price (içinde rozet varsa) kutu üretmez, rozetler .price-wrapper'ın satırına katılır. */
html body .fk-fav-grid .box-text .price-wrapper {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	column-gap: 6px !important;
	row-gap: 0 !important;
}

html body .fk-fav-grid .box-text .price-wrapper > .price {
	flex: 0 0 100%;
	max-width: 100%;
}

html body .fk-fav-grid .box-text .price-wrapper > .price.price.price:has(> .fv-bestseller-badge, > .fv-new-design-badge, > .fv-stock-question-badge, > .fivorno-seri-rozet) {
	display: contents !important;
}

html body .fk-fav-grid .box-text .price-wrapper > .fv-mobile-badge-wrap {
	display: contents !important;
}
