/* COMTRANS quick search. Brandbook colors only. */
.af-main-header { overflow: visible; }

.af-quick-search {
    position: absolute;
    left: 28px;
    right: 28px;
    top: calc(100% + 2px);
    z-index: 1200;
    max-width: 1864px;
    margin: 0 auto;
    font-family: 'Montserrat', Arial, sans-serif;
}

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

.af-quick-search__panel {
    overflow: hidden;
    width: 100%;
    border: 1px solid rgba(144, 144, 145, .22);
    border-radius: 12px;
    background: #fefefe;
    box-shadow: 0 20px 55px rgba(38, 37, 35, .18);
}

.af-quick-search__head {
    min-height: 58px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(144, 144, 145, .26);
    color: #262523;
}
.af-quick-search__head strong { font-size: 16px; font-weight: 700; }
.af-quick-search__head span { color: #909091; font-size: 13px; }

.af-quick-search__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
}
.af-quick-search__body--single { grid-template-columns: minmax(0, 1fr); }

.af-quick-search__products { min-width: 0; padding: 0 18px; }

.af-quick-search__product {
    min-height: 88px;
    display: grid;
    grid-template-columns: 76px minmax(260px, 1fr) 125px 120px 130px;
    align-items: center;
    gap: 16px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(144, 144, 145, .24);
    color: #262523;
    text-decoration: none !important;
    transition: background .15s ease;
}
.af-quick-search__product:last-child { border-bottom: 0; }
.af-quick-search__product:hover,
.af-quick-search__product:focus { background: rgba(150, 175, 215, .13); outline: none; }

.af-quick-search__product-image {
    width: 72px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.af-quick-search__product-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto;
    object-fit: contain;
}

