/* ==========================================
   COOCOOVAYIA PRODUCT SEARCH
   ========================================== */

/* Wrapper */
.ccv-search-wrap {
    position: relative;
    width: 100%;
    max-width: 320px;
}

/* Form */
.ccv-search-form {
    margin: 0;
}

/* Input + button row */
.ccv-search-input-wrap {
    display: flex;
    align-items: center;
    background: #ededed;
    border-radius: 5px;
    overflow: hidden;
    height: 40px;
}

/* Text input */
.ccv-search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 0 12px !important;
    height: 40px !important;
    font-size: 14px;
    color: #333 !important;
    outline: none;
    box-shadow: none !important;
    margin: 0 !important;
}
.ccv-search-input::placeholder {
    color: #909090;
}

/* Search button */
.ccv-search-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff !important;
    color: rgb(102, 102, 102) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    transition: background 0.2s;
    padding: 0;
    margin: 0;
    line-height: 1;
}
.ccv-search-btn:hover {
    background: #a8c4a6;
}

/* ---- Dropdown results ---- */
.ccv-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    max-height: 420px;
    overflow-y: auto;
}

/* Single result item */
.ccv-sr-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.1s;
    align-items: center;
}
.ccv-sr-item:last-of-type {
    border-bottom: none;
}
.ccv-sr-item:hover,
.ccv-sr-item.ccv-sr-active {
    background: #f7f7f7;
}

/* Result image */
.ccv-sr-img {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}
.ccv-sr-img img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 2px;
}

/* Result info */
.ccv-sr-info {
    flex: 1;
    min-width: 0;
}
.ccv-sr-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ccv-sr-price {
    font-size: 13px;
    color: #333;
    font-weight: 700;
    margin-top: 2px;
}
.ccv-sr-price del {
    opacity: 0.6;
    font-weight: 400;
    margin-right: 4px;
}
.ccv-sr-price ins {
    text-decoration: none;
    color: #89a587;
}
.ccv-sr-sku {
    font-size: 11px;
    color: #999;
    margin-top: 1px;
}

/* "View all results" link */
.ccv-sr-viewall {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #c7d8c6;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
}
.ccv-sr-viewall:hover {
    background: #f9f9f9;
    color: #89a587;
}

/* Loading */
.ccv-sr-loading {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 18px;
}

/* No results */
.ccv-sr-empty {
    text-align: center;
    padding: 15px 12px;
    color: #999;
    font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .ccv-search-wrap {
        max-width: 100%;
    }
}
