/* ==========================================================================
   Identities Gallery — shop listing (design: "Galerija - Popis Proizvoda")
   CWS Filters Pro custom panel (cws-suite/filters-panel.php) and the grid the
   loop card sits in. The card itself (cws-suite/loop-card.php) is styled by
   cws-suite/loop-card.css, which is loaded on every page that prints cards;
   this file only adds what is specific to the new shop: the grid, the item
   reset, and the 6 / 5 / 3 view sizes. Enqueued by the Identities Gallery
   Addons plugin on the pages where the new shop is live
   (WooCommerce → Identities Gallery).

   Layout: the Filters Pro aside / panel / .iga-filters wrappers are flattened
   with display: contents, so .iga-side (sidebar), .iga-bar (tabs, sort, view
   switch, chips) and .cws-fpro-main (grid + load more) sit in one grid:

       255px     | 1fr
       .iga-side | .iga-bar
       .iga-side | .cws-fpro-main

   At 960px and below the phone design ("Galerija - Mobilni Filteri") takes
   over: the bar and its row are flattened too, so the tabs, a sticky
   "Filteri | sort" bar, the result count and the grid are rows of the same
   grid (a sticky grid item sticks for the whole listing), and the sidebar is
   the design's bottom sheet — a Filters Pro draft driven by iga.js (not the
   Filters Pro sheet, which is never opened here).

   Everything is scoped under .cws-fpro--panel-custom; buttons at (0,2,0)+ so a
   kit button rule ((0,1,1)) cannot repaint them. The view-size rules are
   written above loop-card.css's (0,4,2)+ card rules.
   ========================================================================== */

