/* ==========================================================================
   LIVE SEARCH – Dropdown onder zoekbalk
   ========================================================================== */

/* Form needs relative positioning for dropdown */
.mobile-search-panel form,
.header-search-form {
    position: relative;
}

.sar-ls-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99990;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    max-height: 70vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.sar-ls-dropdown.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Sectie headers */
.sar-ls-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    padding: 14px 16px 6px;
}

.sar-ls-section + .sar-ls-section {
    border-top: 1px solid #f3f4f6;
}

/* Merk / Categorie links */
.sar-ls-link {
    display: block;
    padding: 9px 16px;
    font-size: 15px;
    color: #111;
    text-decoration: none;
    transition: background 0.1s ease;
}

.sar-ls-link:hover {
    background: #fdf2f8;
    color: #be185d;
}

/* Product rij */
.sar-ls-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s ease;
}

.sar-ls-product:hover {
    background: #fdf2f8;
}

.sar-ls-product-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.sar-ls-product-info {
    flex: 1;
    min-width: 0;
}

.sar-ls-product-name {
    font-size: 15px;
    font-weight: 500;
    color: #111;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sar-ls-product-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-top: 2px;
}

.sar-ls-product-price del {
    color: #9ca3af;
    font-weight: 400;
    font-size: 13px;
}

.sar-ls-product-price ins {
    text-decoration: none;
    font-weight: 700;
}

/* Stock status */
.sar-ls-product-stock {
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

.sar-ls-instock {
    color: #059669;
}

.sar-ls-backorder {
    color: #d97706;
}

.sar-ls-oos {
    color: #dc2626;
}

/* Geen resultaten */
.sar-ls-empty {
    padding: 20px 16px;
    text-align: center;
    font-size: 15px;
    color: #9ca3af;
}

/* Bekijk alle resultaten */
.sar-ls-viewall {
    display: block;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #be185d;
    text-decoration: none;
    border-top: 1px solid #f3f4f6;
    transition: background 0.1s ease;
}

/* Loading skeleton */
@keyframes sar-shimmer {
    0%   { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.sar-ls-skeleton {
    padding: 12px 16px;
}

.sar-ls-skel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.sar-ls-skel-img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: sar-shimmer 1.2s infinite ease-in-out;
    flex-shrink: 0;
}

.sar-ls-skel-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sar-ls-skel-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: sar-shimmer 1.2s infinite ease-in-out;
}

.sar-ls-skel-line.w30 { width: 30%; }
.sar-ls-skel-line.w40 { width: 40%; }
.sar-ls-skel-line.w50 { width: 50%; }
.sar-ls-skel-line.w60 { width: 60%; }
.sar-ls-skel-line.w70 { width: 70%; }
.sar-ls-skel-line.w80 { width: 80%; }

.sar-ls-viewall:hover {
    background: #fdf2f8;
}

/* Mobiel: full-width dropdown */
@media (max-width: 768px) {
    .sar-ls-dropdown {
        border-radius: 0 0 10px 10px;
        max-height: 60vh;
    }

    .sar-ls-product-img {
        width: 52px;
        height: 52px;
    }
}
