/* =====================================================================
   05 – TERMÉKLISTÁK: kategória, bolt, TOP ajánlatok, Termékvonalak (inc/shop.php)
   fejléc → kategória-gombok → eszköztár (szűrők + rendezés) → rács → lapozás
   ===================================================================== */

/* A Woo alap elemei helyett a saját fejléc (a Blocksy címsávja: bv-own-head, 01-base.css) */
.bv-list .woocommerce-products-header,
.bv-list .woo-listing-top { display: none; }
.bv-list #main { --bv-container-max: calc(var(--bv-content-list) + 2 * var(--bv-gutter)); }   /* oldalt hely marad, mint az olasz oldalon */

/* ---------- Kenyérmorzsa ---------- */
.ct-breadcrumbs, .woocommerce-breadcrumb {
	margin: 0 0 18px; font-family: var(--bv-font-body); font-size: 13px; font-weight: 500;
	letter-spacing: 0; text-transform: none; color: var(--bv-muted);
}
.ct-breadcrumbs a, .woocommerce-breadcrumb a { color: var(--bv-text); text-decoration: none; }
.ct-breadcrumbs a:hover, .woocommerce-breadcrumb a:hover { color: var(--bv-brown); text-decoration: underline; }

/* ---------- Kategória-gombok képpel: húzható csík nyilakkal (js/drag-scroll.js) ---------- */
.bv-drag { position: relative; margin: 0 0 28px; }
.bv-list-cats {
	display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
	scroll-snap-type: x proximity; cursor: grab; -webkit-user-select: none; user-select: none;
}
.bv-list-cats::-webkit-scrollbar { display: none; }
.bv-list-cats.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.bv-list-cats.is-dragging a { pointer-events: none; }
.bv-list-cats__item {
	flex: none; display: inline-flex; align-items: center; gap: 12px; padding: 5px 18px 5px 5px;
	background: var(--bv-white); border: 1.5px solid var(--bv-line); border-radius: var(--bv-pill);
	color: var(--bv-text); text-decoration: none; scroll-snap-align: start;
	transition: border-color .15s ease, background .15s ease;
}
.bv-list-cats__item:hover { border-color: var(--bv-text); background: var(--bv-cream-light); color: var(--bv-text); }
.bv-list-cats__img { flex: none; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; background: var(--bv-card-bg); }
.bv-list-cats__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.bv-list-cats__name { font-size: 14px; font-weight: 600; white-space: nowrap; }
/* Több sorban (Bottega beállítások → Terméklisták → Lista); a csúszka nyilai ilyenkor maguktól eltűnnek */
.bv-list-cats--wrap { flex-wrap: wrap; overflow: visible; cursor: auto; scroll-snap-type: none; margin-bottom: 28px; }
@media (min-width: 1000px) {
	.bv-list-cats--wrap-desktop { flex-wrap: wrap; overflow: visible; cursor: auto; scroll-snap-type: none; }
}

/* halványuló szélek, ahol még van tovább */
.bv-drag::before, .bv-drag::after {
	content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 64px; pointer-events: none;
	transition: opacity .2s ease;
}
.bv-drag::before { left: 0; background: linear-gradient(90deg, var(--bv-bg), rgba(247,246,245,0)); }
.bv-drag::after { right: 0; background: linear-gradient(270deg, var(--bv-bg), rgba(247,246,245,0)); }
.bv-drag.is-start::before, .bv-drag.is-end::after { opacity: 0; }
.bv-drag__arrow {
	position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--bv-white); color: var(--bv-text); font-size: 22px; line-height: 1;
	box-shadow: 0 4px 14px rgba(61,43,36,.18);
}
.bv-drag__arrow:hover { background: var(--bv-cream-light); }
.bv-drag__arrow--prev { left: 4px; }
.bv-drag__arrow--next { right: 4px; }
.bv-drag__arrow[hidden] { display: none; }