.cws-fpro.cws-fpro--panel-custom {
    --ink: #1f1f1f;
    --muted: #8e8e8c;
    --faint: #bdbdbb;
    --line: #e9e9e7;
    --box: #ededeb;
    --olive: #8fa83a;
    --olive: oklch(0.7 0.14 115);
    --cut: #b8452f;
    --cut: oklch(0.55 0.16 30);
    --sk: #efefed;
    --sk2: #f8f8f6;
    --iga-cols: 5;

    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 20px;
    row-gap: 0;
    max-width: 1940px;
    margin: 0 auto;
    padding: 40px 45px 80px;
    color: var(--ink);
    font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.cws-fpro--panel-custom .cws-fpro-aside,
.cws-fpro--panel-custom .cws-fpro-panel.is-custom,
.cws-fpro--panel-custom .iga-filters {
    display: contents;
}

.cws-fpro--panel-custom .iga-side { grid-column: 1; grid-row: 1 / span 2; padding-top: 30px; min-width: 0; }
.cws-fpro--panel-custom .iga-bar { grid-column: 2; grid-row: 1; min-width: 0; }
.cws-fpro--panel-custom .cws-fpro-main { grid-column: 2; grid-row: 2; min-width: 0; }
/* Phone-only pieces (sheet head / sort radios / footer, bar buttons, bar count). */
.cws-fpro--panel-custom .iga-scrim,
.cws-fpro--panel-custom .iga-side__head,
.cws-fpro--panel-custom .iga-side__foot,
.cws-fpro--panel-custom .iga-fgroup--sort,
.cws-fpro--panel-custom .iga-found--bar,
.cws-fpro--panel-custom .iga-tools .iga-mbtn,
.cws-fpro--panel-custom .iga-tools .iga-msep,
.cws-fpro--panel-custom .iga-prices__pre { display: none; }

.cws-fpro--panel-custom a { color: var(--ink); text-decoration: none; }
.cws-fpro--panel-custom a:hover { color: #000; text-decoration: underline; }

.cws-fpro--panel-custom button { font-family: inherit; }

/* ---------- Sidebar ---------- */

.cws-fpro--panel-custom .iga-found {
    min-height: 18px;
    margin: 0 0 30px;
    color: #5e5e5c;
    font-size: 14px;
}

.cws-fpro--panel-custom .iga-found.is-loading {
    width: 150px;
    color: transparent;
    background: linear-gradient(90deg, var(--sk) 0, var(--sk2) 40%, var(--sk) 80%);
    background-size: 200% 100%;
    animation: iga-shim 1.2s linear infinite;
}

.cws-fpro--panel-custom .iga-fgroup { margin: 0 0 44px; padding: 0; border: 0; }

.cws-fpro--panel-custom .iga-fgroup h3 {
    margin: 0 0 22px;
    color: var(--ink);
    font-family: inherit;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -.005em;
    text-transform: none;
}

.cws-fpro--panel-custom .iga-fgroup h3 .cws-fpro-sec-n { display: none; }
.cws-fpro--panel-custom .iga-fgroup .cws-fpro-sec-body { display: block; padding: 0; }

/* Price */
.cws-fpro--panel-custom .iga-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cws-fpro--panel-custom .iga-prices__f { position: relative; display: block; margin: 0; }

.cws-fpro--panel-custom .iga-prices input {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid #d9d9d7;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    outline: none;
}

.cws-fpro--panel-custom .iga-prices input:focus { border-color: var(--ink); }

.cws-fpro--panel-custom .iga-range {
    position: relative;
    height: 24px;
    margin: 10px 0 0;
}

.cws-fpro--panel-custom .iga-range__in {
    position: absolute;
    left: 11px;
    right: 11px;
    top: 11px;
    height: 2px;
}

.cws-fpro--panel-custom .iga-range__track { position: absolute; left: -1px; right: -1px; top: 0; height: 2px; background: var(--line); }
.cws-fpro--panel-custom .iga-range__fill { position: absolute; top: 0; height: 2px; background: var(--ink); }

.cws-fpro--panel-custom .iga-range input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.cws-fpro--panel-custom .iga-range input[type="range"]::-webkit-slider-runnable-track { background: none; border: 0; }
.cws-fpro--panel-custom .iga-range input[type="range"]::-moz-range-track { background: none; border: 0; }

.cws-fpro--panel-custom .iga-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 22px;
    height: 22px;
    border: 1px solid #cfcfcd;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    cursor: grab;
}

.cws-fpro--panel-custom .iga-range input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 20px;
    height: 20px;
    border: 1px solid #cfcfcd;
    border-radius: 50%;
    background: #fff;
    cursor: grab;
}

/* Checkbox lists */
.cws-fpro--panel-custom .iga-opts,
.cws-fpro--panel-custom .iga-subs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cws-fpro--panel-custom .iga-subs { grid-column: 1 / -1; margin: 8px 0 4px 30px; }
.cws-fpro--panel-custom .iga-subs[hidden] { display: none; }

.cws-fpro--panel-custom .iga-opt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22px;
    align-items: start;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.cws-fpro--panel-custom .iga-opt::before,
.cws-fpro--panel-custom .iga-opt::marker { content: none; }

