/* ==========================================================================
   MOTOWHEEL — MOBILE RESPONSIVE AUTOMOTIVE STYLES
   Covers: Header, Search, Hero, Fitment Widget, Cards, Footer, Bottom Nav
   ========================================================================== */

/* ─── GLOBAL MOBILE RESET ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    body {
        font-size: 14px;
        background: #f4f6f9;
    }

    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* Tighten vertical gaps between sections */
    .__inline-61.d-flex.flex-column.gap-20 {
        gap: 14px !important;
    }
}

/* Hide Mobile App Download Banner Popup */
.app-download-popup,
#app-banner {
    display: none !important;
}

/* ─── TOPBAR — HIDE ON MOBILE ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .topbar {
        display: none !important;
    }
}

/* ─── STICKY HEADER / NAVBAR ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .navbar-sticky.mobile-head {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #ffffff !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10) !important;
        padding: 0 !important;
    }

    .navbar.navbar-expand-md.navbar-light {
        padding: 10px 14px !important;
        min-height: 60px;
    }

    /* Logo sizing on mobile */
    .mobile-logo-img,
    .__inline-11 {
        max-height: 36px !important;
        width: auto !important;
    }

    /* Hamburger toggler */
    .navbar-toggler {
        border: none !important;
        padding: 4px 6px !important;
        box-shadow: none !important;
        order: -1;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff2e3b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='21' y2='18'%3E%3C/line%3E%3C/svg%3E") !important;
        width: 24px;
        height: 24px;
    }

    /* Navbar toolbar icons on mobile */
    .navbar-toolbar {
        gap: 6px !important;
        margin-left: auto;
    }

    .navbar-tool-icon-box {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .navbar-tool-icon-box.bg-secondary {
        background: #f1f5f9 !important;
        color: #0f172a !important;
    }

    /* Cart icon badge */
    .navbar-tool-label {
        top: -4px !important;
        right: -4px !important;
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
        background: #ff2e3b !important;
        border: 2px solid #fff;
    }

    /* Cart total text — hide on small */
    .navbar-tool-text {
        display: none !important;
    }

    /* Collapsed Mobile Sidebar Drawer Menu Styling */
    #navbarCollapse {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 290px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 999999 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2) !important;
        overflow-y: auto !important;
        border: none !important;
        transition: transform 0.3s ease-in-out !important;
    }

    /* Mobile Header inside Drawer */
    .mobile-menu-drawer-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 16px 20px !important;
        background: #0b0f19 !important;
        border-bottom: 3px solid #ff2e3b !important;
        margin-bottom: 12px !important;
        color: #ffffff !important;
    }

    .mobile-menu-drawer-title {
        font-family: 'Outfit', sans-serif !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        color: #ffffff !important;
        letter-spacing: 0.04em !important;
        text-transform: uppercase !important;
        display: flex !important;
        align-items: center !important;
    }

    .close-drawer-btn,
    .mobile-menu-drawer-header .navbar-toggler {
        color: #ffffff !important;
        opacity: 1 !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        padding: 0 !important;
    }

    .close-drawer-btn i,
    .mobile-menu-drawer-header .navbar-toggler i {
        font-size: 20px !important;
        color: #ffffff !important;
    }

    /* Navbar List inside Drawer */
    #navbarCollapse .navbar-nav {
        padding: 0 16px 20px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #navbarCollapse .nav-item {
        margin-bottom: 8px !important;
        border: none !important;
        width: 100% !important;
    }

    #navbarCollapse .nav-link,
    #navbarCollapse .nav-item > a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 12px 16px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        font-family: 'Outfit', sans-serif !important;
        font-weight: 600 !important;
        font-size: 14px !important;
        color: #0f172a !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }

    #navbarCollapse .nav-link:hover,
    #navbarCollapse .nav-link.active,
    #navbarCollapse .nav-item.active > .nav-link {
        background: rgba(255, 46, 59, 0.06) !important;
        border-color: #ff2e3b !important;
        color: #ff2e3b !important;
    }

    /* Dropdown Menus inside Drawer (Categories, Brand, Offers) */
    #navbarCollapse .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        background: #ffffff !important;
        border: 1px solid #f1f5f9 !important;
        border-radius: 12px !important;
        margin-top: 6px !important;
        margin-bottom: 8px !important;
        padding: 6px 8px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    }

    #navbarCollapse .dropdown-menu .dropdown-item,
    #navbarCollapse .dropdown-menu a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 9px 12px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #334155 !important;
        border-radius: 8px !important;
        background: transparent !important;
        border: none !important;
    }

    #navbarCollapse .dropdown-menu a:hover,
    #navbarCollapse .dropdown-menu a.active {
        background: #f1f5f9 !important;
        color: #ff2e3b !important;
    }

    /* Mega menu items inside drawer */
    #navbarCollapse .mega-nav1,
    #navbarCollapse .mega-nav {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Responsive Navbar Stuck Menu Container */
    .navbar-stuck-menu {
        background: #ffffff !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 0 !important;
    }
}

