/**
 * COMPLETE MOBILE-FIRST RESPONSIVE DESIGN
 * Combined and Enhanced - Inspired by modern e-commerce (Shopit Marketplace)
 * 
 * This file combines your original mobile_enhancements.css with new
 * modern design improvements for a complete mobile experience.
 * 
 * Key Improvements:
 * - Card-based layouts with rounded corners
 * - Better spacing and touch targets (44x44px minimum)
 * - Smooth animations and transitions
 * - Bottom navigation for mobile
 * - Sticky headers with dynamic shadow
 * - Improved product grids
 * - Registration/Login page scrollbar support
 * - Enhanced visual hierarchy
 * - Modern promotional banners
 * - Pull-to-refresh indicators
 * - Scroll progress tracking
 * 
 * Color Palette (maintained):
 * - Primary Blue: #19427f
 * - Brand Red: #dc382b
 * - Dark: #122b46
 * - Light Gray: #f8f9fa
 * - Success Green: #28a745
 * 
 * @version 3.0 - COMBINED & ENHANCED
 * @author GoneClear Development Team
 */

/* ========================================
   GLOBAL MOBILE ENHANCEMENTS
   ======================================== */

html {
    scroll-behavior: smooth;
}

* {
    -webkit-tap-highlight-color: rgba(25, 66, 127, 0.1);
    -webkit-touch-callout: none;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========================================
   REGISTER/LOGIN PAGE MOBILE SCROLLBAR FIX
   ======================================== */

@media screen and (max-width: 768px) {
    /* Enable scrolling on registration and login pages */
    body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        height: auto;
        min-height: 100vh;
        background: #f5f7fa;
    }
    
    /* Remove height constraints from containers */
    .container {
        max-height: none;
        overflow-y: visible;
        margin: 20px auto;
    }
    
    /* Remove height constraints from forms */
    .register-form,
    .login-form {
        max-height: none;
        overflow-y: visible;
    }
}

