/* XStore Search Bar Replacement */
.fps-xstore-replacement {
    position: relative;
    display: block;
    width: 100%;
    z-index: 999;
}

.fps-search-box {
    position: relative;
}

.fps-input-container {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    background: #dfdfdf;
    transition: all 0.3s ease;
    height: 46px;
    box-shadow: none;
    border: 1px solid transparent;
}

.fps-input-container:focus-within {
    background: #f0f0f0;
    border: 1px solid #7f7070;
}

#fps-search-input {
    background-color: #dfdfdf;
    height: 100%;
    border: none;
    width: 100%;
    font-size: 14px;
    outline: none;
    color: #333;
    font-weight: 500;
    padding: 0 40px;
    box-sizing: border-box;
    -webkit-appearance: none;
}

#fps-search-input:focus {
    background-color: #f0f0f0;
}

#fps-search-input::placeholder {
    color: #777;
    font-weight: 500;
}

.fps-search-icon {
    position: absolute;
    left: 15px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.fps-loading-spinner {
    position: absolute;
    right: 15px;
    color: #000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    animation: fpsSpin 1s linear infinite;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

@keyframes fpsSpin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.fps-results-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    visibility: hidden;
    padding: 12px;
    border: 1px solid #eaeaea;
}

.fps-results-container.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.fps-product-list {
    display: grid;
    gap: 10px;
}

.fps-product-item {
    display: flex;
    padding: 12px;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    animation: fpsSlideIn 0.3s forwards;
    opacity: 0;
    transform: translateY(15px);
    cursor: pointer;
    border: 1px solid #f0f0f0;
    align-items: center;
}

.fps-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: #e0e0e0;
}

.fps-product-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 15px;
    background: #f8f8f8;
    padding: 5px;
    flex-shrink: 0;
    border: 1px solid #f1f1f1;
}

.fps-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fps-product-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.fps-product-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 0;
}

.fps-product-actions {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.fps-add-to-cart {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: none;
}

.fps-add-to-cart:hover {
    background: #219653;
    transform: translateY(-1px);
}

.fps-view-details {
    color: #3498db;
    margin-left: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 6px;
    background: #f0f7ff;
    white-space: nowrap;
}

.fps-view-details:hover {
    color: #2980b9;
    background: #e6f0ff;
    text-decoration: none;
}

.fps-no-results {
    text-align: center;
    padding: 30px 15px;
    color: #777;
}

.fps-no-results svg {
    width: 30px;
    height: 30px;
    color: #ccc;
    margin-bottom: 15px;
}

.fps-no-results h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

.fps-match-score {
    font-size: 11px;
    color: #27ae60;
    margin-top: 3px;
    font-weight: 500;
    background: #f0fff4;
    padding: 2px 6px;
    border-radius: 50px;
    display: inline-block;
}
/* Add to your CSS file */
.fps-product-vendor {
    font-size: 0.8em;
    margin-bottom: 5px;
    color: #666;
}

.fps-product-vendor span {
    font-weight: 500;
}

.fps-product-vendor a {
    color: var(--fps-accent-color, #3a3a3a);
    text-decoration: none;
}

.fps-product-vendor a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fps-product-vendor {
        font-size: 0.75em;
    }
}
@keyframes fpsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fpsSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for XStore */
@media (max-width: 768px) {
    .fps-xstore-replacement {
        order: 100;
        width: 100%;
        margin-top: 10px;
    }
}