/* ── Search Page ─────────────────────────────────────────────── */
.search-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8fafc;
}

.search-container {
    padding: 0 0 80px 0;
    flex: 1;
}

/* ── Hero Search Bar ─────────────────────────────────────────── */
.search-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f62fe 100%);
    padding: 56px 5% 48px;
    text-align: center;
    margin-bottom: 48px;
}

.search-hero-title {
    font-size: 40px;
    font-weight: 800;
    color: white;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.search-hero-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 16px;
    margin: 0 0 32px 0;
}

.search-input-large-wrapper {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-lg {
    position: absolute;
    left: 20px;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.search-input-large {
    width: 100%;
    padding: 18px 24px 18px 52px;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    outline: none;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s;
    box-sizing: border-box;
}

.search-input-large:focus {
    box-shadow: 0 8px 40px rgba(15, 98, 254, 0.3);
}

/* ── Initial State (suggestion chips) ───────────────────────── */
.search-initial-state {
    padding: 0 5%;
    text-align: center;
}

.search-suggestions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.suggestion-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.suggestion-chip:hover {
    border-color: #0f62fe;
    color: #0f62fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 98, 254, 0.15);
}

/* ── Loading State ───────────────────────────────────────────── */
.search-loading {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

/* ── No Results ──────────────────────────────────────────────── */
.search-no-results {
    padding: 60px 5%;
    text-align: center;
}

.no-results-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 24px;
    filter: grayscale(0.5);
}

.no-results-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.no-results-hint {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 32px 0;
}

.no-results-tips {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.no-results-tip {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

/* ── Error ───────────────────────────────────────────────────── */
.search-error {
    padding: 40px 5%;
    text-align: center;
    color: #ef4444;
    font-weight: 500;
}

/* ── Results Container ───────────────────────────────────────── */
.search-results-container {
    padding: 0 5%;
}

.results-meta {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.results-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* ── Section Titles ──────────────────────────────────────────── */
.results-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Category Results ────────────────────────────────────────── */
.categories-result-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.category-result-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.category-result-card:hover {
    border-color: #0f62fe;
    color: #0f62fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 98, 254, 0.12);
}

.cat-result-icon {
    font-size: 18px;
}

.cat-result-name {
    font-weight: 600;
}

/* ── Product Results Grid ────────────────────────────────────── */
.search-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.search-product-card {
    width: 100%;
    max-width: 300px;
    height: 420px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.search-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.search-product-img-wrapper {
    position: relative;
    height: 200px;
    background: #f8fafc;
    overflow: hidden;
    flex-shrink: 0;
}

.search-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.search-product-card:hover .search-product-img {
    transform: scale(1.04);
}

.search-product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #cbd5e1;
}

.search-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0f62fe;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.search-product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.search-product-brand {
    font-size: 11px;
    font-weight: 700;
    color: #0f62fe;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-product-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.search-product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.search-product-price {
    font-size: 18px;
    font-weight: 800;
    color: #0f62fe;
}

.search-product-original {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 400;
}

/* ── Header Suggestion improvements ─────────────────────────── */
.suggestion-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suggestion-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.suggestion-brand {
    font-size: 12px;
    color: #64748b;
}

.suggestion-price {
    font-size: 13px;
    font-weight: 700;
    color: #0f62fe;
}

.no-suggestions {
    color: #94a3b8;
    font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .search-hero-title {
        font-size: 28px;
    }

    .search-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .search-hero {
        padding: 40px 5% 36px;
    }
}