/* ============================================
   SHOP MOBILE CSS - Mobile App-like Design
   Design totalement type application mobile
   ============================================ */

/* Règles globales pour éviter le débordement */
@media (max-width: 768px) {
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Forcer tous les éléments à respecter la largeur de l'écran */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Empêcher le scroll horizontal sur tous les carrousels */
    .carousel,
    .carousel-inner {
        overflow-x: hidden !important;
        overflow-y: visible !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Mobile Only Styles */
@media (max-width: 768px) {
    /* Reset pour mobile */
    body {
        padding-bottom: 80px !important;
        overflow-x: hidden !important;
        background: #f5f5f5 !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        /* Correction pour Android - éviter le dépassement */
        position: relative;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Correction viewport pour Android */
    html {
        height: 100%;
        height: -webkit-fill-available;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Forcer tous les éléments à rester dans l'écran */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Correction pour éviter le débordement horizontal */
    body > *,
    main,
    section,
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Hero Section Mobile */
    .hero {
        height: 250px !important;
        margin-top: 0 !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
    }
    
    /* Shop Section Mobile */
    .shop-section {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        background: #f5f5f5 !important;
    }
    
    /* Container Mobile */
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Category Banner Mobile */
    .category-banner-section {
        height: 200px !important;
        margin-top: 0 !important;
    }
    
    .category-banner-content h1 {
        font-size: 1.5rem !important;
    }
    
    .category-banner-content .lead {
        font-size: 0.9rem !important;
    }
    
    /* Breadcrumb Mobile - Hidden */
    .breadcrumb {
        display: none !important;
    }
    
    /* Floating Filter Button */
    .mobile-filter-btn {
        position: fixed;
        bottom: 90px;
        right: 16px;
        background: linear-gradient(135deg, #800020 0%, #a00030 100%);
        color: white;
        border: none;
        border-radius: 50px;
        padding: 14px 22px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 20px rgba(128, 0, 32, 0.4);
        z-index: 1000;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 600;
    }

    .mobile-filter-btn:active {
        transform: scale(0.95);
        box-shadow: 0 2px 15px rgba(128, 0, 32, 0.5);
    }

    /* Mobile Filter Modal */
    .mobile-filter-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
        display: flex;
        justify-content: flex-end;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        backdrop-filter: blur(4px);
    }

    .mobile-filter-modal.active {
        visibility: visible;
        opacity: 1;
    }

    .mobile-filter-content {
        width: 85%;
        max-width: 380px;
        background: #fff;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
        box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    }

    .mobile-filter-modal.active .mobile-filter-content {
        transform: translateX(0);
    }

    .mobile-filter-header {
        padding: 1.25rem 1.5rem;
        background: linear-gradient(135deg, #800020 0%, #a00030 100%);
        color: white;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .mobile-filter-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
    }

    .mobile-filter-close {
        background: rgba(255,255,255,0.2);
        border: none;
        color: white;
        font-size: 1.25rem;
        cursor: pointer;
        padding: 0.5rem;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s ease;
    }
    
    .mobile-filter-close:active {
        background: rgba(255,255,255,0.3);
        transform: scale(0.95);
    }

    .mobile-filter-body {
        flex: 1;
        padding: 1.25rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-filter-body h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: #212529;
    }
    
    .mobile-filter-body .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 12px;
        transition: all 0.2s ease;
    }
    
    .mobile-filter-body .btn:active {
        transform: scale(0.98);
    }

    /* Product Cards Mobile - Design App Moderne */
    .product-card {
        margin-bottom: 0.75rem !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        background: #fff !important;
        border: none !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    .product-card-image {
        height: 180px !important;
        object-fit: cover !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #f8f9fa !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Toutes les images doivent rester dans leur conteneur */
    img {
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .product-card-body {
        padding: 1rem;
    }
    
    .product-card-title {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        line-height: 1.4;
        color: #212529;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-card-description {
        display: none;
    }
    
    .product-card-price-value {
        font-size: 1.15rem;
        font-weight: 700;
        color: #800020;
        margin: 0.5rem 0;
    }
    
    .product-card-compare-price {
        font-size: 0.85rem;
        color: #6c757d;
        text-decoration: line-through;
        margin-right: 0.5rem;
    }
    
    .product-card-actions {
        margin-top: 0.75rem;
        display: flex;
        gap: 0.5rem;
    }
    
    .product-card-btn-view,
    .product-card-btn-cart {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
        border-radius: 10px;
        font-weight: 600;
        flex: 1;
        transition: all 0.2s ease;
    }
    
    .product-card-btn-view:active,
    .product-card-btn-cart:active {
        transform: scale(0.98);
    }
    
    .product-card-badges-right {
        top: 8px;
        right: 8px;
    }
    
    .product-card-badges-left {
        top: 8px;
        left: 8px;
    }
    
    .product-card-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .product-card-seller {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        background: #f8f9fa;
        border-radius: 10px;
    }
    
    .product-card-seller-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #28a745;
    }
    
    .product-card-seller-avatar-placeholder {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #28a745;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.875rem;
    }
    
    .product-card-seller-name {
        font-size: 0.8rem;
        font-weight: 600;
        color: #212529;
    }
    
    .product-card-wholesale-wrapper {
        margin-top: 0.5rem;
        padding: 0.5rem;
        background: #f0f8f0;
        border-radius: 8px;
        font-size: 0.75rem;
    }

    /* Shop Sidebar Hidden on Mobile */
    .shop-sidebar {
        display: none !important;
    }

    .d-none.d-md-block {
        display: none !important;
    }
    
    /* Products Grid Mobile - 2 colonnes */
    .products-grid,
    .row.g-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        padding: 0.5rem 0.5rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .row.g-4 > * {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Toutes les rows doivent rester dans l'écran */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .row > * {
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Search Bar Mobile */
    .search-bar-section {
        padding: 1rem 0.5rem !important;
        background: linear-gradient(135deg, #800020 0%, #a00030 100%) !important;
        margin-bottom: 0.5rem;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .search-form .input-group {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        background: #fff;
    }
    
    .search-form .form-control {
        border: none;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        background: #fff;
    }
    
    .search-form .search-submit-btn {
        border: none;
        padding: 0.875rem 1.5rem;
        background: #ffc107;
        color: #212529;
    }
    
    /* Section Titles Mobile */
    section h2 {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
        color: #212529;
    }
    
    /* Category Cards Mobile */
    .category-card {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        transition: all 0.3s ease;
        background: #fff;
    }
    
    .category-card:active {
        transform: scale(0.98);
    }
    
    .category-card .card-img-top {
        height: 140px;
        object-fit: cover;
    }
    
    .category-card .card-body {
        padding: 0.75rem;
    }
    
    .category-card .card-title {
        font-size: 0.9rem;
        font-weight: 600;
        margin: 0;
    }
    
    /* Product Detail Mobile */
    .product-images {
        margin-bottom: 1rem;
    }
    
    .product-images img {
        border-radius: 16px;
        width: 100%;
    }
    
    .gallery-thumb {
        border-radius: 10px;
        border: 2px solid transparent;
        transition: all 0.2s ease;
    }
    
    .gallery-thumb:active {
        border-color: #800020;
        transform: scale(0.95);
    }
    
    /* Product Info Mobile */
    .product-info h1 {
        font-size: 1.35rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .product-info .price {
        font-size: 1.75rem;
        font-weight: 700;
        color: #800020;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        border-radius: 12px;
        font-weight: 600;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #800020 0%, #a00030 100%);
        box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
    }
    
    .btn-primary:active {
        box-shadow: 0 2px 8px rgba(128, 0, 32, 0.4);
    }
    
    /* Active Filters Mobile */
    .active-filters {
        padding: 0.75rem 0.5rem;
        background: #fff;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 0.75rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .active-filters .badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* Results Count Mobile */
    .results-count {
        padding: 0.75rem 0.5rem;
        background: #fff;
        border-bottom: 1px solid #e9ecef;
        font-size: 0.875rem;
        color: #6c757d;
        font-weight: 500;
    }
    
    /* Products Header Mobile */
    .products-header {
        background: #fff;
        padding: 1rem 0.5rem;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    /* Sort Select Mobile */
    .products-header select {
        width: 100%;
        padding: 0.75rem;
        border-radius: 12px;
        border: 1px solid #dee2e6;
        font-size: 0.95rem;
        background: #fff;
    }
    
    /* Infinite Scroll Loader Mobile */
    .infinite-scroll-loader {
        padding: 2rem;
        text-align: center;
        color: #6c757d;
    }
    
    .infinite-scroll-loader .spinner-border {
        width: 2rem;
        height: 2rem;
        border-width: 3px;
        color: #800020;
    }
    
    /* No Products Message Mobile */
    .no-products {
        text-align: center;
        padding: 3rem 1rem;
        color: #6c757d;
    }
    
    .no-products i {
        font-size: 3rem;
        margin-bottom: 1rem;
        color: #dee2e6;
    }
    
    /* Bottom Navigation Bar (App-like) */
    .shop-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e9ecef;
        padding: 0.5rem 0;
        z-index: 1000;
        box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around;
        align-items: center;
        flex-wrap: nowrap;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        /* Support pour safe area sur iOS */
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
        /* Hauteur minimale pour Android */
        min-height: 60px;
    }
    
    .shop-bottom-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.25rem;
        text-decoration: none;
        color: #6c757d;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        position: relative;
        border-radius: 12px;
        margin: 0 0.25rem;
        text-align: center;
    }
    
    .shop-bottom-nav-item.active {
        color: #800020;
        background: rgba(128, 0, 32, 0.1);
    }
    
    .shop-bottom-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
        transition: all 0.2s ease;
    }
    
    .shop-bottom-nav-item.active i {
        transform: scale(1.1);
    }
    
    .shop-bottom-nav-item span {
        font-size: 0.7rem;
        font-weight: 500;
        white-space: nowrap;
    }
    
    .shop-bottom-nav-item:active {
        transform: scale(0.95);
        background: rgba(128, 0, 32, 0.15);
    }
    
    .shop-bottom-nav-item .badge {
        position: absolute;
        top: 0;
        right: 0.5rem;
        transform: translate(50%, -50%);
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
        min-width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Header Mobile Sticky */
    .header {
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Smooth Scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Remove default margins on mobile */
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .row > * {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* Card improvements */
    .card {
        border: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-radius: 16px;
        background: #fff;
    }
    
    /* Badge improvements */
    .badge {
        padding: 0.4rem 0.75rem;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.8rem;
    }
    
    /* Input improvements */
    .form-control,
    .form-select {
        border-radius: 12px;
        border: 1px solid #dee2e6;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        background: #fff;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: #800020;
        box-shadow: 0 0 0 0.2rem rgba(128, 0, 32, 0.15);
        outline: none;
    }
    
    /* Section spacing */
    section {
        margin-bottom: 1rem;
    }
    
    /* Hide desktop elements */
    .d-lg-block,
    .d-md-block {
        display: none !important;
    }
    
    /* Show mobile elements */
    .d-md-none {
        display: block !important;
    }
    
    /* Product Detail Page Mobile */
    .product-detail-mobile {
        padding: 0.5rem;
    }
    
    .product-detail-mobile .product-images {
        margin-bottom: 1rem;
    }
    
    .product-detail-mobile .product-images img {
        border-radius: 16px;
        width: 100%;
        max-height: 400px;
        object-fit: cover;
    }
    
    .product-detail-mobile .gallery-thumb {
        border-radius: 10px;
        height: 70px;
        object-fit: cover;
    }
    
    .product-detail-mobile .product-info {
        background: #fff;
        padding: 1.25rem;
        border-radius: 16px;
        margin-top: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }
    
    .product-detail-mobile .product-info h1 {
        font-size: 1.35rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .product-detail-mobile .product-info .price {
        font-size: 1.75rem;
        font-weight: 700;
        color: #800020;
        margin: 0.75rem 0;
    }
    
    .product-detail-mobile .product-actions {
        position: sticky;
        bottom: 80px;
        background: #fff;
        padding: 1rem;
        border-top: 1px solid #e9ecef;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 100;
        margin: 1rem -0.5rem -0.5rem -0.5rem;
    }
    
    .product-detail-mobile .product-actions .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 12px;
    }
    
    /* Category Page Mobile */
    .category-page-mobile {
        padding: 0;
    }
    
    .category-banner-section {
        margin-bottom: 0.5rem;
    }
    
    /* Homepage Mobile */
    .shop-homepage-mobile section {
        margin-bottom: 1.5rem;
    }
    
    .shop-homepage-mobile .hero-shop-slider {
        height: 200px !important;
        margin-top: 0 !important;
        border-radius: 0;
    }
    
    .shop-homepage-mobile .hero-shop-slider .carousel-item {
        height: 200px !important;
    }
    
    .shop-homepage-mobile .hero-shop-slider img {
        height: 200px;
        object-fit: cover;
    }
    
    /* Advantages Section Mobile */
    .advantages-section-mobile {
        padding: 1rem 0.5rem;
    }
    
    .advantages-section-mobile .col-md-4 {
        margin-bottom: 0.75rem;
    }
    
    .advantages-section-mobile .card {
        border-radius: 12px;
        padding: 1.25rem;
        text-align: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }
    
    .advantages-section-mobile .card i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        color: #800020;
    }
    
    /* Sliders Mobile - Design simple et propre */
    .carousel {
        position: relative !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        /* Stabilisation du carousel */
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
        will-change: transform !important;
    }
    
    .carousel-inner {
        border-radius: 12px !important;
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        /* Stabilisation - Empêcher le scroll horizontal */
        display: block !important;
        position: relative !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .carousel-item {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        /* Stabilisation - Forcer la largeur et empêcher les glissements */
        display: block !important;
        float: none !important;
        position: relative !important;
        margin-right: 0 !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    /* Empêcher le scroll horizontal sur les carrousels */
    .carousel-inner::-webkit-scrollbar {
        display: none !important;
    }
    
    .carousel-inner {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
    
    /* Contrôles de navigation - Masqués sur mobile */
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
    
    /* Indicateurs de carrousel - Style mobile simple */
    .carousel-indicators {
        position: relative;
        margin: 0.75rem 0 0 0;
        bottom: auto;
        justify-content: center;
    }
    
    .carousel-indicators button {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin: 0 4px;
        background-color: rgba(128, 0, 32, 0.3);
        border: none;
        opacity: 1;
    }
    
    .carousel-indicators button.active {
        background-color: #800020;
        width: 24px;
        border-radius: 4px;
    }
    
    /* Slider de catégories - Mobile (2 par slide) */
    .category-card-mobile {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        transition: all 0.3s ease;
        border: none;
    }
    
    .category-card-mobile:active {
        transform: scale(0.98);
    }
    
    .category-card-mobile .card-img-top {
        height: 120px;
        object-fit: cover;
        width: 100%;
    }
    
    .category-card-mobile .card-body {
        padding: 0.5rem !important;
    }
    
    .category-card-mobile .card-title {
        font-size: 0.8rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Row dans les carrousels mobile - 2 colonnes - Alignement parfait */
    .carousel-item .row.g-2 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        -webkit-box-sizing: border-box !important;
        box-sizing: border-box !important;
        /* Stabilisation - Empêcher le débordement */
        overflow: hidden !important;
        position: relative !important;
    }
    
    .carousel-item .row.g-2 > * {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin: 0 !important;
    }
    
    /* Grille 2 colonnes pour mobile dans les sliders - Alignement parfait */
    .carousel-item .col-6 {
        flex: 0 0 50% !important;
        -webkit-flex: 0 0 50% !important;
        max-width: 50% !important;
        min-width: 0 !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin: 0 !important;
        -webkit-box-sizing: border-box !important;
        box-sizing: border-box !important;
        display: flex !important;
        -webkit-display: flex !important;
        flex-direction: column !important;
        -webkit-flex-direction: column !important;
        align-items: stretch !important;
        overflow: hidden !important;
        width: 50% !important;
        /* Stabilisation - Empêcher les glissements */
        position: relative !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    .carousel-item .col-6:first-child {
        padding-left: 0.5rem !important;
        padding-right: 0.25rem !important;
    }
    
    .carousel-item .col-6:last-child {
        padding-right: 0.5rem !important;
        padding-left: 0.25rem !important;
    }
    
    /* Assurer que les cartes dans les sliders n'ont pas de marges */
    .carousel-item .col-6 .product-card,
    .carousel-item .col-6 .category-card-mobile,
    .carousel-item .col-6 > a,
    .carousel-item .col-6 > a > .card {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        -webkit-box-sizing: border-box !important;
        box-sizing: border-box !important;
        display: flex !important;
        -webkit-display: flex !important;
        flex-direction: column !important;
        -webkit-flex-direction: column !important;
        flex: 1 1 auto !important;
        -webkit-flex: 1 1 auto !important;
        overflow: hidden !important;
        /* Stabilisation - Empêcher les mouvements indésirables */
        position: relative !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        will-change: auto !important;
    }
    
    .carousel-item .col-6 > a {
        text-decoration: none !important;
        height: 100% !important;
    }
    
    .carousel-item .col-6 > a {
        display: flex;
        width: 100%;
        text-decoration: none;
    }
    
    /* Sections de sliders */
    section .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Toutes les sections doivent rester dans l'écran */
    section {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Container des carrousels - Alignement parfait */
    .carousel {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        /* Stabilisation - Empêcher les mouvements indésirables */
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .carousel-inner {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        /* Stabilisation - Forcer le comportement de carousel */
        display: block !important;
        position: relative !important;
        touch-action: pan-y !important;
    }
    
    /* Assurer l'alignement parfait des cartes */
    .carousel-item {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        /* Stabilisation - Empêcher les glissements */
        display: block !important;
        float: none !important;
        position: relative !important;
        margin-right: 0 !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    .carousel-item.active {
        display: block !important;
    }
    
    .carousel-item .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        --bs-gutter-x: 0.5rem !important;
        --bs-gutter-y: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        /* Stabilisation */
        position: relative !important;
    }
    
    section h2 {
        font-size: 1.25rem;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    /* Espacement des sections avec sliders */
    section.py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Stabilisation spécifique pour tous les sliders de produits et catégories MOBILE */
    #categoriesSliderMobile,
    #featuredProductsSliderMobile,
    #recentViewsSliderMobile,
    #recommendedProductsSliderMobile {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
    }
    
    #categoriesSliderMobile .carousel-inner,
    #featuredProductsSliderMobile .carousel-inner,
    #recentViewsSliderMobile .carousel-inner,
    #recommendedProductsSliderMobile .carousel-inner {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        display: block !important;
        position: relative !important;
        touch-action: pan-y !important;
        flex-wrap: normal !important;
        scroll-snap-type: none !important;
        /* Empêcher tout scroll horizontal */
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
    
    #categoriesSliderMobile .carousel-inner::-webkit-scrollbar,
    #featuredProductsSliderMobile .carousel-inner::-webkit-scrollbar,
    #recentViewsSliderMobile .carousel-inner::-webkit-scrollbar,
    #recommendedProductsSliderMobile .carousel-inner::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    #categoriesSliderMobile .carousel-item,
    #featuredProductsSliderMobile .carousel-item,
    #recentViewsSliderMobile .carousel-item,
    #recommendedProductsSliderMobile .carousel-item {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        float: none !important;
        position: relative !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        flex: none !important;
        scroll-snap-align: none !important;
    }
    
    #categoriesSliderMobile .carousel-item.active,
    #featuredProductsSliderMobile .carousel-item.active,
    #recentViewsSliderMobile .carousel-item.active,
    #recommendedProductsSliderMobile .carousel-item.active {
        display: block !important;
    }
    
    /* Stabiliser les rows dans les sliders mobile */
    #categoriesSliderMobile .carousel-item .row,
    #featuredProductsSliderMobile .carousel-item .row,
    #recentViewsSliderMobile .carousel-item .row,
    #recommendedProductsSliderMobile .carousel-item .row {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Smooth animations */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Touch improvements */
    button,
    a,
    .btn {
        -webkit-tap-highlight-color: rgba(128, 0, 32, 0.1);
    }
    
    /* Loading states */
    .loading-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 2rem;
    }
    
    .loading-mobile .spinner-border {
        width: 2.5rem;
        height: 2.5rem;
        border-width: 3px;
        color: #800020;
    }
    
    /* Empty states */
    .empty-state-mobile {
        text-align: center;
        padding: 3rem 1.5rem;
        color: #6c757d;
    }
    
    .empty-state-mobile i {
        font-size: 4rem;
        margin-bottom: 1rem;
        color: #dee2e6;
    }
    
    .empty-state-mobile h3 {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #212529;
    }
    
    .empty-state-mobile p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    /* Safe area for notched devices */
    @supports (padding: max(0px)) {
        .shop-bottom-nav {
            padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
        }
    }
    
    /* Correction spécifique pour Android - Assurer que le menu reste dans l'écran */
    @media screen and (max-width: 768px) {
        /* Correction viewport pour Android */
        @supports (-webkit-touch-callout: none) {
            /* iOS */
            .shop-bottom-nav {
                padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
            }
        }
        
        /* Android - Forcer le menu à rester dans l'écran */
        .shop-bottom-nav {
            bottom: 0;
            left: 0;
            right: 0;
            width: 100vw;
            max-width: 100%;
            margin: 0;
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
            will-change: transform;
        }
        
        /* S'assurer que le body ne dépasse pas */
        body {
            width: 100%;
            max-width: 100vw;
            overflow-x: hidden;
            position: relative;
        }
        
        /* Correction pour le contenu principal */
        main,
        .main-content,
        #app {
            width: 100%;
            max-width: 100vw;
            overflow-x: hidden;
            padding-bottom: 80px;
        }
    }
    
    /* Correction spécifique pour l'alignement des cartes sur iPhone et Android */
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        .carousel-item .row.g-2 {
            display: flex !important;
            flex-wrap: nowrap !important;
            margin: 0 !important;
            width: 100% !important;
        }
        
        .carousel-item .col-6 {
            flex: 0 0 50% !important;
            max-width: 50% !important;
            padding-left: 0.25rem !important;
            padding-right: 0.25rem !important;
            margin: 0 !important;
        }
        
        .carousel-item .col-6 .product-card,
        .carousel-item .col-6 .category-card-mobile {
            width: 100% !important;
            margin: 0 !important;
        }
    }
    
    /* Correction spécifique pour Android - Alignement parfait */
    @media screen and (max-width: 768px) {
        /* Forcer l'alignement horizontal des cartes - Compatible Android */
        .carousel-item .row.g-2 {
            display: -webkit-box !important;
            display: -webkit-flex !important;
            display: flex !important;
            -webkit-flex-wrap: nowrap !important;
            flex-wrap: nowrap !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            margin-top: 0 !important;
            margin-bottom: 0 !important;
            width: 100% !important;
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            -webkit-box-sizing: border-box !important;
            box-sizing: border-box !important;
        }
        
        .carousel-item .col-6 {
            -webkit-flex: 0 0 50% !important;
            flex: 0 0 50% !important;
            -webkit-box-flex: 0 !important;
            max-width: 50% !important;
            min-width: 0 !important;
            padding-left: 0.25rem !important;
            padding-right: 0.25rem !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            margin-top: 0 !important;
            margin-bottom: 0 !important;
            -webkit-box-sizing: border-box !important;
            box-sizing: border-box !important;
            display: -webkit-box !important;
            display: -webkit-flex !important;
            display: flex !important;
            -webkit-box-orient: vertical !important;
            -webkit-box-direction: normal !important;
            -webkit-flex-direction: column !important;
            flex-direction: column !important;
        }
        
        .carousel-item .col-6:first-child {
            padding-left: 0.5rem !important;
            padding-right: 0.25rem !important;
        }
        
        .carousel-item .col-6:last-child {
            padding-right: 0.5rem !important;
            padding-left: 0.25rem !important;
        }
        
        .carousel-item .col-6 .product-card,
        .carousel-item .col-6 .category-card-mobile,
        .carousel-item .col-6 > a,
        .carousel-item .col-6 > a > .card {
            width: 100% !important;
            margin: 0 !important;
            -webkit-box-sizing: border-box !important;
            box-sizing: border-box !important;
            display: -webkit-box !important;
            display: -webkit-flex !important;
            display: flex !important;
            -webkit-box-orient: vertical !important;
            -webkit-box-direction: normal !important;
            -webkit-flex-direction: column !important;
            flex-direction: column !important;
            -webkit-flex: 1 1 auto !important;
            flex: 1 1 auto !important;
        }
        
        .carousel-item .col-6 > a {
            text-decoration: none !important;
            height: 100% !important;
        }
        
        /* Assurer que les cartes ont la même hauteur */
        .carousel-item .col-6 .product-card-body,
        .carousel-item .col-6 .category-card-mobile .card-body {
            -webkit-flex: 1 1 auto !important;
            flex: 1 1 auto !important;
            display: -webkit-box !important;
            display: -webkit-flex !important;
            display: flex !important;
            -webkit-box-orient: vertical !important;
            -webkit-box-direction: normal !important;
            -webkit-flex-direction: column !important;
            flex-direction: column !important;
        }
    }
}

/* Styles pour écrans très petits (< 500px) */
@media (max-width: 500px) {
    /* Forcer tous les éléments à rester dans l'écran */
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    html, body {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Toutes les sections */
    section {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .product-card-image {
        height: 160px;
    }
    
    .product-card-body {
        padding: 0.875rem;
    }
    
    .product-card-title {
        font-size: 0.9rem;
    }
    
    .product-card-price-value {
        font-size: 1.1rem;
    }
    
    .products-grid,
    .row.g-4 {
        gap: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Cartes produits sur très petits écrans */
    .product-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Carrousels sur très petits écrans */
    .carousel,
    .carousel-inner,
    .carousel-item {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        /* Stabilisation renforcée */
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .carousel-inner {
        display: block !important;
        position: relative !important;
    }
    
    .carousel-item {
        display: block !important;
        float: none !important;
        position: relative !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    .carousel-item .row {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        overflow: hidden !important;
        position: relative !important;
    }
    
    /* Bottom Navigation - Forcer horizontal même sur très petits écrans */
    .shop-bottom-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-around !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        /* Correction Android - Forcer le menu à rester dans l'écran */
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .shop-bottom-nav-item {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0 !important;
        min-width: 60px !important;
        max-width: none !important;
        padding: 0.4rem 0.15rem !important;
        margin: 0 0.15rem !important;
    }
    
    .shop-bottom-nav-item span {
        font-size: 0.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .shop-bottom-nav-item i {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    section h2 {
        font-size: 1.15rem;
        padding: 0 0.5rem;
    }
    
    .search-bar-section {
        padding: 0.875rem 0.5rem !important;
    }
    
    .hero-shop-slider {
        height: 180px !important;
        border-radius: 0;
        margin-top: 0 !important;
    }
    
    .hero-shop-slider .carousel-item {
        height: 180px !important;
    }
    
    .hero-shop-slider img {
        height: 180px !important;
        object-fit: cover;
    }
    
    /* Sliders - Optimisations pour très petits écrans */
    .carousel-indicators {
        margin-bottom: 0.25rem;
    }
    
    .carousel-indicators button {
        width: 6px;
        height: 6px;
        margin: 0 3px;
    }
    
    .carousel-indicators button.active {
        width: 20px;
    }
    
    .category-card .card-img-top {
        height: 100px !important;
    }
    
    .category-card .card-body {
        padding: 0.5rem !important;
    }
    
    .category-card .card-title {
        font-size: 0.75rem !important;
    }
    
    .product-slider-col .product-card-image {
        height: 120px !important;
    }
    
    .product-slider-col .product-card-body {
        padding: 0.5rem !important;
    }
    
    .product-slider-col .product-card-title {
        font-size: 0.75rem !important;
    }
    
    .product-slider-col .product-card-price-value {
        font-size: 0.9rem !important;
    }
    
    section h2 {
        font-size: 1.1rem !important;
    }
}

/* ============================================
   CORRECTIONS SPÉCIFIQUES POUR ANDROID
   ============================================ */

/* Correction viewport pour Android - Éviter le dépassement du menu */
@media screen and (max-width: 768px) {
    /* Correction pour Android Chrome et autres navigateurs Android */
    @media (pointer: coarse) {
        /* Détecte les écrans tactiles (Android) */
        html {
            height: 100%;
            height: -webkit-fill-available;
            overflow-x: hidden;
            position: relative;
        }
        
        body {
            min-height: 100vh;
            min-height: -webkit-fill-available;
            width: 100%;
            max-width: 100vw;
            overflow-x: hidden;
            position: relative;
            padding-bottom: 80px !important;
        }
        
        /* Menu bottom nav - Correction Android */
        .shop-bottom-nav {
            position: fixed !important;
            bottom: 0 !important;
            left: 0 !important;
            right: 0 !important;
            width: 100vw !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0.5rem 0 !important;
            padding-bottom: 0.5rem !important;
            box-sizing: border-box !important;
            transform: translateZ(0) !important;
            -webkit-transform: translateZ(0) !important;
            will-change: transform !important;
            /* Forcer le menu à rester visible */
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            justify-content: space-around !important;
            align-items: center !important;
            z-index: 1000 !important;
        }
        
        /* S'assurer que le contenu principal ne dépasse pas */
        main,
        .main-content,
        #app,
        .container,
        .container-fluid {
            width: 100% !important;
            max-width: 100vw !important;
            overflow-x: hidden !important;
            box-sizing: border-box !important;
        }
        
        /* Correction pour éviter le scroll horizontal */
        * {
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
        
        /* Toutes les sections et rows */
        section,
        .row,
        .row > * {
            width: 100% !important;
            max-width: 100% !important;
            overflow-x: hidden !important;
            box-sizing: border-box !important;
        }
        
        /* Cartes et carrousels */
        .product-card,
        .category-card-mobile {
            width: 100% !important;
            max-width: 100% !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
            position: relative !important;
        }
        
        /* Stabilisation des carrousels sur Android */
        .carousel {
            width: 100% !important;
            max-width: 100% !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
            touch-action: pan-y !important;
            -webkit-overflow-scrolling: touch !important;
        }
        
        .carousel-inner {
            width: 100% !important;
            max-width: 100% !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
            display: block !important;
            position: relative !important;
            touch-action: pan-y !important;
        }
        
        .carousel-item {
            width: 100% !important;
            max-width: 100% !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
            display: block !important;
            float: none !important;
            position: relative !important;
            margin-right: 0 !important;
            backface-visibility: hidden !important;
            -webkit-backface-visibility: hidden !important;
            transform: translateZ(0) !important;
            -webkit-transform: translateZ(0) !important;
        }
        
        /* Images */
        img {
            max-width: 100% !important;
            height: auto !important;
        }
        
        /* Forcer le menu à rester dans l'écran */
        .shop-bottom-nav-item {
            flex: 1 1 auto !important;
            min-width: 0 !important;
            max-width: 100% !important;
            overflow: hidden !important;
        }
    }
}

/* Correction supplémentaire pour les navigateurs Android spécifiques */
@supports (-webkit-appearance: none) {
    @media screen and (max-width: 768px) {
        .shop-bottom-nav {
            bottom: 0 !important;
            position: fixed !important;
            width: 100% !important;
            max-width: 100vw !important;
        }
    }
}
