
/* MALBASIC COMMERCE CORE — ADAPTIVE FILTERS V4 */

.mb-catalog-sidebar {
    --f4-wine:#681f38;
    --f4-wine-dark:#501529;
    --f4-gold:#b29569;
    --f4-ink:#30292b;
    --f4-muted:#81777a;
    --f4-line:#eae5e1;
    --f4-paper:#fff;
    --f4-soft:#f8f6f2;
    min-width:0;
}

.mb-catalog-sidebar .catalog-filters {
    box-sizing:border-box;
    background:var(--f4-paper);
    border:1px solid var(--f4-line);
    border-radius:10px;
    box-shadow:0 8px 30px rgba(57,34,41,.035);
    padding:0;
}

.mb-catalog-sidebar .mb-filter-accordion {
    margin:0;
    padding:0;
    border:0;
    border-bottom:1px solid var(--f4-line);
    background:transparent;
}

.mb-catalog-sidebar .mb-filter-accordion > summary {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:51px;
    padding:15px 18px;
    list-style:none;
    cursor:pointer;
    color:var(--f4-ink);
    background:transparent;
    font-family:inherit;
    font-size:11px;
    font-weight:var(--mb-design-weight-medium, 500);
    line-height:1.4;
    letter-spacing:.045em;
    text-transform:uppercase;
    transition:color .18s ease,background .18s ease;
}

.mb-catalog-sidebar .mb-filter-accordion > summary::-webkit-details-marker {
    display:none;
}

.mb-catalog-sidebar .mb-filter-accordion > summary::marker {
    content:"";
}

.mb-catalog-sidebar .mb-filter-accordion > summary:hover {
    color:var(--f4-wine);
    background:#fcfaf8;
}

.mb-catalog-sidebar .mb-filter-accordion > summary > span[aria-hidden] {
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 16px;
    width:16px;
    height:16px;
    padding:0;
    border:0;
    background:transparent;
    color:#93878a;
    font-size:17px;
    font-weight:300;
    line-height:1;
    transition:transform .2s ease,color .2s ease;
}

.mb-catalog-sidebar .mb-filter-accordion[open] > summary {
    color:var(--f4-wine);
}

.mb-catalog-sidebar .mb-filter-accordion[open] > summary > span[aria-hidden] {
    transform:rotate(45deg);
    color:var(--f4-wine);
}

.mb-catalog-sidebar .mb-filter-content {
    padding:0 18px 17px;
}

.mb-catalog-sidebar .mb-adaptive-options {
    display:flex;
    flex-direction:column;
    gap:1px;
    max-height:none;
    overflow:visible;
    padding:0;
}

.mb-catalog-sidebar .mb-adaptive-option {
    display:flex;
    align-items:center;
    gap:11px;
    width:100%;
    min-height:35px;
    margin:0;
    padding:6px 3px;
    border:0;
    border-radius:4px;
    color:#51494b;
    background:transparent;
    cursor:pointer;
    font-size:12px;
    font-weight:var(--mb-design-weight-body, 400);
    line-height:1.4;
    letter-spacing:0;
    text-transform:none;
    transition:color .15s ease,background .15s ease;
}

.mb-catalog-sidebar .mb-adaptive-option:hover {
    background:var(--f4-soft);
    color:var(--f4-wine);
}

.mb-catalog-sidebar .mb-adaptive-option input[type="checkbox"] {
    appearance:none;
    -webkit-appearance:none;
    display:block;
    position:relative;
    box-sizing:border-box;
    flex:0 0 16px;
    width:16px;
    height:16px;
    min-width:16px;
    min-height:16px;
    max-width:16px;
    max-height:16px;
    margin:0;
    padding:0;
    border:1px solid #cfc5c3;
    border-radius:3px;
    background:#fff;
    box-shadow:none;
    cursor:pointer;
}

.mb-catalog-sidebar .mb-adaptive-option input[type="checkbox"]:checked {
    background:var(--f4-wine);
    border-color:var(--f4-wine);
}