.af-quick-search__product-main { min-width: 0; display: block; }
.af-quick-search__product-name {
    display: block;
    color: #262523;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}
.af-quick-search__product-meta {
    margin-top: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: #515151;
    font-size: 11px;
}
.af-quick-search__product-meta span + span::before {
    content: '•';
    margin-right: 10px;
    color: #96afd7;
}
.af-quick-search__product-article { color: #909091; font-size: 11px; }

.af-quick-search__availability {
    justify-self: start;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
}
.af-quick-search__availability.is-available { background: rgba(150, 175, 215, .20); color: #14326e; }
.af-quick-search__availability.is-unavailable { background: rgba(144, 144, 145, .14); color: #515151; }

.af-quick-search__price {
    justify-self: end;
    color: #14326e;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.af-quick-search__categories {
    padding: 18px 22px;
    border-left: 1px solid rgba(144, 144, 145, .25);
}
.af-quick-search__categories-title {
    margin-bottom: 14px;
    color: #262523;
    font-size: 15px;
    font-weight: 700;
}
.af-quick-search__categories-list { display: grid; gap: 12px; }
.af-quick-search__categories-list a {
    color: #14326e;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
    text-decoration: none;
}
.af-quick-search__categories-list a:hover { text-decoration: underline; }

.af-quick-search__all {
    min-height: 50px;
    margin: 0 18px 16px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 7px;
    background: #14326e;
    color: #fefefe !important;
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background .15s ease;
}
.af-quick-search__all:hover,
.af-quick-search__all:focus { background: #47639a; outline: none; }

.af-quick-search__state {
    min-height: 120px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #515151;
    text-align: center;
}
.af-quick-search__state--empty i { color: #96afd7; font-size: 24px; }
.af-quick-search__state--empty strong,
.af-quick-search__state--empty span { display: block; }
.af-quick-search__state--empty strong { color: #262523; }
.af-quick-search__state--empty span { margin-top: 5px; color: #909091; font-size: 12px; }

.af-quick-search__loading {
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 12px;
    background: #fefefe;
    box-shadow: 0 20px 55px rgba(38, 37, 35, .18);
    color: #515151;
}
.af-quick-search__spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(150, 175, 215, .55);
    border-top-color: #14326e;
    border-radius: 50%;
    animation: afQuickSearchSpin .7s linear infinite;
}
@keyframes afQuickSearchSpin { to { transform: rotate(360deg); } }

@media (max-width: 1500px) {
    .af-quick-search { left: 20px; right: 20px; }
    .af-quick-search__product { grid-template-columns: 68px minmax(220px, 1fr) 110px 112px 115px; gap: 12px; }
    .af-quick-search__body { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 1100px) {
    .af-quick-search__product { grid-template-columns: 64px minmax(180px, 1fr) 105px 110px; }
    .af-quick-search__product-article { display: none; }
    .af-quick-search__body { grid-template-columns: minmax(0, 1fr) 230px; }
    .af-quick-search {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 200px;
        max-width: none;
        max-height: calc(100vh - 200px);
        overflow: auto;
    }
}

@media (max-width: 767px) {
    .af-quick-search {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 180px;
        max-width: none;
        max-height: calc(100vh - 180px);
        overflow: auto;
    }
    .af-quick-search__panel { border-radius: 10px; }
    .af-quick-search__head { min-height: 50px; padding: 0 14px; }
    .af-quick-search__head strong { font-size: 14px; }
    .af-quick-search__head span { font-size: 11px; }
    .af-quick-search__body { display: block; }
    .af-quick-search__products { padding: 0 10px; }
    .af-quick-search__product {
        min-height: 86px;
        grid-template-columns: 62px minmax(0, 1fr) auto;
        grid-template-areas:
            'image main price'
            'image availability price';
        gap: 5px 10px;
        padding: 10px 2px;
    }
    .af-quick-search__product-image { grid-area: image; width: 58px; height: 58px; }
    .af-quick-search__product-main { grid-area: main; }
    .af-quick-search__product-name { font-size: 11px; }
    .af-quick-search__product-meta { margin-top: 4px; font-size: 9px; gap: 4px 7px; }
    .af-quick-search__product-article { display: none; }
    .af-quick-search__availability { grid-area: availability; padding: 3px 7px; font-size: 9px; }
    .af-quick-search__price { grid-area: price; align-self: center; font-size: 12px; }
    .af-quick-search__categories { padding: 14px; border-left: 0; border-top: 1px solid rgba(144,144,145,.25); }
    .af-quick-search__categories-list {
        gap: 6px;
        max-height: 84px;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 4px;
        scrollbar-width: thin;
    }
    .af-quick-search__categories-list a {
        min-height: 24px;
        font-size: 11px;
        line-height: 1.25;
    }
    .af-quick-search__categories-list::-webkit-scrollbar { width: 4px; }
    .af-quick-search__categories-list::-webkit-scrollbar-thumb {
        background: #96afd7;
        border-radius: 10px;
    }
    .af-quick-search__all { min-height: 44px; margin: 0 10px 10px; font-size: 10px; }
}
.af-quick-search__categories-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.af-quick-search__categories-list small { color: #909091; font-size: 10px; font-weight: 600; }

/* Mobile-only tabs for quick search */
.af-quick-search__mobile-tabs { display: none; }

@media (max-width: 767px) {
    .af-quick-search__mobile-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 8px 10px 0;
        background: #fefefe;
    }

    .af-quick-search__mobile-tab {
        min-height: 40px;
        padding: 7px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid rgba(144, 144, 145, .28);
        border-radius: 7px 7px 0 0;
        background: rgba(150, 175, 215, .10);
        color: #515151;
        font: inherit;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
    }

    .af-quick-search__mobile-tab small {
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(144, 144, 145, .16);
        color: #515151;
        font-size: 9px;
        line-height: 20px;
    }

    .af-quick-search__mobile-tab.is-active {
        border-color: #14326e;
        background: #14326e;
        color: #fefefe;
    }

    .af-quick-search__mobile-tab.is-active small {
        background: #fefefe;
        color: #14326e;
    }

    .af-quick-search__body[data-active-tab="products"] .af-quick-search__categories {
        display: none;
    }

    .af-quick-search__body[data-active-tab="categories"] .af-quick-search__products {
        display: none;
    }

    .af-quick-search__body[data-active-tab="categories"] .af-quick-search__categories {
        display: block;
        padding: 8px 14px 14px;
        border-top: 0;
    }

    .af-quick-search__body[data-active-tab="categories"] .af-quick-search__categories-title {
        display: none;
    }

    .af-quick-search__body[data-active-tab="categories"] .af-quick-search__categories-list {
        max-height: calc(100vh - 360px);
        min-height: 0;
        overflow-y: auto;
    }
}
