/* Dedicated results page: remove only the Brator title/banner block. */
body.hdk-ymm-results-page .brator-banner-area,
body.hdk-ymm-results-page .brator-breadcrumb-area,
body.hdk-ymm-results-page .brator-page-title-area {
    display: none !important;
}

.hdk-ymm-static-filter,
.hdk-ymm-static-filter * {
    box-sizing: border-box;
}

/*
 * Fully independent filter shell.
 * No Brator layout or behavior class is required, so the theme cannot position,
 * disable, or restyle the form through its original YMM selectors.
 */
.hdk-ymm-static-filter {
    display: block !important;
    width: 100% !important;
    max-width: 1140px !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 28px 30px !important;
    border: 1px solid #ff625f !important;
    border-radius: 10px !important;
    background: #fff7f7 !important;
    box-shadow: none !important;
}

.hdk-ymm-static-filter .hdk-ymm-filter-form {
    display: grid !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 20px !important;
    align-items: center !important;
    background: transparent !important;
}

.hdk-ymm-static-filter.hdk-ymm-fields-3 .hdk-ymm-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(150px, 160px) !important;
}

.hdk-ymm-static-filter.hdk-ymm-fields-4 .hdk-ymm-filter-form {
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(150px, 160px) !important;
}

.hdk-ymm-static-filter.hdk-ymm-fields-5 .hdk-ymm-filter-form {
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(150px, 160px) !important;
    gap: 14px !important;
}

.hdk-ymm-static-filter .hdk-ymm-select,
.hdk-ymm-static-filter select.hdk-ymm-select {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 53px !important;
    min-height: 53px !important;
    margin: 0 !important;
    padding: 0 42px 0 15px !important;
    border: 1px solid #aeb3b7 !important;
    border-radius: 4px !important;
    outline: 0 !important;
    background-color: #fff !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 51px !important;
    box-shadow: none !important;
    text-overflow: ellipsis;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.hdk-ymm-static-filter .hdk-ymm-select:hover:not(:disabled) {
    border-color: #747a7f !important;
}

.hdk-ymm-static-filter .hdk-ymm-select:focus,
.hdk-ymm-static-filter .hdk-ymm-select:focus-visible {
    border-color: #e85e5b !important;
    box-shadow: 0 0 0 3px rgba(232, 94, 91, .16) !important;
}

.hdk-ymm-static-filter .hdk-ymm-select:disabled {
    cursor: not-allowed !important;
    opacity: .58 !important;
}

.hdk-ymm-static-filter .hdk-ymm-submit,
.hdk-ymm-static-filter .hdk-ymm-submit:disabled {
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 53px !important;
    min-height: 53px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #ff817d !important;
    border-radius: 4px !important;
    background: #ff817d !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    cursor: pointer !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: background-color .18s ease, border-color .18s ease, transform .08s ease, box-shadow .18s ease;
}

.hdk-ymm-static-filter .hdk-ymm-submit:hover,
.hdk-ymm-static-filter .hdk-ymm-submit:focus-visible {
    border-color: #ee6d69 !important;
    background: #ee6d69 !important;
}

.hdk-ymm-static-filter .hdk-ymm-submit:active {
    transform: translateY(1px);
}

.hdk-ymm-static-filter .hdk-ymm-submit:focus,
.hdk-ymm-static-filter .hdk-ymm-submit:focus-visible {
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(232, 94, 91, .22) !important;
}

.hdk-ymm-unavailable {
    padding: 12px 14px;
    border: 1px solid #dcdcde;
    background: #fff;
}

/* Tablet: two balanced columns and a full-width action. */
@media (max-width: 1100px) {
    .hdk-ymm-static-filter {
        max-width: calc(100% - 32px) !important;
        padding: 24px !important;
    }

    .hdk-ymm-static-filter .hdk-ymm-filter-form,
    .hdk-ymm-static-filter.hdk-ymm-fields-3 .hdk-ymm-filter-form,
    .hdk-ymm-static-filter.hdk-ymm-fields-4 .hdk-ymm-filter-form,
    .hdk-ymm-static-filter.hdk-ymm-fields-5 .hdk-ymm-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }

    .hdk-ymm-static-filter .hdk-ymm-submit {
        grid-column: 1 / -1;
    }
}

