/* Search Functionality Styles */

.search-btn {
    background-color: #d2a6a6;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-left: 15px;
}

.search-btn:hover {
    background-color: #c09595;
    transform: translateY(-1px);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-overlay.active .search-container {
    transform: translateY(0);
}

/* Search Header */
.search-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    padding: 10px 0;
    background: transparent;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    margin-left: 15px;
    transition: color 0.3s;
}

.search-close:hover {
    color: #333;
}

/* Search Results */
.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
}

.search-header-info {
    margin-bottom: 20px;
}

.search-header-info h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

/* Search Suggestions */
.search-suggestions {
    text-align: center;
    padding: 20px 0;
}

.search-suggestions h4 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggestion-tag {
    background: #f8f9fa;
    color: #666;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

.suggestion-tag:hover {
    background: #d2a6a6;
    color: white;
    border-color: #d2a6a6;
}

/* Search Products */
.search-products {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-product-item {
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.search-product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-product-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    gap: 15px;
}

.search-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-product-info {
    flex: 1;
    min-width: 0;
}

.search-product-info h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-product-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-product-price {
    font-size: 16px;
    font-weight: 600;
    color: #d2a6a6;
}

/* Search Messages */
.search-message,
.search-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.search-error {
    color: #d2a6a6;
}

.search-message .search-suggestions {
    margin-top: 20px;
    padding: 0;
}

.search-message .search-suggestions p {
    margin: 0 0 15px 0;
    color: #999;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-overlay {
        padding-top: 5vh;
    }

    .search-container {
        width: 95%;
        max-height: 90vh;
    }

    .search-header {
        padding: 15px;
    }

    .search-input {
        font-size: 16px;
    }

    .search-results {
        max-height: 70vh;
        padding: 15px;
    }

    .search-product-link {
        padding: 8px;
        gap: 12px;
    }

    .search-product-image {
        width: 60px;
        height: 60px;
    }

    .search-product-info h5 {
        font-size: 15px;
    }

    .search-product-info p {
        font-size: 13px;
    }

    .suggestion-tags {
        gap: 8px;
    }

    .suggestion-tag {
        padding: 6px 12px;
        font-size: 13px;
    }

    .search-btn {
        padding: 8px 12px;
        font-size: 13px;
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .search-overlay {
        padding-top: 2vh;
    }

    .search-container {
        margin: 10px;
        width: calc(100% - 20px);
    }

    .search-header {
        padding: 12px;
    }

    .search-close {
        margin-left: 10px;
    }

    .search-product-link {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .search-product-image {
        width: 100px;
        height: 100px;
        align-self: center;
    }

    .search-product-info h5 {
        white-space: normal;
        text-align: center;
    }
}
