/* ==== jb-global.css =========================================================
   Shipped site-wide CSS (docs/conventions.md#the-shared-files). Output on every page,
   checkout included, by the global head after the theme stylesheet: tier 1.
   One section per feature, each starting with a header like this one (feature, markup
   location, date shipped). Shared colours/sizes go in :root custom properties (--jb-...)
   at the top once a second feature needs them. Keep the file under ~30 KB; a feature
   bigger than ~150 lines gets its own resource pair.
   =========================================================================== */

/* ==== Header search ==========================================================
   Markup: properties/readytheme_contentsection/__KJ_header_search.mvt (.jb-search); the panel is built by
   js/header-search.js. Replaces the SearchSpring v3 autocomplete (SEC-8); layout and breakpoints follow v3's
   behvgi.css, type is 2px larger, and there are no facets (2026-11-05).
   Shipped 2026-11-05 (gated from 2026-11-04). Docs: docs/header-search.md.
   Here rather than in its own resource: a stylesheet linked from the header's content section would sit in
   <body> and hold up rendering below the header on a first visit.
   1099px is v3's breakpoint, kept on purpose: the two-column panel is 880px wide.
   =========================================================================== */
/* While the panel is open the JS puts .jb-search-raised on the header (the theme's .main-header, a stacking
   context at z-index 2): above page content such as Swiper's pagination (10), below the mega menus (19-20),
   mini-basket, lightboxes, modals, toast and chat (999 and up). */
