/* Search Modal */

.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.search-modal.active {
    display: flex;
    align-items: flex-start;
}

.search-modal-content {
    background: #fff;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: slideDown 0.3s;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.search-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--secondary);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    margin-left: 12px;
}

.search-header h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.search-form {
    padding: 15px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #eee;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-results {
    padding: 0 15px 15px;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-text);
}

.search-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-text);
}

.search-product {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    margin-bottom: 8px;
}

.search-product:active {
    background: var(--secondary);
}

.search-product-image {
    flex: 0 0 60px;
}

.search-product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.search-product-info {
    flex: 1;
}

.search-product-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
}

.search-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}