/* ---------- Eszköztár: szűrők + rendezés ---------- */
.bv-toolbar {
	position: relative; z-index: 20;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
	margin: 0 0 16px; padding: 14px 0; border-block: 1px solid var(--bv-line);
}
.bv-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.bv-filter { position: relative; }
.bv-filter summary {
	position: relative; list-style: none; cursor: pointer; -webkit-user-select: none; user-select: none;
	padding: 9px 38px 9px 18px;
	background: var(--bv-white); border: 1px solid var(--bv-cream); border-radius: var(--bv-pill);
	font-size: 14px; font-weight: 600; color: var(--bv-text);
}
.bv-filter summary::-webkit-details-marker { display: none; }
.bv-filter summary::after {
	content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg); transition: transform .2s;
}
.bv-filter summary:hover,
.bv-filter[open] summary { border-color: var(--bv-text); }
.bv-filter[open] summary::after { transform: rotate(-135deg); margin-top: -1px; }
.bv-filter.is-set summary { background: var(--bv-text); border-color: var(--bv-text); color: var(--bv-white); }
.bv-filter ul {
	position: absolute; z-index: 50; top: calc(100% + 6px); left: 0;
	min-width: 240px; max-height: 340px; overflow-y: auto; margin: 0; padding: 8px; list-style: none;
	background: var(--bv-white); border: 1px solid var(--bv-line); border-radius: 12px;
	box-shadow: 0 14px 30px -10px rgba(61,43,36,.25);
}
.bv-filter li { margin: 0; }
.bv-filter li a {
	display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
	font-size: 14px; color: var(--bv-text); text-decoration: none;
}
.bv-filter li a::before {   /* jelölőnégyzet */
	content: ""; flex: none; width: 16px; height: 16px; border: 1.5px solid var(--bv-muted); border-radius: 4px;
}
.bv-filter li a:hover { background: var(--bv-cream-light); }
.bv-filter li a.is-active { font-weight: 600; }
.bv-filter li a.is-active::before {
	border-color: var(--bv-text);
	background: var(--bv-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Ár: kétvégű csúszka (inc/shop.php, js/price-filter.js) – a többi szűrő lenyílójához illő dobozban */
.bv-price {
	position: absolute; z-index: 50; top: calc(100% + 6px); left: 0;
	display: grid; gap: 14px; width: 320px; margin: 0; padding: 18px 18px 16px;
	background: var(--bv-white); border: 1px solid var(--bv-line); border-radius: 12px;
	box-shadow: 0 14px 30px -10px rgba(61,43,36,.25);
}
.bv-price__now { margin: 0; font-size: 15px; font-weight: 700; color: var(--bv-text); text-align: center; }
/* A sáv: szürke alap + márkaszínű kijelölt szakasz; a két csúszka egymáson, csak a fogantyúk foghatók meg.
   A fogantyú közepe a sáv két végétől fél fogantyúnyira áll meg – a kijelölés ehhez igazodik. */
.bv-price__slider { --bv-thumb: 24px; --bv-h: 32px; --bv-from: 0; --bv-to: 1; position: relative; height: var(--bv-h); }
@media (pointer: coarse) { .bv-price__slider { --bv-thumb: 30px; --bv-h: 44px; } } /* ujjal nagyobb fogantyú */
.bv-price__slider::before,
.bv-price__slider::after { content: ""; position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; pointer-events: none; }
.bv-price__slider::before { left: calc(var(--bv-thumb) / 2); right: calc(var(--bv-thumb) / 2); background: var(--bv-cream); }
.bv-price__slider::after {
	left: calc(var(--bv-thumb) / 2 + (100% - var(--bv-thumb)) * var(--bv-from));
	right: calc(var(--bv-thumb) / 2 + (100% - var(--bv-thumb)) * (1 - var(--bv-to)));
	background: var(--bv-brown);
}
.bv-price__range {
	position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0;
	background: none; border: 0; outline: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.bv-price__range::-webkit-slider-runnable-track { height: 100%; background: none; border: 0; }
.bv-price__range::-moz-range-track { background: none; border: 0; }
.bv-price__range::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; pointer-events: auto; cursor: grab;
	width: var(--bv-thumb); height: var(--bv-thumb); margin-top: calc((var(--bv-h) - var(--bv-thumb)) / 2);
	border: 2px solid var(--bv-brown); border-radius: 50%; background: var(--bv-white); box-shadow: 0 2px 6px rgba(61,43,36,.25);
}
.bv-price__range::-moz-range-thumb {
	pointer-events: auto; cursor: grab; box-sizing: border-box; width: var(--bv-thumb); height: var(--bv-thumb);
	border: 2px solid var(--bv-brown); border-radius: 50%; background: var(--bv-white); box-shadow: 0 2px 6px rgba(61,43,36,.25);
}
.bv-price__range:active::-webkit-slider-thumb { cursor: grabbing; }
.bv-price__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(141,63,43,.2); }
.bv-price__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(141,63,43,.2); }
.bv-price:not(.is-ready) .bv-price__slider { display: none; } /* JavaScript nélkül csak a számmezők */
.bv-price__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bv-price__field { display: grid; gap: 4px; margin: 0; font-size: 12px; color: var(--bv-muted); }
.bv-price__input { position: relative; display: block; }
.bv-price__input > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--bv-muted); pointer-events: none; }
.bv-price .bv-price__input input[type="number"] {
	width: 100% !important; height: 40px !important; min-height: 0 !important; margin: 0 !important; padding: 0 34px 0 12px !important;
	border: 1px solid var(--bv-cream) !important; border-radius: 10px !important; background: var(--bv-white) !important; box-shadow: none !important;
	font-family: var(--bv-font-body); font-size: 15px; font-weight: 600; color: var(--bv-text);
	-moz-appearance: textfield; appearance: textfield;
} /* !important: a Blocksy számmező-stílusa ellen (lásd 03-cards.css) */
.bv-price .bv-price__input input::-webkit-outer-spin-button,
.bv-price .bv-price__input input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.bv-price .bv-price__input input:focus { border-color: var(--bv-brown) !important; outline: none; }
.bv-price__actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.bv-price__actions .button { min-height: 42px; padding-left: 24px; padding-right: 24px; }

