/* TheGunDock typeahead search suggestions */
.search-bar { position: relative; }
.tgd-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #c41e3a;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    max-height: 540px;
    overflow-y: auto;
    margin-top: 2px;
    color: #1a202c;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.tgd-suggest[hidden] { display: none; }

.tgd-suggest-section { border-bottom: 1px solid #edf2f7; padding: 6px 0; }
.tgd-suggest-section:last-of-type { border-bottom: 0; }
.tgd-suggest-label {
    padding: 4px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
}

.tgd-suggest-item {
    display: flex;
    gap: 12px;
    padding: 8px 14px;
    text-decoration: none;
    color: #1a202c;
    cursor: pointer;
    align-items: center;
    transition: background 0.08s;
}
.tgd-suggest-item:hover,
.tgd-suggest-item.tgd-active { background: #f7fafc; }
.tgd-suggest-item mark { background: #fff3cd; color: inherit; padding: 0; font-weight: 700; }

.tgd-product .tgd-thumb {
    flex: 0 0 48px;
    width: 48px; height: 48px;
    background: #f7fafc;
    border-radius: 4px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.tgd-product .tgd-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tgd-product .tgd-noimg { width: 100%; height: 100%; background: #edf2f7; }
.tgd-product .tgd-meta { flex: 1; min-width: 0; }
.tgd-product .tgd-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #1a202c;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tgd-product .tgd-row2 {
    display: flex; align-items: center; gap: 8px;
    margin-top: 4px;
    font-size: 13px;
}
.tgd-price { font-weight: 700; color: #1a202c; }

.tgd-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.tgd-badge-stock { background: #c6f6d5; color: #22543d; }
.tgd-badge-oos   { background: #fed7d7; color: #742a2a; }

.tgd-cat, .tgd-mfg {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 14px;
    font-size: 14px;
}
.tgd-cat-name, .tgd-mfg-name { font-weight: 600; }
.tgd-cat-count, .tgd-mfg-count { font-size: 12px; color: #718096; }

.tgd-suggest-footer {
    border-top: 1px solid #edf2f7;
    padding: 10px 14px;
    text-align: center;
    background: #fafafa;
}
.tgd-suggest-footer a {
    color: #c41e3a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.tgd-suggest-footer a:hover { text-decoration: underline; }

.tgd-suggest-empty {
    padding: 16px 14px;
    color: #718096;
    font-size: 14px;
    text-align: center;
}

/* Mobile: panel takes full width and stays anchored to search bar */
@media (max-width: 640px) {
    .tgd-suggest {
        max-height: calc(100vh - 140px);
        border-radius: 0;
        margin-top: 0;
        border-left: 0;
        border-right: 0;
    }
}
