/* =====================================================================
   02 – FEJLÉC: sorok, főmenü, kereső (asztali mező, telefonos panel), mega menü, telefonos menü
   ===================================================================== */

/* ---------- Sorok ---------- */
#header [data-row="top"] { background: var(--bv-cream); color: var(--bv-brown); font-size: 13px; }
#header [data-row="top"] a { color: var(--bv-brown); }
#header [data-row="middle"],
#header [data-row="bottom"] { background: var(--bv-white); }
#header [data-row="middle"] { --height: max(72px, min(5.4vw, 100px)); }
#header [data-row="bottom"] { --height: 44px; }
/* Logó: asztali gépen nagyobb (kb. 64–76 px magas), telefonon 46 px */
#header .site-logo-container img,
#header .custom-logo { max-height: max(46px, min(4.4vw, 76px)); width: auto; }

/* Ikonok, kosárösszeg */
#header .ct-header-search,
#header .ct-icon { color: var(--bv-brown); fill: var(--bv-brown); }
#header .ct-cart-total { color: var(--bv-brown); }
/* Fiók és kosár ikon egységesen: alapból sötét, egérre terrakotta */
#header .ct-header-cart .ct-icon { color: var(--bv-text); fill: var(--bv-text); transition: fill .15s ease; }
#header .ct-header-cart a:hover .ct-icon { color: var(--bv-brown); fill: var(--bv-brown); }
#header .ct-header-cart { --theme-icon-size: 24px; }
#header .ct-header-cart svg { width: 24px; height: 24px; }
/* Fiók ikon: a kosárhoz illő vonalas ikon (a Blocksy kis ikonja / profilképe helyett) */
#header .ct-account-item > svg,
#header .ct-account-item > img,
#header .ct-account-item > .ct-media-container { display: none; }
#header .ct-account-item::before {
	content: ""; flex: none; width: 26px; height: 26px; background: var(--bv-text); transition: background .15s ease;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20.5c.9-3.9 3.8-6 7.5-6s6.6 2.1 7.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20.5c.9-3.9 3.8-6 7.5-6s6.6 2.1 7.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
#header .ct-account-item:hover::before { background: var(--bv-brown); }
/* Telefonon/tableten a kereső mellé tett fiók ikon (js/drawers.js) */
#header .bv-head-account { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 6px; }
/* Kívánságlista szív a fiók ikon előtt (js/wishlist.js teszi be) */
.bv-wish-head { position: relative; display: inline-flex; align-items: center; margin-right: 18px; color: var(--bv-text); }
.bv-wish-head svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.bv-wish-head:hover { color: var(--bv-brown); }
.bv-wish-head__count {
	position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--bv-brown); color: var(--bv-white);
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.bv-wish-head__count[hidden] { display: none; }
#header .ct-cart-total,
#header .ct-label { font-family: var(--bv-font-body); font-size: 15px; font-weight: 600; text-transform: none; }
/* A Blocksy kosár-lenyíló helyett a saját kosárpanel nyílik (08-drawer-freebar.css) */
#header .ct-header-cart .ct-cart-content { display: none !important; }
/* Telefonon a kosár összege nem fér el a logó mellett (két sorba tört) – ott csak az ikon és a darabszám látszik;
   az összeg a kosárpanelben és az ingyenes szállítás sávban ott van */
@media (max-width: 689px) {
	#header .ct-header-cart .ct-label,
	#header .ct-header-cart .ct-cart-total { display: none !important; }
}

/* ---------- Főmenü ---------- */
.header-menu-1 .menu > li > .ct-menu-link,
.header-menu-2 .menu > li > .ct-menu-link {
	font-family: var(--bv-font-body); font-size: 15px; font-weight: 500;
	letter-spacing: 0; text-transform: none; color: var(--bv-brown);
}
.header-menu-1 .menu > li > .ct-menu-link:hover,
.header-menu-2 .menu > li > .ct-menu-link:hover { color: var(--bv-rust); }

/* "TOP ajánlatok" pirula – menüpont CSS osztálya: bv-menu-pill */
.menu > li.bv-menu-pill > .ct-menu-link {
	height: auto !important; padding: 6px 16px !important; margin-right: 8px;
	background: var(--bv-brown); color: var(--bv-white) !important; border-radius: var(--bv-pill);
}
.menu > li.bv-menu-pill > .ct-menu-link:hover { background: var(--bv-rust); }
.menu > li.bv-mega-active > .ct-menu-link { color: var(--bv-rust); text-decoration: underline; text-underline-offset: 6px; }