/* ========================================
   MOBILE NAVIGATION IMPROVEMENTS - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .navTop {
        position: sticky;
        top: 0;
        z-index: 999;
        padding: 10px 16px !important;
        height: auto !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        background: linear-gradient(135deg, #19427f 0%, #122b46 100%);
        transition: box-shadow 0.3s ease;
    }
    
    /* Dynamic shadow on scroll */
    .navTop.scrolled {
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
    }
    
    .nav-logo .logo img {
        max-height: 28px;
    }
    
    /* Enhanced search box */
    .search {
        flex-direction: column;
        border-radius: 16px;
        padding: 12px;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        margin: 8px 0;
    }
    
    .search-box-select {
        width: 100%;
        border-radius: 8px 8px 0 0;
        padding: 10px;
        margin: 0 0 8px 0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .search-box-text {
        min-width: 100% !important;
        border-radius: 12px;
        padding: 14px 16px;
        font-size: 15px;
        border: 2px solid #e8e8e8;
        transition: border-color 0.3s ease;
    }
    
    .search-box-text:focus {
        border-color: #19427f;
        outline: none;
    }
    
    .search-box-button {
        width: 100%;
        border-radius: 12px;
        padding: 14px;
        margin-top: 8px;
        font-weight: 600;
        background: #19427f;
        color: white;
        border: none;
        font-size: 15px;
        transition: all 0.3s ease;
    }
    
    .search-box-button:active {
        transform: scale(0.98);
    }
    
    /* Bottom Navigation Bar - Enhanced */
    .header-links {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
        z-index: 998;
        display: flex !important;
        justify-content: space-around;
        gap: 0;
        height: auto;
        border-top: 1px solid #f0f0f0;
    }
    
    .header-links li {
        flex: 1;
        display: flex;
        justify-content: center;
    }
    
    .header-links a,
    .icon-cart {
        flex-direction: column;
        align-items: center;
        padding: 6px 12px !important;
        font-size: 11px;
        color: #666 !important;
        gap: 4px;
        transition: all 0.3s ease;
        border-radius: 8px;
    }
    
    .header-links a i,
    .icon-cart i {
        font-size: 24px !important;
        color: #19427f;
        transition: transform 0.3s ease;
    }
    
    .header-links a:active,
    .icon-cart:active {
        transform: scale(0.95);
        background: rgba(25, 66, 127, 0.05);
    }
    
    .header-links a.active,
    .icon-cart.active {
        background: rgba(25, 66, 127, 0.08);
        color: #19427f !important;
    }
    
    .header-links a.active i,
    .icon-cart.active i {
        transform: scale(1.1);
    }
    
    .cart-count {
        top: 0px !important;
        right: 50% !important;
        transform: translateX(10px);
        width: 20px !important;
        height: 20px !important;
        font-size: 11px !important;
        background: #dc382b;
        border: 2px solid white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .categories-bar {
        display: none;
    }
    
    main,
    .shop-main,
    .checkout-main {
        padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }
}

/* ========================================
   HOMEPAGE SLIDER IMPROVEMENTS - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .slider {
        border-radius: 0 0 24px 24px;
        overflow: hidden;
        margin-bottom: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .slide img {
        border-radius: 0 0 24px 24px;
        min-height: 200px;
        object-fit: cover;
    }
    
    .prev,
    .next {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-size: 1.2rem;
        background: rgba(255, 255, 255, 0.95);
        color: #19427f;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .prev {
        left: 12px;
    }
    
    .next {
        right: 12px;
    }
    
    /* Enhanced dot navigation */
    .slider-dots {
        bottom: 16px;
        padding: 8px 16px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .slider-dots .dot {
        width: 8px;
        height: 8px;
        background: rgba(25, 66, 127, 0.3);
        border: none;
        transition: all 0.3s ease;
    }
    
    .slider-dots .dot:hover {
        background: rgba(25, 66, 127, 0.5);
    }
    
    .slider-dots .dot.active {
        width: 24px;
        background: #19427f;
        border-radius: 20px;
    }
}

/* ========================================
   FEATURES SECTION MOBILE - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .features {
        padding: 0;
        background: transparent;
        border: none;
        margin: -12px 0 0 0;
    }
    
    .feature-container {
        flex-direction: row;
        gap: 8px;
        padding: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }
    
    .feature-container::-webkit-scrollbar {
        display: none;
    }
    
    .feature-item {
        flex: 0 0 auto;
        width: 140px;
        flex-direction: column;
        background: white;
        border-radius: 16px;
        padding: 16px 12px;
        border: 1px solid #f0f0f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        height: auto;
        text-align: center;
        transition: all 0.3s ease;
        scroll-snap-align: start;
    }
    
    .feature-item:active {
        transform: scale(0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .feature-item i {
        font-size: 32px;
        margin-bottom: 8px;
        margin-right: 0;
        color: #19427f;
    }
    
    .feature-item p {
        font-size: 12px;
        margin: 0;
        line-height: 1.3;
        font-weight: 500;
        color: #333;
    }
}

/* ========================================
   SECTION STYLING - NEW
   ======================================== */

@media screen and (max-width: 768px) {
    
    /* Consistent section styling */
    .category-slider,
    .top-selling,
    .banner-section,
    .deals-section,
    .brand-slider-section {
        padding: 24px 16px;
        background: transparent;
    }
    
    /* Section titles */
    .section-title,
    .top-selling-title,
    .deals-title {
        font-size: 22px;
        font-weight: 600;
        color: #1a1a1a;
        margin-bottom: 16px;
        padding-left: 0;
    }
}

/* ========================================
   CATEGORY SLIDER MOBILE - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .category-slider {
        padding: 24px 0;
        background: transparent;
    }
    
    .slider-container {
        width: 100%;
        padding: 0;
        overflow: visible;
    }
    
    .slider-wrapper {
        gap: 12px;
        padding: 8px 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .slider-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .category-item {
        flex: 0 0 110px;
        scroll-snap-align: start;
    }
    
    .category-image {
        width: 110px;
        height: 110px;
        border-radius: 16px;
        background: white;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        margin-bottom: 8px;
        transition: all 0.3s ease;
        border: 2px solid #f5f5f5;
    }
    
    .category-item:active .category-image {
        transform: scale(0.95);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
        border-color: #19427f;
    }
    
    .category-image img {
        padding: 8px;
    }
    
    .category-item span {
        font-size: 12px;
        font-weight: 600;
        color: #333;
    }
    
    .slider-nav {
        display: none;
    }
}

/* ========================================
   PRODUCT GRID IMPROVEMENTS - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 16px;
    }
    
    .product-card {
        background: white;
        border-radius: 16px;
        padding: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;
        border: 1px solid #f5f5f5;
    }
    
    .product-card:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
    
    .product-image-container {
        border-radius: 12px;
        background: #f9f9f9;
        margin-bottom: 10px;
        border: none;
        padding: 12px;
    }
    
    .product-image {
        border-radius: 8px;
    }
    
    .product-brand {
        font-size: 11px;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .product-name {
        font-size: 14px;
        line-height: 1.3;
        margin: 6px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-weight: 500;
        color: #1a1a1a;
    }
    
    .product-price {
        font-size: 18px;
        font-weight: 700;
        color: #19427f;
    }
    
    .rating {
        font-size: 12px;
    }
    
    .sold-out-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        background: #333;
        color: white;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 11px;
        font-weight: 600;
    }
}

/* ========================================
   TOP SELLING SECTION MOBILE
   ======================================== */

@media screen and (max-width: 768px) {
    
    .top-selling {
        padding: 24px 16px;
        background: transparent;
    }
    
    .top-selling-header {
        padding: 0;
        margin-bottom: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .top-selling-title {
        font-size: 22px;
        font-weight: 600;
    }
    
    .view-all {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 8px;
        background: white;
        border: 2px solid #19427f;
        color: #19427f;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .view-all:active {
        transform: scale(0.95);
    }
}

/* ========================================
   SHOP PAGE MOBILE
   ======================================== */

@media screen and (max-width: 768px) {
    
    .shop-header {
        padding: 16px;
        background: white;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        margin-bottom: 16px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .title-view-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .view-toggle {
        display: flex;
        gap: 8px;
    }
    
    .view-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        border: 1px solid #e0e0e0;
        transition: all 0.3s ease;
    }
    
    .view-btn.active {
        background: #19427f;
        color: white;
        border-color: #19427f;
    }
    
    .view-btn i {
        font-size: 18px;
    }
    
    .listProduct {
        padding: 0 16px;
    }
    
    .listProduct .item {
        border-radius: 16px;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        margin-bottom: 12px;
        transition: all 0.3s ease;
    }
    
    .listProduct .item:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
    
    .filter-tab {
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        background: #19427f;
        color: white;
        padding: 12px 8px;
        border-radius: 12px 0 0 12px;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        z-index: 100;
        writing-mode: vertical-rl;
        font-weight: 600;
        font-size: 14px;
    }
    
    .filter-panel {
        width: 85%;
        max-width: 320px;
        right: -100%;
        border-radius: 20px 0 0 20px;
        transition: right 0.3s ease;
    }
    
    .filter-panel.active {
        right: 0;
    }
    
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .filter-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .filter-section {
        padding: 16px;
    }
    
    .price-ranges {
        padding: 16px;
    }
    
    .filter-tab span {
        display: block;
        width: 40px;
        height: 80px;
    }
    
    .filter-close {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #f8f9fa;
        color: #333;
        top: 12px;
        right: 12px;
    }
    
    .filter-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .price-inputs input {
        border-radius: 12px;
        padding: 12px;
        border: 1px solid #e0e0e0;
    }
    
    #applyFilter,
    #resetFilter {
        border-radius: 12px;
        padding: 14px;
        font-size: 15px;
        font-weight: 600;
    }
    
    .range-options label {
        padding: 12px;
        background: #f8f9fa;
        border-radius: 12px;
        margin-bottom: 8px;
        transition: all 0.3s ease;
    }
    
    .range-options label:active {
        background: #e8e9ea;
        transform: scale(0.98);
    }
}

/* ========================================
   CHECKOUT PAGE MOBILE
   ======================================== */

@media screen and (max-width: 768px) {
    
    .checkout-container {
        border-radius: 0;
        padding: 0;
        background: #f8f9fa;
    }
    
    .checkout-header {
        border-radius: 0 0 20px 20px;
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .checkout-header h1 {
        font-size: 1.5rem;
    }
    
    .account-info {
        flex-direction: column;
        gap: 8px;
        border-radius: 12px;
        padding: 12px;
    }
    
    .checkout-content {
        gap: 16px;
        padding: 0 16px;
    }
    
    .cart-section {
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .cart-item {
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .summary-section {
        position: static;
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        order: -1;
    }
    
    .checkout {
        border-radius: 12px;
        padding: 16px;
        font-size: 16px;
        font-weight: 600;
    }
}

/* ========================================
   DASHBOARD MOBILE
   ======================================== */

@media screen and (max-width: 768px) {
    
    .sidebar {
        transform: translateX(-100%);
        border-radius: 0 20px 20px 0;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        position: sticky;
        top: 60px;
        z-index: 99;
        border-radius: 0 0 20px 20px;
        padding: 16px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .card {
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .member-card {
        border-radius: 12px;
        border-left-width: 4px;
    }
}

/* ========================================
   FOOTER MOBILE - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .main-footer {
        margin-top: 32px;
        padding-top: 24px;
        background: white;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px;
    }
    
    .footer-section {
        background: #f9f9f9;
        padding: 20px;
        border-radius: 16px;
        box-shadow: none;
        border: 1px solid #f0f0f0;
    }
    
    .footer-section h3 {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 12px;
        color: #1a1a1a;
    }
    
    .footer-logo {
        max-width: 150px;
    }
    
    .submit-btn {
        border-radius: 12px;
        padding: 12px;
        font-weight: 600;
    }
    
    .register-now input {
        border-radius: 12px;
        padding: 12px;
    }
    
    .footer-bottom {
        margin-top: 24px;
        border-radius: 0;
        padding: calc(16px + env(safe-area-inset-bottom)) 16px 80px;
        background: #19427f;
        color: white;
    }
}

/* ========================================
   BANNER SECTION MOBILE - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .banner-section {
        padding: 24px 16px;
    }
    
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .product-banner {
        border-radius: 20px;
        padding: 24px;
        min-height: 160px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .product-banner:active {
        transform: scale(0.98);
    }
    
    .banner-content {
        max-width: 65%;
        z-index: 2;
    }
    
    .banner-title {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 8px;
        color: #1a1a1a;
    }
    
    .banner-subtitle {
        font-size: 13px;
        line-height: 1.4;
        color: #666;
    }
    
    .banner-link {
        display: inline-flex;
        align-items: center;
        margin-top: 12px;
        padding: 8px 16px;
        background: #19427f;
        color: white;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        font-size: 13px;
        border: none;
        transition: all 0.3s ease;
    }
    
    .banner-link:active {
        transform: scale(0.95);
    }
    
    .banner-image,
    .banner-image-great {
        max-width: 40%;
        opacity: 0.9;
    }
}

/* ========================================
   DEALS SECTION MOBILE - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .deals-section {
        padding: 24px 16px;
    }
    
    .deals-header {
        margin-bottom: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .deals-title {
        font-size: 22px;
        font-weight: 600;
    }
    
    .deals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .deal-card {
        border-radius: 16px;
        padding: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        background: white;
        border: 1px solid #f5f5f5;
        transition: all 0.3s ease;
    }
    
    .deal-card:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
    
    .deal-image {
        min-height: 120px;
        background: #f9f9f9;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .deal-title {
        font-size: 14px;
        font-weight: 600;
        color: #1a1a1a;
    }
    
    .deal-price {
        font-size: 18px;
        font-weight: 700;
        color: #19427f;
        margin-bottom: 8px;
    }
    
    .stock-info {
        font-size: 12px;
        color: #dc382b;
        font-weight: 600;
        margin-bottom: 12px;
    }
    
    .stock-info::after {
        display: none;
    }
    
    .view-details {
        width: 100%;
        border-radius: 8px;
        padding: 10px;
        font-size: 13px;
        background: #19427f;
        color: white;
        border: none;
        font-weight: 600;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .view-details:active {
        transform: scale(0.98);
    }
}

/* ========================================
   CART SIDEBAR MOBILE - BOTTOM SHEET STYLE
   ======================================== */

@media screen and (max-width: 768px) {
    
    .cartBar {
        width: 100%;
        height: 80vh;
        right: -100%;
        bottom: 0;
        top: auto;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    body.activeBarcart .cartBar {
        right: 0;
    }
    
    /* Cart handle indicator */
    .cartBar::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #d0d0d0;
        border-radius: 2px;
    }
    
    .cartBar h1 {
        padding: 24px 16px 16px;
        font-size: 1.4rem;
        font-weight: 600;
    }
    
    .cartBar .listCart {
        padding: 0 16px;
        max-height: calc(80vh - 200px);
        overflow-y: auto;
    }
    
    .cartBar .item {
        border-radius: 12px;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .cartBar .btn {
        padding: 16px;
        gap: 12px;
        background: white;
        border-top: 1px solid #f0f0f0;
    }
    
    .cartBar .btn button {
        border-radius: 12px;
        padding: 16px;
        font-weight: 600;
        font-size: 15px;
        transition: all 0.3s ease;
    }
    
    .cartBar .btn button:active {
        transform: scale(0.98);
    }
}

/* ========================================
   BRAND SLIDER MOBILE - ENHANCED
   ======================================== */

@media screen and (max-width: 768px) {
    
    .brand-slider-section {
        padding: 24px 0;
        background: white;
        margin: 16px 0;
    }
    
    .brand-slider-container {
        padding: 0 16px;
    }
    
    .brand-slider {
        gap: 32px;
        padding: 16px 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .brand-slider::-webkit-scrollbar {
        display: none;
    }
    
    .brand-logo {
        min-width: 100px;
        padding: 8px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
    
    .brand-logo img {
        max-width: 80px;
        transition: all 0.3s ease;
    }
    
    .brand-nav-button {
        width: 36px;
        height: 36px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* ========================================
   SMOOTH TRANSITIONS & ANIMATIONS
   ======================================== */

.product-card,
.feature-item,
.category-item,
.deal-card,
.listProduct .item,
.cart-item,
.view-btn,
.filter-tab,
.banner-link,
.view-details,
.view-all,
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   LOADING STATES & SKELETON SCREENS
   ======================================== */

.image-loading,
.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========================================
   TOUCH FEEDBACK
   ======================================== */

@media (hover: none) {
    button:active,
    a:active,
    .product-card:active,
    .category-item:active,
    .deal-card:active,
    .feature-item:active {
        opacity: 0.8;
    }
}

/* ========================================
   SCROLL REVEAL ANIMATIONS (Applied by JS)
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   SCROLL PROGRESS BAR (Applied by JS)
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(25, 66, 127, 0.1);
    z-index: 1000;
    display: none;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #19427f, #dc382b);
    width: 0%;
    transition: width 0.1s ease;
}

@media (max-width: 768px) {
    .scroll-progress {
        display: block;
    }
}

/* ========================================
   SCROLL INDICATORS FOR HORIZONTAL LISTS
   ======================================== */

.scroll-indicator-wrapper {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.scroll-indicator {
    background: linear-gradient(to left, white 60%, transparent);
    padding: 20px 16px 20px 40px;
    color: #19427f;
    font-size: 18px;
    animation: pulse 2s infinite;
    transition: opacity 0.3s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
}

@keyframes pulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

@media (min-width: 769px) {
    .scroll-indicator-wrapper {
        display: none;
    }
}

/* ========================================
   PULL-TO-REFRESH INDICATOR (Applied by JS)
   ======================================== */

.pull-refresh-indicator {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: top 0.3s ease;
    z-index: 9999;
}

.pull-refresh-indicator.active {
    top: 70px;
}

.pull-refresh-indicator i {
    color: #19427f;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   TOAST NOTIFICATIONS (Applied by JS)
   ======================================== */

.toast-container {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: #1a1a1a;
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc382b;
}

.toast.info {
    background: #19427f;
}

/* ========================================
   LAZY LOADING IMAGES (Applied by JS)
   ======================================== */

img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

@media screen and (max-width: 768px) {
    
    /* Larger tap targets - minimum 44x44px */
    button,
    a,
    .product-card,
    .category-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Focus states for keyboard navigation */
    button:focus,
    a:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #19427f;
        outline-offset: 2px;
    }
    
    /* Reduced motion for accessibility */
    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
        
        .reveal {
            opacity: 1;
            transform: none;
        }
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

@media screen and (max-width: 768px) {
    
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .text-center-mobile {
        text-align: center;
    }
    
    .full-width-mobile {
        width: 100% !important;
    }
    
    .no-scroll {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    .mt-mobile-1 { margin-top: 8px; }
    .mt-mobile-2 { margin-top: 16px; }
    .mt-mobile-3 { margin-top: 24px; }
    
    .mb-mobile-1 { margin-bottom: 8px; }
    .mb-mobile-2 { margin-bottom: 16px; }
    .mb-mobile-3 { margin-bottom: 24px; }
    
    .p-mobile-1 { padding: 8px; }
    .p-mobile-2 { padding: 16px; }
    .p-mobile-3 { padding: 24px; }
}

/* ========================================
   RESPONSIVE BREAKPOINT ADJUSTMENTS
   ======================================== */

/* Small phones (320px - 374px) */
@media screen and (max-width: 374px) {
    .product-card {
        padding: 10px;
    }
    
    .feature-item {
        width: 130px;
        padding: 14px 10px;
    }
    
    .category-image {
        width: 100px;
        height: 100px;
    }
    
    .banner-title {
        font-size: 18px;
    }
}

/* Larger phones (375px - 428px) */
@media screen and (min-width: 375px) and (max-width: 428px) {
    .section-title,
    .top-selling-title,
    .deals-title {
        font-size: 24px;
    }
}

/* Tablets (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .products-grid,
    .deals-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .navTop,
    .header-links,
    .cartBar,
    .filter-tab,
    .scroll-progress,
    .pull-refresh-indicator,
    .toast-container {
        display: none !important;
    }
    
    main {
        padding-bottom: 0 !important;
    }
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */

@media screen and (max-width: 768px) and (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode */
    /*
    body {
        background: #1a1a1a;
        color: #f0f0f0;
    }
    
    .product-card,
    .deal-card,
    .feature-item,
    .category-image {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .product-name,
    .deal-title,
    .banner-title,
    .section-title {
        color: #f0f0f0;
    }
    */
}

/* ========================================
   END OF MOBILE ENHANCEMENTS
   ======================================== */