/* Search Overlay */
.search-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}
.search-overlay.active {
    display: flex !important;
}
.search-overlay-content {
    width: 100%;
    max-width: 100%;
    position: relative;
    padding: 0 20px;
}
.search-close-btn {
    position: absolute;
    top: -50px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 48px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.search-close-btn:hover {
    transform: scale(1.2);
}
.search-input-wrapper {
    width: 100%;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--black-color);
}
.search-input {
    width: 100%;
    font-family: var(--font-main);
    font-size: 56px;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: var(--black-color);
    box-shadow: none;
    text-align: right;
    direction: rtl;
    padding: 20px 0;
}
.search-input:focus {
    outline: none;
    background-color: transparent;
    box-shadow: none;
}

.search-input::placeholder {
    color: var(--gray-2-color);
}

/* Search Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding: 0 20px;
    direction: rtl;
}

.search-results-grid::-webkit-scrollbar {
    width: 8px;
}

.search-results-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.search-results-grid::-webkit-scrollbar-thumb {
    background: var(--pink-color);
    border-radius: 10px;
}

.search-result-item {
    background-color: var(--white-color);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.search-result-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    padding: 20px;
    text-align: right;
    direction: rtl;
}

.search-result-title {
    font-family: var(--font-main);
    font-size: 20px;
    font-weight: bold;
    color: var(--black-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.search-result-category {
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--gray-2-color);
    margin-bottom: 10px;
}

.search-result-price {
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: bold;
    color: var(--pink-color);
}

/* Loading and No Results States */
.search-loading,
.search-no-results,
.search-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-family: var(--font-main);
    font-size: 24px;
    color: var(--red-color);
}
.search-error {
    color: #ff6b6b;
}
