/* ═══════════════════════════════════════════════════════════════
   AUTOSUGGEST DROPDOWN - Zoro Industrial Design
   ═══════════════════════════════════════════════════════════════ */

.zr-search-wrap {
    position: relative;
}

.zr-autosuggest-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d5d9d9;
    border-radius: 3px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.08);
    z-index: 1000;
    max-height: 520px;
    overflow-y: auto;
    display: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.zr-autosuggest-dropdown.visible {
    display: block;
    animation: asSlideDown 0.15s ease-out;
}

@keyframes asSlideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.zr-autosuggest-dropdown::-webkit-scrollbar {
    width: 6px;
}
.zr-autosuggest-dropdown::-webkit-scrollbar-track {
    background: #e7e7e7;
}
.zr-autosuggest-dropdown::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 3px;
}

/* Section Headers */
.as-section {
    border-bottom: 1px solid #e7e7e7;
}
.as-section:last-child {
    border-bottom: none;
}

.as-section-header {
    padding: 8px 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid #e7e7e7;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    color: #0c2340;
    text-transform: uppercase;
    letter-spacing: .6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.as-section-header .as-count {
    background: #0c2340;
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
}

/* Items */
.as-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    text-decoration: none;
    color: inherit;
    transition: background .1s;
    cursor: pointer;
    border-bottom: 1px solid #e7e7e7;
}

.as-item:last-child {
    border-bottom: none;
}

.as-item:hover,
.as-item.active {
    background: #eff6ff;
    text-decoration: none;
}

.as-item.active {
    border-left: 3px solid #0066cc;
    padding-left: 11px;
}

/* Product Item */
.as-product-img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: #f8fafc;
    border: 1px solid #e7e7e7;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.as-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.as-product-info {
    flex: 1;
    min-width: 0;
}

.as-product-name {
    font-size: 12px;
    font-weight: 700;
    color: #0f1111;
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.as-product-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #565959;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.as-product-price {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 800;
    color: #0c2340;
    white-space: nowrap;
}

/* Machine Item */
.as-machine-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: #0c2340;
    color: #ffc220;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 800;
}

.as-machine-info {
    flex: 1;
    min-width: 0;
}

.as-machine-name {
    font-size: 12px;
    font-weight: 700;
    color: #0f1111;
}

.as-machine-category {
    font-size: 10px;
    color: #565959;
    font-family: 'IBM Plex Mono', monospace;
}

.as-machine-arrow {
    color: #0066cc;
    font-size: 14px;
    font-weight: 700;
}

/* Category Item */
.as-category-label {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #0f1111;
}

.as-category-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    background: #e7e7e7;
    color: #565959;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
}

/* Highlight */
.as-highlight {
    background: #fef3c7;
    color: #0c2340;
    font-weight: 700;
    padding: 0 1px;
    border-radius: 2px;
}

/* Empty State */
.as-empty {
    padding: 20px;
    text-align: center;
    color: #565959;
    font-size: 12px;
    font-style: italic;
}

/* Loading */
.as-loading {
    padding: 20px;
    text-align: center;
    color: #565959;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
}

.as-loading::after {
    content: '...';
    animation: asDots 1.2s infinite;
}

@keyframes asDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Mobile */
@media (max-width: 768px) {
    .zr-autosuggest-dropdown {
        max-height: 70vh;
    }
    .as-product-img {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}
