.dd-search {
    visibility: hidden !important;
    pointer-events: none !important;
}

.search-mega[hidden] {
    display: none !important;
}

.search-mega {
    --search-menu-top: 90px;
    position: fixed;
    z-index: 2000;
    top: var(--search-menu-top);
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--pb-site-width, 1450px), calc(100% - 32px));
    max-height: calc(100vh - var(--search-menu-top) - 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    color: #26352a;
    border: 1px solid #dce3d9;
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(22, 40, 27, .2);
    text-align: left;
}

.search-mega__heading {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px 16px;
    background: #fff;
    border-bottom: 1px solid #edf0ec;
}

.search-mega__eyebrow {
    color: #5c705e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.search-mega__heading h2 {
    margin: 5px 0 0;
    color: #203b28;
    font-size: 22px;
    line-height: 1.3;
}

.search-mega__close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f5f2;
    color: #506052;
    font-size: 29px;
    line-height: 32px;
    cursor: pointer;
}

.search-mega__close:hover,
.search-mega__close:focus-visible {
    background: #e7eee5;
    color: #173b23;
}

.search-mega__status {
    margin: 0;
    padding: 0 28px;
    color: #58665a;
    font-size: 14px;
}

.search-mega__status:not(:empty) {
    padding-top: 18px;
    padding-bottom: 6px;
}

.search-mega__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    padding: 22px 28px 26px;
}

.search-mega__grid:empty {
    display: none;
}

.search-mega__card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 278px;
    padding: 14px;
    border: 1px solid #d9dfd7;
    border-radius: 5px;
    color: #25332a;
    background: #fff;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.search-mega__card:hover,
.search-mega__card:focus-visible {
    border-color: #477a4e;
    box-shadow: 0 7px 20px rgba(24, 59, 32, .12);
    color: #203b28;
    transform: translateY(-2px);
}

.search-mega__image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 136px;
    margin-bottom: 14px;
    background: #f7f8f6;
}

.search-mega__image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.search-mega__badge {
    position: absolute;
    top: 21px;
    right: 21px;
    padding: 3px 7px;
    border-radius: 9px;
    background: #e7ede6;
    color: #38523b;
    font-size: 11px;
    font-weight: 700;
}

.search-mega__name {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.search-mega mark {
    padding: 0;
    background: #fff0a3;
    color: inherit;
}

.search-mega__details {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #5f665f;
    font-size: 13px;
    line-height: 1.4;
}

.search-mega__more {
    margin-top: auto;
    padding-top: 15px;
    color: #315d37;
    font-size: 13px;
    font-weight: 700;
}

.search-mega__footer {
    padding: 15px 28px 20px;
    border-top: 1px solid #edf0ec;
    text-align: right;
}

.search-mega__footer a {
    color: #24572e;
    font-weight: 700;
}

@media (max-width: 1199px) {
    .search-mega__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .search-mega { width: calc(100% - 24px); }
}

@media (max-width: 899px) {
    .search-mega__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 679px) {
    .search-mega {
        width: calc(100% - 24px);
        max-height: calc(100vh - var(--search-menu-top) - 8px);
    }
    .search-mega__heading { padding: 16px 18px 12px; }
    .search-mega__heading h2 { font-size: 18px; }
    .search-mega__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 16px 18px 20px;
    }
    .search-mega__card { min-height: 242px; padding: 10px; }
    .search-mega__image { height: 105px; }
    .search-mega__badge { top: 14px; right: 14px; }
    .search-mega__status { padding-left: 18px; padding-right: 18px; }
    .search-mega__footer { padding: 12px 18px 16px; }
}

@media (max-width: 380px) {
    .search-mega__grid { grid-template-columns: 1fr; }
    .search-mega__card { min-height: 0; }
}