.mb-catalog-sidebar .mb-adaptive-option input[type="checkbox"]:checked::after {
    content:"";
    position:absolute;
    top:1px;
    left:4px;
    width:4px;
    height:8px;
    border:solid #fff;
    border-width:0 2px 2px 0;
    transform:rotate(45deg);
}

.mb-catalog-sidebar .mb-adaptive-option input[type="checkbox"]:focus-visible,
.mb-catalog-sidebar summary:focus-visible,
.mb-catalog-sidebar button:focus-visible,
.mb-catalog-sidebar input:focus-visible {
    outline:2px solid var(--f4-gold);
    outline-offset:3px;
}

.mb-catalog-sidebar .mb-option-name {
    flex:1 1 auto;
    min-width:0;
    overflow-wrap:break-word;
    font-size:12px;
    line-height:1.45;
    text-transform:none;
    letter-spacing:0;
}

.mb-catalog-sidebar .mb-option-count {
    display:inline-block;
    flex:0 0 auto;
    min-width:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    color:#9c9294;
    font-size:10px;
    font-weight:var(--mb-design-weight-medium, 500);
    line-height:1.5;
    font-variant-numeric:tabular-nums;
}

.mb-catalog-sidebar .mb-adaptive-option input:checked + .mb-option-name {
    color:var(--f4-wine);
    font-weight:var(--mb-design-weight-medium, 500);
}

.mb-catalog-sidebar .mb-adaptive-price {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}

.mb-catalog-sidebar .mb-adaptive-price label {
    display:block;
    min-width:0;
    color:var(--f4-muted);
    font-size:10px;
    font-weight:var(--mb-design-weight-strong, 600);
    line-height:1.5;
    text-transform:none;
    letter-spacing:0;
}

.mb-catalog-sidebar .mb-adaptive-price input {
    display:block;
    box-sizing:border-box;
    width:100%;
    min-width:0;
    height:40px;
    margin-top:7px;
    padding:8px 10px;
    border:1px solid #e4dcd8;
    border-radius:5px;
    background:#fff;
    color:var(--f4-ink);
    font-size:12px;
    box-shadow:none;
}

.mb-catalog-sidebar .mb-adaptive-price input:focus {
    border-color:var(--f4-gold);
    outline:none;
}

.mb-catalog-sidebar select#filter-sort {
    width:100%;
    min-height:40px;
    border:1px solid #e4dcd8;
    border-radius:5px;
    background:#fff;
    color:var(--f4-ink);
    font-size:12px;
}

.mb-catalog-sidebar .mb-f4-more {
    display:inline-flex;
    align-items:center;
    gap:5px;
    margin:9px 0 0;
    padding:5px 0;
    border:0;
    background:transparent;
    color:var(--f4-wine);
    font-size:11px;
    font-weight:var(--mb-design-weight-strong, 600);
    cursor:pointer;
}

.mb-catalog-sidebar .mb-f4-more:hover {
    text-decoration:underline;
}

.mb-catalog-sidebar .mb-f4-hidden {
    display:none !important;
}

.mb-catalog-sidebar .mb-f4-heading {
    padding:19px 18px 15px;
    border-bottom:1px solid var(--f4-line);
}