/* ─── SEARCH BAR MOBILE ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .search-form-mobile {
        display: none;
    }

    .search-form-mobile.active,
    .search-form-mobile.d-block {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        background: #fff;
        padding: 12px 14px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }

    .search-bar-input {
        border-radius: 12px !important;
        border: 2px solid #e2e8f0 !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        background: #f8fafc !important;
        color: #0f172a !important;
        height: 46px !important;
        transition: all 0.2s ease;
    }

    .search-bar-input:focus {
        border-color: #ff2e3b !important;
        box-shadow: 0 0 0 3px rgba(255, 46, 59, 0.12) !important;
        background: #fff !important;
    }

    .search-bar-input::placeholder {
        color: #94a3b8 !important;
    }

    .open-search-form-mobile .navbar-tool-icon-box {
        background: #ff2e3b !important;
        color: #ffffff !important;
        border-radius: 10px !important;
    }

    .open-search-form-mobile .tio-search {
        color: #ffffff !important;
        font-size: 16px !important;
    }

    .close-search-form-mobile {
        color: #ff2e3b !important;
        font-weight: 700;
        font-size: 13px !important;
        cursor: pointer;
        padding: 0 4px;
    }
}

/* ─── HERO SLIDER ─────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .bg-transparent.pt-3 {
        padding-top: 0 !important;
    }

    .__slide-img.__slide-img-170 {
        height: 190px !important;
        object-fit: cover;
        border-radius: 14px !important;
    }

    .__top-slider-images {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Hide left category column on mobile slider area */
    .__top-slider-cate {
        display: none !important;
    }
}

