/* ── Spinner — positioned inside input field by JS ── */
#wc-dpm-ac-spinner {
    display: none;
    position: absolute;
    width: 18px;
    height: 18px;
    z-index: 1000001;
    pointer-events: none;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wc-dpm-spin 0.65s linear infinite;
}

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

/* ── Dropdown — appended to body, positioned via JS ── */
#wc-dpm-ac-dropdown {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
    z-index: 999999;
    overflow: hidden;
    max-height: 520px;
    overflow-y: auto;
    animation: wc-dpm-ac-fade 0.15s ease;
}

@keyframes wc-dpm-ac-fade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Sections ── */
.wc-dpm-ac-section {
    border-bottom: 1px solid #f0f4f8;
}
.wc-dpm-ac-section:last-of-type {
    border-bottom: none;
}

.wc-dpm-ac-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px 7px;
    background: #f8fafc;
    border-bottom: 1px solid #e8edf3;
}
.wc-dpm-ac-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #64748b;
    text-transform: uppercase;
}
.wc-dpm-ac-section-count {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    background: #e2e8f0;
    padding: 1px 8px;
    border-radius: 20px;
}

/* ── Result items ── */
.wc-dpm-ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none !important;
    color: #1e293b !important;
    transition: background 0.12s;
    outline: none;
    cursor: pointer;
}
.wc-dpm-ac-item:hover,
.wc-dpm-ac-item.wc-dpm-ac-active,
.wc-dpm-ac-item:focus {
    background: #f1f5ff;
    color: #1e293b !important;
    text-decoration: none !important;
}

/* Product thumbnail */
.wc-dpm-ac-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #e8edf3;
    background: #f8fafc;
}

/* Product info */
.wc-dpm-ac-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.wc-dpm-ac-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.wc-dpm-ac-price {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
}

/* KB + Blog items */
.wc-dpm-ac-kb .wc-dpm-ac-title,
.wc-dpm-ac-blog .wc-dpm-ac-title {
    font-size: 13px;
    font-weight: 400;
    color: #475569;
    white-space: normal;
}
.wc-dpm-ac-kb:hover .wc-dpm-ac-title,
.wc-dpm-ac-kb.wc-dpm-ac-active .wc-dpm-ac-title,
.wc-dpm-ac-blog:hover .wc-dpm-ac-title,
.wc-dpm-ac-blog.wc-dpm-ac-active .wc-dpm-ac-title {
    color: #1e293b;
}

/* Highlight matched term */
#wc-dpm-ac-dropdown mark {
    background: transparent;
    color: #2563eb;
    font-weight: 700;
    padding: 0;
}

/* ── Empty state ── */
.wc-dpm-ac-empty {
    padding: 20px 16px;
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
}

/* ── View all footer ── */
.wc-dpm-ac-view-all {
    display: block;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb !important;
    text-align: center;
    text-decoration: none !important;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: background 0.12s;
}
.wc-dpm-ac-view-all:hover {
    background: #eff6ff;
    color: #1d4ed8 !important;
}
