/* Existing styles from the original style.css */
.nepalevs-car-comparison {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.comparison-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.add-car {
    text-align: center;
    position: relative;
}

.add-car-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 50%;
    background: #f9f9f9;
    cursor: pointer;
    flex-direction: column;
    transition: border-color 0.3s;
}

.add-car-btn:hover {
    border-color: #007bff;
}

.add-car-btn .plus-icon {
    font-size: 2rem;
    color: #666;
    margin-bottom: 5px;
}

.add-car-btn span {
    font-size: 0.9rem;
    color: #666;
}

.custom-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 5px;
}

.custom-dropdown.active {
    display: block;
}

.custom-dropdown .dropdown-search {
    padding: 8px;
    font-size: 1rem;
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    background: #f9f9f9;
    outline: none;
}

.custom-dropdown .dropdown-search:focus {
    border-bottom-color: #007bff;
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

.custom-dropdown .dropdown-options {
    max-height: 200px;
    overflow-y: auto;
}

.custom-dropdown .dropdown-option {
    padding: 8px 10px;
    cursor: pointer;
}

.custom-dropdown .dropdown-option:hover {
    background: #f0f0f0;
}

.custom-dropdown .dropdown-option.selected {
    background: #007bff;
    color: #fff;
}

.vs {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
}

.car-selections {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.car-selection {
    text-align: center;
}

.car-selection .car-title {
    display: none;
}

.car-selection .variety-select {
    padding: 8px;
    font-size: 1rem;
    width: 200px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.compare-now-wrapper {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.compare-now,
.clear-all {
    padding: 10px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.compare-now {
    background: #ff5733;
}

.compare-now:hover {
    background: #e04e2d;
    transform: translateY(-2px);
}

.clear-all {
    background: #6c757d;
}

.clear-all:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.comparison-result {
    margin-top: 20px;
}

.comparison-table {
    width: 100%;
}

.comparison-table h2 {
    display: none;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: #f4f4f4;
    font-weight: 600;
    padding: 10px;
    text-align: center;
    position: relative;
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
}

.comparison-table th:nth-child(2),
.comparison-table th:nth-child(3) {
    padding: 10px;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    max-width: 190px;
}

.comparison-table .section-title td {
    background: #f8e1e1;
    font-weight: 600;
    text-align: left;
}

.comparison-table td.different {
    color: #ff0000;
}

/* Updated styles for car images in comparison */
.comparison-table .car-images {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.comparison-table .car-image-left,
.comparison-table .car-image-right {
    width: 150px;
    height: 75px;
    text-align: center;
}

.comparison-table .car-image-left img,
.comparison-table .car-image-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* Updated styles for predefined cars cards */
.nepalevs-predefined-cars-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.car-pair-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 450px;
    height: 180px;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.car-pair-card:hover {
    transform: translateY(-5px);
}

.car-pair {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
    height: 120px;
    box-sizing: border-box;
}

.car-left,
.car-right {
    width: 45%;
    height: 100%;
}

.car-left .car-image,
.car-right .car-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.car-left img,
.car-right img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.vs-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: #666;
    width: 10%;
    text-align: center;
}

.car-names {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    height: 60px;
    box-sizing: border-box;
    align-items: center;
}

.name-left,
.name-right {
    font-size: 1rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 45%;
    text-align: center;
}

/* Mobile styles with adjusted spacing and alignment */
@media (max-width: 768px) {
    .nepalevs-car-comparison {
        padding: 0;
        margin: 0;
    }

    .comparison-row {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }

    .car-selections {
        flex-direction: column;
        gap: 10px;
    }

    .add-car-btn {
        width: 100px;
        height: 100px;
    }

    .custom-dropdown,
    .car-selection .variety-select {
        width: 100%;
        max-width: 150px;
    }

    .custom-dropdown {
        width: 150px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 1001;
    }

    .custom-dropdown .dropdown-options {
        max-height: 200px;
        overflow-y: auto;
    }

    .custom-dropdown .dropdown-search {
        width: 100%;
        max-width: 150px;
    }

    .vs {
        font-size: 1.2rem;
    }

    .comparison-table h2 {
        font-size: 1.2rem;
    }

    .comparison-table th,
    .comparison-table td {
        font-size: 0.9rem;
        padding: 8px;
        max-width: 150px;
    }

    .comparison-table th:nth-child(2),
    .comparison-table th:nth-child(3) {
        padding: 8px;
    }

    .comparison-table .car-images {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 20px;
        gap: 16px;
        padding: 0 16px;
    }

    .comparison-table .car-image-left,
    .comparison-table .car-image-right {
        width: 100px;
        height: 50px;
        text-align: center;
    }

    .comparison-table .car-image-left img,
    .comparison-table .car-image-right img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
    }

    .nepalevs-predefined-cars-cards {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 10px 10px 10px 15px;
    }

    .car-pair-card {
        display: inline-flex;
        width: 300px;
        height: 150px;
        margin-right: 10px;
        flex-direction: column;
        flex-shrink: 0;
        vertical-align: top;
        box-sizing: border-box;
    }

    .car-pair {
        height: 100px;
        box-sizing: border-box;
        align-items: center;
    }

    .car-left .car-image,
    .car-right .car-image {
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;
    }

    .car-left img,
    .car-right img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 5px;
    }

    .car-names {
        height: 50px;
        align-items: center;
    }

    .name-left,
    .name-right {
        font-size: 0.9rem;
    }

    .vs-label {
        font-size: 1rem;
    }

    .compare-now-wrapper {
        flex-direction: row;
        gap: 10px;
    }
}