/* ================= GLOBAL ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #ffffff;
    color: #111827;
    line-height: 1.6;
}

#menu-toggle {
    display: none;
}

/* ================= NAVBAR ================= */
.header {
    background: #d4d4d4;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-box {
    background: #2563eb;
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
}

.menu {
    list-style: none;
    display: flex;
    gap: 30px;
}

.menu li a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    transition: 0.3s;
}

.menu li a:hover {
    color: #2563eb;
}

.menu-btn {
    font-size: 26px;
    cursor: pointer;
    padding: 5px 10px;
}

/* ================= SIDEBAR & OVERLAY ================= */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.08);
    padding: 40px 25px;
    transition: right 0.4s ease;
    z-index: 1100;
}

.sidebar h3 {
    margin-bottom: 25px;
    font-size: 20px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 22px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    color: #2563eb;
    padding-left: 5px;
}

.sidebar ul li a.active {
    color: #2563eb;
    font-weight: 700;
    border-left: 3px solid #2563eb;
    padding-left: 10px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1050;
}

#menu-toggle:checked~.sidebar {
    right: 0;
}

#menu-toggle:checked~.overlay {
    opacity: 1;
    visibility: visible;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 22px;
    cursor: pointer;
}

/* ================= HERO SECTION ================= */
.hero {
    position: relative;
    height: 51vmin;
    min-height: 400px;
    overflow: hidden;
    margin-top: 60px;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================= BEST DEALS SECTION ================= */
.best-deals {
    padding: 60px 8%;
    background: #f4f6f9;
}

.best-deals h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;
}

.deals-container {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.listing-card {
    flex: 0 0 25%;
    padding: 10px;
}

.card-box {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
    height: 100%;
}

.card-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-box img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.content {
    padding: 15px;
}

.car-name {
    font-size: 18px;
    font-weight: 600;
    margin: 5px 0;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #111;
}

.deal-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #e6f7ed;
    color: #2563eb;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 10px;
}

/* ================= FOOTER SECTION ================= */
.image-section {
    position: relative;
    width: 100%;
    min-height: 400px;
}

.image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    color: white;
    padding: 40px 8%;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    margin-bottom: 15px;
    border-bottom: 1px solid #fff3;
    padding-bottom: 5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 20px;
    border-top: 1px solid #fff2;
    font-size: 14px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .listing-card {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .menu {
        display: none;
    }

    /* Hide main nav menu on mobile */
    .footer-top {
        flex-direction: column;
    }

    .listing-card {
        flex: 0 0 100%;
    }

    .hero {
        height: 40vh;
    }
}

/* ================= COMPARE MODE STYLES ================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.compare-mode-section {
    padding: 80px 0;
    background: #f8fafc;
}

.compare-controls {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 100;
}

.btn-primary {
    background: #2563eb;
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: 0.3s;
    text-align: left;
}

.dropdown-item:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Selection Cards Grid */
.selection-cards-grid {
    display: grid;
    gap: 30px;
    justify-content: center;
    margin-bottom: 50px;
}

.selection-card {
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 240px;
    position: relative;
    overflow: hidden;
}

.selection-card:hover {
    border-color: #2563eb;
    background: #f0f7ff;
    transform: scale(1.02);
}

.selection-card.filled {
    border-style: solid;
    border-color: #e2e8f0;
    padding: 0;
}

.selection-card.filled:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-placeholder h3 {
    color: #64748b;
    margin-bottom: 10px;
}

.card-placeholder p {
    color: #94a3b8;
    font-size: 14px;
}

.filled-card-content {
    text-align: left;
}

.filled-card-content img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: #f8fafc;
    padding: 20px;
}

.filled-card-details {
    padding: 20px;
}

.filled-card-details h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1e293b;
}

.filled-card-details .detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #64748b;
}

.filled-card-details .detail-item span:last-child {
    font-weight: 600;
    color: #334155;
}

/* Compare Action */
.compare-action {
    text-align: center;
}

.btn-compare {
    background: #10b981;
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-compare:hover:not(:disabled) {
    background: #059669;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.3);
}

.btn-compare:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #94a3b8;
    transition: 0.3s;
}

.modal-close:hover {
    color: #1e293b;
}

.ev-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
}

.modal-search-container {
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 10px 0;
}

.modal-search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

.modal-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.ev-option {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ev-option:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.ev-option.selected {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

.ev-option img {
    width: 100px;
    height: 70px;
    object-fit: contain;
}

.ev-option-info h4 {
    margin-bottom: 4px;
    color: #1e293b;
}

.ev-option-info p {
    font-size: 13px;
    color: #64748b;
}

/* Comparison Result section */
.comparison-result-section {
    padding: 100px 0;
    background: white;
    display: none;
    /* Initially hidden */
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #0f172a;
}

.comparison-table-wrapper {
    overflow-x: auto;
    padding: 20px;
}

table.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.comparison-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
}

.comparison-table th:first-child {
    text-align: left;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
}

.comparison-table .car-header img {
    width: 160px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
}

.comparison-table .car-header h4 {
    font-size: 18px;
    color: #1e293b;
}

.highlight-best {
    background: #ecfdf5 !important;
    position: relative;
    color: #065f46 !important;
}

.price-txt {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.best-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Animations */
.fade-out-section {
    opacity: 0;
    transform: translateY(-20px);
    transition: 0.5s ease;
}

.slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for compare cards */
@media (max-width: 768px) {
    .selection-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        padding: 20px;
    }

    .ev-options-grid {
        grid-template-columns: 1fr;
    }
}



/* most femous  */

/* ================= NEW SECTIONS STYLES ================= */

/* Most Compared Grid */
.most-compared-section {
    padding: 80px 0;
    background: #fdfdfd;
}

.most-compared-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.m-comp-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.m-comp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.m-comp-images {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: relative;
    margin-bottom: 20px;
}

.m-comp-images img {
    width: 40%;
    object-fit: contain;
}

.vs-badge {
    background: #2563eb;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.m-comp-info h4 { margin-bottom: 10px; font-size: 20px; }
.m-comp-info p { color: #64748b; margin-bottom: 15px; }

.btn-outline {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* Expert Video Section */
.expert-video-section {
    padding: 80px 0;
    background: #f1f5f9;
}

.video-wrapper {
    max-width: 1200px; 
    margin: 0 auto;
    display: flex;    
    gap: 20px;     
    justify-content: center;
}

.video-wrapper iframe {
    flex: 1;          
    height: 300px;  
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: none;
}

/* Responsive: Stack videos vertically on small screens */
@media (max-width: 992px) {
    .video-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .video-wrapper iframe {
        width: 100%;
        max-width: 600px;
        height: 350px;
    }
}

/* Image Box Section */
.image-box-section {
    padding: 80px 0;
}

.img-box-container {
    position: relative;
    width: 1200px;
    height: 250px;
    border-radius: 25px;
    overflow: hidden;
    margin: 0 auto;
}

.img-box-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-box-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

/* Responsive Fix for Video */
@media (max-width: 768px) {
    .video-wrapper iframe {
        height: 250px;
    }
}