/* Search controls and category links, using the Butik palette and square edges. */
.atk-search-panel {
    padding: 20px;
    margin-bottom: 22px;
    border: 1px solid #e5e5e5;
    background: #fafafa;
}
.atk-search-panel .atk-search-label {
    display: block;
    margin: 0 0 10px;
    color: #222;
    font-size: 13px;
    font-weight: 700;
}
.atk-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto;
    gap: 12px;
    align-items: center;
}
.atk-search-keyword, .atk-search-select { min-width: 0; }
.atk-search-panel .form-control {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-size: 14px;
    box-shadow: none;
}
.atk-search-panel .form-control:focus {
    border-color: #f45145;
    outline: 2px solid rgba(244, 81, 69, .18);
    outline-offset: 1px;
}
.atk-search-panel .atk-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 46px;
    padding: 10px 22px;
    white-space: nowrap;
}
.atk-search-submit:focus {
    outline: 2px solid #222;
    outline-offset: 3px;
}
.atk-search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 12px;
}
.atk-search-options .atk-search-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    margin: 0;
    color: #555;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 400;
    cursor: pointer;
}
.atk-search-option input[type="checkbox"] {
    position: static;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #f45145;
}
.atk-search-option input:disabled + span { color: #888; }
.atk-search-categories { margin: 0 0 24px; }
.atk-search-categories h3 {
    margin: 0 0 10px;
    color: #222;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .35px;
}
.atk-search-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.atk-search-category-list li { max-width: 100%; }
.atk-search-category-list a.atk-search-category {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #f45145;
    background: #fff5f3;
    color: #222;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.atk-search-category .fa, .atk-search-arrow { color: #d93f34; }
.atk-search-arrow { margin-left: auto; padding-left: 10px; font-size: 18px; line-height: 1; }
.atk-search-category-list a.atk-search-category:hover,
.atk-search-category-list a.atk-search-category:focus {
    border-color: #222;
    background: #222;
    color: #fff;
}
.atk-search-category-list a.atk-search-category:focus { outline: 2px solid #f45145; outline-offset: 2px; }
.atk-search-category:hover .fa, .atk-search-category:focus .fa,
.atk-search-category:hover .atk-search-arrow, .atk-search-category:focus .atk-search-arrow { color: #fff; }

/* Both existing dropdown renderers use a direct <name> child for categories/brands. */
#autosearch_search_results li > a > name {
    position: relative;
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 34px 11px 12px;
    margin: 0;
    border: 1px solid #f45145;
    background: #fff5f3;
    color: #222;
    font-size: 13px;
    line-height: 20px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
    font-weight: 600;
}
#autosearch_search_results li > a > name:after {
    content: '\2192';
    position: absolute;
    right: 12px;
    top: 50%;
    margin-top: -10px;
    color: #d93f34;
    font-size: 18px;
}
#autosearch_search_results li > a:hover > name,
#autosearch_search_results li > a:focus > name {
    border-color: #222;
    background: #222;
    color: #fff;
}
#autosearch_search_results li > a:hover > name:after,
#autosearch_search_results li > a:focus > name:after { color: #fff; }

@media (max-width: 767px) {
    .atk-search-panel { padding: 14px; margin-bottom: 18px; }
    .atk-search-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
    .atk-search-select { grid-column: 1 / -1; grid-row: 2; }
    .atk-search-panel .form-control { font-size: 16px; }
    .atk-search-panel .atk-search-submit { padding: 10px 14px; }
    .atk-search-submit .fa { display: none; }
    .atk-search-options { gap: 4px 16px; margin-top: 10px; }
    .atk-search-options .atk-search-option { min-height: 34px; }
    .atk-search-category-list { display: grid; grid-template-columns: minmax(0, 1fr); }
}
