/* ==========================================================================
   Search suggestions dropdown
   ========================================================================== */

.amd-sg-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
    z-index: 9999;
    font-family: Arial, sans-serif;
    text-align: left;
    margin-top: 2px;
}

.amd-sg-title {
    font-size: 10px;
    font-weight: bold;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 9px 12px 5px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.amd-sg-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #222;
    border-bottom: 1px solid #f3f3f3;
}

.amd-sg-row:last-of-type { border-bottom: none; }

.amd-sg-row.amd-sg-on,
.amd-sg-row:hover { background: #fff5f5; }

.amd-sg-label {
    font-size: 13px;
    color: #222;
    line-height: 1.3;
    display: block;
}

.amd-sg-label b {
    color: #cc0000;
    font-weight: bold;
}

.amd-sg-note {
    font-size: 11px;
    color: #999;
    display: block;
    margin-top: 1px;
}

.amd-sg-note--right {
    margin-left: auto;
    margin-top: 0;
    white-space: nowrap;
}

/* ---- ad cards ---- */
.amd-sg-row--card { align-items: stretch; }

.amd-sg-pic {
    flex: 0 0 52px;
    width: 52px;
    height: 40px;
    border-radius: 3px;
    overflow: hidden;
    background: #f1f1f1;
}

.amd-sg-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.amd-sg-text {
    flex: 1;
    min-width: 0;
}

.amd-sg-text .amd-sg-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
}

.amd-sg-price {
    font-size: 13px;
    font-weight: bold;
    color: #cc0000;
    white-space: nowrap;
    align-self: center;
}

/* ---- footer ---- */
.amd-sg-all {
    display: block;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: bold;
    color: #cc0000;
    text-decoration: none;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.amd-sg-all.amd-sg-on,
.amd-sg-all:hover { background: #fff0f0; }

@media (max-width: 760px) {
    .amd-sg-box {
        min-width: 0;
        max-height: 320px;
    }
    .amd-sg-pic { flex-basis: 44px; width: 44px; height: 34px; }
}
