.sv-gallery {
    background: #ffffff;
}

.sv-gallery h1,
.sv-gallery h2,
.sv-gallery h3,
.sv-gallery h4 {
    color: var(--sv-brand-blue);
}

.sv-gallery-section {
    padding: 16px 0 40px;
    margin: 0;
}

.sv-gallery-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
}

.sv-gallery-filters {
    position: sticky;
    top: 90px;
    align-self: start;
    background: #fff;
    border: 1px solid rgba(16, 19, 28, 0.08);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.sv-gallery-filters h3 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2430;
}

.sv-filter-count {
    font-size: 13px;
    color: #5a6375;
    margin-bottom: 12px;
}

.sv-filter-mode {
    display: grid;
    gap: 2px;
    margin-bottom: 12px;
}

.sv-filter-mode label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1f2430;
    line-height: 1.1;
    padding: 1px 0;
}

.sv-filter-search {
    margin-bottom: 12px;
}

.sv-filter-search input[type="search"] {
    width: 100%;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(16, 19, 28, 0.2);
    padding: 0 12px;
}

.sv-filter-list {
    display: grid;
    gap: 0;
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.sv-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1f2430;
    line-height: 1.15;
    padding: 1px 0;
}

.sv-filter-item input {
    width: 16px;
    height: 16px;
    accent-color: var(--sv-brand-blue);
}

.sv-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.sv-filter-apply {
    background: #ffffff;
    color: #1f2430;
    border: 1px solid rgba(16, 19, 28, 0.14) !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 28px !important;
    height: 28px !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06) !important;
    transition: all 0.2s ease !important;
    min-width: 96px !important;
    box-sizing: border-box !important;
}

.sv-filter-clear {
    color: #fff;
    background: var(--sv-brand-blue);
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 28px !important;
    height: 28px !important;
    transition: all 0.2s ease !important;
    min-width: 96px !important;
    box-sizing: border-box !important;
}

.sv-filter-clear:hover {
    background: var(--sv-brand-red);
    color: #fff;
}

.sv-filter-apply:hover {
    background: var(--sv-brand-red);
    border-color: var(--sv-brand-red);
    color: #fff;
}

.sv-filter-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #5a6375;
    margin-top: 8px;
}

.sv-filter-heading:first-child {
    margin-top: 0;
}

.sv-filter-group.level-1 {
    margin-left: 14px;
}

.sv-filter-group.level-2 {
    margin-left: 24px;
}

.sv-filter-group.level-3 {
    margin-left: 34px;
}

.sv-gallery-results {
    min-width: 0;
    padding-top: 0;
}

.sv-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.sv-gallery-masonry {
    column-count: 4;
    column-gap: 18px;
}

.sv-gallery-card {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 18px;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgba(16, 19, 28, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    color: inherit;
    text-decoration: none;
}

.sv-gallery-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}


.sv-gallery-pagination ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 30px 0 0;
}

@media (max-width: 1200px) {
    .sv-gallery-layout {
        grid-template-columns: 1fr;
    }

    .sv-gallery-filters {
        position: relative;
        top: auto;
    }

    .sv-gallery-masonry {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .sv-gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .sv-gallery-masonry {
        column-count: 1;
    }
}