/* ─── FITMENT / PARTS SEARCH WIDGET ──────────────────────────────────────── */
@media (max-width: 767px) {
    .auto-fitment-section {
        margin-top: 10px !important;
        margin-bottom: 8px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .auto-fitment-card {
        border-radius: 16px !important;
        padding: 16px 14px !important;
    }

    .auto-fitment-card::before {
        height: 3px;
    }

    .auto-fitment-header {
        margin-bottom: 14px !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px !important;
    }

    .auto-fitment-title {
        font-size: 16px !important;
        letter-spacing: 0.02em;
        line-height: 1.3;
    }

    .auto-fitment-title i {
        font-size: 16px !important;
    }

    .auto-fitment-subtitle {
        font-size: 12px !important;
        color: #94a3b8;
    }

    /* Show badge inline on mobile */
    .auto-fitment-header .badge {
        display: inline-flex !important;
        font-size: 10px !important;
        padding: 4px 10px !important;
    }

    .auto-fitment-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .auto-fitment-btn-wrap {
        grid-column: span 1 !important;
    }

    .auto-select-wrapper label {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }

    .auto-select-wrapper select {
        height: 44px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
        padding: 0 12px !important;
    }

    .btn-auto-search {
        height: 44px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        width: 100% !important;
        padding: 0 !important;
    }
}

/* ─── FLASH DEALS ─────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .flash-deals-wrapper {
        border-radius: 14px !important;
        padding: 14px !important;
        margin: 0 !important;
    }

    .flash-deal-text h1 span {
        font-size: 18px !important;
    }

    .cz-countdown-days,
    .cz-countdown-hours,
    .cz-countdown-minutes,
    .cz-countdown-seconds {
        min-width: 40px !important;
        padding: 5px 8px !important;
    }

    .cz-countdown-value {
        font-size: 15px !important;
    }

    .cz-countdown-text {
        font-size: 9px !important;
    }

    .countdown-background {
        padding: 8px 10px !important;
    }
}

/* ─── SECTION HEADERS ─────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .feature-product-title,
    .categories-title,
    .arrival-title,
    .for-feature-title {
        font-size: 17px !important;
    }

    .section-card-margin {
        border-radius: 14px !important;
        padding: 10px 12px 16px !important;
    }

    .view-all-text {
        font-size: 12px !important;
    }
}

/* ─── CATEGORIES SECTION ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .__cate-item .__img {
        width: 62px !important;
        height: 62px !important;
    }

    .__cate-item h3 {
        font-size: 11px !important;
        margin-top: 4px !important;
    }

    .card.__shadow {
        border-radius: 14px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    }

    .card-body {
        padding: 12px !important;
    }
}

/* ─── PRODUCT CARDS (Flash Deal / Feature / New Arrival) ──────────────────── */
@media (max-width: 767px) {
    /* Card 1 - horizontal flash deal style */
    .flash_deal_product {
        border-radius: 12px !important;
        padding: 8px !important;
    }

    .flash_deal_product_pic {
        height: 130px !important;
    }

    .flash_deal_product_pic img {
        height: 110px !important;
    }

    .flash-product-title a {
        font-size: 13px !important;
    }

    .flash-product-price,
    .text-accent {
        font-size: 14px !important;
    }

    /* Card 2 - vertical product card */
    .product-single-hover {
        border-radius: 12px !important;
        padding: 8px !important;
    }

    .product-single-hover:hover {
        transform: none !important; /* disable hover-lift on touch */
    }

    .inline_product img {
        border-radius: 10px !important;
        width: 100% !important;
        height: 130px !important;
        object-fit: contain;
    }

    .single-product-details h3 a {
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    .single-product-details h4 {
        font-size: 14px !important;
    }

    /* Deal of the day card */
    .deal_of_the_day {
        border-radius: 14px !important;
        padding: 14px !important;
    }

    .deal_of_the_day h2 {
        font-size: 15px !important;
    }

    .btn--primary,
    .btn-primary {
        font-size: 13px !important;
        padding: 8px 16px !important;
        border-radius: 10px !important;
    }

    /* For inline single products (latest products grid) */
    .__inline-single-product {
        border-radius: 12px !important;
    }

    .product-with-bg {
        padding: 4px !important;
    }
}

/* ─── FEATURED DEAL SECTION ───────────────────────────────────────────────── */
@media (max-width: 767px) {
    .featured_deal {
        padding: 0 !important;
    }

    .__featured-deal-wrap {
        border-radius: 14px !important;
        padding: 14px !important;
    }

    .featured_deal_title {
        font-size: 18px !important;
    }
}

/* ─── BRANDS SECTION ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .__brand-item {
        height: 70px !important;
        border-radius: 10px !important;
        padding: 8px !important;
    }

    .__brand-item img {
        max-height: 38px !important;
    }

    .brand-slider,
    .mt-sm-3 {
        margin-top: 10px !important;
    }
}

/* ─── TOP SELLERS / VENDOR CARDS ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .seller-card .card {
        border-radius: 14px !important;
    }

    .others-store-card {
        border-radius: 12px !important;
    }

    .other-store-banner {
        height: 90px !important;
    }

    .other-store-logo {
        width: 44px !important;
        height: 44px !important;
    }

    .others-store-card .info h3 {
        font-size: 13px !important;
    }

    .info-area .info-item h5 {
        font-size: 14px !important;
    }
}

/* ─── COMPANY RELIABILITY BAR ─────────────────────────────────────────────── */
@media (max-width: 767px) {
    .shipping-policy-web {
        border-radius: 14px !important;
        padding: 14px 10px !important;
    }

    .shopping-method-icon {
        width: 52px !important;
        height: 52px !important;
    }

    .shipping-method-system p {
        font-size: 12px !important;
    }
}

/* ─── DISCOUNT BADGE ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .for-discount-value {
        font-size: 10px !important;
        padding: 2px 6px !important;
        border-radius: 3px 6px 6px 3px !important;
    }
}

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .page-footer {
        padding-bottom: 80px !important; /* leave room for bottom nav */
    }

    .footer-slide-item {
        border-radius: 12px !important;
        padding: 12px 8px !important;
    }

    .footer-slide-item .heading {
        font-size: 12px !important;
    }

    .footer-web-logo {
        text-align: center !important;
        margin-bottom: 16px;
    }

    .footer-web-logo img {
        max-height: 40px !important;
    }

    /* Footer columns stacked on mobile */
    .page-footer .row > div {
        margin-bottom: 12px;
    }

    .widget-list-link {
        font-size: 13px !important;
        line-height: 1.6;
    }

    .footer-header {
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }

    .page-footer .col-md-3,
    .page-footer .col-xl-3 {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 12px;
        margin-bottom: 4px;
    }

    .social-btn {
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Copyright bottom bar */
    .bg-white-overlay-50.py-4 {
        padding: 12px 0 !important;
    }

    .bg-white-overlay-50 p.fs-14 {
        font-size: 11px !important;
    }

    .bg-white-overlay-50 ul li {
        font-size: 11px !important;
    }
}

/* ─── MOBILE BOTTOM NAVIGATION BAR ───────────────────────────────────────── */
.moto-bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    .moto-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.10);
        padding: 6px 0 env(safe-area-inset-bottom, 6px);
        align-items: stretch;
        justify-content: space-around;
    }

    .moto-bottom-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 4px;
        text-decoration: none !important;
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        font-family: 'Outfit', sans-serif;
        letter-spacing: 0.02em;
        transition: color 0.2s ease, background 0.2s ease;
        border-radius: 0;
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .moto-bottom-nav__item.active,
    .moto-bottom-nav__item:hover {
        color: #ff2e3b;
    }

    .moto-bottom-nav__item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 3px;
        background: #ff2e3b;
        border-radius: 0 0 4px 4px;
    }

    .moto-bottom-nav__icon {
        font-size: 20px;
        line-height: 1;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Cart item count badge on bottom nav */
    .moto-bottom-nav__badge {
        position: absolute;
        top: -5px;
        right: -8px;
        background: #ff2e3b;
        color: #ffffff;
        font-size: 9px;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        border: 2px solid #ffffff;
    }

    .moto-bottom-nav__label {
        font-size: 10px;
        line-height: 1;
    }

    /* Center cart button — prominent */
    .moto-bottom-nav__item.center-cart {
        color: #ffffff !important;
    }

    .moto-bottom-nav__item.center-cart .moto-bottom-nav__icon-wrap {
        background: linear-gradient(135deg, #ff2e3b, #d90429);
        border-radius: 50%;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 16px rgba(255, 46, 59, 0.4);
        margin-top: -14px;
        border: 3px solid #ffffff;
        position: relative;
    }

    .moto-bottom-nav__item.center-cart .moto-bottom-nav__icon {
        font-size: 20px;
        color: #ffffff;
    }

    .moto-bottom-nav__item.center-cart .moto-bottom-nav__label {
        color: #64748b;
    }

    .moto-bottom-nav__item.center-cart:hover .moto-bottom-nav__label,
    .moto-bottom-nav__item.center-cart.active .moto-bottom-nav__label {
        color: #ff2e3b;
    }
}

/* ─── ANNOUNCEMENT BANNER ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    #announcement {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
}

/* ─── QUICK VIEW OVERLAY ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .quick-view {
        display: none !important; /* hide quick view buttons on touch; tap to product page */
    }
}

