/* ==========================================================================
   Jhomesia Header - Trendyol benzeri (turuncu tema)
   ========================================================================== */

.jh-header { background: #fff; position: sticky; top: 0; z-index: 1030; box-shadow: 0 1px 0 rgba(0,0,0,.02); }

/* ---- Ust bilgi seridi ---- */
.jh-topbar { background: #fafafa; border-bottom: 1px solid #f0f0f0; font-size: 12.5px; }
.jh-topbar-links {
	list-style: none; margin: 0; padding: 7px 0;
	display: flex; justify-content: flex-end; gap: 22px;
}
.jh-topbar-links a { color: #7a7d82; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.jh-topbar-links a:hover { color: #f27a1a; }

/* ---- Ana satir ---- */
.jh-header-main { padding: 16px 0; border-bottom: 1px solid #f3f3f3; }
.jh-header-row { display: flex; align-items: center; gap: 24px; }

.jh-logo-wrap { flex: 0 0 auto; }
.jh-logo-wrap img,
.jh-logo-img img { height: 40px; width: auto; display: block; }

.jh-search { flex: 1 1 auto; position: relative; display: flex; max-width: 860px; }
.jh-search input {
	width: 100%; height: 46px;
	border: 1px solid #ececec; background: #f7f7f7; border-radius: 8px;
	padding: 0 50px 0 18px; font-size: 15px; color: #333; outline: none;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.jh-search input::placeholder { color: #9aa0a6; }
.jh-search input:focus { border-color: #f27a1a; background: #fff; box-shadow: 0 0 0 3px rgba(242,122,26,.12); }
.jh-search button {
	position: absolute; right: 5px; top: 5px; height: 36px; width: 38px;
	border: 0; background: transparent; color: #f27a1a;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---- Canli arama dropdown (AJAX) ---- */
.jh-livesearch {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1060;
	background: #fff; border: 1px solid #eef0f4; border-radius: 14px;
	box-shadow: 0 16px 40px rgba(0,0,0,.14); padding: 6px;
	max-height: 70vh; overflow-y: auto;
}
.jh-ls-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #9aa0a6; padding: 9px 10px 4px; }
.jh-ls-cat, .jh-ls-prod { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: #2b2f36; text-decoration: none; }
.jh-ls-cat:hover, .jh-ls-prod:hover { background: #fef1e7; color: #f27a1a; }
.jh-ls-cat .bi { color: #f27a1a; font-size: 16px; }
.jh-ls-cat span { flex: 1; font-size: 14px; }
.jh-ls-cat em { font-style: normal; font-size: 12px; color: #8a8f98; background: #f3f4f6; border-radius: 999px; padding: 1px 8px; }
.jh-ls-prod img { width: 42px; height: 42px; object-fit: cover; border-radius: 9px; border: 1px solid #f0f0f0; flex: 0 0 auto; }
.jh-ls-name { flex: 1; font-size: 14px; line-height: 1.35; }
.jh-ls-price { font-weight: 700; color: #f27a1a; font-size: 14px; white-space: nowrap; }
.jh-ls-all { display: block; text-align: center; padding: 11px; margin: 6px 4px 4px; font-weight: 600; color: #fff; background: #f27a1a; border-radius: 10px; text-decoration: none; font-size: 13px; }
.jh-ls-all:hover { background: #d96c12; color: #fff; }
.jh-ls-empty, .jh-ls-loading { padding: 22px; text-align: center; color: #9aa0a6; font-size: 14px; }

.jh-header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin-left: auto; }
.jh-action {
	display: flex; align-items: center; gap: 10px;
	padding: 12px 16px; border-radius: 12px;
	color: #3a3a3a; text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap;
}
.jh-action svg, .jh-action .bi { color: #555; flex: 0 0 auto; font-size: 28px; line-height: 1; }
.jh-action:hover { background: #fef1e7; color: #f27a1a; }
.jh-action:hover svg, .jh-action:hover .bi { color: #f27a1a; }
.jh-cart { position: relative; }
.jh-cart-count {
	position: absolute; top: -2px; left: 34px;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: #f27a1a; color: #fff; font-size: 11px; font-weight: 700; font-style: normal;
	display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ---- Kategori seridi (scroll'da gizlenir) ---- */
.jh-catnav {
	border-bottom: 1px solid #f0f0f0;
	overflow: hidden;
	max-height: 66px;
	transition: max-height .3s ease, opacity .25s ease;
}
.jh-header.jh-catnav-hidden .jh-catnav {
	max-height: 0;
	opacity: 0;
	border-bottom-color: transparent;
}
.jh-catnav-row { display: flex; align-items: stretch; gap: 6px; }
.jh-allcat {
	display: inline-flex; align-items: center; gap: 8px;
	background: #f27a1a; color: #fff; border: 0;
	font-weight: 700; font-size: 13.5px; padding: 0 18px; margin: 8px 8px 8px 0;
	border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.jh-allcat:hover { background: #d96c12; }

.jh-catnav-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.jh-catnav-menu > li { position: relative; }
.jh-catnav-menu .nav-link {
	display: flex; align-items: center; padding: 14px 14px;
	color: #3a3a3a; text-decoration: none; font-size: 14px; font-weight: 600;
	border-bottom: 3px solid transparent;
}
.jh-catnav-menu .nav-link:hover,
.jh-catnav-menu li.active > .nav-link,
.jh-catnav-menu .current-menu-item > .nav-link { color: #f27a1a; border-bottom-color: #f27a1a; }
.jh-catnav-menu .dropdown-menu { border: 0; box-shadow: 0 8px 28px rgba(0,0,0,.1); border-radius: 10px; padding: 8px; margin-top: 0; }
.jh-catnav-menu .dropdown-item { border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.jh-catnav-menu .dropdown-item:hover { background: #fef1e7; color: #f27a1a; }

/* ---- Hamburger (mobil) + bi ikon boyutlari ---- */
.jh-burger {
	display: none; align-items: center; justify-content: center;
	width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 0;
	font-size: 24px; color: #333; line-height: 1;
}
.jh-allcat .bi { font-size: 18px; }
.jh-topbar-links .bi { font-size: 13px; }
.jh-search button .bi { font-size: 20px; }

/* Kategori menusu link ikonlari (tatli, turuncu) */
.jh-catnav-menu .nav-link .bi { font-size: 16px; margin-right: 7px; color: #f27a1a; }
.jh-mobile-menu .nav-link .bi { font-size: 16px; margin-right: 8px; color: #f27a1a; }

/* ---- Mobil menu ---- */
.jh-mobile-menu .nav-link { display: block; padding: 12px 4px; color: #222; text-decoration: none; font-weight: 600; border-bottom: 1px solid #f2f2f2; }
.jh-mobile-menu .nav-link:hover { color: #f27a1a; }
.jh-mobile-menu .dropdown-menu { position: static !important; transform: none !important; border: 0; box-shadow: none; padding: 0 0 0 14px; }
.jh-mobile-menu .dropdown-item { padding: 10px 4px; }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
	.jh-burger { display: flex; }
	.jh-header-row { flex-wrap: wrap; gap: 12px; }
	.jh-logo-wrap { order: 1; }
	.jh-header-actions { order: 2; margin-left: auto; }
	.jh-header-actions .jh-action span { display: none; }
	.jh-header-actions .jh-action { padding: 8px; }
	.jh-search { order: 3; flex: 1 1 100%; max-width: 100%; }
	.jh-cart-count { left: 22px; }
}

/* ==========================================================================
   Kategori ağacı - açılır/kapanır (sidebar + offcanvas)
   ========================================================================== */
.jh-cattree { list-style: none; margin: 0; padding: 0; }
.jh-cattree-item { border-bottom: 1px solid #f3f3f3; }
.jh-cattree-item:last-child { border-bottom: 0; }
.jh-cattree-row { display: flex; align-items: center; }
.jh-cattree-link { flex: 1 1 auto; display: flex; align-items: center; gap: 9px; padding: 11px 8px; color: #444; text-decoration: none; font-weight: 500; font-size: 14px; min-width: 0; }
.jh-cattree-link > .bi { color: #f27a1a; font-size: 16px; flex: none; }
.jh-cattree-link:hover { color: #f27a1a; }
.jh-cattree-link.active { color: #f27a1a; font-weight: 700; }
.jh-cattree-toggle { flex: none; background: none; border: 0; color: #bbb; cursor: pointer; padding: 8px 6px; line-height: 1; transition: transform .25s ease, color .2s; }
.jh-cattree-toggle .bi { font-size: 13px; }
.jh-cattree-item.is-open > .jh-cattree-row .jh-cattree-toggle { transform: rotate(180deg); color: #f27a1a; }
.jh-cattree-sub { list-style: none; margin: 0; padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.jh-cattree-item.is-open > .jh-cattree-sub { max-height: 600px; }
.jh-cattree-sub li a { display: flex; align-items: center; gap: 8px; padding: 9px 8px 9px 30px; color: #6b6b6b; text-decoration: none; font-size: 13.5px; }
.jh-cattree-sub li a > .bi { font-size: 14px; color: #9a9a9a; flex: none; }
.jh-cattree-sub li a:hover,
.jh-cattree-sub li a:hover > .bi { color: #f27a1a; }
.jh-cattree-sub li a.active,
.jh-cattree-sub li a.active > .bi { color: #f27a1a; font-weight: 600; }
/* Alt kategorili parent satiri: tiklanabilir (toggle) */
.jh-cattree-head { cursor: pointer; user-select: none; }
.jh-cattree-head .jh-cattree-link { cursor: pointer; }
.jh-cattree-head:hover .jh-cattree-link,
.jh-cattree-head:hover .jh-cattree-toggle { color: #f27a1a; }
/* "Tumunu Goster" satiri (alt listenin basi) - vurgulu */
.jh-cattree-sub li.jh-cattree-all a { font-weight: 700; color: #f27a1a; }
.jh-cattree-sub li.jh-cattree-all a > .bi { color: #f27a1a; }
.jh-cattree-sub li.jh-cattree-all a:hover { color: #d96c12; }
.jh-cattree-sub li.jh-cattree-all { border-bottom: 1px dashed #f1e4d8; margin-bottom: 2px; }
.jh-fc-count { margin-left: auto; color: #b3b3b3; font-size: 12px; font-weight: 600; }

/* Offcanvas hızlı linkler + başlık */
.jh-offcanvas-top { list-style: none; margin: 0 0 6px; padding: 0; }
.jh-offcanvas-top li a { display: flex; align-items: center; gap: 9px; padding: 11px 8px; color: #333; text-decoration: none; font-weight: 600; font-size: 14.5px; border-radius: 8px; }
.jh-offcanvas-top li a .bi { color: #f27a1a; font-size: 17px; }
.jh-offcanvas-top li a:hover { background: #fef1e7; color: #f27a1a; }
.jh-offcanvas-bottom { margin: 8px 0 0; border-top: 1px solid #eee; padding-top: 8px; }
.jh-offcanvas-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #aaa; margin: 14px 0 2px; padding: 0 8px; }

/* Favorilerim header sayaç rozeti */
.jh-fav-action { position: relative; }
.jh-wish-count {
	position: absolute; top: -6px; right: -9px;
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: #ff3d57; color: #fff;
	font-size: 11px; font-weight: 700; font-style: normal; line-height: 1;
	display: flex; align-items: center; justify-content: center;
}
.jh-wish-count.is-empty { display: none; }

/* ==========================================================================
   Header dropdownları: Hesabım (avatar+bakiye+menü) + Favorilerim (son 5)
   ========================================================================== */
.jh-action-wrap { position: relative; }
button.jh-action { background: none; border: 0; cursor: pointer; font: inherit; }

.jh-acc-toggle { display: flex; align-items: center; gap: 8px; }
.jh-acc-ava img { width: 34px; height: 34px; border-radius: 50%; display: block; }
.jh-acc-lbl { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.jh-acc-name { font-size: 13px; font-weight: 700; color: #2b2f36; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jh-acc-bal { font-size: 12px; font-weight: 700; color: #f27a1a; }
.jh-acc-bal .woocommerce-Price-amount { color: #f27a1a; }
.jh-acc-caret { font-size: 11px; color: #aaa; transition: transform .2s; }
.jh-acc-wrap.is-open .jh-acc-caret { transform: rotate(180deg); }

.jh-dropdown { position: absolute; top: calc(100% + 12px); right: 0; width: 300px; background: #fff; border: 1px solid #eef0f4; border-radius: 14px; box-shadow: 0 14px 38px rgba(0,0,0,.14); padding: 8px; z-index: 1200; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.jh-action-wrap.is-open .jh-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.jh-dropdown::before { content: ""; position: absolute; top: -6px; right: 26px; width: 12px; height: 12px; background: #fff; border-left: 1px solid #eef0f4; border-top: 1px solid #eef0f4; transform: rotate(45deg); }

.jh-dd-head { display: flex; align-items: center; gap: 11px; padding: 10px 11px 12px; border-bottom: 1px solid #f1f1f1; margin-bottom: 6px; }
.jh-dd-head img { width: 46px; height: 46px; border-radius: 50%; }
.jh-dd-hi { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.jh-dd-hi strong { display: block; font-size: 14px; color: #2b2f36; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jh-dd-hi span { font-size: 12.5px; color: #777; }
.jh-dd-hi b, .jh-dd-hi .woocommerce-Price-amount { color: #f27a1a; }
.jh-dd-add { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #f27a1a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; text-decoration: none; transition: background .15s; }
.jh-dd-add:hover { background: #d96c12; color: #fff; }

.jh-dd-menu { list-style: none; margin: 0; padding: 0; }
.jh-dd-menu li a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; color: #444; text-decoration: none; font-size: 13.5px; font-weight: 500; }
.jh-dd-menu li a .bi { font-size: 16px; color: #f27a1a; width: 18px; text-align: center; }
.jh-dd-menu li a:hover { background: #fef1e7; color: #f27a1a; }
.jh-dd-sep { border-top: 1px solid #f1f1f1; margin-top: 6px; padding-top: 6px; }
.jh-dd-sep a .bi { color: #d32f2f; }
.jh-dd-sep a:hover { background: #fdecea; color: #d32f2f; }

.jh-dd-title { font-size: 13px; font-weight: 700; color: #2b2f36; padding: 8px 11px 4px; }
.jh-fav-list { list-style: none; margin: 0; padding: 0; max-height: 330px; overflow-y: auto; }
.jh-fav-list li a { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px; text-decoration: none; }
.jh-fav-list li a:hover { background: #f7f7f8; }
.jh-fav-thumb img { width: 42px; height: 42px; border-radius: 8px; object-fit: contain; background: #f3f3f3; display: block; padding: 2px; }
.jh-fav-info { display: flex; flex-direction: column; min-width: 0; }
.jh-fav-name { font-size: 13px; color: #2b2f36; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.jh-fav-price { font-size: 13px; font-weight: 700; }
.jh-fav-price .woocommerce-Price-amount { color: #f27a1a; }
.jh-fav-msg { padding: 18px 11px; text-align: center; color: #999; font-size: 13px; }
.jh-fav-all { display: block; text-align: center; margin-top: 6px; padding: 9px; border-radius: 9px; background: #f27a1a; color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.jh-fav-all:hover { background: #d96c12; color: #fff; }

/* Mobil: dropdownlar alttan tam genişlik bottom-sheet */
@media (max-width: 575px) {
	.jh-dropdown { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; border-radius: 16px 16px 0 0; transform: translateY(100%); box-shadow: 0 -10px 30px rgba(0,0,0,.18); }
	.jh-action-wrap.is-open .jh-dropdown { transform: translateY(0); }
	.jh-dropdown::before { display: none; }
	.jh-acc-lbl, .jh-acc-caret { display: none; }
}