/* Rendezés: a WooCommerce select pirulaként */
.bv-sort { display: flex; align-items: center; gap: 8px; }
.bv-sort__label { font-size: 14px; color: var(--bv-muted); white-space: nowrap; }
.bv-sort .woocommerce-ordering { margin: 0; }
.bv-sort .ct-sort-icon { display: none !important; }   /* a Blocksy telefonos rendezés-ikonja a címke alá csúszott */
.bv-sort .woocommerce-ordering select {
	height: 40px; min-width: 200px; padding: 0 38px 0 16px; cursor: pointer;
	appearance: none; -webkit-appearance: none;
	background: var(--bv-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233D2B24' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 14px no-repeat;
	border: 1px solid var(--bv-cream); border-radius: var(--bv-pill);
	font-family: var(--bv-font-body); font-size: 14px; font-weight: 600; color: var(--bv-text);
}
.bv-sort .woocommerce-ordering select:hover,
.bv-sort .woocommerce-ordering select:focus { border-color: var(--bv-text); outline: none; }

/* Aktív szűrők */
.bv-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 20px; }
.bv-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
	background: var(--bv-cream-light); border: 1px solid var(--bv-cream); border-radius: var(--bv-pill);
	color: var(--bv-text); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.bv-chip:hover { border-color: var(--bv-text); color: var(--bv-text); }
