/* Compare Modal Styles */
:root {
    --nc-primary: #247A34;
    --nc-primary-hover: #1f6a2c;
    --nc-text-main: #0f172a;
    --nc-text-muted: #64748b;
    --nc-bg-card: #ffffff;
    --nc-border: #e2e8f0;
    --nc-shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.nc-compare-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nc-compare-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.nc-compare-modal {
    background: #f8fafc;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 24px;
    box-shadow: var(--nc-shadow-premium);
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.nc-compare-modal-overlay.active .nc-compare-modal {
    transform: scale(1);
}

/* Header */
.nc-modal-header {
    padding: 24px 32px;
    background: #fff;
    border-bottom: 1px solid var(--nc-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nc-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--nc-text-main);
}

.nc-modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--nc-text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.nc-modal-close-btn:hover {
    color: #ef4444;
}

/* Content */
.nc-modal-body {
    padding: 20px 32px;
    overflow: hidden;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nc-modal-body::-webkit-scrollbar {
    display: none;
}

/* Selected Cars List */
.nc-selected-cars-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.nc-selected-car-row {
    background: #fff;
    border: 1px solid var(--nc-border);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.nc-vs-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: #fff;
    border-radius: 50%;
}

.nc-vs-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nc-selected-car-img {
    width: 100px;
    height: 70px;
    object-fit: contain;
    background: #FFF;
    border-radius: 10px;
}

.nc-selected-car-info {
    flex: 1;
}

.nc-selected-car-info h3 {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
}

.nc-selected-car-info p {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--nc-text-muted);
}

.nc-selected-car-price {
    font-size: 15px;
    font-weight: 700;
    color: #10b981;
}

.nc-remove-selected-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.nc-remove-selected-btn:hover {
    background: #fef2f2;
}

/* Footer Button */
.nc-btn-compare-action {
    background: #15803d;
    color: #fff;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.nc-btn-compare-action:hover {
    background: #166534;
    transform: translateY(-2px);
}

/* Suggestions Header */
.nc-suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.nc-suggestions-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--nc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nc-add-another-btn {
    background: none;
    border: none;
    color: var(--nc-text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    text-decoration: underline;
}

.nc-add-another-btn:hover {
    color: var(--nc-primary);
}

/* Suggestions Grid */
.nc-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    overflow: hidden;
}

.nc-suggestion-card {
    background: #fff;
    border: 1px solid var(--nc-border);
    border-radius: 16px;
    padding: 12px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.nc-suggestion-card:hover {
    border-color: var(--nc-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nc-suggestion-card.selected {
    border-color: var(--nc-primary);
    background: #eff6ff;
}

.nc-suggestion-img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 12px;
}

.nc-suggestion-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nc-suggestion-price {
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 12px;
}

.nc-suggestion-compare-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--nc-text-main);
    font-weight: 500;
}

.nc-suggestion-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--nc-border);
    appearance: none;
    background: #fff;
    cursor: pointer;
    position: relative;
}

.nc-suggestion-checkbox:checked {
    background: var(--nc-primary);
    border-color: var(--nc-primary);
}.nc-btn-voir-plus {
    background: #15803d;
    color: #fff;
    border: none;
    padding: 10px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.nc-btn-voir-plus:hover {
    background: #166534;
    transform: translateY(-2px);
}

.nc-suggestion-checkbox:checked::after {
    content: '✓';
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* Selector Stepper */
.nc-selector-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 10px;
    position: relative;
}

.nc-selector-stepper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 40px;
    right: 40px;
    height: 1px;
    background: var(--nc-border);
    z-index: 1;
}

.nc-sel-step {
    position: relative;
    z-index: 2;
    background: #f8fafc;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--nc-text-muted);
}

.nc-sel-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--nc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.nc-sel-step.active {
    color: var(--nc-text-main);
}

.nc-sel-step.active .nc-sel-step-num {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.nc-sel-step.completed .nc-sel-step-num {
    background: #ecfdf5;
    border-color: #10b981;
    color: #10b981;
}

/* Selector Search */
.nc-sel-search-wrap {
    position: relative;
    margin-bottom: 24px;
}

.nc-sel-search-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nc-text-muted);
}

.nc-sel-search-input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border-radius: 12px;
    border: 1px solid var(--nc-border);
    background: #fff;
    font-size: 15px;
}

/* Grids */
.nc-sel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: none;
    overflow-y: visible;
    padding: 2px;
}

.nc-sel-item {
    background: #fff;
    border: 1px solid var(--nc-border);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nc-sel-item img {
    width: 100%;
    height: 40px;
    object-fit: contain;
    margin-bottom: 4px;
}

.nc-sel-item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--nc-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Variant List */
.nc-sel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nc-sel-list-item {
    background: #fff;
    border: 1px solid var(--nc-border);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nc-sel-list-item:hover {
    border-color: var(--nc-primary);
    background: #f0f9ff;
}

.nc-sel-list-name {
    font-weight: 600;
}

.nc-sel-list-price {
    color: #10b981;
    font-weight: 700;
}

/* Back Link */
.nc-sel-back {
    margin-top: 16px;
    color: var(--nc-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nc-sel-back:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .nc-sel-grid {
    grid-template-columns: repeat(4, 1fr);
    }

    .nc-sel-item {
        padding: 10px;
    }

    .nc-sel-item img {
        height: 36px;
        margin-bottom: 6px;
    }

    .nc-sel-item-name {
        font-size: 13px;
    }
}

/* Footer */
.nc-modal-footer {
    padding: 24px 32px;
    background: #fff;
    border-top: 1px solid var(--nc-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nc-selected-count {
    font-size: 15px;
    font-weight: 500;
    color: var(--nc-text-muted);
}

.nc-btn-compare-action {
    background: var(--nc-primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.nc-btn-compare-action:hover {
    background: var(--nc-primary-hover);
    transform: translateY(-2px);
}

.nc-btn-compare-action:disabled {
    background: #e2e8f0;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 640px) {
    .nc-compare-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .nc-suggestions-grid {
        grid-template-columns: 1fr;
    }
    
    .nc-selected-car-row {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 12px;
    }
    
    .nc-selected-car-img {
        width: 80px;
        height: 56px;
        min-width: 80px;
        flex-shrink: 0;
    }

    .nc-selected-car-info {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .nc-selected-car-info h3,
    .nc-selected-car-info p,
    .nc-selected-car-price {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nc-remove-selected-btn {
        flex-shrink: 0;
    }

    .nc-suggestion-card {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px;
    }

    .nc-suggestion-img {
        width: 96px;
        height: 72px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .nc-suggestion-name {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        margin-bottom: 4px;
    }

    .nc-suggestion-price {
        margin-bottom: 8px;
    }

    .nc-modal-header,
    .nc-modal-body,
    .nc-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nc-modal-body {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .nc-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .nc-btn-compare-action {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* ============================================
   Override: disable all hover effects in compare modal popup
   ============================================ */
.compare-modal button:hover,
.compare-modal .btn:hover,
.compare-modal a.btn:hover,
.compare-modal a:hover,
.compare-modal .compare-btn:hover,
.popup button:hover,
.popup .btn:hover,
button:hover,
.btn:hover {
    background: inherit !important;
    background-color: inherit !important;
    color: inherit !important;
    border-color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Disable hover on Start Comparison button */
.nc-btn-compare-action:hover,
.nc-btn-compare-action:focus,
.nc-btn-compare-action:active {
    background: var(--nc-primary) !important;
    color: #fff !important;
    border-color: var(--nc-primary) !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
    filter: none !important;
}
