/* Mobile Styles */

@media (max-width: 1024px) {
    .hide-tablet {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Navigation */
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
}

/* Mobile Menu - ShopCore Design */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: white;
    z-index: 10000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.mobile-menu-header .font-bold {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.mobile-menu-header .font-bold::before {
    content: '🛒';
    font-size: 1.5rem;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-menu-items {
    padding: 0.5rem 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f3f4f6;
}

.mobile-menu-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.mobile-menu-item > a:hover,
.mobile-menu-item > a:active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #3B82F6;
    padding-left: 2rem;
}

.mobile-menu-item > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(180deg, #3B82F6 0%, #8B5CF6 100%);
    transition: width 0.2s;
}

.mobile-menu-item > a:hover::before {
    width: 4px;
}

.mobile-menu-item.has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #9CA3AF;
}

.mobile-menu-item.has-children.open > a {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #3B82F6;
}

.mobile-menu-item.has-children.open > a::after {
    transform: rotate(180deg);
    color: #3B82F6;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
}

.mobile-menu-item.open .mobile-submenu {
    max-height: 600px;
}

.mobile-submenu a {
    display: block;
    padding: 0.875rem 2.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mobile-submenu a:hover,
.mobile-submenu a:active {
    color: #3B82F6;
    background: white;
    padding-left: 3rem;
    border-left-color: #3B82F6;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: none;
    padding: 0.5rem 0;
    z-index: 100;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 60px;
    }
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.75rem;
}

.bottom-nav-item.active {
    color: #2563eb;
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
    button, .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Swipe gestures */
.swipe-container {
    touch-action: pan-y;
    user-select: none;
}

/* Mobile Cards */
@media (max-width: 768px) {
    .product-card {
        border-radius: 8px;
    }
    
    .product-card__image {
        padding-top: 100%;
    }
    
    .product-card__content {
        padding: 0.75rem;
    }
}

/* Mobile Forms */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        width: 100%;
    }
}

/* Mobile Tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
    }
    
    .responsive-table thead {
        display: none;
    }
    
    .responsive-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }
    
    .responsive-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
    }
}

/* Mobile Modals */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .quick-view__content {
        flex-direction: column;
    }
}

/* Pull to Refresh Indicator */
.pull-to-refresh {
    display: none;
    text-align: center;
    padding: 1rem;
    color: #6b7280;
}

/* Landscape Mode */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slider {
        height: 300px;
    }
}

/* Safe Areas for iPhone X+ */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
}
