/**
 * Halmar Filter & Shop — frontend styles.
 * Używa zmiennych CSS z motywu halmar-theme: --halmar-gold, --halmar-dark, --halmar-bg.
 * Fallbacki ustawione na wypadek użycia z innym motywem.
 */

:root {
    --hfs-gold: var(--halmar-gold, #D4A820);
    --hfs-gold-hover: var(--halmar-gold-hover, #B8901C);
    --hfs-dark: var(--halmar-dark, #1A1A1A);
    --hfs-bg: var(--halmar-bg, #F5F5F5);
    --hfs-border: #E5E5E5;
    --hfs-muted: #777;
    --hfs-white: #FFF;
    --hfs-radius: 4px;
    --hfs-shadow: 0 2px 8px rgba(0,0,0,.06);
    --hfs-shadow-lg: 0 12px 32px rgba(0,0,0,.12);
}

/* =========================================================
   Wrapper
   ========================================================= */
.halmar-fs { color: var(--hfs-dark); font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.halmar-fs * { box-sizing: border-box; }
.halmar-fs__layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }

/* =========================================================
   Breadcrumb
   ========================================================= */
.halmar-fs-breadcrumb { font-size: 13px; color: var(--hfs-muted); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.halmar-fs-breadcrumb__link { color: var(--hfs-muted); text-decoration: none; }
.halmar-fs-breadcrumb__link:hover { color: var(--hfs-gold); }
.halmar-fs-breadcrumb__sep { color: var(--hfs-border); }
.halmar-fs-breadcrumb__item { color: var(--hfs-dark); font-weight: 500; }

/* =========================================================
   Filters sidebar
   ========================================================= */
.halmar-fs-filters { background: var(--hfs-white); border: 1px solid var(--hfs-border); border-radius: var(--hfs-radius); padding: 20px; position: sticky; top: 88px; }
.halmar-fs-filters__toggle { display: none; width: 100%; padding: 12px 16px; background: var(--hfs-dark); color: var(--hfs-white); border: none; border-radius: var(--hfs-radius); font-weight: 600; cursor: pointer; margin-bottom: 12px; justify-content: space-between; align-items: center; }
.halmar-fs-filters__count { background: var(--hfs-gold); color: var(--hfs-dark); padding: 2px 8px; border-radius: 999px; font-size: 12px; margin-left: 8px; }
.halmar-fs-filters__count:empty { display: none; }
.halmar-fs-filters__form { display: flex; flex-direction: column; gap: 16px; }
.halmar-fs-field { display: flex; flex-direction: column; gap: 6px; }
.halmar-fs-field label { font-size: 13px; font-weight: 600; color: var(--hfs-dark); text-transform: uppercase; letter-spacing: .03em; }
.halmar-fs-field input,
.halmar-fs-field select { width: 100%; padding: 8px 10px; border: 1px solid var(--hfs-border); border-radius: var(--hfs-radius); background: var(--hfs-white); font: inherit; color: var(--hfs-dark); }
.halmar-fs-field input:focus,
.halmar-fs-field select:focus { outline: none; border-color: var(--hfs-gold); box-shadow: 0 0 0 2px rgba(212,168,32,.18); }
.halmar-fs-field--range .halmar-fs-field__range { display: flex; align-items: center; gap: 8px; }
.halmar-fs-field--range input { flex: 1; }
.halmar-fs-filters__actions { display: flex; gap: 8px; margin-top: 4px; }

/* =========================================================
   Results toolbar
   ========================================================= */
.halmar-fs-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; background: var(--hfs-white); border: 1px solid var(--hfs-border); border-radius: var(--hfs-radius); }
.halmar-fs-toolbar__count { font-size: 14px; font-weight: 500; color: var(--hfs-dark); }
.halmar-fs-toolbar__tools { display: flex; gap: 12px; align-items: center; }
.halmar-fs-toolbar__sort select { padding: 6px 10px; border: 1px solid var(--hfs-border); border-radius: var(--hfs-radius); font: inherit; }
.halmar-fs-toolbar__view { display: flex; gap: 2px; border: 1px solid var(--hfs-border); border-radius: var(--hfs-radius); overflow: hidden; }
.halmar-fs-view-btn { padding: 6px 12px; border: 0; background: var(--hfs-white); cursor: pointer; font-size: 16px; }
.halmar-fs-view-btn.is-active { background: var(--hfs-dark); color: var(--hfs-white); }

/* =========================================================
   Product grid / list
   ========================================================= */
.halmar-fs-grid--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.halmar-fs-grid--list { display: flex; flex-direction: column; gap: 12px; }
.halmar-fs-empty { text-align: center; padding: 48px 20px; background: var(--hfs-white); border: 1px dashed var(--hfs-border); border-radius: var(--hfs-radius); color: var(--hfs-muted); grid-column: 1 / -1; }

/* Card */
.halmar-fs-card { background: var(--hfs-white); border: 1px solid var(--hfs-border); border-radius: var(--hfs-radius); overflow: hidden; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.halmar-fs-card:hover { box-shadow: var(--hfs-shadow-lg); transform: translateY(-2px); }
.halmar-fs-card__thumb { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--hfs-bg); }
.halmar-fs-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.halmar-fs-card:hover .halmar-fs-card__thumb img { transform: scale(1.04); }
.halmar-fs-card__badge { position: absolute; top: 8px; padding: 3px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; border-radius: 2px; letter-spacing: .04em; }
.halmar-fs-card__badge--sale { left: 8px; background: var(--hfs-gold); color: var(--hfs-dark); }
.halmar-fs-card__badge--stan { right: 8px; background: var(--hfs-dark); color: var(--hfs-white); }
.halmar-fs-card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.halmar-fs-card__meta { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--hfs-muted); }
.halmar-fs-card__title { font-size: 15px; font-weight: 600; line-height: 1.3; margin: 0; font-family: 'Montserrat', sans-serif; }
.halmar-fs-card__title a { color: var(--hfs-dark); text-decoration: none; }
.halmar-fs-card__title a:hover { color: var(--hfs-gold); }
.halmar-fs-card__sku { font-size: 12px; color: var(--hfs-muted); }
.halmar-fs-card__sku code { font-family: 'JetBrains Mono', monospace; }
.halmar-fs-card__price { font-size: 18px; font-weight: 700; color: var(--hfs-dark); margin-top: auto; }
.halmar-fs-card__price .woocommerce-Price-currencySymbol { color: var(--hfs-gold); }
.halmar-fs-card__actions { display: flex; gap: 6px; }
.halmar-fs-card__actions .halmar-fs-btn { flex: 1; }
.halmar-fs-card__quick { border: 1px solid var(--hfs-border); background: var(--hfs-white); padding: 8px 12px; border-radius: var(--hfs-radius); cursor: pointer; font-size: 14px; }
.halmar-fs-card__quick:hover { border-color: var(--hfs-gold); background: var(--hfs-bg); }

/* List view override */
.halmar-fs-card--list { flex-direction: row; }
.halmar-fs-card--list .halmar-fs-card__thumb { width: 200px; flex: 0 0 200px; aspect-ratio: 4/3; }
.halmar-fs-card--list .halmar-fs-card__body { flex-direction: row; align-items: center; flex-wrap: wrap; }
.halmar-fs-card--list .halmar-fs-card__title { flex: 1 1 100%; }
.halmar-fs-card--list .halmar-fs-card__actions { flex: 0 0 auto; margin-left: auto; }

/* =========================================================
   Buttons
   ========================================================= */
.halmar-fs-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--hfs-radius); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; line-height: 1.2; white-space: nowrap; }
.halmar-fs-btn--primary { background: var(--hfs-gold); color: var(--hfs-dark); border-color: var(--hfs-gold); }
.halmar-fs-btn--primary:hover { background: var(--hfs-gold-hover); border-color: var(--hfs-gold-hover); color: var(--hfs-dark); }
.halmar-fs-btn--ghost { background: transparent; color: var(--hfs-dark); border-color: var(--hfs-border); }
.halmar-fs-btn--ghost:hover { border-color: var(--hfs-dark); }
.halmar-fs-btn--block { width: 100%; }
.halmar-fs-btn:disabled,
.halmar-fs-btn.is-loading { opacity: .6; cursor: wait; }

/* =========================================================
   Pagination
   ========================================================= */
.halmar-fs-pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; }
.halmar-fs-page { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--hfs-border); border-radius: var(--hfs-radius); color: var(--hfs-dark); text-decoration: none; font-weight: 500; background: var(--hfs-white); }
.halmar-fs-page:hover { border-color: var(--hfs-gold); color: var(--hfs-gold); }
.halmar-fs-page.is-active { background: var(--hfs-dark); color: var(--hfs-white); border-color: var(--hfs-dark); }

