/* =============================================================
   HPL Search — Light theme, dark red + dark gray accents
   Scoped to .hpl-search-wrap with !important to override Kandence
   ============================================================= */

.hpl-search-wrap,
.hpl-search-wrap * {
    box-sizing: border-box !important;
}

.hpl-search-wrap {
    width: 100% !important;
    padding: 0 !important;
    font-family: inherit !important;
    color: #222 !important;
}

/* ── Search bar ───────────────────────────────────────────── */
.hpl-search-wrap .hpl-search-bar {
    display: flex !important;
    align-items: stretch !important;
    background: #fff !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}

.hpl-search-wrap .hpl-bar-keyword {
    display: flex !important;
    align-items: center !important;
    padding: 0 14px !important;
    flex: 1 !important;
    gap: 8px !important;
}

.hpl-search-wrap .hpl-bar-location {
    display: flex !important;
    align-items: center !important;
    padding: 0 14px !important;
    gap: 8px !important;
    border-left: 1px solid #e0e0e0 !important;
}

.hpl-search-wrap .hpl-bar-icon {
    width: 17px !important;
    height: 17px !important;
    color: #aaa !important;
    flex-shrink: 0 !important;
}

.hpl-search-wrap .hpl-bar-keyword input[type="text"],
.hpl-search-wrap .hpl-bar-location input[type="text"] {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #222 !important;
    font-size: 15px !important;
    padding: 14px 0 !important;
    width: 100% !important;
    min-width: 0 !important;
}

.hpl-search-wrap .hpl-bar-keyword input::placeholder,
.hpl-search-wrap .hpl-bar-location input::placeholder {
    color: #aaa !important;
}

.hpl-search-wrap .hpl-bar-location input[type="text"] {
    width: 100px !important;
}

.hpl-search-wrap .hpl-bar-location select {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    font-size: 13px !important;
    outline: none !important;
    cursor: pointer !important;
    padding: 4px 2px !important;
}

.hpl-search-wrap .hpl-search-submit {
    background: #8B1A1A !important;
    color: #fff !important;
    border: none !important;
    padding: 0 30px !important;
    min-height: 50px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    letter-spacing: 0.02em !important;
    transition: background 0.15s !important;
    flex-shrink: 0 !important;
}

.hpl-search-wrap .hpl-search-submit:hover {
    background: #a82020 !important;
}

.hpl-search-wrap .hpl-geo-error {
    color: #c0392b !important;
    font-size: 12px !important;
    margin: 4px 0 8px !important;
}

/* ── Layout ───────────────────────────────────────────────── */
.hpl-search-wrap .hpl-search-body {
    display: flex !important;
    gap: 22px !important;
    align-items: flex-start !important;
    margin-top: 20px !important;
}

/* ── Filter sidebar ───────────────────────────────────────── */
.hpl-search-wrap .hpl-filters {
    width: 240px !important;
    flex-shrink: 0 !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    position: sticky !important;
    top: 20px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
}

.hpl-search-wrap .hpl-filters-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 13px 16px !important;
    border-bottom: 1px solid #e8e8e8 !important;
    background: #fafafa !important;
}

.hpl-search-wrap .hpl-filters-label {
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #444 !important;
}

.hpl-search-wrap .hpl-clear-filters {
    background: none !important;
    border: none !important;
    color: #8B1A1A !important;
    font-size: 11px !important;
    cursor: pointer !important;
    padding: 0 !important;
    text-decoration: underline !important;
}

/* ── Accordion ────────────────────────────────────────────── */
.hpl-search-wrap .hpl-accordion-item {
    border-bottom: 1px solid #f0f0f0 !important;
}

.hpl-search-wrap .hpl-accordion-header {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background: transparent !important;
    border: none !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: background 0.12s !important;
}

.hpl-search-wrap .hpl-accordion-header:hover {
    background: #fafafa !important;
}

.hpl-search-wrap .hpl-accordion-open > .hpl-accordion-header {
    color: #8B1A1A !important;
}

.hpl-search-wrap .hpl-chevron {
    width: 15px !important;
    height: 15px !important;
    color: #bbb !important;
    transition: transform 0.2s !important;
    flex-shrink: 0 !important;
}

.hpl-search-wrap .hpl-accordion-open .hpl-chevron {
    transform: rotate(180deg) !important;
    color: #8B1A1A !important;
}

.hpl-search-wrap .hpl-accordion-body {
    display: none !important;
    padding: 2px 16px 14px !important;
}

.hpl-search-wrap .hpl-accordion-open .hpl-accordion-body {
    display: block !important;
}