/* ─── OWL CAROUSEL NAV ARROWS ─────────────────────────────────────────────── */
@media (max-width: 767px) {
    .owl-nav button {
        width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        font-size: 14px !important;
    }
}

/* ─── SCROLL TO TOP ───────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .btn-scroll-top {
        bottom: 76px !important; /* above bottom nav */
        right: 14px !important;
        width: 38px !important;
        height: 38px !important;
    }

    .floating-btn-grp {
        bottom: 76px !important;
    }

    .wa-widget-send-button a img {
        width: 44px !important;
        height: 44px !important;
    }
}

/* ─── CLEARANCE SALE / BANNER SECTIONS ───────────────────────────────────── */
@media (max-width: 767px) {
    .footer_banner_img {
        height: 100px !important;
        border-radius: 10px !important;
        width: 100%;
        object-fit: cover;
    }

    .main_banner_img {
        height: 190px !important;
        border-radius: 14px !important;
    }
}

/* ─── NEW ARRIVAL SECTION ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .new-arrival-section {
        padding: 0 !important;
    }

    .section-header {
        padding: 0 4px !important;
    }

    .arrival-title {
        font-size: 17px !important;
    }
}

/* ─── BEST SELLING / TOP RATED CARDS ──────────────────────────────────────── */
@media (max-width: 767px) {
    .best-selling-image,
    .top-rated-image {
        border-radius: 10px !important;
    }

    .__best-selling,
    .__top-rated {
        border-radius: 12px !important;
        padding: 8px !important;
    }
}

/* ─── SEARCH RESULTS DROPDOWN ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .mobile-search-card {
        border-radius: 14px !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    }
}

/* ─── GENERAL UTILITY OVERRIDES ───────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Remove heavy shadows on mobile for performance */
    .card.__shadow {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }

    /* Tighter padding on sections */
    section.container,
    div.container {
        padding-top: 0 !important;
    }

    .gap-20 {
        gap: 12px !important;
    }

    .section-header {
        margin-bottom: 8px !important;
    }

    /* Remove hover transforms on touch devices */
    @media (hover: none) {
        .product-single-hover:hover,
        .flash_deal_product:hover,
        .__cate-item:hover .__img,
        .__brand-item:hover,
        .others-store-card:hover {
            transform: none !important;
            box-shadow: var(--auto-shadow-card) !important;
        }
    }
}
