/* ===== Filtre produktov ===== */
.if-f { margin: 0 0 18px; position: relative; z-index: 20; }
.if-f__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.if-f__facets { display: contents; }
.if-f__drawer-head, .if-f__drawer-foot { display: none; }
.if-f__facet { position: relative; }
.if-f__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--if-line); border-radius: 999px; background: #fff; color: var(--if-text); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .15s; line-height: 1; }
.if-f__btn:hover { border-color: #BDB9AC; }
.if-f__btn em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--if-green-btn); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.if-f__chev { transition: transform .15s; opacity: .7; }
.if-f__facet.is-open > .if-f__btn { border-color: var(--if-text); box-shadow: 0 0 0 1px var(--if-text); }
.if-f__facet.is-open > .if-f__btn .if-f__chev { transform: rotate(180deg); }
.if-f__facet.is-on > .if-f__btn { border-color: var(--if-green-btn); background: #F3F8F1; }
.if-f__btn--all { background: var(--if-brown, #3B2E1A); border-color: var(--if-brown, #3B2E1A); color: #fff; }
.if-f__btn--all:hover { border-color: var(--if-brown, #3B2E1A); opacity: .92; }
.if-f__btn--all em { background: #fff; color: var(--if-brown, #3B2E1A); }
/* toggle chip */
.if-f__chip { position: relative; }
.if-f__chip input { position: absolute; opacity: 0; pointer-events: none; }
.if-f__chip small { color: var(--if-muted); font-size: 12px; }
.if-f__facet--toggle.is-on .if-f__chip { background: var(--if-green-btn); border-color: var(--if-green-btn); color: #fff; }
.if-f__facet--toggle.is-on .if-f__chip small { color: rgba(255,255,255,.8); }
/* popover */
.if-f__pop { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; max-width: 340px; background: #fff; border: 1px solid var(--if-line); border-radius: 14px; box-shadow: 0 18px 44px rgba(46,36,19,.18); padding: 10px; z-index: 30; }
.if-f__facet.is-open > .if-f__pop { display: block; animation: ifPop .14s ease; }
@keyframes ifPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.if-f__search { width: 100%; height: 38px; border: 1px solid var(--if-line) !important; border-radius: 10px !important; padding: 0 12px !important; margin: 0 0 8px; font-size: 14px; }
.if-f__opts { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1px; }
.if-f__opt { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.3; margin: 0 !important; }
.if-f__opt:hover { background: var(--if-ground); }
.if-f__opt input { position: absolute; opacity: 0; pointer-events: none; }
.if-f__box { width: 18px; height: 18px; flex: 0 0 18px; border: 1.5px solid #BDB9AC; border-radius: 5px; background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
.if-f__opt input:checked + .if-f__box { background: var(--if-green-btn); border-color: var(--if-green-btn); }
.if-f__opt input:checked + .if-f__box::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.if-f__opt input:focus-visible + .if-f__box { box-shadow: 0 0 0 3px rgba(43,133,38,.25); }
.if-f__lab { flex: 1; min-width: 0; }
.if-f__opt small { color: var(--if-muted); font-size: 12px; }
.if-f__opt.is-empty { opacity: .45; }
/* cena */
.if-f__range { padding: 6px 4px 2px; min-width: 280px; }
.if-f__slider { position: relative; height: 28px; margin: 4px 8px 10px; }
.if-f__track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--if-line); }
.if-f__track i { position: absolute; top: 0; bottom: 0; background: var(--if-green-btn); border-radius: 2px; }
.if-f__slider input[type=range] { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 28px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.if-f__slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--if-green-btn); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer; }
.if-f__slider input[type=range]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--if-green-btn); cursor: pointer; }
.if-f__slider input[type=range]::-webkit-slider-runnable-track { background: none; }
.if-f__slider input[type=range]::-moz-range-track { background: none; }
.if-f__inputs { display: flex; align-items: center; gap: 8px; }
.if-f__inputs label { flex: 1; display: flex; align-items: center; gap: 6px; border: 1px solid var(--if-line); border-radius: 10px; padding: 0 10px; height: 40px; margin: 0; }
.if-f__inputs label span, .if-f__inputs label b { font-size: 12px; color: var(--if-muted); font-weight: 400; }
.if-f__inputs input { border: 0 !important; padding: 0 !important; height: 38px !important; width: 100%; min-width: 0; font-size: 14px; background: none !important; box-shadow: none !important; -moz-appearance: textfield; }
.if-f__inputs input::-webkit-outer-spin-button, .if-f__inputs input::-webkit-inner-spin-button { -webkit-appearance: none; }
.if-f__dash { color: var(--if-muted); }
.if-f__apply { width: 100%; margin-top: 10px; height: 40px; border: 0; border-radius: 10px; background: var(--if-green-btn); color: #fff; font-weight: 600; cursor: pointer; }
.if-f__apply:hover { background: #236E1F; }
/* aktívne */
.if-f__active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.if-f__pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; background: #E9F3E7; color: #1F6B1B !important; font-size: 13px; text-decoration: none !important; transition: background .12s; }
.if-f__pill b { font-weight: 600; }
.if-f__pill span { font-size: 16px; line-height: 1; opacity: .7; }
.if-f__pill:hover { background: #D7EAD3; }
.if-f__clear { font-size: 13px; font-weight: 600; color: var(--if-text) !important; text-decoration: underline !important; margin-left: 4px; }
/* načítavanie */
.if-f.is-loading, html.if-f-loading ul.products { opacity: .55; pointer-events: none; transition: opacity .15s; }
html.if-f-loading ul.products { filter: saturate(.6); }
.if-f__empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 28px; border: 1px dashed var(--if-line); border-radius: 14px; background: #fff; margin: 10px 0 30px; }
.if-f__empty strong { font-size: 16px; }
.if-f__empty span { color: var(--if-muted); }
.if-f__backdrop { display: none; }

/* ===== Drawer (mobil + „Všetky filtre“) ===== */
@media (min-width: 1000px) {
	.if-f:not(.is-drawer) .if-f__facets .if-f__drawer-head, .if-f:not(.is-drawer) .if-f__facets .if-f__drawer-foot { display: none; }
}
.if-f.is-drawer .if-f__facets, .if-f__facets.is-drawer {
	display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: #fff; z-index: 100001; box-shadow: -20px 0 50px rgba(0,0,0,.2); overflow: hidden; animation: ifDrawer .2s ease;
}
@keyframes ifDrawer { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.if-f.is-drawer .if-f__drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--if-line); }
.if-f.is-drawer .if-f__drawer-head strong { font-family: "Barlow Condensed", sans-serif; font-size: 24px; text-transform: uppercase; color: var(--if-brown, #3B2E1A); }
.if-f__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--if-line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--if-text); }
.if-f.is-drawer .if-f__facet { border-bottom: 1px solid var(--if-line-soft, #EEECE5); }
.if-f.is-drawer .if-f__facets > .if-f__facet:first-of-type { margin-top: 0; }
.if-f.is-drawer .if-f__facets { overflow-y: auto; }
.if-f.is-drawer .if-f__btn { width: 100%; height: 56px; border: 0 !important; border-radius: 0; padding: 0 20px; justify-content: flex-start; font-size: 15px; font-weight: 600; background: #fff !important; box-shadow: none !important; }
.if-f.is-drawer .if-f__btn .if-f__chev { margin-left: auto; }
.if-f.is-drawer .if-f__pop { position: static; display: none; box-shadow: none; border: 0; border-radius: 0; max-width: none; min-width: 0; padding: 0 12px 14px; animation: none; }
.if-f.is-drawer .if-f__facet.is-open > .if-f__pop { display: block; }
.if-f.is-drawer .if-f__opts { max-height: none; }
.if-f.is-drawer .if-f__facet--toggle { padding: 12px 20px; }
.if-f.is-drawer .if-f__facet--toggle .if-f__chip { width: auto; height: 40px; border: 1px solid var(--if-line) !important; border-radius: 999px; padding: 0 14px; font-weight: 500; }
.if-f.is-drawer .if-f__facet--toggle.is-on .if-f__chip { background: var(--if-green-btn) !important; color: #fff; }
.if-f.is-drawer .if-f__drawer-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 14px 20px; border-top: 1px solid var(--if-line); background: #fff; position: sticky; bottom: 0; }
.if-f__reset { font-size: 14px; font-weight: 600; color: var(--if-text) !important; text-decoration: underline !important; white-space: nowrap; }
.if-f__show { flex: 1; height: 48px; border: 0; border-radius: 10px; background: var(--if-green-btn); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
html.if-f-drawer-open { overflow: hidden; }
html.if-f-drawer-open .if-f__backdrop { display: block; position: fixed; inset: 0; background: rgba(30,22,10,.45); z-index: 100000; animation: ifFade .15s ease; }
html.if-f-drawer-open .if-f { z-index: auto; }

/* mobil: len tlačidlo Filtre + aktívne filtre */
@media (max-width: 999px) {
	.if-f__bar > .if-f__facets { display: none; }
	.if-f.is-drawer .if-f__bar > .if-f__facets { display: flex; }
	.if-f__btn--all span { font-size: 0; }
	.if-f__btn--all span::before { content: "Filtre"; font-size: 14px; }
	.if-f__btn--all { height: 44px; padding: 0 18px; }
	.if-f__active { margin-top: 10px; }
}

/* Podkategórie – logá a obrázky celé (nie orezané) */
.if-subcat__img { flex: 0 0 60px !important; width: 60px; height: 48px !important; background: #fff !important; border: 1px solid var(--if-line); }
.if-subcat__img img { padding: 4px; box-sizing: border-box; }
@media (max-width: 689px) { .if-subcat__img { flex-basis: 52px !important; width: 52px; height: 40px !important; } }

/* SEO text kategórie – ignorovať vložené farby z editora (napr. biely text) */
.if-cat-seo [style*="color"], .if-cat-seo font[color] { color: inherit !important; background-color: transparent !important; }

/* Produkt – oddelenie sekcie Súvisiace / Odporúčame */
.single-product section.related, .single-product section.up-sells { margin-top: 72px !important; padding-top: 56px !important; border-top: 1px solid var(--if-line); position: relative; }
.single-product section.up-sells + section.related { margin-top: 48px !important; padding-top: 48px !important; }
.single-product section.related > h2, .single-product section.up-sells > h2 { margin: 0 0 24px !important; }
.single-product section.related ul.products, .single-product section.up-sells ul.products { margin-bottom: 0 !important; }

/* Platba – bez deliacej čiary nad popisom vybranej platby */
.woocommerce-checkout #payment li.wc_payment_method .payment_box { border: 0 !important; box-shadow: none !important; margin-top: -4px !important; }
.woocommerce-checkout #payment li.wc_payment_method > label { border: 0 !important; }

/* Produkt – skrátený zoznam kategórií */
.if-cats-rest { display: none; }
.if-cats-more.is-open .if-cats-rest { display: inline; }
.if-cats-toggle { border: 0; background: none; padding: 0 0 0 4px; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--if-green-btn); cursor: pointer; text-decoration: underline; }