/* ── Filter inputs ────────────────────────────────────────── */
.hpl-search-wrap .hpl-accordion-body select,
.hpl-search-wrap .hpl-accordion-body input[type="text"],
.hpl-search-wrap .hpl-accordion-body input[type="number"] {
    width: 100% !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    padding: 7px 10px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    outline: none !important;
}

.hpl-search-wrap .hpl-accordion-body select:focus,
.hpl-search-wrap .hpl-accordion-body input:focus {
    border-color: #8B1A1A !important;
}

.hpl-search-wrap .hpl-range-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.hpl-search-wrap .hpl-range-row input {
    flex: 1 !important;
}

.hpl-search-wrap .hpl-range-row span {
    color: #bbb !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
}

/* ── Apply button ─────────────────────────────────────────── */
.hpl-search-wrap .hpl-filter-actions {
    padding: 12px 16px !important;
    background: #fafafa !important;
    border-top: 1px solid #f0f0f0 !important;
}

.hpl-search-wrap .hpl-apply-btn {
    width: 100% !important;
    padding: 10px !important;
    background: #8B1A1A !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    letter-spacing: 0.02em !important;
    transition: background 0.15s !important;
}

.hpl-search-wrap .hpl-apply-btn:hover {
    background: #a82020 !important;
}

/* ── Results toolbar ──────────────────────────────────────── */
.hpl-search-wrap .hpl-results-area {
    flex: 1 !important;
    min-width: 0 !important;
}

.hpl-search-wrap .hpl-results-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    flex-wrap: wrap !important;
    padding: 10px 14px !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
}

.hpl-search-wrap .hpl-results-count {
    flex: 1 !important;
    font-size: 13px !important;
    color: #777 !important;
}

.hpl-search-wrap .hpl-sort-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: #555 !important;
}

.hpl-search-wrap .hpl-sort-wrap select {
    background: #fff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    outline: none !important;
}

.hpl-search-wrap .hpl-filter-toggle {
    display: none !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    cursor: pointer !important;
}

/* ── Results grid ─────────────────────────────────────────── */
.hpl-search-wrap .hpl-results-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    transition: opacity 0.2s !important;
}

.hpl-search-wrap .hpl-results-grid.hpl-loading {
    opacity: 0.4 !important;
    pointer-events: none !important;
}

.hpl-search-wrap .hpl-no-results {
    grid-column: 1 / -1 !important;
    padding: 60px 24px !important;
    text-align: center !important;
    color: #999 !important;
    font-size: 15px !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
}

/* ── Result card ──────────────────────────────────────────── */
.hpl-search-wrap .hpl-result-card {
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: #222 !important;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s !important;
}

.hpl-search-wrap .hpl-result-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
    border-color: #8B1A1A !important;
    transform: translateY(-2px) !important;
    color: #222 !important;
}

.hpl-search-wrap .hpl-result-card.hpl-card--sold {
    opacity: 0.7 !important;
}

.hpl-search-wrap .hpl-card-image {
    position: relative !important;
    aspect-ratio: 4 / 3 !important;
    background: #f5f5f5 !important;
    overflow: hidden !important;
}

.hpl-search-wrap .hpl-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.hpl-search-wrap .hpl-card-no-image {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ccc !important;
    font-size: 13px !important;
}

.hpl-search-wrap .hpl-card-sold-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background: #8B1A1A !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 3px !important;
    letter-spacing: 0.05em !important;
}

.hpl-search-wrap .hpl-card-dealer-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(34,34,34,0.75) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 3px !important;
}

.hpl-search-wrap .hpl-card-featured-badge {
    position: absolute !important;
    bottom: 8px !important;
    left: 8px !important;
    background: #b08700 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 3px !important;
    letter-spacing: 0.03em !important;
}

.hpl-search-wrap .hpl-result-card.hpl-card--featured {
    border-color: #b08700 !important;
    box-shadow: 0 0 0 1px #b08700 !important;
}

.hpl-search-wrap .hpl-card-body {
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
}

.hpl-search-wrap .hpl-card-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a7f37 !important;
}

.hpl-search-wrap .hpl-card-price--contact {
    font-size: 13px !important;
    color: #999 !important;
    font-style: italic !important;
    font-weight: 400 !important;
}

.hpl-search-wrap .hpl-card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #222 !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.hpl-search-wrap .hpl-card-vehicle {
    font-size: 12px !important;
    color: #777 !important;
    margin: 0 !important;
}

.hpl-search-wrap .hpl-card-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin-top: 4px !important;
    font-size: 11px !important;
    color: #999 !important;
}

.hpl-search-wrap .hpl-card-condition {
    background: #f0f7ff !important;
    color: #0073aa !important;
    padding: 1px 6px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
}