@media (min-width: 1000px) and (max-width: 1280px) {
	.header-menu-1 .menu > li > .ct-menu-link,
	.header-menu-2 .menu > li > .ct-menu-link { font-size: 14px; padding-left: 8px !important; padding-right: 8px !important; }
	.menu > li.bv-menu-pill > .ct-menu-link { padding: 5px 12px !important; }
}

/* ---------- Kereső mező ([bv_search]) ---------- */
.bv-search { position: relative; display: flex; align-items: center; width: max(220px, min(16vw, 300px)); max-width: 100%; }
.bv-search__icon { position: absolute; left: 14px; color: var(--bv-brown); pointer-events: none; }
.bv-search input[type="search"] {
	width: 100%; height: 40px; padding: 0 16px 0 40px;
	border: 1px solid var(--bv-muted); border-radius: var(--bv-pill); background: var(--bv-white);
	font-family: var(--bv-font-body); font-size: 14px; color: var(--bv-text);
}
.bv-search input[type="search"]::placeholder { color: var(--bv-muted); }
.bv-search input[type="search"]:focus { outline: none; border-color: var(--bv-brown); box-shadow: 0 0 0 3px rgba(141,63,43,.12); }

/* ---------- Telefonos / tabletes keresőpanel (inc/search.php: bv_msearch_panel, js/search.js; 1000 px alatt) ----------
   Felülről lecsúszó lap: keresőmező + Mégse, alatta legutóbbi keresések és kategóriák, gépelés közben élő találatok. */
.bv-msearch[hidden] { display: none; }
.bv-msearch { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000; }
.bv-msearch__backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(61, 43, 36, .45); opacity: 0; transition: opacity .25s ease; }
.bv-msearch__panel {
	position: absolute; top: 0; left: 0; right: 0; display: flex; flex-direction: column; max-height: 88vh; max-height: 88dvh;
	border-radius: 0 0 22px 22px; background: var(--bv-white); box-shadow: 0 12px 40px rgba(61, 43, 36, .18);
	transform: translateY(-104%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.bv-msearch.is-open .bv-msearch__backdrop { opacity: 1; }
.bv-msearch.is-open .bv-msearch__panel { transform: none; }
html.bv-msearch-open { overflow: hidden; }

.bv-msearch__bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--bv-line); }
.bv-msearch__form { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.bv-msearch__form > svg { position: absolute; left: 16px; color: var(--bv-brown); pointer-events: none; }
.bv-msearch__form input[type="search"] {
	width: 100%; height: 48px; margin: 0; padding: 0 44px 0 46px; border: 1.5px solid transparent; border-radius: var(--bv-pill);
	background: var(--bv-cream-light); box-shadow: none;
	font-family: var(--bv-font-body); font-size: 16px; color: var(--bv-text); /* 16 px: az iPhone így nem nagyít rá */
	-webkit-appearance: none; appearance: none;
}
.bv-msearch__form input[type="search"]::-webkit-search-cancel-button { display: none; }
.bv-msearch__form input[type="search"]::placeholder { color: var(--bv-muted); }
.bv-msearch__form input[type="search"]:focus { outline: none; border-color: var(--bv-brown); background: var(--bv-white); }
.bv-msearch__clear {
	position: absolute; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
	border: 0; border-radius: 50%; background: var(--bv-cream); color: var(--bv-text); font-size: 20px; line-height: 1; cursor: pointer;
}
.bv-msearch__clear[hidden] { display: none; }
.bv-msearch__cancel { flex: none; padding: 8px 2px; border: 0; background: none; color: var(--bv-brown); font-family: var(--bv-font-body); font-size: 15px; font-weight: 600; cursor: pointer; }

.bv-msearch__body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 20px; }
/* tableten a tartalom középen, olvasható szélességben */
.bv-msearch__bar > * { max-width: 720px; }
.bv-msearch__body > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.bv-msearch__sect { padding-top: 14px; }
.bv-msearch__sect[hidden] { display: none; }
.bv-msearch__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bv-msearch__head h2 { margin: 0; font-family: var(--bv-font-body); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bv-muted); }
.bv-msearch__forget { padding: 0; border: 0; background: none; color: var(--bv-brown); font-family: var(--bv-font-body); font-size: 13px; text-decoration: underline; cursor: pointer; }
.bv-msearch__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bv-msearch__chip {
	display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 1px solid var(--bv-line); border-radius: var(--bv-pill);
	background: var(--bv-white); color: var(--bv-text); font-family: var(--bv-font-body); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.bv-msearch__chip:active { border-color: var(--bv-brown); color: var(--bv-brown); }

.bv-msearch__list { margin: 0; padding: 0; list-style: none; }
.bv-msearch__item a { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--bv-line); color: var(--bv-text); text-decoration: none; }
.bv-msearch__thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; background: var(--bv-cream-light); object-fit: contain; }
.bv-msearch__info { display: grid; gap: 3px; min-width: 0; }
.bv-msearch__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 500; line-height: 1.35; }
.bv-msearch__price { font-size: 14px; font-weight: 700; color: var(--bv-brown); }
.bv-msearch__price del { margin-left: 6px; font-weight: 400; color: var(--bv-muted); }
.bv-msearch__price ins { text-decoration: none; }
/* töltés közben: szürke helykitöltők */
.bv-msearch__item.is-loading { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--bv-line); }
.bv-msearch__item.is-loading .bv-msearch__info { flex: 1; }
.bv-msearch__item.is-loading .bv-msearch__info span { display: block; height: 12px; border-radius: 6px; background: var(--bv-cream-light); animation: bv-msearch-pulse 1.1s ease-in-out infinite alternate; }
.bv-msearch__item.is-loading .bv-msearch__info span + span { width: 40%; }
.bv-msearch__item.is-loading .bv-msearch__thumb { animation: bv-msearch-pulse 1.1s ease-in-out infinite alternate; }
@keyframes bv-msearch-pulse { to { opacity: .45; } }
.bv-msearch__empty { margin: 8px 0 0; font-size: 14px; color: var(--bv-muted); }
.bv-msearch__empty[hidden], .bv-msearch__all[hidden] { display: none !important; }
.bv-msearch__all { display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 16px; box-sizing: border-box; text-decoration: none !important; }
@media (prefers-reduced-motion: reduce) { .bv-msearch__panel, .bv-msearch__backdrop { transition: none; } }