/* =========================================================
   Cart sidebar / modal
   ========================================================= */
.halmar-fs-cart { position: fixed; inset: 0; z-index: 9998; display: none; }
.halmar-fs-cart.is-open { display: block; }
.halmar-fs-cart__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.halmar-fs-cart__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: var(--hfs-white); display: flex; flex-direction: column; box-shadow: var(--hfs-shadow-lg); animation: halmarFsSlideIn .25s ease; }
@keyframes halmarFsSlideIn { from { transform: translateX(100%); } to { transform: none; } }

.halmar-fs-cart--modal .halmar-fs-cart__panel { top: 50%; right: 50%; height: auto; max-height: 85vh; transform: translate(50%, -50%); width: min(520px, 95%); border-radius: 8px; animation: halmarFsFadeIn .2s ease; }
@keyframes halmarFsFadeIn { from { opacity: 0; transform: translate(50%, -46%); } to { opacity: 1; transform: translate(50%, -50%); } }

.halmar-fs-cart__header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--hfs-border); }
.halmar-fs-cart__title { font-size: 18px; font-weight: 700; margin: 0; font-family: 'Montserrat', sans-serif; }
.halmar-fs-cart__close { background: none; border: 0; font-size: 24px; cursor: pointer; line-height: 1; color: var(--hfs-dark); padding: 4px; }
.halmar-fs-cart__close:hover { color: var(--hfs-gold); }

