/**
 * Mobile-First Styles
 * Magic Art Colours - Customer Frontend
 */

/* Mobile Base Styles */
@media (max-width: 768px) {
    /* Typography */
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    
    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
        touch-action: manipulation;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 8px 16px;
    }
    
    /* Product Cards */
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    /* Sticky Bottom Cart Button */
    .sticky-cart-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        padding: 12px 15px;
        z-index: 1000;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #e0e0e0;
    }
    
    .sticky-cart-bottom .price {
        font-size: 1.25rem;
        font-weight: 700;
        color: #0d6efd;
    }
    
    .sticky-cart-bottom .btn {
        flex: 1;
        margin-left: 10px;
        max-width: 200px;
    }
    
    /* Mobile Navbar */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .cart-icon-badge {
        position: relative;
        display: inline-block;
    }
    
    .cart-icon-badge .badge {
        position: absolute;
        top: -8px;
        right: -8px;
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    /* Collapsible Filters */
    .filter-section {
        margin-bottom: 1rem;
    }
    
    .filter-toggle {
        width: 100%;
        text-align: left;
        padding: 12px;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        font-weight: 500;
    }
    
    .filter-content {
        display: none;
        padding: 15px;
        background: white;
        border: 1px solid #dee2e6;
        border-top: none;
        border-radius: 0 0 6px 6px;
    }
    
    .filter-content.show {
        display: block;
    }
    
    /* Product Grid */
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Product Detail */
    .product-detail-image {
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .product-detail-info {
        padding: 1rem 0;
    }
    
    /* Cart Page */
    .cart-item {
        display: flex;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 6px;
    }
    
    .cart-item-details {
        flex: 1;
    }
    
    .cart-item-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Checkout Form */
    .checkout-form .form-control,
    .checkout-form .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    /* Empty States */
    .empty-state {
        text-align: center;
        padding: 3rem 1rem;
    }
    
    .empty-state-icon {
        font-size: 4rem;
        color: #dee2e6;
        margin-bottom: 1rem;
    }
    
    /* Loading Spinner */
    .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(0,0,0,0.1);
        border-radius: 50%;
        border-top-color: #0d6efd;
        animation: spin 0.8s linear infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    /* Toast Notifications */
    .toast-container {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 9999;
        max-width: 90%;
    }
    
    .toast {
        min-width: 250px;
        margin-bottom: 10px;
    }
    
    /* Lazy Loading */
    img[data-src] {
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    img[data-src].loaded {
        opacity: 1;
    }
    
    /* Section Padding */
    .section {
        padding: 2rem 0;
    }
    
    /* Container Padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }
    
    /* Show on mobile */
    .show-mobile {
        display: block !important;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop - Hide sticky cart */
@media (min-width: 769px) {
    .sticky-cart-bottom {
        display: none;
    }
    
    .show-mobile {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .sticky-cart-bottom,
    .btn,
    .filter-section {
        display: none !important;
    }
}