.jb-search-raised.main-header { position: relative; z-index: 18; }
.jb-search { position: relative; }
.jb-search .jb-search-field { position: static; font-size: 16px; font-weight: 100; }
.jb-search .jb-search-input { width: 98%; height: 40px; }
.jb-search .jb-search-input:focus { border-color: #2f84ed; }
/* The theme's .button draws a 1px grey border round the green button. */
.jb-search .jb-search-button, .jb-search .jb-search-button:hover {
    display: flex; justify-content: center; align-items: center; height: 40px; font-size: 20px; border-color: transparent;
}
.jb-search .jb-search-button:focus-visible { outline: 2px solid #2f84ed; outline-offset: 2px; }

.jb-search .jb-search-panel {
    position: absolute; z-index: 999999; top: 100%; left: calc(10px + var(--jb-search-shift, 0px)); overflow: hidden;
    width: 880px; margin-top: 7px; font-size: 14px; font-weight: 400; line-height: 1.45; text-align: left;
    background: #f1f6f7; border: 1px solid #dde4ea; border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.jb-search .jb-search-panel[hidden] { display: none; }
.jb-search-panel *, .jb-search-panel *::before { box-sizing: border-box; }
.jb-search-panel ul, .jb-search-panel li { margin: 0; padding: 0; list-style: none; }
.jb-search-panel p { margin: 0; padding: 0; }
.jb-search-panel a { color: #333333; text-decoration: none; }

/* The saved vehicle: hard to miss (cf. CTGY's "Currently shopping for a ..."), with an obvious way out. */
.jb-search-vehicle {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px;
    background: #eafaf1; border-left: 5px solid #2ecc71; border-bottom: 1px solid #cdeedb;
}
.jb-search-panel .jb-search-vehicle-text { flex: 1 1 auto; min-width: 0; color: #2a527a; font-size: 18px; line-height: 1.3; }
.jb-search-vehicle-text strong {
    font-weight: 700; white-space: nowrap; text-decoration: underline; text-decoration-color: #2ecc71;
    text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.jb-search-vehicle ul { flex: none; }
.jb-search-panel .jb-search-vehicle-remove {
    display: inline-flex; align-items: center; gap: 6px; min-height: 34px; margin: 0; padding: 4px 14px 4px 10px;
    color: #2a527a; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-transform: none;
    white-space: nowrap; background: #ffffff; border: 1px solid #9fdcb9; border-radius: 17px; box-shadow: none;
    cursor: pointer;
}
.jb-search-vehicle-x { font-size: 22px; font-weight: 400; line-height: 1; }

.jb-search-body { display: flex; }
.jb-search-terms { flex: 0 0 170px; }
.jb-search-panel .jb-search-term { display: block; padding: 10px 16px 10px 20px; font-size: 18px; line-height: 1.3; }
.jb-search-term em { font-style: normal; font-weight: bold; }
.jb-search-panel .jb-search-term.is-active { color: #24364A; background: #ffffff; }

.jb-search-results { flex: 1 1 auto; min-width: 0; padding: 20px; background: #ffffff; }
.jb-search-panel .jb-search-heading { margin-bottom: 12px; color: #24364A; font-size: 20px; line-height: 1.3; }
.jb-search-heading strong { color: #2a527a; }
.jb-search-panel .jb-search-empty { margin-bottom: 12px; font-size: 16px; }
.jb-search-results ul { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.jb-search-results li { width: 25%; margin-bottom: 24px; padding: 0 6px; }
.jb-search-panel .jb-search-product { display: block; }
.jb-search-image { display: flex; align-items: center; justify-content: center; height: 120px; margin-bottom: 10px; }
.jb-search-image img { width: auto; height: auto; max-width: 100%; max-height: 120px; border: 0; }
.jb-search-name, .jb-search-code, .jb-search-price { display: block; margin-bottom: 8px; }
.jb-search-name {
    display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.jb-search-code { color: #555555; }
.jb-search-code b { color: #333333; }
.jb-search-price { margin-bottom: 0; font-size: 15px; }
.jb-search-now { color: #000000; font-weight: bold; }
.jb-search-retail { padding-right: 5px; color: #999999; }
.jb-search-panel .jb-search-all { display: inline-block; color: #2a527a; font-size: 16px; font-weight: bold; }

@media (hover: hover) {
    .jb-search-panel a:hover, .jb-search-panel .jb-search-product:hover .jb-search-name { text-decoration: underline; }
    .jb-search-panel .jb-search-product:hover { text-decoration: none; }
    .jb-search-panel .jb-search-vehicle-remove:hover { color: #ffffff; background: #2ecc71; border-color: #2ecc71; }
}
.jb-search-panel .is-highlighted { text-decoration: underline; outline: 2px solid #2f84ed; outline-offset: -2px; }

@media (max-width: 1099px) {
    .jb-search .jb-search-panel { width: 732px; }
    .jb-search-body { flex-direction: column; }
    .jb-search-terms { flex-basis: auto; }
    .jb-search-terms ul { display: flex; }
    .jb-search-terms li { flex: 1 1 auto; text-align: center; }
    .jb-search-panel .jb-search-term { padding: 10px 14px; }
    .jb-search-image { height: 100px; }
    .jb-search-image img { max-height: 100px; }
}

@media (max-width: 767px) {
    .jb-search .jb-search-panel { right: 0; left: 0; width: auto; }
    .jb-search-panel .jb-search-term { padding: 6px 10px; font-size: 16px; }
    .jb-search-results { padding: 12px 10px; }
    .jb-search-panel .jb-search-heading { font-size: 16px; }
    .jb-search-panel .jb-search-vehicle-text { font-size: 16px; }
}

@media (max-width: 480px) {
    .jb-search-vehicle { gap: 8px; padding: 8px 8px 8px 10px; }
    .jb-search-panel .jb-search-vehicle-text { font-size: 15px; }
    .jb-search-panel .jb-search-vehicle-remove { min-height: 32px; padding: 3px 10px 3px 8px; font-size: 14px; }
    .jb-search-terms { padding: 8px; border-bottom: 1px solid #e8edf7; }
    .jb-search-terms ul { flex-wrap: wrap; margin: 0 -4px -4px; }
    .jb-search-terms li { flex: 0 0 33.33%; text-align: left; }
    .jb-search-panel .jb-search-term { padding: 0 4px 6px; font-size: 14px; }
    .jb-search-panel .jb-search-term.is-active { background: none; }
    .jb-search-results { padding: 8px; }
    .jb-search-panel .jb-search-heading { display: none; }
    .jb-search-results ul { margin: 0 -4px; }
    .jb-search-results li { width: 50%; margin-bottom: 10px; padding: 0 4px; }
    .jb-search-name, .jb-search-code { margin-bottom: 4px; }
}