.cws-fpro--panel-custom .iga-chk,
.cws-fpro--panel-custom .iga-chk.cws-fpro-opt {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.cws-fpro--panel-custom .iga-chk input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.cws-fpro--panel-custom .iga-chk__bx {
    position: relative;
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: -2px;
    background: var(--box);
    transition: background .15s;
}

.cws-fpro--panel-custom .iga-chk__bx::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.cws-fpro--panel-custom .iga-chk input:checked + .iga-chk__bx { background: var(--ink); }
.cws-fpro--panel-custom .iga-chk input:checked + .iga-chk__bx::after { opacity: 1; }
.cws-fpro--panel-custom .iga-chk input:focus-visible + .iga-chk__bx { outline: 2px solid var(--ink); outline-offset: 2px; }
.cws-fpro--panel-custom .iga-chk:not(.is-disabled):hover .iga-chk__bx { background: #e0e0de; }
.cws-fpro--panel-custom .iga-chk:not(.is-disabled):hover input:checked + .iga-chk__bx { background: #000; }

.cws-fpro--panel-custom .iga-chk__n { margin-left: 4px; color: var(--faint); font-size: 13px; }
.cws-fpro--panel-custom .iga-chk.is-disabled { color: var(--faint); cursor: default; }
.cws-fpro--panel-custom .iga-chk.is-disabled .iga-chk__bx { background: #f5f5f4; }

/* "+" sub-list toggle */
.cws-fpro--panel-custom .iga-plus {
    position: relative;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    background-color: transparent;
    color: #9a9a98;
    cursor: pointer;
}

.cws-fpro--panel-custom .iga-plus::before,
.cws-fpro--panel-custom .iga-plus::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 10px;
    height: 1px;
    background: currentColor;
    transition: transform .2s;
}

.cws-fpro--panel-custom .iga-plus::after { transform: rotate(90deg); }
.cws-fpro--panel-custom .iga-plus.is-open::after { transform: rotate(0); }
.cws-fpro--panel-custom .iga-plus:hover { color: var(--ink); background: none; }

/* ---------- Bar: tabs, sort, view switch ---------- */

.cws-fpro--panel-custom .iga-bar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 6px 0 22px;
    border-bottom: 1px solid var(--line);
}

.cws-fpro--panel-custom .iga-tabs { display: flex; flex-wrap: wrap; gap: 10px 53px; }

.cws-fpro--panel-custom .iga-tabs .iga-tab {
    padding: 4px 0 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    background-color: transparent;
    color: var(--ink);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color .2s;
}

.cws-fpro--panel-custom .iga-tabs .iga-tab:hover { border-bottom-color: #d0d0ce; }
.cws-fpro--panel-custom .iga-tabs .iga-tab.is-on { border-bottom-color: var(--ink); }

.cws-fpro--panel-custom .iga-tools { display: flex; align-items: center; gap: 0; }


.cws-fpro--panel-custom .iga-sort { position: relative; }

.cws-fpro--panel-custom .iga-sort .iga-sort__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    min-width: 150px;
    padding: 8px 0;
    border: 0;
    background: none;
    background-color: transparent;
    color: #7a7a78;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.cws-fpro--panel-custom .iga-sort .iga-sort__btn::after {
    content: "";
    border: 5px solid transparent;
    border-top: 5px solid #7a7a78;
    border-bottom: 0;
    transition: transform .2s;
}

.cws-fpro--panel-custom .iga-sort.is-open .iga-sort__btn::after { transform: rotate(180deg); }

.cws-fpro--panel-custom .iga-sort__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    min-width: 220px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .07);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: .16s;
}

.cws-fpro--panel-custom .iga-sort.is-open .iga-sort__menu { opacity: 1; transform: none; pointer-events: auto; }
.cws-fpro--panel-custom .iga-sort__menu li { margin: 0; padding: 0; }

