/**
 * KL Search — Styles
 * Search results page layout + live search dropdown
 */

/* ═══════════════════════════════
   Search Results Page
   ═══════════════════════════════ */

.kl-search-results-page {
    padding: 24px 0 48px;
}

.kl-search-header {
    text-align: center;
    margin-bottom: 24px;
}

.kl-search-title {
    font-size: 22px;
    font-weight: 700;
    color: #0a0a0a;
    font-family: 'Outfit', sans-serif;
    line-height: 1.3;
}

.kl-search-count {
    font-size: 15px;
    font-weight: 400;
    color: #6c757d;
}

/* Empty state */
.kl-search-empty {
    text-align: center;
    padding: 64px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

.kl-search-empty-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.kl-search-empty h2 {
    font-size: 20px;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
}

.kl-search-empty p {
    color: #6c757d;
    font-size: 15px;
    margin-bottom: 24px;
}

.kl-search-empty .kl-shop-btn {
    display: inline-flex;
}

/* Hide Astra breadcrumbs + wrappers on search results */
.search-results .woocommerce-breadcrumb,
.kl-search-results-page .ast-woocommerce-container {
    max-width: none !important;
    padding: 0 !important;
}


/* ═══════════════════════════════
   Live Search Dropdown
   ═══════════════════════════════ */

.kl-live-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    font-family: 'Outfit', sans-serif;
}

.kl-live-search-dropdown.kl-active {
    display: block;
}

/* Individual result item */
.kl-live-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #0a0a0a;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.kl-live-search-item:hover,
.kl-live-search-item.kl-focused {
    background: #f8f9fa;
    color: #0a0a0a;
}

.kl-live-search-item:last-of-type {
    border-bottom: none;
}

.kl-live-search-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f8f9fa;
}

.kl-live-search-info {
    flex: 1;
    min-width: 0;
}

.kl-live-search-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kl-live-search-price {
    font-size: 13px;
    font-weight: 700;
    color: #0a0a0a;
    margin-top: 2px;
}

.kl-live-search-price del {
    font-weight: 400;
    color: #6c757d;
    font-size: 12px;
}

.kl-live-search-price ins {
    text-decoration: none;
}

/* Rating stars */
.kl-live-search-rating {
    display: flex;
    gap: 1px;
    margin-top: 2px;
}

.kl-live-search-rating i {
    font-size: 10px;
    color: #FFD700;
}

/* "View all results" link */
.kl-live-search-all {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #00d4aa;
    text-decoration: none;
    border-top: 1px solid #eee;
    transition: background 0.15s;
}

.kl-live-search-all:hover {
    background: #f8f9fa;
    color: #00b894;
}

/* Loading spinner */
.kl-live-search-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px;
    color: #6c757d;
    font-size: 14px;
}

/* No results */
.kl-live-search-none {
    padding: 24px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.kl-live-search-none i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    color: #ddd;
}


/* ═══════════════════════════════
   Responsive
   ═══════════════════════════════ */

@media (min-width: 768px) {
    .kl-search-title { font-size: 26px; }
    .kl-search-results-page { padding: 32px 0 64px; }
}

@media (min-width: 1024px) {
    .kl-search-title { font-size: 30px; }
}

@media (max-width: 767px) {
    .kl-search-results-page {
        padding: 16px 0 32px;
    }
    .kl-search-title {
        font-size: 20px;
    }
    .kl-search-count {
        font-size: 14px;
    }
    .kl-search-empty {
        padding: 40px 16px;
    }
    .kl-search-empty-icon {
        font-size: 36px;
    }
    .kl-search-empty h2 {
        font-size: 18px;
    }
    .kl-search-empty p {
        font-size: 14px;
    }
    .kl-live-search-item {
        padding: 8px 12px;
        gap: 10px;
    }
    .kl-live-search-thumb {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 479px) {
    .kl-search-title {
        font-size: 18px;
    }
    .kl-search-empty {
        padding: 32px 12px;
    }
    .kl-search-empty-icon {
        font-size: 32px;
    }
    .kl-live-search-name {
        font-size: 13px;
    }
}
