/* ===== Smart search: drop-down, menu-bar box and full-screen phone search ===== */

.ss-form { position: relative; }

/* ---------- search box in the menu bar (wide screens) ---------- */
.ss-nav {
    flex: 0 1 400px;
    margin: 0 18px 0 22px;
    min-width: 220px;
}
.ss-field {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    background: #fff;
    border: 2px solid #33373d;
    border-radius: 12px;
    overflow: hidden;
}
.ss-field:focus-within { box-shadow: 0 0 0 4px rgba(90, 96, 104, 0.18); }
.ss-field .ss-ico { padding: 0 4px 0 14px; color: #656b73; }
.ss-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 8px;
    font-size: 0.95rem;
    color: #1f2226;
    background: transparent;
}
.ss-field input::-webkit-search-cancel-button { display: none; }
.ss-clear, .ss-mic {
    border: 0;
    background: none;
    color: #656b73;
    height: 100%;
    padding: 0 10px;
    cursor: pointer;
}
.ss-clear { display: none; }
.ss-form.has-text .ss-clear { display: block; }
.ss-mic { border-left: 1px solid #d3d8dd; padding: 0 12px; }
.ss-mic.is-listening { color: #e30613; animation: ss-pulse 1s ease-in-out infinite; }
@keyframes ss-pulse { 50% { opacity: 0.4; } }
.ss-go {
    border: 0;
    height: 100%;
    padding: 0 16px;
    background: #33373d;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.ss-go:hover { background: #1f2226; }

/* round search button in the menu bar (phones, tablets) */
.hw-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid #b9bfc6;
    border-radius: 10px;
    background: transparent;
    color: #1f2226;
    font-size: 1.1rem;
    cursor: pointer;
}
.hw-search-btn:hover { background: #dde1e5; }
.hw-search-btn + .hw-basket-btn { margin-left: 8px; }
@media (min-width: 992px) {
    .hw-search-btn { order: 3; margin-left: 12px; }
    .hw-search-btn + .hw-basket-btn { margin-left: 8px; }
}
/* make room for the search box on smaller laptops */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .hw-phone-item { display: none !important; }
    .hw-navbar .nav-link { padding-left: 0.7rem !important; padding-right: 0.7rem !important; }
}

/* ---------- the drop-down ---------- */
.ss-drop {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1060;
    display: none;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d3d8dd;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(31, 34, 38, 0.22);
    text-align: left;
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}
.ss-drop.is-open { display: block; }
.ss-nav .ss-drop { min-width: 440px; }
.ss-sec { padding: 10px 0 6px; border-bottom: 1px solid #eceef0; }
.ss-sec:last-child { border-bottom: 0; }
.ss-h {
    padding: 0 16px 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9aa1a9;
}
.ss-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 16px 8px; }
.ss-chip {
    border: 1px solid #d3d8dd;
    background: #f7f8f9;
    color: #1f2226;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.ss-chip:hover { border-color: #e30613; }
.ss-chip.is-recent::before { content: "\21BA  "; color: #9aa1a9; }
.ss-note {
    margin: 10px 16px 2px;
    padding: 8px 12px;
    background: #f1f3f5;
    border-left: 3px solid #e30613;
    border-radius: 6px;
    font-size: 0.83rem;
    color: #3a3e44;
}
.ss-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: #1f2226;
    text-decoration: none;
}
.ss-row:hover, .ss-row.is-active { background: #f1f3f5; color: #1f2226; }
.ss-ci {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #33373d;
    color: #fff;
    font-size: 0.85rem;
}
.ss-cn { font-size: 0.92rem; font-weight: 600; }
.ss-cat small { margin-left: auto; color: #656b73; font-size: 0.78rem; white-space: nowrap; }
.ss-pi {
    flex: none;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 9px;
    border: 1px solid #d3d8dd;
    background: #f6f7f8 center / contain no-repeat;
    color: #9aa1a9;
}
.ss-pt { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.ss-pt:hover { color: inherit; }
.ss-pn { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.ss-pc { font-size: 0.76rem; color: #656b73; }
.ss-pn mark { background: #ffe3e5; color: inherit; padding: 0 1px; border-radius: 3px; }
.ss-add {
    flex: none;
    border: 1.5px solid #e30613;
    background: #fff;
    color: #e30613;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.ss-add:hover { background: #e30613; color: #fff; }
.ss-add.is-added { background: #33373d; border-color: #33373d; color: #fff; }
.ss-all {
    display: block;
    padding: 12px 16px;
    background: #f7f8f9;
    color: #1f2226;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}
.ss-all:hover { background: #eceef0; color: #1f2226; }
.ss-all b { color: #e30613; }
.ss-ask { padding: 22px 18px; text-align: center; }
.ss-ask > i { font-size: 1.8rem; color: #9aa1a9; }
.ss-ask h4 { margin: 8px 0 4px; font-size: 1rem; font-weight: 700; color: #1f2226; }
.ss-ask p { margin: 0 auto 14px; max-width: 34ch; color: #656b73; font-size: 0.86rem; line-height: 1.5; }
.ss-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    background: #1fa855;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.ss-wa:hover { background: #178a45; color: #fff; }
.ss-alt { margin-top: 12px; font-size: 0.84rem; color: #656b73; }
.ss-alt button { border: 0; background: none; padding: 0 4px; color: #1f2226; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- full-screen search (phones, tablets) ---------- */
html.ss-lock, html.ss-lock body { overflow: hidden !important; }
.ss-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: none;
    flex-direction: column;
    background: #fff;
}
.ss-overlay.is-open { display: flex; }
.ss-overlay-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px 10px 6px;
    border-bottom: 1px solid #d3d8dd;
}
.ss-back { border: 0; background: none; font-size: 1.4rem; padding: 4px 8px; color: #1f2226; cursor: pointer; }
.ss-overlay .ss-field { border-width: 1.5px; height: 46px; }
.ss-overlay .ss-field input { font-size: 16px; } /* 16px stops iPhones zooming in */
.ss-drop.ss-drop-inline {
    position: static;
    display: block;
    flex: 1;
    min-height: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.ss-drop-inline .ss-row { padding-top: 10px; padding-bottom: 10px; }

/* ---------- full results page ---------- */
.ss-page-note {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.85rem;
}
.empty-state .ss-alt a { margin: 0 4px; color: #1f2226; font-weight: 700; }
.ss-ask-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 22px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #d3d8dd;
    border-left: 5px solid #1fa855;
    border-radius: 14px;
    color: #3a3e44;
    line-height: 1.5;
}
.ss-ask-banner strong { color: #1f2226; }
.ss-ask-banner small { display: block; margin-top: 4px; color: #656b73; }

/* ---------- fit fixes ---------- */
/* an older phone rule stretches every submit button in .search-container to full width */
.search-container .ss-field button.ss-go[type="submit"],
.ss-field button.ss-go[type="submit"] { width: auto !important; flex: none; }

/* keep menu words on one line */
.hw-navbar .nav-link,
.hw-quote-btn { white-space: nowrap; }

/* smaller laptops: narrower search box so the menu fits */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .ss-nav { flex-basis: 300px; min-width: 200px; margin: 0 10px 0 16px; }
    .ss-nav .ss-go { padding: 0 12px; }
    .hw-navbar .nav-link { padding-left: 0.55rem !important; padding-right: 0.55rem !important; }
    .hw-quote-btn { padding-left: 12px !important; padding-right: 12px !important; }
    .hw-brand-copy strong { font-size: 1.15rem; }
}

/* phones: logo, search, basket and menu button on one row */
@media (max-width: 479.98px) {
    .hw-brand { gap: 8px; margin-right: 0 !important; }
    .hw-brand-logo { width: 40px; height: 40px; }
    .hw-brand-copy strong { font-size: 0.92rem; letter-spacing: 0.02em; }
    .hw-search-btn, .hw-basket-btn { width: 40px; height: 40px; }
    .hw-search-btn + .hw-basket-btn { margin-left: 6px; }
    .hw-navbar-toggler { padding: 0.3rem 0.5rem !important; margin-left: 6px; }
}
@media (max-width: 359.98px) {
    .hw-brand-copy strong { font-size: 0.88rem; }
}
