.imagesearch-container {
    /*max-width: 1200px;
    margin: 0 auto;*/
    width: 100%;
    padding: 20px 0;
}

.imagesearch-description {
    text-align: center;
    margin-bottom: 30px;
}

.imagesearch-form-container {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.input-method-toggle {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.toggle-option {
    cursor: pointer;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.toggle-option input[type="radio"] {
    margin-right: 8px;
}

.toggle-option:has(input:checked) {
    background: #1979c3;
    color: #fff;
    border-color: #1979c3;
}

.field {
    margin-bottom: 20px;
}

.field .label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.field .control {
    position: relative;
}

.input-file,
.input-text,
.select {
    font-size: 14px;
}

.file-info,
.url-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.search-options {
    margin: 20px 0;
}

.actions-toolbar {
    text-align: center;
    margin-top: 20px;
}

.action.submit.primary {
    padding: 12px 30px;
    font-size: 16px;
    background: #1979c3;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.action.submit.primary:hover {
    background: #006bb4;
}

.action.submit.primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.loading-indicator {
    text-align: center;
    padding: 40px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1979c3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.query-image-container {
    text-align: center;
    margin: 30px 0;
}

.query-image {
    max-width: 300px;
    max-height: 300px;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.search-results {
    margin-top: 40px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.results-stats {
    color: #666;
    font-size: 14px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.result-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.result-info {
    padding: 15px;
}

.result-name {
    font-weight: 600;
    margin-bottom: 8px;
}

.result-name a {
    color: #333;
    text-decoration: none;
}

.result-name a:hover {
    color: #1979c3;
}

.result-score {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.result-price {
    font-size: 18px;
    font-weight: bold;
    color: #1979c3;
}

.message.error {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #d32f2f;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.message.info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #1976d2;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.vs-wrapper {
    /*max-width: 900px;
    margin: 0 auto;*/
    color: #0F1111;
    -webkit-font-smoothing: antialiased;
}

.vs-wrapper * {
    box-sizing: border-box;
}

.vs-container {
    background: #fff;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.vs-tabs {
    display: flex;
    border-bottom: 1px solid #D5D9D9;
    background: #F0F2F2;
}

.vs-tab {
    flex: 1;
    padding: 14px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #565959;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.vs-tab.active {
    color: #0972BA;
    background: #fff;
    border-bottom-color: #0972BA;
}

.vs-content {
    padding: 24px;
    text-align: center;
}

.vs-headline {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0F1111;
}

.vs-subtext {
    font-size: 14px;
    color: #565959;
    margin-bottom: 24px;
}

.vs-input-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.vs-action-card {
    border: 2px dashed #D5D9D9;
    border-radius: 8px;
    padding: 30px 20px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vs-action-card:hover {
    border-color: #0972BA;
    background: rgba(9, 114, 186, 0.1);
}

.vs-icon-large {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    stroke: #565959;
}

.vs-action-text {
    font-weight: 700;
    color: #0F1111;
    font-size: 15px;
}

.vs-action-sub {
    font-size: 12px;
    color: #565959;
    margin-top: 4px;
}

.hidden-input {
    display: none;
}

.vs-camera-option {
    display: none;
}

@media (max-width: 768px) {
    /*.vs-input-grid {
        grid-template-columns: 1fr 1fr;
    }*/

    .vs-camera-option {
        display: flex;
        border-style: solid;
        background: #FAFAFA;
    }

    .vs-gallery-option {
        border-style: solid;
        background: #FAFAFA;
    }

    .vs-action-card {
        padding: 20px 10px;
        height: 140px;
    }

    .vs-icon-large {
        width: 32px;
        height: 32px;
    }
}

.vs-search-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    background: #0972BA;
    border: 1px solid #0972BA;
    color: #FFF;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5);
}

.vs-url-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #888C8C;
    border-radius: 4px;
    font-size: 15px;
    box-shadow: 0 1px 2px rgba(15, 17, 17, 0.15) inset;
}

.vs-results-area {
    display: none;
    margin-top: 30px;
}

.vs-stats {
    font-size: 14px;
    color: #000;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-weight: 600;
}

.vs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
@media (min-width: 768px) {
    .vs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .vs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .vs-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}



.vs-card-item {
    border: solid 1px #ebebeb;
    overflow: hidden;
    background: #fff;
    border-radius: 5px;
}

.vs-card-img {
    position: relative;
    padding-top: 100%;
    display: block;
    height: 0;
/*    background: #F7F7F7;*/
}

.vs-card-img img {
    bottom: 0;
    display: block;
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    mix-blend-mode: multiply;
}

.vs-card-info {
    padding: 10px;
}

.vs-card-title {
    font-size: 18px;
    line-height: normal;
    color: #000;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 46px;
}
.vs-card-title a {
    color: #000;
    text-decoration: none;
}
.vs-card-title a:active,
.vs-card-title a:hover,
.vs-card-title a:focus{
    color: #0972BA;
}

.vs-card-price {
    font-size: 18px;
    color: #D41117;
    font-weight: 700;
}

.vs-card-score {
    font-size: 12px;
    color: #007600;
    font-weight: 700;
    margin-top: 10px;
}

.hidden {
    display: none;
}

.vs-error {
    color: #C40000;
    font-size: 13px;
    margin-top: 10px;
    font-weight: 700;
    display: none;
}

/* --- NEW LOADER STYLES --- */

/* 1. Preview Box (The container for image + scanner) */
.vs-preview-box {
    position: relative;
    background: #000;
    border-radius: 8px;
    height: 250px;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Crucial for containing the beam */
}

/* The Uploaded Image */
.vs-preview-box img {
    max-width: 100%;
    max-height: 100%;
    transition: opacity 0.3s;
}

/* Change Button */
.vs-change-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #fff;
    color: #0F1111;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: none;
    z-index: 5;
}

/* 2. The Scanning Overlay (Hidden by default) */
.vs-scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dims the image */
    z-index: 4;
    display: none;
    /* Toggled by JS */
}

/* 3. The Laser Beam */
.vs-scan-beam {
    width: 100%;
    height: 3px;
    background: #0972BA;
    /* Amazon Orange */
    box-shadow: 0 0 20px rgba(228, 121, 17, 0.9), 0 0 10px #0972BA;
    /* Glowing effect */
    position: absolute;
    top: 0;
    animation: scan 2s infinite ease-in-out;
}

/* 4. Scanning Text */
.vs-scan-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* The Animation Keyframes */
@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Active State Helper */
.vs-is-scanning .vs-scan-overlay {
    display: block;
}

.vs-is-scanning img {
    opacity: 0.6;
}

/* Dim image when scanning */
.vs-is-scanning .vs-change-btn {
    display: none;
}

/* Hide button while scanning */

/* General Loader (For URL search) */
.vs-general-loader {
    text-align: center;
    margin: 20px 0;
    display: none;
}

.vs-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(9, 114, 186, 0.5);
    border-radius: 50%;
    border-top-color: #0972BA;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@media (max-width: 1600px) {
    .vs-card-price {
        font-size:16px
    }

    .vs-card-title {
        font-size: 16px;
        height: 42px;
    }
}

@media only screen and (max-width: 1439px) and (min-width: 1280px) {
    .vs-card-title {
        font-size: 15px;
        
    }
}

@media only screen and (max-width: 1439px) {
    .vs-card-title {
        font-size: 15px;
        height: 38px;
    }
}

@media (max-width: 767px) {
    .vs-content {
        padding: 15px;
    }
    .vs-card-title {
        font-size: 14px;
        height: 36px;
    }
}


