/* ── Nafay Motors Mobile Responsive Fix ── */

/* Fix body padding causing overflow */
body {
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* Fix container padding on mobile */
@media (max-width: 767px) {
    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ── Fix WhatsApp circle buttons ── */
/* The floating WA button is making all green buttons circle */
a.btn-whatsapp-price,
a.btn-mob-whatsapp,
a.btn-home-wa,
.btn-whatsapp-price,
.btn-mob-whatsapp,
.btn-home-wa {
    display: block !important;
    width: 100% !important;
    border-radius: 8px !important;
    padding: 10px 8px !important;
    text-align: center !important;
    background: #25D366 !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: unset !important;
    min-width: unset !important;
    aspect-ratio: unset !important;
    box-shadow: none !important;
    position: static !important;
    bottom: unset !important;
    right: unset !important;
}

/* Keep the floating WA button as circle - only that one */
.wa-float,
.mob-wa-float,
a.wa-float,
a.mob-wa-float {
    position: fixed !important;
    bottom: 24px !important;
    right: 20px !important;
    border-radius: 50px !important;
    width: auto !important;
    padding: 12px 20px !important;
    background: #25D366 !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 15px rgba(37,211,102,.4) !important;
}

/* ── Homepage car cards mobile ── */
@media (max-width: 767px) {
    .home-car-card {
        margin-bottom: 16px;
    }
    .home-car-card img {
        height: 200px;
        object-fit: cover;
    }
    .hero-title {
        font-size: 24px !important;
    }
    .hero-subtitle {
        font-size: 14px !important;
    }
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 90%;
        text-align: center;
        padding: 12px 20px;
    }
    .trust-bar .row {
        flex-wrap: wrap;
    }
    .trust-item .trust-num {
        font-size: 20px !important;
    }
    .section-title {
        font-size: 20px !important;
    }
}

/* ── Stock page mobile ── */
@media (max-width: 767px) {
    /* Stack the car card vertically */
    .car-card {
        flex-direction: column !important;
    }
    .car-img-wrap {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
        height: 200px !important;
        min-height: 200px !important;
    }
    .car-info {
        padding: 12px !important;
    }
    /* Hide desktop action column, show mobile buttons */
    .car-actions {
        display: none !important;
    }
    /* Show mobile buttons below car info */
    .d-block.d-md-none {
        display: block !important;
    }
    /* Right sidebar goes below listing on mobile */
    .stock-sidebar-col,
    .col-lg-3.col-md-4 {
        margin-top: 20px;
    }
    .car-title {
        font-size: 14px !important;
    }
    .spec-pill {
        font-size: 10px !important;
        padding: 3px 7px !important;
    }
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Navbar fix on mobile ── */
@media (max-width: 767px) {
    .timerowup, .timerow {
        font-size: 10px !important;
        padding: 4px 8px !important;
        overflow-x: auto;
        white-space: nowrap;
    }
    /* Fix the top info bar wrapping */
    .row.timerowup .col-6,
    .row.timerowup .col {
        font-size: 10px;
    }
}

/* ── Right sidebar full width on mobile ── */
@media (max-width: 767px) {
    .search-sidebar-box {
        margin-top: 10px;
        border-radius: 8px;
    }
    .whatsapp-sidebar-box {
        margin-top: 12px;
    }
}

/* ── View car page mobile ── */
@media (max-width: 767px) {
    .car-top {
        margin-left: 0 !important;
    }
    .coldetail {
        border-left: 4px solid #FE5214;
        padding-left: 10px;
    }
    .cardet-table {
        font-size: 12px;
    }
    .gallery {
        max-width: 100%;
    }
}

/* ── General mobile improvements ── */
@media (max-width: 767px) {
    /* Prevent horizontal scroll */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    /* Fix footer on mobile */
    .footer .row > div {
        margin-bottom: 16px;
    }
    /* Fix filter tags wrapping */
    .filter-tags {
        gap: 6px;
    }
    .filter-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
    /* Make WhatsApp float smaller on mobile */
    .wa-float {
        padding: 10px 14px !important;
        font-size: 12px !important;
        bottom: 16px !important;
        right: 12px !important;
    }
}