.halmar-fs-cart__free-ship { padding: 12px 20px; background: var(--hfs-bg); border-bottom: 1px solid var(--hfs-border); font-size: 13px; }
.halmar-fs-cart__free-ship-msg { margin-bottom: 6px; }
.halmar-fs-cart__free-ship-bar { height: 6px; background: var(--hfs-border); border-radius: 3px; overflow: hidden; }
.halmar-fs-cart__free-ship-bar span { display: block; height: 100%; background: var(--hfs-gold); transition: width .3s; width: 0; }

.halmar-fs-cart__items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.halmar-fs-cart__empty { text-align: center; color: var(--hfs-muted); padding: 32px 0; }
.halmar-fs-cart__item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hfs-border); align-items: flex-start; }
.halmar-fs-cart__item:last-child { border-bottom: 0; }
.halmar-fs-cart__item-thumb { flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border-radius: var(--hfs-radius); background: var(--hfs-bg); }
.halmar-fs-cart__item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.halmar-fs-cart__item-body { flex: 1; min-width: 0; }
.halmar-fs-cart__item-name { color: var(--hfs-dark); text-decoration: none; font-weight: 600; font-size: 14px; display: block; line-height: 1.3; }
.halmar-fs-cart__item-name:hover { color: var(--hfs-gold); }
.halmar-fs-cart__item-meta { font-size: 13px; color: var(--hfs-muted); margin-top: 4px; }
.halmar-fs-cart__item-remove { background: transparent; border: 0; color: var(--hfs-muted); font-size: 20px; cursor: pointer; padding: 4px 8px; line-height: 1; }
.halmar-fs-cart__item-remove:hover { color: #c00; }

.halmar-fs-cart__footer { padding: 16px 20px; border-top: 1px solid var(--hfs-border); display: flex; flex-direction: column; gap: 8px; }
.halmar-fs-cart__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.halmar-fs-cart__total-label { font-size: 14px; color: var(--hfs-muted); text-transform: uppercase; letter-spacing: .05em; }
.halmar-fs-cart__total-val { font-size: 20px; font-weight: 700; font-family: 'Montserrat', sans-serif; }

/* =========================================================
   Product quickview modal
   ========================================================= */
.halmar-fs-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.halmar-fs-modal[hidden] { display: none !important; }
.halmar-fs-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.halmar-fs-modal__dialog { position: relative; background: var(--hfs-white); border-radius: 8px; max-width: 900px; width: min(900px, 94%); max-height: 90vh; overflow-y: auto; box-shadow: var(--hfs-shadow-lg); padding: 28px 32px; animation: halmarFsFadeIn2 .2s ease; }
@keyframes halmarFsFadeIn2 { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.halmar-fs-modal__close { position: absolute; top: 12px; right: 16px; background: none; border: 0; font-size: 28px; cursor: pointer; line-height: 1; }
.halmar-fs-modal__close:hover { color: var(--hfs-gold); }
.halmar-fs-modal__loading { text-align: center; padding: 60px 0; color: var(--hfs-muted); }

.halmar-fs-modal__product { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.halmar-fs-modal__gallery { display: flex; flex-direction: column; gap: 8px; }
.halmar-fs-modal__gallery-main { width: 100%; aspect-ratio: 4/3; background: var(--hfs-bg); border-radius: var(--hfs-radius); overflow: hidden; }
.halmar-fs-modal__gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.halmar-fs-modal__gallery-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.halmar-fs-modal__gallery-thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--hfs-radius); cursor: pointer; border: 2px solid transparent; }
.halmar-fs-modal__gallery-thumbs img.is-active { border-color: var(--hfs-gold); }
.halmar-fs-modal__info h2 { font-family: 'Montserrat', sans-serif; font-size: 22px; margin: 0 0 12px; }
.halmar-fs-modal__price { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.halmar-fs-modal__attrs { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; }
.halmar-fs-modal__attrs li strong { display: block; color: var(--hfs-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.halmar-fs-modal__desc { font-size: 14px; color: #444; margin-bottom: 16px; max-height: 120px; overflow: auto; }

/* =========================================================
   Responsive (mobile first)
   ========================================================= */
@media (max-width: 1199px) {
    .halmar-fs__layout { grid-template-columns: 240px 1fr; }
}
@media (max-width: 767px) {
    .halmar-fs__layout { grid-template-columns: 1fr; }
    .halmar-fs-filters { position: static; padding: 16px; }
    .halmar-fs-filters__toggle { display: flex; }
    .halmar-fs-filters__form { display: none; padding-top: 12px; border-top: 1px solid var(--hfs-border); margin-top: 8px; }
    .halmar-fs-filters.is-open .halmar-fs-filters__form { display: flex; }
    .halmar-fs-toolbar { flex-direction: column; align-items: flex-start; }
    .halmar-fs-grid--grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .halmar-fs-card--list { flex-direction: column; }
    .halmar-fs-card--list .halmar-fs-card__thumb { width: 100%; flex: none; }
    .halmar-fs-modal__product { grid-template-columns: 1fr; }
    .halmar-fs-modal__attrs { grid-template-columns: 1fr; }
    .halmar-fs-cart__panel { width: 100%; }
}
@media (max-width: 480px) {
    .halmar-fs-grid--grid { grid-template-columns: 1fr; }
}

/* =========================================================
   WIDOK KLASYCZNY: panel "Ustawienia filtrowania" + drzewko
   ========================================================= */
.halmar-fs-classic { display: block; }

/* --- Panel filtrów (zwijany) --- */
.halmar-fs-fpanel { background: var(--hfs-white); border: 1px solid var(--hfs-border); border-radius: 12px; box-shadow: var(--hfs-shadow); margin-bottom: 22px; overflow: hidden; }
.halmar-fs-fpanel__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 18px; background: none; border: 0; cursor: pointer; font: inherit; color: var(--hfs-dark); text-align: left; }
.halmar-fs-fpanel__head:hover { background: rgba(0,0,0,.018); }
.halmar-fs-fpanel__icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 9px; background: rgba(201,162,75,.14); color: var(--hfs-gold); flex: none; }
.halmar-fs-fpanel__icon svg { width: 19px; height: 19px; }
.halmar-fs-fpanel__title { font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.halmar-fs-fpanel__count { margin-left: auto; background: var(--hfs-gold); color: var(--hfs-dark); font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.halmar-fs-fpanel__count:empty { display: none; }
.halmar-fs-fpanel__count:empty + .halmar-fs-fpanel__chev { margin-left: auto; }
.halmar-fs-fpanel__chev { display: inline-flex; color: var(--hfs-muted); transition: transform .25s ease; flex: none; }
.halmar-fs-fpanel__chev svg { width: 20px; height: 20px; }
.halmar-fs-fpanel.is-open .halmar-fs-fpanel__chev { transform: rotate(180deg); }
.halmar-fs-fpanel__body { display: none; padding: 18px; border-top: 1px solid var(--hfs-border); }
.halmar-fs-fpanel.is-open .halmar-fs-fpanel__body { display: block; }
.halmar-fs-fpanel .halmar-fs-filters__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; }
.halmar-fs-fpanel .halmar-fs-filters__actions { grid-column: 1 / -1; margin-top: 2px; }

/* --- Dymek pomocy "?" --- */
.halmar-fs-help { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--hfs-muted); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; cursor: help; flex: none; }
.halmar-fs-help:hover, .halmar-fs-help:focus-visible { background: var(--hfs-gold); color: var(--hfs-dark); outline: none; }
.halmar-fs-help::after { content: attr(data-halmar-tip); position: absolute; top: calc(100% + 11px); left: 50%; transform: translateX(-50%) translateY(4px); width: max-content; max-width: 260px; background: var(--hfs-dark); color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.45; letter-spacing: 0; text-transform: none; padding: 9px 12px; border-radius: 9px; box-shadow: var(--hfs-shadow-lg); opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease; z-index: 40; pointer-events: none; white-space: normal; text-align: left; }
.halmar-fs-help::before { content: ""; position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-bottom-color: var(--hfs-dark); opacity: 0; visibility: hidden; transition: opacity .18s ease; z-index: 41; }
.halmar-fs-help:hover::after, .halmar-fs-help:focus-visible::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.halmar-fs-help:hover::before, .halmar-fs-help:focus-visible::before { opacity: 1; visibility: visible; }

/* --- Układ: drzewko (sidebar) + wyniki --- */
.halmar-fs-main { display: grid; grid-template-columns: 264px 1fr; gap: 24px; align-items: start; }
.halmar-fs-main .halmar-fs-results { min-width: 0; }

/* --- Drzewko kategorii: kaskadowe flyouty (pełna głębokość) --- */
.halmar-fs-cattree { background: var(--hfs-white); border: 1px solid var(--hfs-border); border-radius: 12px; box-shadow: var(--hfs-shadow); padding: 8px; position: sticky; top: 88px; z-index: 200; }
.halmar-fs-cattree__head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 12px; border-bottom: 1px solid var(--hfs-border); margin-bottom: 6px; }
.halmar-fs-cattree__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--hfs-dark); }
.halmar-fs-cattree__menu, .halmar-fs-cattree__group { list-style: none; margin: 0; padding: 0; }
.halmar-fs-cattree__item { position: relative; border-radius: 8px; }
.halmar-fs-cattree__row { display: flex; align-items: stretch; border-radius: 8px; }
.halmar-fs-cattree__item.is-branch > .halmar-fs-cattree__row { box-shadow: inset 3px 0 0 var(--hfs-gold); }
.halmar-fs-cattree__link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 8px; text-decoration: none; color: var(--hfs-dark); font-size: 14px; font-weight: 500; line-height: 1.3; }
.halmar-fs-cattree__link:hover { background: rgba(201,162,75,.10); color: var(--hfs-dark); }
.halmar-fs-cattree__link.is-active { background: var(--hfs-gold); color: var(--hfs-dark); font-weight: 700; }
.halmar-fs-cattree__all { font-weight: 600; }
.halmar-fs-cattree__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.halmar-fs-cattree__count { font-size: 12px; color: var(--hfs-muted); font-variant-numeric: tabular-nums; flex: none; }
.halmar-fs-cattree__link.is-active .halmar-fs-cattree__count { color: rgba(0,0,0,.55); }
.halmar-fs-cattree__caret { flex: none; width: 36px; border: 0; background: none; color: var(--hfs-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.halmar-fs-cattree__caret:hover { background: rgba(0,0,0,.05); color: var(--hfs-dark); }
.halmar-fs-cattree__caret svg { width: 17px; height: 17px; }

/* Flyout (panel podkategorii wysuwany w bok) */
.halmar-fs-cattree__flyout { position: absolute; top: -9px; left: 100%; z-index: 60; min-width: 240px; max-width: 300px; background: var(--hfs-white); border: 1px solid var(--hfs-border); border-radius: 12px; box-shadow: var(--hfs-shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateX(-6px); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.halmar-fs-cattree__flyout::before { content: ""; position: absolute; top: 0; left: -12px; width: 12px; height: 100%; } /* mostek dla hover */
.halmar-fs-cattree__item.is-open > .halmar-fs-cattree__flyout { opacity: 1; visibility: visible; transform: translateX(0); }
.halmar-fs-cattree__flyout-head { display: none; }

@media (hover: hover) and (min-width: 992px) {
    .halmar-fs-cattree__item:hover > .halmar-fs-cattree__flyout,
    .halmar-fs-cattree__item:focus-within > .halmar-fs-cattree__flyout { opacity: 1; visibility: visible; transform: translateX(0); }
}

/* Mobile / tablet: flyout jako wysuwany panel (drill-in) z przyciskiem wstecz */
@media (max-width: 991px) {
    .halmar-fs-main { grid-template-columns: 1fr; }
    .halmar-fs-cattree { position: static; }
    .halmar-fs-cattree__flyout { position: fixed; inset: 0; margin: 0; border: 0; border-radius: 0; min-width: 0; max-width: none; max-height: none; height: 100%; padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; transform: translateX(100%); opacity: 1; visibility: hidden; z-index: 1000; transition: transform .25s ease, visibility .25s; }
    .halmar-fs-cattree__flyout::before { display: none; }
    .halmar-fs-cattree__item.is-open > .halmar-fs-cattree__flyout { transform: translateX(0); visibility: visible; }
    .halmar-fs-cattree__flyout-head { display: flex; align-items: center; position: sticky; top: 0; background: var(--hfs-white); border-bottom: 1px solid var(--hfs-border); padding: 12px 14px; z-index: 2; }
    .halmar-fs-cattree__back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--hfs-dark); cursor: pointer; }
    .halmar-fs-cattree__back svg { width: 20px; height: 20px; flex: none; }
    .halmar-fs-cattree__group { padding: 8px; }
}

/* =========================================================
   AUTOUZUPEŁNIANIE WYSZUKIWAREK (typeahead)
   ========================================================= */
.halmar-suggest-panel { display: none; z-index: 2000; background: var(--hfs-white); border: 1px solid var(--hfs-border); border-radius: 12px; box-shadow: var(--hfs-shadow-lg); padding: 6px; max-height: 62vh; overflow-y: auto; font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.halmar-suggest-panel.is-open { display: block; }
.halmar-suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--hfs-dark); }
.halmar-suggest-item:hover, .halmar-suggest-item.is-active { background: rgba(201,162,75,.12); }
.halmar-suggest-thumb { width: 46px; height: 46px; flex: none; border-radius: 8px; overflow: hidden; background: #f3f3f3; display: flex; align-items: center; justify-content: center; }
.halmar-suggest-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.halmar-suggest-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.halmar-suggest-name { font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.halmar-suggest-meta { font-size: 12.5px; color: var(--hfs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.halmar-suggest-meta .amount, .halmar-suggest-meta bdi, .halmar-suggest-meta del, .halmar-suggest-meta ins { color: var(--hfs-dark); font-weight: 600; text-decoration: none; }
.halmar-suggest-empty { padding: 14px; text-align: center; color: var(--hfs-muted); font-size: 13.5px; }

/* =========================================================
   OPIS SEO POD WYNIKAMI SKLEPU
   ========================================================= */
.halmar-fs-seo { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--hfs-border); color: #555; }
.halmar-fs-seo__h { font-size: 19px; font-weight: 700; color: var(--hfs-dark); margin: 0 0 12px; }
.halmar-fs-seo p { line-height: 1.7; margin: 0 0 12px; font-size: 14.5px; }
.halmar-fs-seo p:last-child { margin-bottom: 0; }
.halmar-fs-seo a { color: var(--hfs-gold); font-weight: 600; text-decoration: none; }
.halmar-fs-seo a:hover { text-decoration: underline; }