/* ---------- Mega menü ---------- */
.bv-mega {
	position: absolute; left: 0; right: 0; z-index: 999;
	background: var(--bv-white); border-top: 1px solid var(--bv-cream);
	box-shadow: 0 18px 30px -18px rgba(61,43,36,.25);
	opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease;
}
.bv-mega.is-open { opacity: 1; transform: none; }
.bv-mega[hidden] { display: none; }
.bv-mega__inner {
	max-width: calc(var(--bv-content) + 2 * var(--bv-gutter)); margin: 0 auto;
	padding: 32px var(--bv-gutter) 36px;
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px;
}
.bv-mega__cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 28px; align-content: start; }
.bv-mega__title {
	display: block; margin-bottom: 12px;
	font-family: var(--bv-font-body); font-size: 12px; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase; color: var(--bv-text);
}
.bv-mega ul { list-style: none; margin: 0; padding: 0; }
.bv-mega li { margin: 0 0 8px; }
.bv-mega li a { font-size: 14px; color: var(--bv-text); text-decoration: none; }
.bv-mega li a:hover { color: var(--bv-brown); text-decoration: underline; }
.bv-mega__all { font-weight: 600; }
.bv-mega__cards { display: flex; gap: 16px; }
.bv-mega__card { width: 200px; display: flex; flex-direction: column; gap: 6px; color: var(--bv-text); text-decoration: none; }
.bv-mega__card img {
	width: 200px; height: 200px; object-fit: contain;
	border-radius: 12px; background: var(--bv-card-bg); mix-blend-mode: multiply;
}
.bv-mega__card-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.bv-mega__card-cta { font-size: 13px; color: var(--bv-brown); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1200px) {
	.bv-mega__cards { display: none; }
	.bv-mega__inner { grid-template-columns: 1fr; }
}
@media (max-width: 999px) { .bv-mega-wrap { display: none; } }

/* ---------- Telefonos menü (Blocksy offcanvas) ---------- */
#offcanvas, #offcanvas .ct-panel-inner, #offcanvas .ct-panel-content { background-color: var(--bv-white) !important; color: var(--bv-text); }
#offcanvas .ct-menu-link,
#offcanvas .mobile-menu a {
	color: var(--bv-brown) !important; font-family: var(--bv-font-body);
	font-size: 17px; font-weight: 500; letter-spacing: 0; text-transform: none;
}
#offcanvas .mobile-menu li { border-bottom: 1px solid var(--bv-cream); }
#offcanvas .mobile-menu li.bv-menu-pill > a,
#offcanvas .mobile-menu .bv-menu-pill > .ct-menu-link {
	display: inline-flex; margin: 6px 0; padding: 6px 16px !important;
	background: var(--bv-brown); color: var(--bv-white) !important; border-radius: var(--bv-pill);
}
#offcanvas .ct-toggle-close, #offcanvas .ct-toggle-dropdown-mobile { color: var(--bv-brown) !important; }
