/* 
   HOME-MOBILE.CSS 
   Target: Tablet and Mobile (<= 991px)
*/

@media (max-width: 991px) {

    /* Section Priority - Mantıklı Mobil Sıralama */
    .home-sections-wrapper {
        display: flex;
        flex-direction: column;
    }

    .section-fast-filter {
        order: 1;
        margin-top: 0 !important;
    }

    .section-slider {
        order: 2;
    }

    .section-filter {
        order: 3;
        margin-top: 20px !important;
    }

    /* Brand Filter Mobile Styles */
    .brand-filter-container {
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 0;
    }

    .brand-filter-item {
        min-width: 70px;
        padding: 8px;
        border-radius: 12px;
    }

    .brand-logo-wrap {
        width: 35px;
        height: 35px;
        margin-bottom: 5px;
        padding: 5px;
    }

    .brand-name-text {
        font-size: 0.6rem;
    }

    .section-vitrin {
        order: 4;
        margin-top: 10px !important;
    }

    .section-coming-soon {
        order: 5;
    }

    .section-banners {
        order: 6;
    }

    .section-stats {
        order: 7;
    }

    .section-seo-title {
        order: 8;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }

    .section-sold {
        order: 9;
    }

    .section-blog {
        order: 10;
    }

    .section-cta {
        order: 11;
    }

    .section-auth-docs {
        order: 12;
        margin-bottom: 30px !important;
    }

    .section-features {
        order: 13;
    }

    .section-overall-stats {
        order: 14;
    }

    .section-newsletter {
        order: 15;
    }

    /* Layout Adjustments */
    .listing-card {
        margin-bottom: 15px;
        display: flex;
        flex-direction: column;
    }

    .card-img-wrapper {
        height: auto !important;
        aspect-ratio: 4 / 3;
        min-height: auto !important;
    }

    .card-img-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .card-content {
        padding: 10px !important;
    }

    .brand-title {
        font-size: 14px !important;
        min-height: 36px !important;
        height: auto !important;
        margin-bottom: 2px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .trim-title {
        font-size: 11px !important;
        height: 16px !important;
        margin-bottom: 8px !important;
    }

    .specs-grid {
        padding: 6px !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4px !important;
        height: auto !important;
        max-height: none !important;
        margin-bottom: 10px !important;
    }

    .spec-item {
        font-size: 10px !important;
        white-space: nowrap;
    }

    .spec-item i {
        width: 12px !important;
        margin-right: 2px !important;
        font-size: 10px;
    }

    .card-footer-custom {
        padding-top: 8px !important;
        height: auto !important;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .price-val {
        font-size: 16px !important;
    }

    .badge-dynamic {
        font-size: 9px !important;
        padding: 3px 6px !important;
    }

    .fav-btn,
    .compare-btn,
    .expertise-trigger {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
    }

    .expertise-trigger {
        display: none !important;
    }

    /* Hide some elements to save space in 2-column layout */
    .listing-card .lot-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
        top: 8px !important;
        right: 8px !important;
    }

    /* Stats Banner Adjustment */
    .stats-counter-banner .stat-icon {
        width: 40px !important;
        height: 40px !important;
    }

    .stats-counter-banner h3 {
        font-size: 1.1rem !important;
    }

    /* Search Page Card Adjustments */
    .vehicle-col {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .vehicle-card {
        border-radius: 12px !important;
        overflow: hidden;
    }

    .vehicle-card .card-img-top {
        height: 120px !important;
        object-fit: cover;
    }

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

    .vehicle-card .card-title {
        font-size: 0.85rem !important;
        margin-bottom: 4px !important;
        height: 34px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.2;
    }

    /* Premium Slider Mobile (v2.4) */
    .premium-hero-slider {
        height: auto !important;
        min-height: auto !important;
        border-radius: 20px !important;
        background: #fff;
    }

    .premium-slide {
        flex-direction: column !important;
        height: auto !important;
        position: relative !important;
        opacity: 0;
        display: none;
    }

    .premium-slide.active {
        opacity: 1;
        display: flex;
    }

    .slide-visual-area {
        width: 100% !important;
        height: 250px !important;
    }

    .bento-grid-collage {
        padding: 5px !important;
        gap: 5px !important;
    }

    .bento-item {
        border-radius: 12px !important;
    }

    .single-slide-img {
        border-radius: 12px !important;
    }

    .slide-info-area {
        width: 100% !important;
        padding: 0 !important;
        margin-top: 0 !important;
        /* Removed overlap */
    }

    .info-glass-card {
        width: 100% !important;
        /* Full width on mobile */
        margin: 0 auto !important;
        padding: 20px !important;
        backdrop-filter: blur(10px) !important;
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: none !important;
        border-radius: 0 0 20px 20px !important;
        border: none !important;
    }

    .badge-logo-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }

    .brand-logo-circle {
        width: 44px !important;
        height: 44px !important;
        margin-top: 0 !important;
    }

    .slide-title {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }

    .slide-subtitle {
        font-size: 13px !important;
        margin-bottom: 15px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .slide-specs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 20px !important;
    }

    .spec-node {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    /* Hide Color and HP on Mobile */
    .slide-specs-grid .spec-node:nth-child(5),
    .slide-specs-grid .spec-node:nth-child(6) {
        display: none !important;
    }

    .marketing-promo-banner {
        margin-bottom: 15px !important;
        width: fit-content;
    }

    .slide-action-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .slide-price-tag {
        font-size: 22px !important;
        text-align: center;
    }

    .premium-btn {
        width: 100% !important;
        height: 44px !important;
    }

    .premium-dots {
        position: relative !important;
        bottom: 0 !important;
        right: 0 !important;
        justify-content: center;
        margin: 15px 0;
    }

    .dot-item {
        background: rgba(0, 0, 0, 0.1) !important;
    }

    .premium-badge {
        font-size: 9px !important;
        padding: 4px 10px !important;
        margin-bottom: 12px !important;
    }

    /* Compact Listing Card - Global Mobile */
    .listing-card,
    .vehicle-card {
        border-radius: 12px !important;
        margin-bottom: 10px !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04) !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
    }

    .card-img-wrapper,
    .vehicle-card .card-img-top {
        height: 140px !important;
        min-height: 140px !important;
        aspect-ratio: 16 / 11;
    }

    .brand-title,
    .vehicle-card .card-title {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        height: 34px !important;
        margin-bottom: 4px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .trim-title {
        display: none !important;
        /* Hide trim on mobile 2st column to save space */
    }

    .price-val,
    .vehicle-card .text-primary.fw-bold {
        font-size: 0.95rem !important;
        font-weight: 800 !important;
    }

    .specs-grid,
    .vehicle-card .small.text-muted {
        grid-template-columns: 1fr 1fr !important;
        gap: 2px !important;
        margin-bottom: 8px !important;
    }

    .spec-item,
    .vehicle-card .small.text-muted>div {
        font-size: 0.75rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-footer-custom {
        padding: 5px 0 0 0 !important;
    }

    .badge-dynamic {
        font-size: 0.65rem !important;
        padding: 2px 5px !important;
    }

    .btn-outline-primary {
        padding: 5px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }

    /* Save space for Sold Banner and Dual Banners on mobile */
    .section-banners .rounded-4 {
        padding: 20px !important;
        min-height: 140px !important;
    }

    .section-banners h3 {
        font-size: 1.25rem !important;
        margin-bottom: 5px !important;
    }

    .section-banners p {
        font-size: 0.8rem !important;
        margin-bottom: 10px !important;
    }

    .section-banners .btn-lg {
        padding: 8px 25px !important;
        font-size: 0.85rem !important;
    }

    .sold-banner {
        margin-bottom: 25px !important;
    }

    .sold-banner .rounded-4 {
        padding: 25px 20px !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px;
    }

    .sold-banner h2 {
        font-size: 1.5rem !important;
    }

    .sold-banner p {
        font-size: 0.9rem !important;
    }

    .sold-banner .btn-lg {
        padding: 10px 30px !important;
        font-size: 1rem !important;
        width: 100%;
    }

    /* Recently Viewed Mobile Hub Optimization */
    .section-recently-viewed {
        margin-bottom: 25px !important;
        margin-top: 10px !important;
        padding: 0 5px;
    }

    .history-row-container::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: 40px;
        background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95));
        pointer-events: none;
        z-index: 5;
    }

    [data-theme="dark"] .history-row-container::after {
        background: linear-gradient(to right, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.95));
    }

    /* Recently Viewed Mobile Gap Fix */
    .section-recently-viewed {
        margin-bottom: 25px !important;
        padding-top: 10px !important;
        padding-bottom: 0 !important;
    }

    .section-recently-viewed .section-header {
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
    }

    .section-recently-viewed #recentlyViewedList {
        margin-top: 0 !important;
    }

    /* Fast Filter Mobile Adjustments - Horizontal Scroll */
    .section-fast-filter {
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        margin-left: -12px; /* Container'dan taşması için */
        margin-right: -12px;
        padding-bottom: 5px;
        position: relative;
    }

    /* Right Side Fade Mask for Fast Filter */
    .section-fast-filter::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: 60px;
        background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95));
        pointer-events: none;
        z-index: 10;
    }

    [data-theme="dark"] .section-fast-filter::after {
        background: linear-gradient(to right, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.95));
    }

    .ff-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 12px !important;
        padding: 5px 15px 5px 25px !important; /* Left padding for better alignment */
        width: auto !important;
        min-width: 100%;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        /* Scroll Hint Animation */
        animation: scrollHint 1.8s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    }

    .ff-grid::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .ff-grid > div {
        flex: 0 0 115px !important; /* Kartların genişliği partial visibility için ayarlandı */
        scroll-snap-align: center;
        display: block !important;
    }

    .fast-filter-card {
        padding: 12px 6px !important;
        border-radius: 16px !important;
        height: 100% !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        border: 1px solid rgba(0, 0, 0, 0.04) !important;
    }

    .ff-icon-wrap {
        width: 34px !important;
        height: 34px !important;
        font-size: 15px !important;
        border-radius: 10px !important;
        margin-bottom: 6px !important;
    }

    .ff-title {
        font-size: 0.72rem !important;
        line-height: 1.1 !important;
        letter-spacing: -0.2px;
        white-space: normal;
        text-align: center;
        font-weight: 700 !important;
    }
}

/* Fluidity for very small screens */
@media (max-width: 576px) {
    .price-val {
        font-size: 15px !important;
    }
}

/* DARK MODE MOBILE */
[data-theme="dark"] .premium-hero-slider {
    background: #121212 !important;
}

[data-theme="dark"] .info-glass-card {
    background: rgba(30, 30, 30, 0.95) !important;
    color: #fff !important;
}