.bmc-gallery {
    max-width: 1380px;
    margin: 0 auto;
    padding: 8px 16px 40px;
    color: #172033;
}

.bmc-gallery__intro {
    margin-bottom: 12px;
    text-align: center;
}

.bmc-gallery__title {
    margin: 0 0 4px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    font-weight: 700;
}

.bmc-gallery__subtitle {
    margin: 0 auto;
    max-width: 860px;
    color: #4b5b73;
    font-size: 1.05rem;
    line-height: 1.55;
}

.bmc-gallery__filters {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
    align-items: stretch;
}

.bmc-gallery__filters.has-both {
    grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.8fr);
}

.bmc-gallery__filters.has-search-only,
.bmc-gallery__filters.has-category-only {
    grid-template-columns: minmax(0, 480px);
    justify-content: start;
}

.bmc-gallery__search-wrap,
.bmc-gallery__category-wrap {
    position: relative;
}

.bmc-gallery__search,
.bmc-gallery__category,
.bmc-gallery__select,
.bmc-gallery__input {
    width: 100% !important;
    min-height: 56px !important;
    height: 56px !important;
    border: 1px solid #c8d3e1 !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: #172033 !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    padding: 0 18px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.bmc-gallery__search {
    padding-right: 92px !important;
    padding-left: 52px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.bmc-gallery__search::placeholder,
.bmc-gallery__category,
.bmc-gallery__select,
.bmc-gallery__input::placeholder {
    color: #5f6f88 !important;
}

.bmc-gallery__search:focus,
.bmc-gallery__category:focus,
.bmc-gallery__select:focus,
.bmc-gallery__input:focus {
    outline: none !important;
    border-color: #007148 !important;
    box-shadow: 0 0 0 4px rgba(0, 113, 72, 0.12) !important;
}

.bmc-gallery__search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.72;
}

.bmc-gallery__search-icon::before,
.bmc-gallery__search-icon::after {
    content: '';
    position: absolute;
    display: block;
}

.bmc-gallery__search-icon::before {
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    border: 2px solid #5f6f88;
    border-radius: 50%;
}

.bmc-gallery__search-icon::after {
    right: 0;
    bottom: 1px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: #5f6f88;
    transform: rotate(45deg);
    transform-origin: center;
}

.bmc-gallery__category-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 18px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #5f6f88;
    border-bottom: 2px solid #5f6f88;
    transform: translateY(-62%) rotate(45deg);
    pointer-events: none;
}

.bmc-gallery__category {
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-right: 48px !important;
}

.bmc-gallery__search::-webkit-search-decoration,
.bmc-gallery__search::-webkit-search-cancel-button,
.bmc-gallery__search::-webkit-search-results-button,
.bmc-gallery__search::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
}

.bmc-gallery__clear {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #eef3f8;
    color: #3f4d64;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.bmc-gallery__clear:hover {
    background: #dfe8f1;
}

.bmc-gallery__notice {
    min-height: 24px;
    margin-bottom: 14px;
    color: #4b5b73;
}

.bmc-gallery__notice.is-error {
    color: #b42318;
}

.bmc-gallery__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
    align-items: stretch;
}

.bmc-gallery__card {
    display: flex;
    flex-direction: column;
    width: min(100%, var(--bmc-gallery-card-max, 380px));
    max-width: var(--bmc-gallery-card-max, 380px);
    flex: 0 1 var(--bmc-gallery-card-max, 380px);
    border: 1px solid #d7e0ea;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.bmc-gallery__preview {
    aspect-ratio: 0.72;
    background: #edf3f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bmc-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #edf3f9;
}

.bmc-gallery__image-placeholder {
    padding: 20px;
    text-align: center;
    color: #5d6d86;
    font-weight: 600;
}

.bmc-gallery__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}

.bmc-gallery__card-title {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.15;
    font-weight: 700;
}

.bmc-gallery__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.bmc-gallery__pill,
.bmc-gallery__price {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
}

.bmc-gallery__price {
    background: #e6f4ef;
    color: #007148;
}

.bmc-gallery__pill {
    background: #eff3f7;
    color: #46546c;
}

.bmc-gallery__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bmc-gallery__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bmc-gallery__field--custom[hidden] {
    display: none;
}

.bmc-gallery__label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #172033;
}

.bmc-gallery__price-row {
    display: flex;
    justify-content: flex-start;
}

.bmc-gallery__button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 58px !important;
    padding: 12px 16px !important;
    border: 0 !important;
    border-radius: 16px !important;
    background: #007148 !important;
    color: #fff !important;
    font-size: 0.96rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: normal !important;
    cursor: pointer !important;
}

.bmc-gallery__button.is-loading,
.bmc-gallery__button:disabled {
    cursor: default !important;
    background: #8fa39a !important;
}

.bmc-gallery__empty {
    padding: 26px 24px;
    border: 1px dashed #c8d3e1;
    border-radius: 22px;
    background: #fff;
    color: #4b5b73;
}

.bmc-gallery__footer {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.bmc-gallery__load-more {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 52px !important;
    padding: 0 22px !important;
    border: 1px solid #007148 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #007148 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

@media (max-width: 767px) {
    .bmc-gallery {
        padding: 8px 12px 28px;
    }

    .bmc-gallery__filters,
    .bmc-gallery__filters.has-both,
    .bmc-gallery__filters.has-search-only,
    .bmc-gallery__filters.has-category-only {
        grid-template-columns: 1fr;
    }

    .bmc-gallery__grid {
        justify-content: stretch;
        gap: 16px;
    }

    .bmc-gallery__card {
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
    }
}
