/* Search Modal Styles */
.search-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    padding-top: 100px;
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal-wrapper.active {
    opacity: 1;
}

.search-content-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 90%;
    max-height:58vh;
    overflow: hidden;
    position: relative;
    padding: 0;
}

/* Search Input Section */
.search-input-section {
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #6c757d;
    font-size: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #007bff;
}

.close-btn {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #f8f9fa;
}

.search-hint {
    font-size: 14px;
    color: #6c757d;
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0 24px;
}

/* Popular Categories Section */
.popular-categories-section {
    padding: 24px;
}

.popular-categories-title {
    font-size: 12px;
    font-weight: bold;
    color: #495057;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.popular-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.category-btn {
    display: block;
    padding: 12px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* Search Results Section */
.search-results-section {
    padding: 24px;
    display: none;
}

.search-results-title {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
}

.search-results-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.modal-search-result-item {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.modal-search-result-item:last-child {
    border-bottom: none;
}

.modal-search-result-item:hover,
.modal-search-result-item.highlighted {
    background-color: #f8f9fa;
}

.modal-search-result-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 16px;
    border-radius: 8px;
    flex-shrink: 0;
}

.modal-search-result-content {
    flex: 1;
    min-width: 0;
}

.modal-search-result-category {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 4px;
}

.modal-search-result-title {
    font-weight: 600;
    font-size: 16px;
    color: #212529;
    margin-bottom: 4px;
    line-height: 1.3;
}

.modal-search-result-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 16px;
}

/* Search Footer */
.search-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.keyboard-hint {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 12px;
    color: #495057;
    font-weight: 500;
}

/* Spinner */
.spinner-icon {
    animation: spin 1s linear infinite;
    color: #007bff;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .popular-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-footer {
        gap: 8px;
    }

    .keyboard-hint {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .popular-categories-grid {
        grid-template-columns: 1fr;
    }

    .search-content-box {
        width: 95%;
        margin: 20px;
    }

    .search-input-section,
    .popular-categories-section,
    .search-results-section {
        padding: 16px;
    }
}

.red {
    color: red;
}

