/* WooCommerce Image Search – Free Local – Alibaba Lens style */

.wcis-container {
    max-width: 720px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.wcis-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 1.5rem;
}

.wcis-dropzone {
    border: 2px dashed #d0d0d0;
    border-radius: 16px;
    background: #fafafa;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcis-dropzone.dragover {
    border-color: #ff6a00;
    background: #fff8f3;
}

.wcis-dropzone-inner { width: 100%; }

.wcis-icon { margin-bottom: 1rem; }

.wcis-paste {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 0.4rem;
}

.wcis-or {
    font-size: 0.9rem;
    color: #888;
    margin: 0 0 1.2rem;
}

.wcis-upload-btn {
    background: linear-gradient(90deg, #ff8a00, #ff5e00);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.wcis-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 106, 0, 0.45);
}

.wcis-preview {
    position: relative;
    max-width: 280px;
    margin: 0 auto;
}

.wcis-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.wcis-clear {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.wcis-status {
    text-align: center;
    margin-top: 1.2rem;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.wcis-status.loading { background: #fff8f3; color: #ff6a00; }
.wcis-status.error   { background: #fff0f0; color: #c00; }
.wcis-status.success { background: #f0fff4; color: #0a7; }

.wcis-results { margin-top: 2rem; }

.wcis-results-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #222;
}

.wcis-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.2rem;
}

.wcis-product {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
}

.wcis-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.wcis-product img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.wcis-product-body { padding: 0.75rem; }

.wcis-product-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #222;
    margin: 0 0 0.4rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wcis-product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ff6a00;
    margin-bottom: 0.5rem;
}

.wcis-product-link {
    display: inline-block;
    font-size: 0.8rem;
    color: #ff6a00;
    text-decoration: none;
    font-weight: 600;
}

.wcis-product-link:hover { text-decoration: underline; }

/* Floating button */
.wcis-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99990;
    background: linear-gradient(90deg, #ff8a00, #ff5e00);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.3rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.15s;
}

.wcis-floating-btn:hover { transform: scale(1.05); }

/* Modal */
.wcis-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcis-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.wcis-modal-box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    width: 94%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.wcis-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.wcis-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.wcis-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0 0.3rem;
}

.wcis-modal-body { padding: 1.5rem; }

@media (max-width: 480px) {
    .wcis-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    .wcis-product img { height: 120px; }
    .wcis-floating-btn span { display: none; }
    .wcis-floating-btn {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
}