.mb-catalog-sidebar .mb-f4-heading-title {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.mb-catalog-sidebar .mb-f4-heading-title strong {
    color:var(--f4-ink);
    font-size:15px;
    font-weight:var(--mb-design-weight-strong, 600);
    letter-spacing:-0.015em;
}

.mb-catalog-sidebar .mb-f4-heading-title a {
    color:var(--f4-muted);
    font-size:10px;
    font-weight:var(--mb-design-weight-strong, 600);
    text-decoration:underline;
    text-underline-offset:3px;
}

.mb-catalog-sidebar .mb-f4-heading > p {
    margin:6px 0 0;
    color:var(--f4-muted);
    font-size:11px;
    line-height:1.5;
}

.mb-catalog-sidebar .mb-f4-selected {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:12px;
}

.mb-catalog-sidebar .mb-f4-chip {
    display:inline-flex;
    align-items:center;
    gap:7px;
    max-width:100%;
    min-height:29px;
    padding:5px 9px;
    border:1px solid #e6d9da;
    border-radius:5px;
    background:#faf6f5;
    color:var(--f4-wine);
    font-size:10px;
    font-weight:var(--mb-design-weight-medium, 500);
    line-height:1.4;
    cursor:pointer;
}

.mb-catalog-sidebar .mb-f4-chip:hover {
    background:#f1e6e6;
}

.mb-catalog-sidebar .mb-f4-chip span {
    font-size:14px;
    font-weight:var(--mb-design-weight-body, 400);
}

.mb-catalog-sidebar .mb-has-value > summary {
    color:var(--f4-wine);
}

.mb-catalog-sidebar .catalog-filter-actions {
    display:flex;
    flex-direction:column;
    gap:7px;
    margin:0;
    padding:15px 18px 17px;
    border-top:1px solid var(--f4-line);
    background:#fff;
}

.mb-catalog-sidebar .catalog-filter-actions button[type="submit"] {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:43px;
    margin:0;
    border:1px solid var(--f4-wine);
    border-radius:5px;
    background:var(--f4-wine);
    color:#fff;
    font-size:11px;
    font-weight:var(--mb-design-weight-strong, 600);
    line-height:1.4;
    letter-spacing:.025em;
    cursor:pointer;
    transition:background .18s ease;
}

.mb-catalog-sidebar .catalog-filter-actions button[type="submit"]:hover {
    background:var(--f4-wine-dark);
}

.mb-catalog-sidebar .catalog-filter-actions a {
    display:block;
    padding:6px;
    color:var(--f4-muted);
    font-size:10px;
    font-weight:var(--mb-design-weight-medium, 500);
    text-align:center;
    text-decoration:none;
}

.mb-catalog-sidebar .catalog-filter-actions a:hover {
    color:var(--f4-wine);
    text-decoration:underline;
}

@media (min-width:851px) {
    .mb-catalog-layout {
        align-items:start;
    }

    .mb-catalog-sidebar {
        position:sticky;
        top:82px;
        align-self:start;
        box-sizing:border-box;
        height:auto;
        max-height:calc(100vh - 96px);
        min-height:0;
        z-index:5;
    }

    .mb-catalog-sidebar .catalog-filters {
        display:block;
        box-sizing:border-box;
        max-height:calc(100vh - 96px);
        overflow-x:hidden;
        overflow-y:auto;
        overscroll-behavior:contain;
        scrollbar-width:thin;
        scrollbar-color:#d8cfcb transparent;
    }

    .mb-catalog-sidebar .catalog-filter-actions {
        position:sticky;
        bottom:0;
        z-index:4;
        box-shadow:0 -9px 20px rgba(255,255,255,.96);
    }
}

@media (max-width:850px) {
    .mb-catalog-sidebar {
        position:static;
        max-height:none;
        height:auto;
    }

    .mb-catalog-sidebar .catalog-filters {
        max-height:none;
        overflow:visible;
        border:0;
        border-radius:0;
        box-shadow:none;
    }

    .mb-catalog-sidebar .mb-filter-accordion > summary {
        min-height:55px;
        padding:17px 20px;
    }

    .mb-catalog-sidebar .mb-filter-content {
        padding:0 20px 18px;
    }

    .mb-catalog-sidebar .mb-adaptive-option {
        min-height:42px;
        padding:9px 4px;
    }

    .mb-catalog-sidebar .mb-f4-heading {
        padding:20px;
    }

    .mb-catalog-sidebar .catalog-filter-actions {
        position:relative;
        bottom:auto;
        padding:17px 20px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .mb-catalog-sidebar *,
    .mb-catalog-sidebar *::before,
    .mb-catalog-sidebar *::after {
        transition:none !important;
    }
}

/* =====================================================
   MALBAŠIĆ — FILTER SIDEBAR V5
   Završna vizuelna obrada
   Sticky i scroll pravila V4 ostaju nepromijenjena.
   ===================================================== */

.mb-catalog-sidebar .catalog-filters {
    border-color:#ece7e3;
    background:#fff;
    box-shadow:0 10px 32px rgba(65,35,44,.035);
}

/* Naslov i kontekst */
.mb-catalog-sidebar .mb-f4-heading {
    padding:20px 18px 17px;
    border-bottom:1px solid #eae5e1;
    background:linear-gradient(180deg,#fff 0%,#fdfbf9 100%);
}

.mb-catalog-sidebar .mb-f4-heading-title {
    align-items:center;
}

.mb-catalog-sidebar .mb-f4-heading-title strong {
    color:#34282c;
    font-size:16px;
    font-weight:var(--mb-design-weight-strong, 600);
    letter-spacing:-0.02em;
    line-height:1.3;
    text-transform:none;
}

.mb-catalog-sidebar .mb-f4-heading-title a {
    color:#87787b;
    font-size:10px;
    font-weight:var(--mb-design-weight-strong, 600);
    text-decoration:none;
    border-bottom:1px solid #cfc3c0;
    padding-bottom:2px;
}

.mb-catalog-sidebar .mb-f4-heading-title a:hover {
    color:#681f38;
    border-color:#681f38;
}

.mb-catalog-sidebar .mb-f4-heading > p {
    margin:7px 0 0;
    color:#8d8283;
    font-size:11px;
    line-height:1.6;
}

.mb-catalog-sidebar .mb-v5-active-title {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:17px;
    margin-bottom:9px;
    color:#7b6e70;
    font-size:10px;
    font-weight:var(--mb-design-weight-strong, 600);
    letter-spacing:.075em;
    text-transform:uppercase;
}

.mb-catalog-sidebar .mb-v5-active-count {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:20px;
    height:20px;
    padding:0 5px;
    border-radius:50px;
    background:#f2e9e7;
    color:#681f38;
    font-size:10px;
    font-weight:var(--mb-design-weight-strong, 600);
}

/* Aktivni filteri */
.mb-catalog-sidebar .mb-f4-selected {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:0;
}

.mb-catalog-sidebar .mb-f4-selected[hidden],
.mb-catalog-sidebar .mb-v5-active-title[hidden] {
    display:none !important;
}

.mb-catalog-sidebar .mb-f4-chip {
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-height:31px;
    max-width:100%;
    margin:0;
    padding:6px 9px 6px 11px;
    border:1px solid #e7d9d8;
    border-radius:5px;
    background:#faf6f5;
    color:#681f38;
    font-size:10px;
    font-weight:var(--mb-design-weight-medium, 500);
    line-height:1.4;
    text-align:left;
    cursor:pointer;
    transition:background .15s ease,border-color .15s ease;
}

.mb-catalog-sidebar .mb-f4-chip:hover {
    background:#f3e9e8;
    border-color:#d8bfc1;
}

.mb-catalog-sidebar .mb-f4-chip span {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 14px;
    width:14px;
    height:14px;
    font-size:15px;
    font-weight:var(--mb-design-weight-body, 400);
    line-height:1;
}

/* Accordion */
.mb-catalog-sidebar .mb-filter-accordion {
    border-bottom:1px solid #eee9e5;
}

.mb-catalog-sidebar .mb-filter-accordion > summary {
    min-height:50px;
    padding:15px 18px;
    color:#43383b;
    font-size:11px;
    font-weight:var(--mb-design-weight-medium, 500);
    letter-spacing:.045em;
}

.mb-catalog-sidebar .mb-filter-accordion > summary:hover {
    background:#fbf9f7;
    color:#681f38;
}

.mb-catalog-sidebar .mb-filter-accordion[open] > summary {
    color:#681f38;
}

.mb-catalog-sidebar .mb-filter-accordion > summary > span[aria-hidden] {
    font-size:16px;
    color:#a99b9b;
}

.mb-catalog-sidebar .mb-filter-content {
    padding:0 18px 18px;
}

/* Vrijednosti atributa */
.mb-catalog-sidebar .mb-adaptive-options {
    gap:0;
}

.mb-catalog-sidebar .mb-adaptive-option {
    gap:11px;
    min-height:36px;
    padding:7px 3px;
    border-radius:4px;
    font-size:12px;
    line-height:1.45;
}

.mb-catalog-sidebar .mb-adaptive-option:hover {
    background:#faf7f4;
}

.mb-catalog-sidebar .mb-adaptive-option input[type="checkbox"] {
    box-sizing:border-box;
    flex:0 0 16px;
    width:16px;
    height:16px;
    min-width:16px;
    min-height:16px;
    max-width:16px;
    max-height:16px;
    margin:0;
    border-radius:3px;
    border:1px solid #cfc5c3;
    box-shadow:none;
    background:#fff;
}

.mb-catalog-sidebar .mb-adaptive-option input[type="checkbox"]:checked {
    background:#681f38;
    border-color:#681f38;
}

.mb-catalog-sidebar .mb-option-name {
    color:#554b4d;
    font-size:12px;
    font-weight:450;
    line-height:1.45;
}

.mb-catalog-sidebar .mb-option-count {
    color:#66615c;
    font-size:10px;
    font-weight:var(--mb-design-weight-medium, 500);
    background:transparent;
    border:0;
    padding:0;
}

.mb-catalog-sidebar .mb-adaptive-option input:checked + .mb-option-name {
    color:#681f38;
    font-weight:var(--mb-design-weight-medium, 500);
}

.mb-catalog-sidebar .mb-adaptive-option:has(input:checked) {
    background:#fbf7f6;
}

/* Prikaži više */
.mb-catalog-sidebar .mb-f4-more {
    margin:11px 0 0;
    padding:4px 0;
    color:#681f38;
    font-size:11px;
    font-weight:var(--mb-design-weight-medium, 500);
    letter-spacing:0;
    text-decoration:none;
}

.mb-catalog-sidebar .mb-f4-more:hover {
    text-decoration:underline;
    text-underline-offset:3px;
}

/* Cijena */
.mb-catalog-sidebar .mb-adaptive-price {
    gap:10px;
}

.mb-catalog-sidebar .mb-adaptive-price label {
    color:#827679;
    font-size:10px;
    font-weight:var(--mb-design-weight-strong, 600);
}

.mb-catalog-sidebar .mb-adaptive-price input {
    height:40px;
    margin-top:7px;
    border:1px solid #e7dfda;
    border-radius:5px;
    background:#fff;
    font-size:12px;
    color:#403336;
}

.mb-catalog-sidebar .mb-adaptive-price input:focus {
    border-color:#b29569;
    box-shadow:0 0 0 3px rgba(178,149,105,.11);
}

/* Podnožje */
.mb-catalog-sidebar .catalog-filter-actions {
    gap:8px;
    padding:15px 18px 16px;
    background:#fff;
    border-top:1px solid #eee9e5;
}

.mb-catalog-sidebar .mb-v5-result-hint {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    margin:0 0 5px;
    color:#817477;
    font-size:10px;
    line-height:1.5;
    text-align:center;
}

.mb-catalog-sidebar .mb-v5-result-hint strong {
    color:#681f38;
    font-weight:var(--mb-design-weight-strong, 600);
    font-variant-numeric:tabular-nums;
}

.mb-catalog-sidebar .catalog-filter-actions button[type="submit"] {
    min-height:44px;
    border-radius:5px;
    background:#681f38;
    color:#fff;
    font-size:11px;
    font-weight:var(--mb-design-weight-strong, 600);
    letter-spacing:.025em;
}

.mb-catalog-sidebar .catalog-filter-actions button[type="submit"]:hover {
    background:#501529;
}

.mb-catalog-sidebar .catalog-filter-actions a {
    padding:6px 0;
    color:#84777a;
    font-size:10px;
    font-weight:var(--mb-design-weight-medium, 500);
}

@media(max-width:850px) {
    .mb-catalog-sidebar .mb-f4-heading {
        padding:19px 20px;
    }

    .mb-catalog-sidebar .mb-filter-accordion > summary {
        padding:17px 20px;
    }

    .mb-catalog-sidebar .mb-filter-content {
        padding:0 20px 19px;
    }

    .mb-catalog-sidebar .mb-adaptive-option {
        min-height:43px;
        padding:9px 3px;
    }

    .mb-catalog-sidebar .catalog-filter-actions {
        padding:16px 20px 19px;
    }
}
