/* TOM'S Smart Search Autocomplete */
.toms-smart-search {
    max-width: 720px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 100;
}
.toms-ss-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.toms-ss-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    z-index: 1;
}
.toms-ss-input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #222;
}
.toms-ss-input:focus {
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.08);
}
.toms-ss-input::placeholder {
    color: #aaa;
}
.toms-ss-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    transition: background 0.15s;
    z-index: 1;
}
.toms-ss-clear:hover {
    background: #ddd;
    color: #333;
}

/* Dropdown */
.toms-ss-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    z-index: 200;
}
.toms-ss-dropdown.visible {
    display: block;
}
.toms-ss-dropdown::-webkit-scrollbar {
    width: 6px;
}
.toms-ss-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Groups */
.toms-ss-group {
    padding: 4px 0;
}
.toms-ss-group + .toms-ss-group {
    border-top: 1px solid #f0f0f0;
}
.toms-ss-group-title {
    padding: 8px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Items */
.toms-ss-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #222;
    transition: background 0.1s;
    cursor: pointer;
    gap: 12px;
}
.toms-ss-item:hover,
.toms-ss-item.active {
    background: #f8f8f8;
}
.toms-ss-item .toms-ss-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toms-ss-item .toms-ss-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.toms-ss-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: #cc0000;
}
.toms-ss-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toms-ss-name {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toms-ss-name mark {
    background: rgba(204, 0, 0, 0.1);
    color: #cc0000;
    padding: 0 1px;
    border-radius: 2px;
}
.toms-ss-brand-tag {
    color: #cc0000;
    font-weight: 600;
    font-size: 12px;
    margin-right: 2px;
}
.toms-ss-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}
.toms-ss-gen {
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}
.toms-ss-arrow {
    flex-shrink: 0;
    color: #ccc;
    transition: color 0.15s;
}
.toms-ss-item:hover .toms-ss-arrow {
    color: #cc0000;
}
.toms-ss-empty {
    padding: 20px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .toms-smart-search { margin: 0 auto 14px; }
    .toms-ss-input { padding: 12px 40px 12px 44px; font-size: 15px; }
    .toms-ss-dropdown { max-height: 350px; }
    .toms-ss-item { padding: 8px 12px; gap: 10px; }
    .toms-ss-name { font-size: 13px; }
}
@media (max-width: 480px) {
    .toms-ss-input { padding: 10px 36px 10px 40px; font-size: 14px; border-radius: 8px; }
    .toms-ss-dropdown { border-radius: 8px; }
}
