/* VeryFleet Live Search - adapted from the CS-Cart bd_live_search visual language. */
.vf-ls {
    --vf-ls-accent: #008fd3;
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    height: 100vh;
    overflow: hidden;
    color: #171717;
    background: rgba(0, 0, 0, .08);
    font-family: inherit;
}

.vf-ls.is-open { display: block; }
body.vf-ls-is-open { overflow: hidden !important; }
.vf-ls[aria-hidden="true"] { visibility: hidden; }
.vf-ls[aria-hidden="false"] { visibility: visible; }
.vf-ls *, .vf-ls *::before, .vf-ls *::after { box-sizing: border-box; }

.vf-ls__shell {
    width: 100%;
    height: clamp(650px, 78vh, 820px);
    max-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.vf-ls__header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(86px, 110px) minmax(0, 1fr) 48px;
    align-items: start;
    gap: 18px;
    min-height: 86px;
    padding: 10px 38px 8px;
    background: rgba(255, 255, 255, .985);
}

.vf-ls__brand {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 52px;
    color: inherit;
    text-decoration: none;
}

.vf-ls__brand img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
}

.vf-ls__search-wrap { min-width: 0; }

.vf-ls__search {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 42px;
    align-items: center;
    min-width: 0;
}

.vf-ls__search-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #111;
    stroke-linecap: round;
    stroke-width: 2;
}

.vf-ls__input {
    width: 100%;
    height: 50px;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    outline: 0 !important;
    color: #171717 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 17px;
    line-height: 50px;
}

.vf-ls__input::-webkit-search-cancel-button { display: none; }

.vf-ls__line {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--vf-ls-accent);
}

.vf-ls__clear-query,
.vf-ls__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    color: #777;
    background: transparent;
    cursor: pointer;
}

.vf-ls__clear-query {
    width: 38px;
    height: 38px;
}

.vf-ls__clear-query[hidden] { display: none; }
.vf-ls__clear-query:hover, .vf-ls__clear-query:focus-visible { color: var(--vf-ls-accent); }
.vf-ls__clear-query svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }

.vf-ls__close {
    width: 44px;
    height: 44px;
    margin-top: 2px;
}

.vf-ls__close:hover, .vf-ls__close:focus-visible { color: #111; }
.vf-ls__close svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2.3; }

.vf-ls__code-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0 0 28px;
    color: #555;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}

.vf-ls__code-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vf-ls__code-toggle-ui {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 19px;
    border: 1px solid #b6b6b6;
    border-radius: 999px;
    background: #f0f0f0;
    transition: .15s ease;
}

.vf-ls__code-toggle-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #777;
    transition: transform .15s ease, background .15s ease;
}

.vf-ls__code-toggle input:checked + .vf-ls__code-toggle-ui {
    border-color: var(--vf-ls-accent);
    background: #eef9fe;
}

.vf-ls__code-toggle input:checked + .vf-ls__code-toggle-ui::after {
    background: var(--vf-ls-accent);
    transform: translateX(15px);
}

.vf-ls__body {
    position: relative;
    width: 100%;
    max-width: 1440px;
    min-height: calc(100% - 86px);
    margin: 0 auto;
    padding: 10px 48px 28px;
}

.vf-ls__section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.vf-ls__section-heading h2 {
    margin: 0;
    color: #111;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.vf-ls__section-heading--history { justify-content: flex-start; }
.vf-ls__history { padding: 4px 112px 16px; }
.vf-ls__popular-searches { padding: 0 112px 16px; }

.vf-ls__history-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.vf-ls__history-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 5px 10px 5px 14px;
    border: 1px solid #a8a8a8;
    border-radius: 999px;
    color: #555;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.vf-ls__history-chip:hover,
.vf-ls__history-chip:focus-within {
    border-color: var(--vf-ls-accent);
    color: #111;
    background: #f8fcff;
}

.vf-ls__history-chip-text,
.vf-ls__history-chip-remove {
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.vf-ls__history-chip-text {
    overflow: hidden;
    max-width: 210px;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vf-ls__history-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #777;
    font-size: 20px;
    line-height: 1;
}

.vf-ls__popular-chip { padding-right: 14px; }
.vf-ls__popular-chip::before { content: "↗"; color: var(--vf-ls-accent); font-size: 12px; }

.vf-ls__clear-history {
    padding: 4px 2px;
    border: 0;
    color: var(--vf-ls-accent);
    background: transparent;
    font-size: 14px;
    cursor: pointer;
}

.vf-ls__clear-history:hover { text-decoration: underline; }

.vf-ls__discovery-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    color: #777;
    text-align: center;
}

.vf-ls__discovery-hint svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #aaa;
    stroke-linecap: round;
    stroke-width: 2;
}

.vf-ls__discovery-hint p { margin: 0; }

.vf-ls__results { padding-top: 6px; }

.vf-ls__results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    color: #333;
    font-size: 14px;
}

.vf-ls__results-heading p { margin: 0; font-size: 15px; }

.vf-ls__sorting {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
}

.vf-ls__sorting select {
    min-width: 180px;
    height: 38px;
    margin: 0;
    padding: 0 34px 0 12px;
    border: 1px solid #c9c9c9;
    border-radius: 3px;
    color: #222;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.vf-ls__sorting select:focus {
    border-color: var(--vf-ls-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 143, 211, .12);
}

.vf-ls__results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.vf-ls-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid #d4d4d4;
    border-radius: 3px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.vf-ls-card:hover {
    border-color: #aaa;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .07);
    transform: translateY(-1px);
}

.vf-ls-card__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 220px;
    padding: 18px;
    background: #fff;
}