/* Mobile: one full-width control per row. */
@media (max-width: 640px) {
    .hdk-ymm-static-filter {
        max-width: calc(100% - 24px) !important;
        padding: 18px 16px !important;
        border-radius: 8px !important;
    }

    .hdk-ymm-static-filter .hdk-ymm-filter-form,
    .hdk-ymm-static-filter.hdk-ymm-fields-3 .hdk-ymm-filter-form,
    .hdk-ymm-static-filter.hdk-ymm-fields-4 .hdk-ymm-filter-form,
    .hdk-ymm-static-filter.hdk-ymm-fields-5 .hdk-ymm-filter-form {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 13px !important;
    }

    .hdk-ymm-static-filter .hdk-ymm-submit {
        grid-column: auto;
    }

    .hdk-ymm-static-filter .hdk-ymm-select,
    .hdk-ymm-static-filter select.hdk-ymm-select,
    .hdk-ymm-static-filter .hdk-ymm-submit {
        height: 51px !important;
        min-height: 51px !important;
        font-size: 16px !important;
    }
}

/* Dedicated results-page search panel. */
.hdk-ymm-results-filter-panel {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto 30px;
    padding: 24px 30px 28px;
    border: 1px solid #ff625f;
    border-radius: 10px;
    background: #fff7f7;
}

.hdk-ymm-results-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 16px;
}

.hdk-ymm-results-filter-heading h2 {
    margin: 0;
    color: #202020;
    font-size: clamp(18px, 1.65vw, 23px);
    font-weight: 600;
    line-height: 1.3;
}

.hdk-ymm-reset-link {
    flex: 0 0 auto;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hdk-ymm-reset-link:hover,
.hdk-ymm-reset-link:focus-visible {
    color: #d54c49;
}

/* The results panel already supplies the shell; prevent a double border. */
.hdk-ymm-results-filter-panel .hdk-ymm-static-filter {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.hdk-ymm-results-summary {
    margin: 0 0 20px;
    font-size: 14px;
}

.hdk-ymm-results .products {
    clear: both;
}

.hdk-ymm-results .woocommerce-pagination {
    margin-top: 28px;
}

.hdk-ymm-results-empty {
    padding: 18px 20px;
    border: 1px solid #e5e5e5;
    background: #fff;
}

@media (max-width: 1100px) {
    .hdk-ymm-results-filter-panel {
        max-width: calc(100% - 32px);
        padding: 24px;
    }

    .hdk-ymm-results-filter-panel .hdk-ymm-static-filter {
        max-width: none !important;
        padding: 0 !important;
    }
}

@media (max-width: 640px) {
    .hdk-ymm-results-filter-panel {
        max-width: calc(100% - 24px);
        margin-bottom: 24px;
        padding: 18px 16px;
        border-radius: 8px;
    }

    .hdk-ymm-results-filter-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        margin-bottom: 14px;
    }

    .hdk-ymm-results-filter-heading h2 {
        font-size: 19px;
    }

    .hdk-ymm-results-filter-panel .hdk-ymm-static-filter {
        max-width: none !important;
        padding: 0 !important;
    }
}

/* Results-page vertical compaction. */
@media (min-width: 1101px) {
    body.hdk-ymm-results-page .hdk-ymm-results {
        margin-top: -92px;
    }
}

@media (min-width: 641px) and (max-width: 1100px) {
    body.hdk-ymm-results-page .hdk-ymm-results {
        margin-top: -46px;
    }
}

@media (max-width: 640px) {
    body.hdk-ymm-results-page .hdk-ymm-results {
        margin-top: -20px;
    }
}

/*
 * Product cards intentionally use the active Brator/WooCommerce templates,
 * columns, and responsive CSS. The plugin styles only its filter, summary,
 * pagination spacing, and the dedicated results-page shell.
 */
