/* Laprom Smart Search v1.0 - Thumbnail List Styles */

/* Section title */
.lph-search-section-title {
    padding: 8px 14px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

/* Result item - thumbnail list layout */
.lph-search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s ease;
    cursor: pointer;
}

.lph-search-result-item:last-child {
    border-bottom: none;
}

.lph-search-result-item:hover,
.lph-search-result-item.lph-result-active {
    background: #f8f4ef;
}

/* Thumbnail */
.lph-result-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f5f5f5;
    border: 1px solid #eee;
}

/* Info container */
.lph-result-info {
    flex: 1;
    margin-left: 12px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Product name */
.lph-result-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d2d2d;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta row (category + price) */
.lph-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.2;
}

/* Category badge */
.lph-result-cat {
    color: #999;
    font-size: 11px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Price */
.lph-result-price {
    font-weight: 700;
    color: #E87A15;
    font-size: 13px;
    margin-left: auto;
    white-space: nowrap;
}

.lph-result-price del {
    color: #bbb;
    font-weight: 400;
    font-size: 11px;
    margin-right: 4px;
}

.lph-result-price ins {
    text-decoration: none;
}

/* Dropdown enhancements */
.lph-search-dropdown {
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Custom scrollbar */
.lph-search-dropdown::-webkit-scrollbar {
    width: 4px;
}

.lph-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.lph-search-dropdown::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

/* Loading state enhancement */
.lph-search-loading {
    padding: 24px 14px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.lph-search-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #E87A15;
    border-top-color: transparent;
    border-radius: 50%;
    animation: lph-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Empty state */
.lph-search-empty {
    padding: 24px 14px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* View all link */
.lph-search-view-all {
    display: block;
    padding: 12px 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #E87A15;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    transition: background 0.15s ease;
}

.lph-search-view-all:hover {
    background: #f0ebe4;
    color: #d06a10;
}

/* Active search state */
.lph-search.lph-search-active .lph-search-input {
    border-color: #E87A15;
    box-shadow: 0 0 0 3px rgba(232, 122, 21, 0.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .lph-search-dropdown {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-height: 65vh !important;
        border-radius: 0 0 12px 12px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
        z-index: 10001 !important;
    }

    .lph-result-thumb {
        width: 44px;
        height: 44px;
    }

    .lph-result-info {
        margin-left: 10px;
    }

    .lph-result-name {
        font-size: 13px;
        -webkit-line-clamp: 1;
    }

    .lph-result-meta {
        font-size: 11px;
    }

    .lph-result-cat {
        max-width: 160px;
    }

    .lph-search-result-item {
        padding: 10px 14px;
    }

    .lph-search-section-title {
        padding: 10px 14px 8px;
        font-size: 11px;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .lph-search-loading,
    .lph-search-empty {
        padding: 30px 14px;
    }
}


/* Search field pill shape + round search button */
.lph-search-input {
    border-radius: 99px !important;
}
.lph-search::after {
    border-radius: 50% !important;
}