.cws-fpro--panel-custom .iga-sort__menu button {
    display: block;
    width: 100%;
    padding: 9px 16px;
    border: 0;
    background: none;
    background-color: transparent;
    color: #555;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}

.cws-fpro--panel-custom .iga-sort__menu button:hover { background: #f6f6f4; background-color: #f6f6f4; color: var(--ink); }
.cws-fpro--panel-custom .iga-sort__menu button.is-on { color: var(--ink); font-weight: 600; }

.cws-fpro--panel-custom .iga-sort__native {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    opacity: 0;
    pointer-events: none;
}

.cws-fpro--panel-custom .iga-vsep { width: 1px; height: 22px; margin: 0 22px 0 26px; background: var(--line); }

.cws-fpro--panel-custom .iga-views { display: flex; gap: 14px; }

.cws-fpro--panel-custom .iga-views .iga-vbtn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: none;
    background-color: transparent;
    color: #c9c9c7;
    cursor: pointer;
    transition: color .15s;
}

.cws-fpro--panel-custom .iga-views .iga-vbtn:hover { color: #8a8a88; }
.cws-fpro--panel-custom .iga-views .iga-vbtn.is-on { color: var(--ink); }

.cws-fpro--panel-custom .iga-dots { display: grid; gap: 3px; }
.cws-fpro--panel-custom .iga-dots i { display: block; border-radius: 50%; background: currentColor; }
.cws-fpro--panel-custom .iga-dots--9 { grid-template-columns: repeat(3, 3px); }
.cws-fpro--panel-custom .iga-dots--9 i { width: 3px; height: 3px; }
.cws-fpro--panel-custom .iga-dots--4 { grid-template-columns: repeat(2, 5px); }
.cws-fpro--panel-custom .iga-dots--4 i { width: 5px; height: 5px; }
.cws-fpro--panel-custom .iga-dots--1 i { width: 11px; height: 11px; }

/* Chips */
.cws-fpro--panel-custom .iga-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; }
.cws-fpro--panel-custom .iga-chips:empty { display: none; }

.cws-fpro--panel-custom .iga-chips .cws-fpro-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 0;
    border-radius: 0;
    background: #f4f4f2;
    color: var(--ink);
    font-size: 12px;
    font-weight: 400;
}

