.search-results-wrapper {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 320px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 0 0 1px var(--primary-border, rgba(37, 99, 235, 0.08));
    z-index: 1050;
    overflow: hidden;
    display: none;
    animation: searchDropIn 0.2s ease-out;
}

.search-results-wrapper.is-open {
    display: block;
}

@keyframes searchDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.search-items-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 6px 0;
}

.search-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    text-decoration: none !important;
    color: #0f172a;
    transition: background-color 0.15s ease;
}

.search-item-row:hover,
.search-item-row.is-selected {
    background-color: var(--primary-light, #f0fdf4);
}

.search-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    object-fit: contain;
    flex-shrink: 0;
    padding: 3px;
}

.search-item-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-item-meta {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.search-item-sub {
    font-size: 11.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-end {
    text-align: right;
    flex-shrink: 0;
}

.search-item-price {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-color, #16a34a);
}

.search-item-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.search-state-message {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.search-state-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2.5px solid #e2e8f0;
    border-top-color: var(--primary-color, #16a34a);
    border-radius: 50%;
    animation: searchSpin 0.7s linear infinite;
    margin-bottom: 6px;
}

@keyframes searchSpin {
    to {
        transform: rotate(360deg);
    }
}

.search-view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 14px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    color: var(--primary-color, #16a34a);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.search-view-all-btn:hover {
    background: var(--primary-light, #f0fdf4);
}

.search-page-wrapper {
    width: 100%;
    min-height: 80vh;
    background-color: #f8fafc;
    padding: 32px 16px 80px;
}

.search-page-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.search-page-header {
    position: relative;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 45%, #022c22 100%);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 18px;
    padding: 30px 32px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    box-shadow: 0 16px 36px -10px rgba(6, 78, 59, 0.45), 0 0 0 1px rgba(16, 185, 129, 0.15);
    overflow: hidden;
}

.search-page-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: 15%;
    width: 320px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(52, 211, 153, 0.3) 0%, rgba(16, 185, 129, 0.12) 50%, transparent 70%);
    filter: blur(36px);
    pointer-events: none;
}

.search-page-title-box {
    position: relative;
    z-index: 1;
}

.search-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    backdrop-filter: blur(8px);
}

.search-page-title-box h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.search-page-title-box p {
    font-size: 13.5px;
    color: rgba(240, 253, 244, 0.85);
    margin: 0;
}

.search-query-highlight {
    color: #6ee7b7;
    font-weight: 700;
}

.search-tabs-filter {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.search-tab-link {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.search-tab-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.search-tab-link.active {
    background: #ffffff;
    color: #064e3b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.search-empty-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
}

.search-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.search-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.search-empty-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

@media (max-width: 1024px) {
    .search-results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .search-page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
    }

    .search-tabs-filter {
        width: 100%;
        justify-content: space-between;
    }

    .search-tab-link {
        flex: 1;
        text-align: center;
        padding: 7px 10px;
    }

    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }
}