.bv-chip span[aria-hidden] { font-size: 16px; line-height: 1; }
.bv-link { color: var(--bv-text); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.bv-link:hover { color: var(--bv-brown); }

/* ---------- Üres találat ---------- */
.bv-empty {
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	margin: 24px 0 48px; padding: 48px 24px; text-align: center;
	background: var(--bv-cream-light); border-radius: var(--bv-radius);
}
.bv-empty p { margin: 0; }
.bv-empty__title { font-size: 18px; font-weight: 700; color: var(--bv-text); }
.bv-empty .button { margin-top: 14px; }

/* ---------- Lapozás: Blocksy (.ct-pagination) és WooCommerce – számok középen, Előző / Következő mellettük ---------- */
.ct-pagination,
.woocommerce-pagination ul.page-numbers,
.woocommerce nav.woocommerce-pagination ul {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
	margin: 40px 0 8px; padding: 0; border: 0;
}
.ct-pagination > div { display: flex; flex-wrap: wrap; gap: 6px; }
.woocommerce-pagination li,
.woocommerce nav.woocommerce-pagination ul li { margin: 0; border: 0; overflow: visible; list-style: none; }
.ct-pagination .page-numbers,
.woocommerce nav.woocommerce-pagination ul li .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-width: 42px; height: 42px; margin: 0; padding: 0 12px;
	border: 1px solid var(--bv-line); border-radius: var(--bv-pill); background: var(--bv-white);
	font-family: var(--bv-font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none;
	color: var(--bv-text); text-decoration: none;
}
.ct-pagination .prev, .ct-pagination .next,
.woocommerce nav.woocommerce-pagination .prev, .woocommerce nav.woocommerce-pagination .next { padding: 0 18px; }
.ct-pagination .page-numbers svg { width: 9px; height: 9px; fill: currentColor; }
.ct-pagination a.page-numbers:hover,
.woocommerce nav.woocommerce-pagination ul li a:hover { border-color: var(--bv-text); background: var(--bv-white); color: var(--bv-text); }
.ct-pagination .current,
.woocommerce nav.woocommerce-pagination ul li span.current { border-color: var(--bv-text); background: var(--bv-text); color: var(--bv-white); }
.ct-pagination .dots,
.woocommerce nav.woocommerce-pagination ul li span.dots { border-color: transparent; background: transparent; }

/* ---------- Telefon és tablet (1000 px alatt, mint a kereső és a menü): a kategóriasávot ujjal görgetjük, nyilak nélkül ---------- */
@media (max-width: 999px) {
	.bv-drag { margin-left: calc(-1 * var(--bv-gutter)); margin-right: calc(-1 * var(--bv-gutter)); }
	.bv-list-cats { padding-left: var(--bv-gutter); padding-right: var(--bv-gutter); }
	.bv-list-cats--wrap { padding-left: 0; padding-right: 0; }
	.bv-drag__arrow, .bv-drag::before, .bv-drag::after { display: none; }
}

/* ---------- Telefon ---------- */
@media (max-width: 760px) {
	.ct-breadcrumbs, .woocommerce-breadcrumb { font-size: 11px; line-height: 1.6; }
	.ct-breadcrumbs > span:last-child, .woocommerce-breadcrumb > :last-child {
		display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
	}
	.bv-list-cats--wrap { gap: 8px; }
	.bv-list-cats__img { width: 36px; height: 36px; }
	.bv-list-cats__name { font-size: 13px; }
	.bv-toolbar { gap: 10px; padding: 12px 0; }
	.bv-filters { flex-wrap: nowrap; width: 100%; overflow-x: auto; scrollbar-width: none; }
	.bv-filters::-webkit-scrollbar { display: none; }
	.bv-filter { position: static; }       /* a lista a teljes eszköztár szélességében nyílik */
	.bv-filter summary { padding: 8px 32px 8px 14px; font-size: 13px; white-space: nowrap; }
	.bv-filter summary::after { right: 13px; }
	.bv-filter ul { left: 0; right: 0; min-width: 0; }
	.bv-price { left: 0; right: 0; width: auto; max-width: 420px; }
	.bv-sort { width: 100%; }
	.bv-sort .woocommerce-ordering { flex: 1; }
	.bv-sort .woocommerce-ordering select { width: 100%; min-width: 0; }
}
