/* MOBILE-FIRST STYLES FOR IPHONE - NEW FILE */

/* iPhone Specific Fixes (320px - 667px) */

@media screen and (max-width: 667px) {
    /* Reset everything for mobile */
    * {
        -webkit-text-size-adjust: 100%;
        box-sizing: border-box;
    }
    
    /* Mobile toast positioning - OVERRIDE desktop styles */
    .toast-alert {
        top: 60px !important; /* Below mobile header */
        right: -350px !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 !important;
        padding: 10px 14px !important;
        position: fixed !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 99999 !important; /* Same as desktop but mobile positioning */
    }
    
    .toast-alert.show {
        right: 10px !important;
    }
    
    /* Mobile stacking */
    .toast-alert:nth-of-type(1) {
        top: 60px !important;
    }
    
    .toast-alert:nth-of-type(2) {
        top: 115px !important;
    }
    
    .toast-alert:nth-of-type(3) {
        top: 170px !important;
    }
    
    .toast-alert:nth-of-type(4) {
        top: 225px !important;
    }
    
    .toast-alert:nth-of-type(5) {
        top: 280px !important;
    }

    .inventory-table-container .table-container {
        display: none !important;
    }

    .inventory-mobile-cards {
        display: block !important;
    }

/* Desktop-only rules (larger than mobile) */
@media screen and (min-width: 668px) {
    /* Hide mobile menu elements on desktop */
    .menu-overlay,
    .slide-menu,
    .hamburger-menu {
        display: none !important;
    }
    
    /* Reset mobile cart positioning for desktop */
    .cart-panel {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        max-height: none !important;
    }
    
    /* Reset sales container margin for desktop */
    .sales-container {
        margin-bottom: 0 !important;
    }
    
    /* Show desktop table, hide mobile cards */
    .inventory-mobile-cards {
        display: none !important;
    }
    
    .inventory-table-container .table-container {
        display: block !important;
    }
}
    
    html {
        font-size: 14px;
    }
    
    body {
        margin: 0;
        padding: 0;
        padding-bottom: 80px !important;
        overflow-x: hidden;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }
    
    /* Completely hide desktop sidebar */
    .sidebar {
        display: none !important;
    }
    
    /* Main content full width */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: calc(100vh - 80px);
    }
    
    /* Header shrunk way down */
    .content-header {
        padding: 12px 15px !important;
        background: #3498db;
        color: white;
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .content-header h1 {
        font-size: 18px !important;
        margin: 0 !important;
        font-weight: 600;
        color: white;
    }
    
    /* Content area */
    .content-body {
        padding: 15px 10px 80px 10px !important;
    }
    
    /* Dashboard mobile-first */
    .welcome-message {
        padding: 20px 15px !important;
        margin-bottom: 20px !important;
        border-radius: 10px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .welcome-message h2 {
        font-size: 22px !important;
        margin-bottom: 10px !important;
        color: #2c3e50;
    }
    
    .welcome-message p {
        font-size: 15px !important;
        line-height: 1.5;
        margin-bottom: 20px !important;
        color: #7f8c8d;
    }
    
    /* Stats cards stack vertically */
    .quick-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        margin: 0 !important;
    }
    
    .stat-card {
        display: flex !important;
        align-items: center !important;
        padding: 20px 15px !important;
        border-radius: 10px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin: 0 !important;
    }
    
    .stat-card h3 {
        font-size: 28px !important;
        margin: 0 10px 0 0 !important;
        min-width: 80px;
    }
    
    .stat-card p {
        font-size: 14px !important;
        margin: 0 !important;
        flex: 1;
    }
    
    /* Remove bottom navigation completely */
    .mobile-nav {
        display: none !important;
    }
    
    /* Remove bottom padding from body */
    body {
        margin: 0;
        padding: 0;
        padding-bottom: 0 !important; /* No bottom padding needed */
        overflow-x: hidden;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }
    
    /* Header with hamburger menu */
    .content-header {
        padding: 12px 15px !important;
        background: #3498db;
        color: white;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .content-header h1 {
        font-size: 18px !important;
        margin: 0 !important;
        font-weight: 600;
        color: white;
        flex: 1;
    }
    
    /* Hamburger menu button */
    .hamburger-menu {
        width: 30px !important;
        height: 30px !important;
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 24px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px !important;
        transition: background 0.2s ease;
    }
    
    .hamburger-menu:active {
        background: rgba(255,255,255,0.1) !important;
    }
    
    /* Slide-out menu overlay */
    .menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 50000 !important; /* CHANGE from 10000 to 50000 */
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    .menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Slide-out menu panel */
    .slide-menu {
        position: fixed !important;
        top: 0 !important;
        right: -300px !important;
        width: 280px !important;
        height: 100vh !important;
        background: #2c3e50 !important;
        z-index: 50001 !important; /* CHANGE from 10001 to 50001 */
        transition: right 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2) !important;
    }
    
    .slide-menu.active {
        right: 0 !important; /* Slide in */
    }
    
    /* Menu header */
    .slide-menu-header {
        padding: 20px !important;
        background: #34495e !important;
        border-bottom: 1px solid #4a5f7a !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .slide-menu-header h3 {
        color: white !important;
        margin: 0 !important;
        font-size: 18px !important;
    }
    
    .close-menu {
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 24px !important;
        cursor: pointer !important;
        width: 30px !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px !important;
    }
    
    .close-menu:active {
        background: rgba(255,255,255,0.1) !important;
    }
    
    /* Menu items */
    .slide-menu-items {
        flex: 1 !important;
        padding: 20px 0 !important;
    }
    
    .slide-menu-item {
        display: block !important;
        color: #ecf0f1 !important;
        text-decoration: none !important;
        padding: 15px 20px !important;
        border-bottom: 1px solid #34495e !important;
        transition: background 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    .slide-menu-item:active {
        background: #34495e !important;
    }
    
    .slide-menu-item.active {
        background: #3498db !important;
        color: white !important;
    }
    
    .slide-menu-item .icon {
        font-size: 20px !important;
        width: 24px !important;
        text-align: center !important;
    }
    
    .slide-menu-item .text {
        font-size: 16px !important;
        font-weight: 500 !important;
    }
    
    /* Menu footer */
    .slide-menu-footer {
        padding: 20px !important;
        border-top: 1px solid #34495e !important;
        background: #34495e !important;
    }
    
    .logout-menu-item {
        display: block !important;
        color: #e74c3c !important;
        text-decoration: none !important;
        padding: 12px 20px !important;
        border: 1px solid #e74c3c !important;
        border-radius: 6px !important;
        text-align: center !important;
        font-weight: 600 !important;
        transition: all 0.2s ease !important;
    }
    
    .logout-menu-item:active {
        background: #e74c3c !important;
        color: white !important;
    }
    
    /* Inventory Mobile Cards */
    .inventory-header {
        padding: 15px 10px !important;
        flex-direction: column !important;
        gap: 15px !important;
        background: white;
        margin: -15px -10px 20px -10px;
    }
    
    .header-actions {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    
    .header-actions .btn {
        width: 100% !important;
        padding: 15px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }
    
    .search-box input,
    .filter-dropdown select {
        width: 100% !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        border: 2px solid #e1e1e1 !important;
        border-radius: 8px !important;
    }
    
    .inventory-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    
    .inventory-stats .stat-card {
        padding: 15px !important;
        border-left: 4px solid #3498db !important;
    }
    
    /* Mobile Inventory Cards - FORCE DISPLAY */
    .inventory-table-container {
        display: block !important;
        margin: 0 !important;
    }
    
    /* Hide desktop table on mobile */
    .inventory-table-container .table-container {
        display: none !important;
    }
    
    /* Show mobile cards on mobile */
    .inventory-mobile-cards {
        display: block !important;
        background: #f8f9fa;
        margin: 0 !important;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .inventory-card {
        background: white !important;
        border-bottom: 1px solid #e1e1e1 !important;
        padding: 20px 15px !important;
        margin: 0 !important;
    }
    
    .inventory-card:last-child {
        border-bottom: none !important;
    }
    
    .inventory-card-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        margin-bottom: 10px !important;
    }
    
    .inventory-card-header h4 {
        font-size: 18px !important;
        margin: 0 !important;
        color: #2c3e50 !important;
        flex: 1 !important;
        margin-right: 15px !important;
        line-height: 1.3;
    }
    
    .inventory-price {
        font-size: 20px !important;
        font-weight: bold !important;
        color: #27ae60 !important;
    }
    
    .inventory-card-details {
        margin-bottom: 15px !important;
    }
    
    .inventory-category {
        display: block !important;
        font-size: 13px !important;
        color: #7f8c8d !important;
        margin-bottom: 5px !important;
        font-weight: 500;
    }
    
    .inventory-specs {
        display: block !important;
        font-size: 12px !important;
        color: #95a5a6 !important;
    }
    
    .inventory-card-status {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 15px !important;
        padding: 10px 0;
        border-top: 1px solid #f1f1f1;
        border-bottom: 1px solid #f1f1f1;
    }
    
    .inventory-quantity {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .qty-btn {
        width: 36px !important;
        height: 36px !important;
        border: 2px solid #3498db !important;
        background: white !important;
        color: #3498db !important;
        border-radius: 8px !important;
        font-size: 20px !important;
        font-weight: bold !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease;
    }
    
    .qty-btn:active {
        background: #3498db !important;
        color: white !important;
        transform: scale(0.95);
    }
    
    .qty-number {
        font-size: 20px !important;
        font-weight: bold !important;
        color: #2c3e50 !important;
        min-width: 40px !important;
        text-align: center !important;
    }
    
    .inventory-card-actions {
        display: flex !important;
        gap: 10px !important;
    }
    
    .btn-mobile {
        flex: 1 !important;
        padding: 12px 8px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        border: none !important;
        cursor: pointer !important;
        font-weight: 600 !important;
        transition: all 0.2s ease;
    }
    
    .btn-mobile.btn-primary {
        background: #3498db !important;
        color: white !important;
    }
    
    .btn-mobile.btn-secondary {
        background: #95a5a6 !important;
        color: white !important;
    }
    
    .btn-mobile.btn-danger {
        background: #e74c3c !important;
        color: white !important;
    }
    
    .btn-mobile:active {
        transform: scale(0.95);
    }
    
    /* Sales Page Mobile */
    .sales-header {
        padding: 15px 10px !important;
        flex-direction: column !important;
        gap: 15px !important;
        background: white;
        margin: -15px -10px 20px -10px;
        border-bottom: 1px solid #e1e1e1;
    }
    
    .header-info h2 {
        font-size: 20px !important;
        margin-bottom: 5px !important;
    }
    
    .sale-stats {
        display: flex !important;
        justify-content: space-around !important;
        background: #f8f9fa !important;
        padding: 15px 10px !important;
        border-radius: 10px !important;
        gap: 10px;
    }
    
    .stat-item {
        text-align: center !important;
        flex: 1;
    }
    
    .stat-label {
        font-size: 11px !important;
        color: #7f8c8d !important;
        margin-bottom: 5px !important;
    }
    
    .stat-value {
        display: block !important;
        font-size: 18px !important;
        font-weight: bold !important;
        color: #27ae60 !important;
    }
    
    /* Sales container - stack everything */
    .sales-container {
        display: block !important;
        height: auto !important;
        margin-bottom: 200px !important; /* Space for cart */
    }
    
    .product-panel {
        background: white;
        border-radius: 10px;
        margin-bottom: 20px !important;
        padding: 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .search-section {
        padding: 15px !important;
        flex-direction: column !important;
        gap: 10px !important;
        top: 55px !important;
        background: white !important;
        z-index: 50 !important;
        border-bottom: 1px solid #e1e1e1 !important;
        border-radius: 10px 10px 0 0;
    }
    
    .search-section input,
    .search-section select {
        width: 100% !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        border: 2px solid #e1e1e1 !important;
        border-radius: 8px !important;
    }
    
    /* Product grid - large touch targets */
    .products-grid {
        display: block !important;
        padding: 0 !important;
    }
    
    .product-card {
        display: flex !important;
        background: white !important;
        border: none !important;
        border-bottom: 1px solid #e1e1e1 !important;
        border-radius: 0 !important;
        padding: 20px 15px !important;
        margin: 0 !important;
        cursor: pointer !important;
        transition: background 0.2s ease;
        align-items: center;
        gap: 15px;
    }

    /* Allow JavaScript to hide filtered products */
    .product-card.hidden {
        display: none !important;
    }
    
    .product-card:last-child {
        border-bottom: none !important;
    }
    
    .product-card:active {
        background: #e3f2fd !important;
    }
    
    .product-info {
        flex: 1 !important;
    }
    
    .product-info h4 {
        font-size: 18px !important;
        margin: 0 0 5px 0 !important;
        color: #2c3e50 !important;
        line-height: 1.3;
    }
    
    .product-category {
        font-size: 13px !important;
        color: #7f8c8d !important;
        margin: 0 0 8px 0 !important;
    }
    
    .product-details {
        font-size: 12px !important;
        color: #95a5a6 !important;
    }
    
    .product-price {
        font-size: 22px !important;
        font-weight: bold !important;
        color: #27ae60 !important;
        text-align: right !important;
    }
    
    .product-stock {
        position: absolute;
        bottom: 8px;
        right: 15px;
        font-size: 11px !important;
        color: #95a5a6 !important;
    }
    
    /* Sales container - reduce bottom margin since cart is smaller */
    .sales-container {
        display: block !important;
        height: auto !important;
        margin-bottom: 120px !important; /* Reduced from 200px */
    }
    
    /* Cart - Compact single line version */
    .cart-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        border-top: 2px solid #e1e1e1 !important;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.2) !important;
        max-height: 170px !important; /* Much smaller */
        z-index: 1000 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .category-header {
        margin: 0;
        border-radius: 0;
        font-size: 14px;
        padding: 10px 15px;
        border-left: 4px solid #2980b9;
    }

        .subcategory-header {
        margin: 0;
        border-radius: 0;
        font-size: 14px;
        padding: 10px 15px;
        border-left: 4px solid #2980b9;
    }
    
    /* Make sure products under each category have proper styling */
    .product-card {
        border-top: none !important;
    }
    
    .category-header + .product-card {
        border-top: 1px solid #e1e1e1 !important;
    }
    
    /* Single line cart summary */
    .cart-header {
        padding: 12px 15px !important;
        background: #f8f9fa !important;
        border-bottom: 1px solid #e1e1e1 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .cart-summary-line {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        flex: 1 !important;
    }
    
    .cart-count {
        font-size: 14px !important;
        color: #2c3e50 !important;
        font-weight: 600 !important;
    }
    
    .cart-total {
        font-size: 16px !important;
        color: #27ae60 !important;
        font-weight: bold !important;
    }
    
    .btn-clear {
        background: #e74c3c !important;
        color: white !important;
        border: none !important;
        padding: 6px 12px !important;
        border-radius: 6px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
    }
    
    /* Hide the detailed cart items section completely */
    .cart-items {
        display: none !important;
    }
    
    .empty-cart {
        display: none !important;
    }
    
    /* Hide the detailed summary section */
    .cart-summary {
        display: none !important;
    }
    
    /* Compact action buttons */
    .cart-actions {
        padding: 10px 15px !important;
        flex-shrink: 0 !important;
        background: white;
        border-top: 1px solid #e1e1e1;
    }
    
    .cart-actions .btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 16px !important;
        margin-bottom: 0 !important;
        border-radius: 8px !important;
        font-weight: 600;
    }
    
    /* When cart is empty, show a simple message */
    .cart-panel.empty .cart-header {
        justify-content: center !important;
    }
    
    .cart-panel.empty .cart-summary-line {
        justify-content: center !important;
    }
    
    .cart-panel.empty .btn-clear {
        display: none !important;
    }
    
    .cart-empty-message {
        font-size: 14px !important;
        color: #7f8c8d !important;
        font-weight: 500 !important;
    }
    
    /* Modal completely redesigned for mobile */
    .modal {
        z-index: 10000 !important;
    }
    
    .modal-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        background: white;
    }
    
    .modal-header {
        padding: 15px 20px !important;
        background: #3498db !important;
        color: white !important;
        flex-shrink: 0 !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .modal-header h3 {
        color: white !important;
        font-size: 18px !important;
        margin: 0;
    }
    
    .close {
        color: white !important;
        font-size: 28px !important;
        cursor: pointer;
    }
    
    .modal-form-content {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 20px !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-actions {
        padding: 20px !important;
        background: #f8f9fa !important;
        flex-shrink: 0 !important;
        border-top: 1px solid #e1e1e1;
    }
    
    .modal-actions .btn {
        width: 100% !important;
        margin-bottom: 10px !important;
        padding: 15px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        font-weight: 600;
    }
    
    /* Form elements optimized for mobile */
    .form-row {
        display: block !important;
        margin-bottom: 20px !important;
    }
    
    .form-group {
        margin-bottom: 20px !important;
    }
    
    .form-group label {
        display: block !important;
        margin-bottom: 8px !important;
        font-weight: 600 !important;
        font-size: 15px !important;
        color: #2c3e50 !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        padding: 15px !important;
        font-size: 16px !important;
        border: 2px solid #e1e1e1 !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        background: white;
        transition: border-color 0.2s ease;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #3498db !important;
        outline: none;
    }
    
    /* Touch improvements */
    .btn {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 20px !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        transition: all 0.2s ease;
        border: none;
        font-weight: 600;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .btn-primary {
        background: #3498db !important;
        color: white !important;
    }
    
    .btn-secondary {
        background: #95a5a6 !important;
        color: white !important;
    }
    
    .btn-danger {
        background: #e74c3c !important;
        color: white !important;
    }
    
    /* Status indicators */
    .status {
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: bold;
        text-transform: uppercase;
    }
    
    .status-good {
        background: #d4edda;
        color: #155724;
    }
    
    .status-warning {
        background: #fff3cd;
        color: #856404;
    }
    
    .status-danger {
        background: #f8d7da;
        color: #721c24;
    }
    
    /* Hide desktop table on mobile */
    .table-container {
        display: none !important;
    }
    
    /* Prevent text selection on UI elements */
    .mobile-nav,
    .product-card,
    .inventory-card,
    .cart-header,
    .btn {
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    /* Improve scrolling performance */
    .content-body,
    .cart-items,
    .modal-form-content,
    .products-grid {
        -webkit-overflow-scrolling: touch !important;
    }

    /* Modal cart item styling with delete buttons */
    .modal-cart-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid #f1f1f1 !important;
    }

    .modal-cart-item:last-child {
        border-bottom: none !important;
    }

    .modal-item-info {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex: 1 !important;
        margin-right: 10px !important;
    }

    .modal-item-name {
        font-weight: 500 !important;
        color: #2c3e50 !important;
    }

    .modal-item-price {
        font-weight: bold !important;
        color: #27ae60 !important;
    }

    .modal-item-controls {
        flex-shrink: 0 !important;
    }

    .modal-remove-btn {
        background: #e74c3c !important;
        color: white !important;
        border: none !important;
        border-radius: 4px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
        font-weight: bold !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: background 0.2s ease !important;
    }

    .modal-remove-btn:hover {
        background: #c0392b !important;
    }

    .modal-remove-btn:active {
        transform: scale(0.95) !important;
    }

    /* Mobile specific styling */
    @media screen and (max-width: 667px) {
        .modal-cart-item {
            padding: 15px 0 !important;
        }
        
        .modal-remove-btn {
            width: 32px !important;
            height: 32px !important;
            font-size: 18px !important;
        }
        
        .modal-item-info {
            margin-right: 15px !important;
        }
    }

    .name-preview {
    font-size: 14px;
    padding: 12px;
    min-height: 40px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }

    /* Mobile specific inventory organization */
    .inventory-organized .category-header {
        padding: 12px 15px;
        font-size: 14px;
        border-radius: 0;
        margin: 0 0 0 0 !important;
        border-left: 4px solid #2980b9;
    }

    .inventory-organized .category-header:not(:first-child) {
        margin-top: 0 0 0 0 !important; /* Only add margin between different categories */
    }
    
    .inventory-organized .subcategory-header {
        padding: 10px 15px;
        padding-left: 30px;
        font-size: 13px;
        border-radius: 0;
    }
    
    .inventory-filtered h4 {
        padding: 12px 15px;
        font-size: 14px;
    }

    .size-header {
    padding: 8px 15px;
    padding-left: 40px; /* Double indent */
    font-size: 12px;
    border-radius: 0;
    }

    .sku-add-section {
    padding: 10px 15px;
    }
    
    .sku-input-group input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 12px;
    }
    
    .btn-sku-add {
        padding: 10px 14px;
        font-size: 14px;
    }

    .bulk-pricing-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    }
    
    .bulk-pricing-row label {
        min-width: auto;
    }
    
    .bulk-input-group {
        width: 100%;
    }
    
    .bulk-input-group input {
        width: 100px;
    }

    .cart-item-price {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    }
    
    .original-price {
        font-size: 11px !important;
    }
    
    .bulk-price {
        font-size: 12px !important;
    }

        .image-upload-section {
        flex-direction: column;
    }
    
    .item-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .image-cell {
        width: 50px;
    }

    .inventory-table th,
    .inventory-table td {
        height: auto;
        padding: 10px 5px;
    }
    
    .col-item {
        min-width: 150px;
    }
    
    .col-sku {
        width: 100px;
    }
    
    .col-category {
        min-width: 80px;
    }
    
    .col-price {
        width: 80px;
    }
    
    .col-quantity {
        width: 100px;
    }
    
    .col-actions {
        width: 120px;
    }
    
    .quantity-cell {
        flex-direction: column;
        gap: 5px;
    }
    
    .actions-group {
        flex-direction: column;
        gap: 2px;
    }

    .purchases-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .purchases-header .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .purchases-header .header-actions .btn,
    .purchases-header .header-actions input,
    .purchases-header .header-actions select {
        width: 100%;
    }
    
    .purchases-stats {
        grid-template-columns: 1fr;
    }
    
    /* Mobile table - convert to cards */
       /* Hide desktop table on mobile */
    .purchases-table-container .table-container {
        display: none !important;
    }
    
    /* Show mobile cards on mobile */
    .purchases-mobile-cards {
        display: block !important;
        background: #f8f9fa;
        margin: 0 !important;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .purchase-card {
        background: white !important;
        border-bottom: 1px solid #e1e1e1 !important;
        padding: 20px 15px !important;
        margin: 0 !important;
    }
    
    .purchase-card:last-child {
        border-bottom: none !important;
    }
    
    .purchase-card-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        margin-bottom: 15px !important;
    }
    
    .purchase-card-header h4 {
        font-size: 18px !important;
        margin: 0 !important;
        color: #2c3e50 !important;
        flex: 1 !important;
        margin-right: 15px !important;
        line-height: 1.3;
    }
    
    .purchase-cost {
        font-size: 20px !important;
        font-weight: bold !important;
        color: #e74c3c !important;
    }
    
    .purchase-card-details {
        margin-bottom: 15px !important;
    }
    
    .purchase-date {
        display: block !important;
        font-size: 13px !important;
        color: #7f8c8d !important;
        margin-bottom: 10px !important;
        font-weight: 500;
    }
    
    .purchase-items {
        display: block !important;
        font-size: 14px !important;
        color: #2c3e50 !important;
        line-height: 1.4;
        margin-bottom: 10px !important;
    }
    
    .purchase-category-mobile {
        display: inline-block !important;
        margin-bottom: 10px !important;
    }
    
    .purchase-card-actions {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .receipt-mobile {
        width: 40px;
        height: 40px;
    }
    
    .receipt-mobile .receipt-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .receipt-mobile .no-receipt {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .btn-mobile {
        flex: 1 !important;
        padding: 12px 8px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        border: none !important;
        cursor: pointer !important;
        font-weight: 600 !important;
        transition: all 0.2s ease;
        margin: 0 2px !important;
    }
    
    .btn-mobile.btn-primary {
        background: #3498db !important;
        color: white !important;
    }
    
    .btn-mobile.btn-secondary {
        background: #95a5a6 !important;
        color: white !important;
    }
    
    .btn-mobile.btn-danger {
        background: #e74c3c !important;
        color: white !important;
    }
    
    .btn-mobile:active {
        transform: scale(0.95);
    }
}