.vf-ls-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.vf-ls-card__content {
    min-height: 126px;
    padding: 16px 16px 18px;
}

.vf-ls-card__title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0 0 12px;
    color: #161616;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.vf-ls-card__title a { color: inherit; text-decoration: none; }
.vf-ls-card__title a:hover { color: var(--vf-ls-accent); }

.vf-ls-card__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.vf-ls-card__code {
    overflow: hidden;
    margin: 0;
    color: #666;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vf-ls-card__code strong { color: var(--vf-ls-accent); }

.vf-ls-card__price {
    flex: 0 0 auto;
    margin-left: auto;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    text-align: right;
}

.vf-ls__load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 30px 0 6px;
}

.vf-ls__load-more-wrap[hidden] { display: none; }

.vf-ls__load-more {
    min-width: 190px;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid var(--vf-ls-accent);
    border-radius: 4px;
    color: #fff;
    background: var(--vf-ls-accent);
    font-weight: 700;
    cursor: pointer;
}

.vf-ls__load-more:hover { filter: brightness(.9); }

.vf-ls__empty-message {
    grid-column: 1 / -1;
    margin: 0;
    padding: 60px 20px;
    color: #666;
    text-align: center;
}

.vf-ls__loading {
    position: fixed;
    top: 92px;
    right: 42px;
    z-index: 8;
}

.vf-ls__loading:not([hidden]) { display: flex; }

.vf-ls__spinner {
    display: block;
    width: 24px;
    height: 24px;
    border: 3px solid #d8edf7;
    border-top-color: var(--vf-ls-accent);
    border-radius: 50%;
    animation: vf-ls-spin .7s linear infinite;
}

.vf-ls__sr-only {
    position: absolute !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    margin: -1px !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

@keyframes vf-ls-spin { to { transform: rotate(360deg); } }

@media (max-width: 1199px) {
    .vf-ls__results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vf-ls__history, .vf-ls__popular-searches { padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 899px) {
    .vf-ls__header { grid-template-columns: 72px minmax(0, 1fr) 42px; gap: 10px; padding: 10px 18px 8px; }
    .vf-ls__body { padding-right: 22px; padding-left: 22px; }
    .vf-ls__results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
    .vf-ls__shell { height: 84vh; }
    .vf-ls__header { grid-template-columns: minmax(0, 1fr) 42px; min-height: 82px; padding: 8px 12px; }
    .vf-ls__brand { display: none; }
    .vf-ls__input { height: 46px; font-size: 16px; line-height: 46px; }
    .vf-ls__code-toggle { margin-left: 28px; font-size: 12px; }
    .vf-ls__body { min-height: calc(100% - 82px); padding: 6px 12px 34px; }
    .vf-ls__history { padding: 8px 0 18px; }
    .vf-ls__popular-searches { padding: 0 0 18px; }
    .vf-ls__section-heading h2 { font-size: 18px; }
    .vf-ls__results-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 16px; }
    .vf-ls__sorting { justify-content: space-between; width: 100%; }
    .vf-ls__sorting select { min-width: 0; max-width: 68%; }
    .vf-ls__results-grid { gap: 9px; }
    .vf-ls-card__image-link { height: 160px; padding: 10px; }
    .vf-ls-card__content { min-height: 112px; padding: 11px 10px 14px; }
    .vf-ls-card__title { min-height: 40px; margin-bottom: 10px; font-size: 13px; line-height: 1.4; }
    .vf-ls-card__meta { align-items: flex-start; flex-direction: column; gap: 5px; }
    .vf-ls-card__price { margin-left: 0; font-size: 15px; text-align: left; }
    .vf-ls-card__code { max-width: 100%; font-size: 11px; }
    .vf-ls__loading { top: 86px; right: 18px; }
}


/* v1.4 - discovery: 6 auctions ending soon */
.vf-ls__ending-soon {
    padding: 8px 0 26px;
}

.vf-ls__section-note {
    color: #777;
    font-size: 13px;
    font-weight: 400;
}

.vf-ls__ending-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.vf-ls-ending-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid #dedede;
    border-radius: 3px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.vf-ls-ending-card:hover {
    border-color: #aaa;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
}

.vf-ls-ending-card__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 138px;
    padding: 10px;
    background: #fff;
}

.vf-ls-ending-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vf-ls-ending-card__content {
    padding: 10px 11px 12px;
}

.vf-ls-ending-card__title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 38px;
    margin: 0 0 10px;
    color: #171717;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.vf-ls-ending-card__title a {
    color: inherit;
    text-decoration: none;
}

.vf-ls-ending-card__title a:hover {
    color: var(--vf-ls-accent);
}

.vf-ls-ending-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vf-ls-ending-card__countdown {
    color: #666;
    font-size: 11px;
    white-space: nowrap;
}

.vf-ls-ending-card__countdown::before {
    content: "⏱ ";
    color: var(--vf-ls-accent);
}

.vf-ls-ending-card__price {
    overflow: hidden;
    color: #111;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .vf-ls__ending-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
    .vf-ls__ending-soon { padding: 6px 0 22px; }
    .vf-ls__section-note { display: none; }
    .vf-ls__ending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .vf-ls-ending-card__image-link { height: 122px; padding: 8px; }
    .vf-ls-ending-card__content { padding: 8px 9px 10px; }
    .vf-ls-ending-card__title { min-height: 36px; font-size: 12px; }
    .vf-ls-ending-card__footer { align-items: flex-start; flex-direction: column; gap: 3px; }
    .vf-ls-ending-card__price { font-size: 13px; }
}
