/* FCC Haku – widget + autocomplete. Reuses the theme's .catalog/.filters/.pc
 * classes; the rules below only add what the theme does not define, with
 * fallbacks for the theme variables so the widget also works elsewhere. */
.fcc-haku{--fh-surface:var(--surface,#141418);--fh-surface2:var(--surface2,#1b1b21);--fh-line:var(--line,rgba(255,255,255,.07));--fh-line2:var(--line2,rgba(255,255,255,.14));--fh-text:var(--text,#f4f2ec);--fh-muted:var(--muted,#9d9a92);--fh-gold:var(--gold,#c9a24a);--fh-gold2:var(--gold2,#e8cd7e);--fh-red:var(--red,#e0343a);position:relative}
.fcc-haku-title{margin:0 0 16px}
.fcc-haku-search{margin:0 0 22px;max-width:820px}
.fcc-haku .fcc-haku-layout{margin-top:0}
.fcc-haku .filters ul{list-style:none;margin:0;padding:0}
.fcc-haku .fgroup li a{text-decoration:none}
.fcc-haku .chip{text-decoration:none;display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.fcc-haku .chip small{font-size:10.5px;opacity:.6}
.fcc-haku .chip.is-empty{opacity:.45}
.fcc-haku .chips.fsub{margin-top:8px;padding-left:10px;border-left:2px solid var(--fh-line2)}
.fcc-haku .fsearch{margin:0 0 8px}
.fcc-haku-showmore{display:inline-block;margin-top:6px;font-size:12px;color:var(--fh-muted);text-decoration:none}
.fcc-haku-showmore:hover{color:var(--fh-gold2)}
.fcc-haku .toolbar .sort select{min-width:190px}
.fcc-haku-count{margin:0;color:var(--fh-muted);font-size:13.5px}
.fcc-haku-count b{color:#fff;font-weight:600}
.fcc-haku-chips:empty{display:none}
.fcc-haku-chips a{text-decoration:none;cursor:pointer}
.fcc-haku-status:empty{display:none}
.fcc-haku-error{padding:14px 16px;border:1px solid var(--fh-red);border-radius:10px;color:var(--fh-text);background:rgba(224,52,58,.08);margin-bottom:16px}
.fcc-haku-grid{min-height:120px;transition:opacity .15s}
.fcc-haku.is-loading .fcc-haku-grid{opacity:.55}
.fcc-haku.is-loading .fcc-haku-facet-list{opacity:.7}
.fcc-haku-more{text-align:center;margin-top:24px;position:relative}
.fcc-haku-sentinel{display:block;height:1px}
.fcc-haku-noscript{padding:16px;border:1px dashed var(--fh-line2);border-radius:10px;color:var(--fh-muted)}
.fcc-haku [hidden]{display:none!important}
.fcc-haku .pc-title small{display:-webkit-box}

/* Inside the theme's page content wrapper (.entry): lift the 820px cap and undo the body-text link styling. */
.entry:has(> .fcc-haku),.page-content:has(.fcc-haku){max-width:none}
.entry .fcc-haku a{text-decoration:none}
.entry .fcc-haku .pc a,.entry .fcc-haku .pc-title a{color:inherit}
.entry .fcc-haku .pc-title a{color:#fff}
.entry .fcc-haku .fgroup li a{color:#d6d3ca}
.entry .fcc-haku .fgroup li.on>a{color:var(--fh-gold2)}
.entry .fcc-haku .chip{color:#d6d3ca}
.entry .fcc-haku .chip.on{color:var(--fh-gold2)}
.entry .fcc-haku .toolbar .active a{color:#e9e6dd}
.entry .fcc-haku .filters-head a,.entry .fcc-haku .fcc-haku-showmore{color:var(--fh-muted)}
.entry .fcc-haku .filters-head a:hover,.entry .fcc-haku .fcc-haku-showmore:hover{color:var(--fh-gold2)}
.entry .fcc-haku a.btn-gold,.entry .fcc-haku .pc a.btn-gold,.entry .fcc-haku .pc a.btn-gold:hover{color:#161206}
.entry .fcc-haku a.btn-ghost,.entry .fcc-haku .pc a.btn-ghost{color:var(--fh-muted)}
.entry .fcc-haku .pc a.btn-ghost:hover,.entry .fcc-haku a.btn-outline{color:var(--fh-text)}
.entry .fcc-haku ul{list-style:none;padding:0;margin:0}
.entry .fcc-haku p{margin:0}
.entry .fcc-haku h3,.entry .fcc-haku h4{margin-top:0}
.entry .fcc-haku .filters-head h3{margin:0}
.fcc-haku .pc-price strong,.fcc-haku .pc-price s{white-space:nowrap}

/* Fallback layout when the theme does not provide .catalog/.grid */
.fcc-haku .catalog{display:grid;grid-template-columns:270px 1fr;gap:28px;align-items:start}
.fcc-haku .grid.products{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.fcc-haku .grid.c5{grid-template-columns:repeat(5,1fr)}
.fcc-haku .grid.c3{grid-template-columns:repeat(3,1fr)}
.fcc-haku .grid.c2{grid-template-columns:repeat(2,1fr)}
@media (max-width:960px){
  .fcc-haku .catalog{grid-template-columns:1fr}
  .fcc-haku .grid.products,.fcc-haku .grid.c5,.fcc-haku .grid.c3{grid-template-columns:repeat(2,1fr)}
  .fcc-haku .toolbar .sort{margin-left:0;width:100%}
}

/* ---- Autocomplete dropdown ---- */
.fcc-haku-ac{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:80;background:var(--surface2,#1b1b21);border:1px solid var(--line2,rgba(255,255,255,.14));border-radius:12px;box-shadow:0 24px 50px -20px rgba(0,0,0,.9);overflow:hidden;max-height:min(70vh,560px);overflow-y:auto;font-family:var(--font-b,Inter,system-ui,sans-serif);text-align:left}
.fcc-haku-ac[hidden]{display:none}
.fcc-haku-ac-group+.fcc-haku-ac-group{border-top:1px solid var(--line,rgba(255,255,255,.07))}
.fcc-haku-ac-head{font-family:var(--font-h,"Barlow Condensed",sans-serif);font-weight:700;font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--gold,#c9a24a);padding:10px 14px 4px}
.fcc-haku-ac-item{display:flex;align-items:center;gap:12px;padding:8px 14px;color:var(--text,#f4f2ec);text-decoration:none;font-size:13.5px;line-height:1.3}
.fcc-haku-ac-item:hover,.fcc-haku-ac-item.is-active{background:rgba(201,162,74,.12)}
.fcc-haku-ac-item mark{background:none;color:var(--gold2,#e8cd7e);font-weight:600}
.fcc-haku-ac-facet .lbl{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted,#9d9a92);min-width:64px}
.fcc-haku-ac-facet .val{flex:1;font-weight:500}
.fcc-haku-ac-facet .cnt,.fcc-haku-ac-product .price em{font-size:11px;color:var(--muted2,#6f6c66);font-style:normal}
.fcc-haku-ac-product img{width:44px;height:60px;object-fit:cover;border-radius:5px;background:#0c0c0f;flex:none;border:1px solid rgba(255,255,255,.08)}
.fcc-haku-ac-product img.placeholder{object-fit:contain;opacity:.4;padding:8px}
.fcc-haku-ac-product.is-soldout img{filter:grayscale(1) brightness(.6)}
.fcc-haku-ac-product .txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.fcc-haku-ac-product .set{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--gold,#c9a24a);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fcc-haku-ac-product .ttl{font-family:var(--font-h,"Barlow Condensed",sans-serif);font-weight:700;font-size:18px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fcc-haku-ac-product .sub{font-size:12px;color:var(--muted,#9d9a92);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fcc-haku-ac-product .price{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}
.fcc-haku-ac-product .price b{font-family:var(--font-h,"Barlow Condensed",sans-serif);font-size:18px;font-weight:800;color:#fff}
.fcc-haku-ac-product .price s{font-size:11px;color:var(--muted2,#6f6c66)}
.fcc-haku-ac-all{display:block;padding:11px 14px;text-align:center;font-family:var(--font-h,"Barlow Condensed",sans-serif);font-weight:700;letter-spacing:.08em;text-transform:uppercase;font-size:14px;color:var(--gold2,#e8cd7e);border-top:1px solid var(--line,rgba(255,255,255,.07));text-decoration:none}
.fcc-haku-ac-all:hover,.fcc-haku-ac-all.is-active{background:rgba(201,162,74,.12)}
.fcc-haku-ac-empty{padding:14px;color:var(--muted,#9d9a92);font-size:13px}

/* "Lisää suodattimia" (collapsed secondary facets) */
.fcc-haku-facets .fgroup-more>h4{color:var(--gold2,#e8cd7e)}
.fcc-haku-facets .fgroup-more__body .fgroup:first-child{border-top:0;padding-top:4px}
.fcc-haku-facets .fgroup-more>h4 small{font-size:18px;line-height:0;color:var(--gold,#c9a24a)}
