/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 28px;
    padding: 8px 8px 8px 20px;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid #e1e5e9;
    margin-bottom: 20px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    animation: subtleAppear 0.5s ease-out; /* merged */
}

.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 3px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    border-color: #6a11cb;
    background: #fefefe;
}

.search-icon {
    color: #055128;
    font-size: 1.1rem;
    margin-right: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.search-container:focus-within .search-icon {
    opacity: 1;
}

#search {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 1rem;
    background: transparent;
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.2px;
}

#search::placeholder {
    color: black;
    font-weight: 400;
}

#clearIcon {
    color: #ff4757;
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: none;
    margin-right: 10px;
    background: transparent;
}

#clearIcon:hover {
    background: rgba(255, 71, 87, 0.1);
    color: #ff0000;
    transform: scale(1.1);
}

#clearIcon:active {
    transform: scale(0.95);
}

.search-btn {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 3px 12px rgba(218, 27, 96, 0.3),
        0 1px 3px rgba(218, 27, 96, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: auto;
    position: relative;
    overflow: hidden;
    width: 120px;
    max-width: 100%;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 20%;
    height: 50%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(218, 27, 96, 0.4),
        0 3px 8px rgba(218, 27, 96, 0.3);
}

/* ✅ merged duplicate */
.search-btn:hover::before {
    left: 100%;
}

.search-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(218, 27, 96, 0.4),
        0 1px 3px rgba(218, 27, 96, 0.3);
}

.search-btn i {
    margin-right: 6px;
    font-size: 0.9rem;
}

.product-list {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    color: blue;
}

.centered-spinner {
    text-align: center;
}

/* Animation */
@keyframes subtleAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
