.woo-menu-search-item {
    display: flex;
    align-items: center;
}

.woo-menu-search-container {
    position: relative;
    width: 280px;
    margin: 0 auto;
    font-family: inherit;
    line-height: initial;
}

.woo-menu-search-form {
    position: relative;
    margin: 0;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 30px;
    padding: 5px 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    background: #fff;
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0,124,186,0.2);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #666;
    margin-right: 8px;
}

.woo-menu-search-field {
    border: none !important;
    background: transparent !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    width: 100%;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px;
    color: #333;
}

.woo-menu-search-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #666;
    border-radius: 50%;
    animation: woo-search-spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes woo-search-spin {
    to { transform: rotate(360deg); }
}

.woo-menu-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; /* Align left to prevent overflowing off the left edge */
    width: 680px; /* Much wider for horizontal layout */
    max-width: calc(100vw - 30px); /* Responsive constraint to prevent overflow */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 99999;
    display: none;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #eee;
}

/* Specific styling to match the user screenshot */
.woo-search-result-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    transition: background 0.2s;
}

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

.woo-search-result-item:hover {
    background: #fafafa;
}

.woo-search-result-image {
    width: 60px;
    height: 60px;
    margin-right: 20px;
    flex-shrink: 0;
    display: block;
}

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

.woo-search-result-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.woo-search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    text-decoration: none !important;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.woo-search-result-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.woo-search-result-rating {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #ffb800; /* Star color */
}

/* Ensure WooCommerce stars look right */
.woo-search-result-rating .star-rating {
    font-size: 12px;
    width: 5.4em;
    margin-right: 5px;
}
.woo-search-result-rating .star-rating span {
    color: #ffb800;
}

.woo-search-result-rating .rating-count {
    color: #333;
    font-weight: 500;
    margin-left: 3px;
}

.woo-search-result-price {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.woo-search-result-price del {
    color: #999;
    font-weight: normal;
    margin-right: 5px;
}

.woo-search-result-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
}

.woo-search-qty {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    overflow: hidden;
    height: 38px;
    background: #fff;
}

.woo-qty-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 100%;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    padding: 0;
}

.woo-qty-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.woo-qty-input {
    width: 35px;
    height: 100%;
    border: none !important;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    padding: 0 !important;
    margin: 0 !important;
    color: #333;
    -moz-appearance: textfield;
}

.woo-qty-input::-webkit-outer-spin-button,
.woo-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woo-search-add-to-cart {
    background: #034f4f !important;
    color: #fff !important;
    border-radius: 6px;
    padding: 8px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background 0.2s;
    border: none !important;
    cursor: pointer;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.5;
}

.woo-search-add-to-cart:hover {
    background: #219EA7 !important;
}

.woo-search-add-to-cart.loading {
    opacity: 0.7;
    pointer-events: none;
}

.woo-search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

/* Small screen adjustments */
@media (max-width: 768px) {
    .woo-menu-search-results {
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
    .woo-search-result-actions {
        flex-direction: column;
        gap: 10px;
    }
}