.cws-fpro--panel-custom .iga-chips .cws-fpro-chip:hover { background: #ebebe9; }

.cws-fpro--panel-custom .iga-chips .cws-fpro-chip button {
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    background-color: transparent;
    color: #999;
    cursor: pointer;
}

.cws-fpro--panel-custom .iga-chips .cws-fpro-chip button svg { width: 10px; height: 10px; }
.cws-fpro--panel-custom .iga-chips .cws-fpro-chip button:hover { color: var(--ink); }

.cws-fpro--panel-custom .iga-chips .cws-fpro-chip-clear {
    padding: 6px 10px;
    border: 0;
    background: none;
    background-color: transparent;
    color: #666;
    font-size: 12px;
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- Grid ---------- */

.cws-fpro--panel-custom[data-iga-view="6"] { --iga-cols: 6; }
.cws-fpro--panel-custom[data-iga-view="3"] { --iga-cols: 3; }

.cws-fpro.cws-fpro--panel-custom .cws-fpro-results ul.products {
    display: grid;
    grid-template-columns: repeat(var(--iga-cols), minmax(0, 1fr));
    gap: 40px 20px;
    margin: 0;
    padding: 40px 0 0;
    list-style: none;
}

.cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] .cws-fpro-results ul.products { gap: 34px 16px; }
.cws-fpro.cws-fpro--panel-custom[data-iga-view="3"] .cws-fpro-results ul.products { gap: 56px 28px; }

@media (max-width: 1400px) {
    .cws-fpro--panel-custom[data-iga-view="6"] { --iga-cols: 5; }
    .cws-fpro--panel-custom[data-iga-view="5"],
    .cws-fpro--panel-custom:not([data-iga-view]) { --iga-cols: 4; }
}

@media (max-width: 1150px) {
    .cws-fpro--panel-custom[data-iga-view="6"] { --iga-cols: 4; }
    .cws-fpro--panel-custom[data-iga-view="5"],
    .cws-fpro--panel-custom:not([data-iga-view]) { --iga-cols: 3; }
    .cws-fpro--panel-custom[data-iga-view="3"] { --iga-cols: 2; }
}


/* ---------- Card in this grid (the card itself: loop-card.css) ---------- */

/* A grid cell: no Sober/Bootstrap column width, float or gutter. */
.cws-fpro.cws-fpro--panel-custom .cws-fpro-results ul.products > li.product.iga-card {
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    animation: iga-rise .45s both;
}

/* The view switch is desktop-only (hidden at 960px and below), so are its sizes. */
@media (min-width: 961px) {
    /* Large (3) view */
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="3"] ul.products li.product.iga-card h2.iga-card__ttl { font-size: 17px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="3"] ul.products li.product.iga-card .iga-card__pr.price { font-size: 14px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="3"] ul.products li.product.iga-card .iga-card__pr.price .cws-anchor-price { font-size: 11px; }

    /* Dense (6) view */
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card h2.iga-card__ttl { margin-top: 22px; font-size: 13px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-card__pr.price { margin-top: 12px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-card__pr.price .cws-anchor-price { margin-top: 10px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-card__acts { gap: 8px; bottom: 14px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-card__act { width: 38px; height: 38px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-card__act svg { width: 16px; height: 16px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-card__act--eye { font-size: 9px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-card__act--eye svg { width: 16px; height: 11px; }
    .cws-fpro.cws-fpro--panel-custom[data-iga-view="6"] ul.products li.product.iga-card .iga-badge { min-width: 0; height: 24px; padding: 0 10px; font-size: 11px; }
}

/* ---------- Skeleton cards (Filters Pro markup) ---------- */

.cws-fpro.cws-fpro--panel-custom .cws-fpro-results .cws-fpro-skcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.cws-fpro--panel-custom .cws-fpro-skcard .cws-fpro-sk {
    border-radius: 0;
    background: linear-gradient(90deg, var(--sk) 0, var(--sk2) 40%, var(--sk) 80%);
    background-size: 200% 100%;
    animation: iga-shim 1.2s linear infinite;
}

.cws-fpro--panel-custom .cws-fpro-skcard .cws-fpro-sk-media { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.cws-fpro--panel-custom .cws-fpro-skcard .cws-fpro-sk-body { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0; }
.cws-fpro--panel-custom .cws-fpro-skcard .cws-fpro-sk-body > :nth-child(1) { width: 62% !important; height: 14px !important; margin-top: 36px; }
.cws-fpro--panel-custom .cws-fpro-skcard .cws-fpro-sk-body > :nth-child(2) { width: 28% !important; height: 12px !important; margin-top: 18px; }
.cws-fpro--panel-custom .cws-fpro-skcard .cws-fpro-sk-body > :nth-child(3) { width: 78% !important; height: 9px !important; margin-top: 14px; }
.cws-fpro--panel-custom .cws-fpro-skcard .cws-fpro-sk-body > :nth-child(n + 4) { display: none; }

@keyframes iga-shim { to { background-position: -200% 0; } }
@keyframes iga-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Load more (Filters Pro footer) ---------- */

.cws-fpro--panel-custom .cws-fpro-foot { padding: 0; border: 0; }

.cws-fpro--panel-custom .cws-fpro-inf {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 60px 0 0;
    border: 0;
    background: none;
}

.cws-fpro--panel-custom .cws-fpro-inf-txt { order: 1; margin: 0; color: var(--muted); font-size: 12px; }
.cws-fpro--panel-custom .cws-fpro-inf-bar { order: 2; width: 180px; height: 2px; border-radius: 0; background: var(--line); overflow: hidden; }
.cws-fpro--panel-custom .cws-fpro-inf-bar i { display: block; height: 100%; border-radius: 0; background: var(--ink); transition: width .3s; }
.cws-fpro--panel-custom .cws-fpro-inf-end { order: 3; color: var(--muted); font-size: 12px; }
.cws-fpro--panel-custom .cws-fpro-inf-end svg { display: none; }

.cws-fpro.cws-fpro--panel-custom .cws-fpro-inf .cws-fpro-loadmore {
    order: 3;
    height: auto;
    padding: 14px 38px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: #fff;
    background-color: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: none;
    cursor: pointer;
    transition: .15s;
}

.cws-fpro.cws-fpro--panel-custom .cws-fpro-inf .cws-fpro-loadmore:hover {
    background: var(--ink);
    background-color: var(--ink);
    color: #fff;
}

/* Empty state */
.cws-fpro--panel-custom .cws-fpro-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 90px 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #666;
    font-size: 15px;
    text-align: center;
}

.cws-fpro--panel-custom .cws-fpro-empty button {
    padding: 14px 38px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: #fff;
    background-color: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
}

/* ---------- Phones and tablets (design: "Galerija - Mobilni Filteri") ---------- */

@media (max-width: 960px) {
    .cws-fpro.cws-fpro--panel-custom {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        padding: 8px 0 60px;
    }

    /* Tabs, the sticky bar, the count and the grid are rows of the widget grid. */
    .cws-fpro--panel-custom .iga-bar,
    .cws-fpro--panel-custom .iga-bar__row { display: contents; }

    .cws-fpro--panel-custom .iga-tabs { grid-column: 1; grid-row: 1; }
    .cws-fpro--panel-custom .iga-tools { grid-column: 1; grid-row: 2; }
    .cws-fpro--panel-custom .iga-found--bar { grid-column: 1; grid-row: 3; }
    .cws-fpro--panel-custom .cws-fpro-main { grid-column: 1; grid-row: 4; padding: 0 16px; }

    .cws-fpro--panel-custom .iga-chips,
    .cws-fpro--panel-custom .iga-found--side,
    .cws-fpro--panel-custom .iga-tools .iga-sort,
    .cws-fpro--panel-custom .iga-tools .iga-vsep,
    .cws-fpro--panel-custom .iga-tools .iga-views { display: none; }

    /* Tabs: one scrolling row */
    .cws-fpro--panel-custom .iga-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 22px;
        width: auto;
        padding: 10px 20px 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .cws-fpro--panel-custom .iga-tabs::-webkit-scrollbar { display: none; }

    .cws-fpro--panel-custom .iga-tabs .iga-tab {
        flex: none;
        min-height: 44px;
        padding: 6px 0 10px;
        font-size: 15px;
        white-space: nowrap;
    }

    /* The sticky "Filteri | sort" bar; --iga-stick = the Sober smart header while it is slid in (iga.js). */
    .cws-fpro--panel-custom .iga-tools {
        position: sticky;
        top: var(--iga-stick, 0px);
        z-index: 50;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 0;
        width: auto;
        height: 52px;
        margin: 0;
        background: #fff;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        transition: top .25s;
    }

    .cws-fpro--panel-custom .iga-tools .iga-mbtn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 0;
        height: 100%;
        padding: 0 10px;
        border: 0;
        border-radius: 0;
        background: #fff;
        background-color: #fff;
        color: var(--ink);
        font-size: 14px;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
        cursor: pointer;
    }

    .cws-fpro--panel-custom .iga-tools .iga-mbtn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .cws-fpro--panel-custom .iga-tools .iga-mbtn svg { flex: none; width: 18px; height: 18px; }
    .cws-fpro--panel-custom .iga-tools .iga-msep { display: block; width: 1px; height: 22px; background: var(--line); }

    .cws-fpro--panel-custom .iga-ftoggle__n {
        display: grid;
        place-items: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 10px;
        background: var(--ink);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
    }

    .cws-fpro--panel-custom .iga-ftoggle__n[hidden] { display: none; }

    /* Result count under the bar */
    .cws-fpro--panel-custom .iga-found--bar {
        display: block;
        min-height: 17px;
        margin: 18px 20px 0;
        font-size: 13px;
    }

    .cws-fpro--panel-custom .iga-found--bar.is-loading { width: 140px; }

    /* Grid: 3 columns on tablets, 1 on phones, whatever the desktop view switch says */
    .cws-fpro.cws-fpro--panel-custom[data-iga-view],
    .cws-fpro.cws-fpro--panel-custom:not([data-iga-view]) { --iga-cols: 3; }

    .cws-fpro.cws-fpro--panel-custom[data-iga-view] .cws-fpro-results ul.products,
    .cws-fpro.cws-fpro--panel-custom .cws-fpro-results ul.products { gap: 30px 12px; padding-top: 18px; }

    .cws-fpro--panel-custom .cws-fpro-empty { padding: 70px 24px; font-size: 14px; }

    /* ---- The bottom sheet ---- */

    .cws-fpro--panel-custom .iga-side {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 99990;
        display: flex;
        flex-direction: column;
        width: auto;
        height: 85vh;
        height: 85dvh;
        padding: 0;
        overflow: hidden;
        border-radius: 14px 14px 0 0;
        background: #fff;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, .12);
        transform: translateY(100%);
        visibility: hidden;
        transition: transform .34s cubic-bezier(.2, .75, .2, 1), visibility 0s .34s;
    }

    .cws-fpro--panel-custom.iga-sheet-open .iga-side {
        transform: none;
        visibility: visible;
        transition: transform .34s cubic-bezier(.2, .75, .2, 1);
    }

    .cws-fpro--panel-custom .iga-side.is-dragging { transition: none; }

    .cws-fpro--panel-custom .iga-side__head {
        display: block;
        flex: none;
        margin: 0;
        padding: 8px 8px 0;
        border-bottom: 1px solid var(--line);
        touch-action: none;
        cursor: grab;
    }

    .cws-fpro--panel-custom .iga-side__grab { display: block; width: 40px; height: 4px; margin: 0 auto 4px; border-radius: 2px; background: #d6d6d4; }

    .cws-fpro--panel-custom .iga-side__row {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        height: 52px;
    }

    .cws-fpro--panel-custom .iga-side__title { font-size: 17px; font-weight: 500; }

    .cws-fpro--panel-custom .iga-side__reset {
        justify-self: start;
        height: 44px;
        padding: 0 12px;
        border: 0;
        border-radius: 0;
        background: none;
        background-color: transparent;
        color: #555;
        font-size: 13px;
        font-weight: 400;
        text-decoration: underline;
        cursor: pointer;
    }

    .cws-fpro--panel-custom .iga-side__reset:disabled { color: var(--faint); text-decoration: none; cursor: default; }

    .cws-fpro--panel-custom .iga-side__x {
        justify-self: end;
        position: relative;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        background-color: transparent;
        cursor: pointer;
    }

    .cws-fpro--panel-custom .iga-side__x::before,
    .cws-fpro--panel-custom .iga-side__x::after {
        content: "";
        position: absolute;
        left: 14px;
        right: 14px;
        top: 21px;
        height: 1.5px;
        background: #555;
        transform: rotate(45deg);
    }

    .cws-fpro--panel-custom .iga-side__x::after { transform: rotate(-45deg); }

    .cws-fpro--panel-custom .iga-side__body {
        flex: 1;
        min-height: 0;
        padding: 0 20px;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .cws-fpro--panel-custom .iga-fgroup { margin: 0; padding: 26px 0 24px; border-bottom: 1px solid var(--line); }
    .cws-fpro--panel-custom .iga-fgroup:last-child { padding-bottom: 30px; border-bottom: 0; }
    .cws-fpro--panel-custom .iga-fgroup h3 { margin: 0 0 14px; font-size: 18px; }
    .cws-fpro--panel-custom .iga-fgroup--sort { display: block; }

    /* Sort radios */
    .cws-fpro--panel-custom .iga-rads { display: flex; flex-direction: column; }

    .cws-fpro--panel-custom .iga-rads .iga-rad {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 44px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        background-color: transparent;
        color: var(--ink);
        font-size: 14px;
        font-weight: 400;
        text-align: left;
        cursor: pointer;
    }

    .cws-fpro--panel-custom .iga-rad__b { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--box); transition: background .15s; }
    .cws-fpro--panel-custom .iga-rad.is-on .iga-rad__b { background: var(--ink); }
    .cws-fpro--panel-custom .iga-rad.is-on .iga-rad__b::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }

    /* Checkbox rows: 44px targets */
    .cws-fpro--panel-custom .iga-opts,
    .cws-fpro--panel-custom .iga-subs { gap: 0; }

    .cws-fpro--panel-custom .iga-subs { margin: 0 0 6px 34px; }
    .cws-fpro--panel-custom .iga-opt { grid-template-columns: minmax(0, 1fr) 44px; gap: 0; }

    .cws-fpro--panel-custom .iga-chk,
    .cws-fpro--panel-custom .iga-chk.cws-fpro-opt {
        align-items: center;
        gap: 12px;
        min-height: 44px;
        padding: 6px 0;
        line-height: 1.3;
    }

    .cws-fpro--panel-custom .iga-chk__bx { margin-top: 0; }
    .cws-fpro--panel-custom .iga-chk__n { margin-left: 6px; }

    .cws-fpro--panel-custom .iga-plus { width: 44px; height: 44px; }

    .cws-fpro--panel-custom .iga-plus::before,
    .cws-fpro--panel-custom .iga-plus::after { left: 15px; right: 15px; top: 21.5px; }

    /* Price: "Od" / "Do" inside the fields, bigger thumbs. 16px text keeps iOS from zooming in. */
    .cws-fpro--panel-custom .iga-prices { gap: 12px; }

    .cws-fpro--panel-custom .iga-prices__pre {
        display: block;
        position: absolute;
        left: 14px;
        top: 50%;
        color: var(--muted);
        font-size: 12px;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .cws-fpro--panel-custom .iga-prices input { padding: 0 14px 0 48px; font-size: 16px; }

    .cws-fpro--panel-custom .iga-range { height: 30px; margin-top: 16px; }
    .cws-fpro--panel-custom .iga-range__in { left: 13px; right: 13px; top: 14px; }
    .cws-fpro--panel-custom .iga-range input[type="range"] { height: 30px; }
    .cws-fpro--panel-custom .iga-range input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
    .cws-fpro--panel-custom .iga-range input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; }

    /* Footer: apply */
    .cws-fpro--panel-custom .iga-side__foot {
        display: block;
        flex: none;
        padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--line);
        background: #fff;
    }

    .cws-fpro--panel-custom .iga-side__foot .iga-apply {
        width: 100%;
        height: 54px;
        padding: 0 16px;
        border: 0;
        border-radius: 0;
        background: #23252b;
        background-color: #23252b;
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: background .2s, opacity .2s;
    }

    .cws-fpro--panel-custom .iga-side__foot .iga-apply:active { background: #000; background-color: #000; }
    .cws-fpro--panel-custom .iga-side__foot .iga-apply:disabled { background: #c9c9c7; background-color: #c9c9c7; cursor: default; }
    .cws-fpro--panel-custom .iga-side__foot .iga-apply.is-pending { opacity: .7; }

    .cws-fpro--panel-custom .iga-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 99980;
        background: rgba(20, 20, 20, .5);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s;
    }

    .cws-fpro--panel-custom.iga-sheet-open .iga-scrim { opacity: 1; pointer-events: auto; }

    html.iga-sheet-lock,
    html.iga-sheet-lock body { overflow: hidden; }
}

/* Phones: one card per row (two were too narrow for the image, badges and the round actions). */
@media (max-width: 640px) {
    .cws-fpro.cws-fpro--panel-custom[data-iga-view],
    .cws-fpro.cws-fpro--panel-custom:not([data-iga-view]) { --iga-cols: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cws-fpro.cws-fpro--panel-custom .cws-fpro-results ul.products > li.product.iga-card { animation: none; }
    .cws-fpro--panel-custom .iga-side,
    .cws-fpro--panel-custom.iga-sheet-open .iga-side,
    .cws-fpro--panel-custom .iga-scrim,
    .cws-fpro--panel-custom .iga-tools { transition: none; }
}