/* ── Pagination ───────────────────────────────────────────── */
.hpl-search-wrap .hpl-pagination {
    margin-top: 24px !important;
}

.hpl-search-wrap .hpl-pages {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.hpl-search-wrap .hpl-page-btn {
    padding: 7px 13px !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #555 !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.12s !important;
}

.hpl-search-wrap .hpl-page-btn:hover {
    background: #f5f5f5 !important;
    border-color: #8B1A1A !important;
    color: #8B1A1A !important;
}

.hpl-search-wrap .hpl-page-btn--active {
    background: #8B1A1A !important;
    color: #fff !important;
    border-color: #8B1A1A !important;
}

.hpl-search-wrap .hpl-page-ellipsis {
    padding: 7px 4px !important;
    color: #bbb !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
    .hpl-search-wrap .hpl-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .hpl-search-wrap .hpl-search-bar {
        flex-wrap: wrap !important;
    }
    .hpl-search-wrap .hpl-bar-location {
        border-left: none !important;
        border-top: 1px solid #e0e0e0 !important;
        flex: 1 !important;
    }
    .hpl-search-wrap .hpl-search-body {
        flex-direction: column !important;
    }
    .hpl-search-wrap .hpl-filters {
        width: 100% !important;
        position: static !important;
        display: none !important;
    }
    .hpl-search-wrap .hpl-filters.hpl-filters--open {
        display: block !important;
    }
    .hpl-search-wrap .hpl-filter-toggle {
        display: inline-block !important;
    }
}

@media (max-width: 480px) {
    .hpl-search-wrap .hpl-results-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Featured Shelf ──────────────────────────────────────────────────────── */

.hpl-search-wrap .hpl-featured-shelf {
    margin-bottom: 24px !important;
    background: #fffdf0 !important;
    border: 1px solid #e8d97a !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
}

.hpl-search-wrap .hpl-fs-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
}

.hpl-search-wrap .hpl-fs-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #7a5f00 !important;
    letter-spacing: 0.02em !important;
}

.hpl-search-wrap .hpl-fs-note {
    font-size: 11px !important;
    color: #aaa !important;
    font-style: italic !important;
}

.hpl-search-wrap .hpl-fs-scroll-wrap {
    position: relative !important;
}

.hpl-search-wrap .hpl-fs-track {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 4px !important;
}
.hpl-search-wrap .hpl-fs-track::-webkit-scrollbar { display: none !important; }

/* Cards inside the shelf snap and have a fixed width */
.hpl-search-wrap .hpl-fs-track .hpl-result-card {
    flex: 0 0 220px !important;
    min-width: 0 !important;
    scroll-snap-align: start !important;
    font-size: 13px !important;
}
.hpl-search-wrap .hpl-fs-track .hpl-card-image {
    height: 140px !important;
}
.hpl-search-wrap .hpl-fs-track .hpl-card-title {
    font-size: 13px !important;
    -webkit-line-clamp: 2 !important;
}

/* Scroll arrows */
.hpl-search-wrap .hpl-fs-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    background: #222 !important;
    border: 2px solid #222 !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.35) !important;
    transition: background .15s, border-color .15s !important;
    padding: 0 !important;
}
.hpl-search-wrap .hpl-fs-arrow:hover {
    background: #8B0000 !important;
    border-color: #8B0000 !important;
}
.hpl-search-wrap .hpl-fs-arrow svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #fff !important;
    display: block !important;
}
.hpl-search-wrap .hpl-fs-arrow--prev { left: -17px !important; }
.hpl-search-wrap .hpl-fs-arrow--next { right: -17px !important; }

@media (max-width: 600px) {
    .hpl-search-wrap .hpl-fs-track .hpl-result-card { flex: 0 0 180px !important; }
    .hpl-search-wrap .hpl-fs-arrow { display: none !important; }
}

/* ── Frosted-glass search bar (transparent="1") ──────────────── */

.hpl-search-wrap .hpl-search-bar--glass {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18) !important;
}

.hpl-search-wrap .hpl-search-bar--glass .hpl-bar-location {
    border-left-color: rgba(0, 0, 0, 0.1) !important;
}

.hpl-search-wrap .hpl-search-bar--glass .hpl-bar-keyword input,
.hpl-search-wrap .hpl-search-bar--glass .hpl-bar-location input,
.hpl-search-wrap .hpl-search-bar--glass .hpl-bar-location select {
    color: #111 !important;
}

.hpl-search-wrap .hpl-search-bar--glass .hpl-bar-keyword input::placeholder,
.hpl-search-wrap .hpl-search-bar--glass .hpl-bar-location input::placeholder {
    color: #777 !important;
}
