/* Mobile-First Responsive Design */

/* Base Mobile Styles (320px+) */
* {
    box-sizing: border-box;
}

body {
    font-size: 14px;
    line-height: 1.5;
}

.container {
    padding: 0 15px;
    max-width: 100%;
}

/* Header Mobile */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    height: 60px;
}

.logo img {
    max-height: 35px;
}

/* Mobile Navigation */
.main-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: white;
    z-index: 999;
    overflow-y: auto;
}

.main-nav.active {
    display: block;
}

.nav-menu {
    flex-direction: column;
    padding: 20px 0;
    margin: 0;
    list-style: none;
}

.nav-menu li {
    border-bottom: 1px solid #eee;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.nav-menu a:hover {
    background: #f5f5f5;
    color: #6b46c1;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions a {
    padding: 8px;
    color: #333;
    font-size: 18px;
}

/* Shop Mobile */
.shop-hero {
    height: 50vh;
    min-height: 300px;
}

.hero-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-search input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 25px;
}

/* Category Swiper Mobile */
.category-swiper {
    margin: 20px 0;
}

.category-card {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.category-card h3 {
    font-size: 14px;
    margin: 5px 0;
}

.product-count {
    font-size: 12px;
    color: #666;
}

/* Shop Layout Mobile */
.shop-layout {
    display: block;
}

.shop-sidebar {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 60px);
    background: white;
    z-index: 998;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.shop-sidebar.active {
    left: 0;
}

.filter-toggle {
    display: block;
    width: 100%;
    padding: 10px;
    background: #6b46c1;
    color: white;
    border: none;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 16px;
}

.shop-content {
    width: 100%;
    padding-top: 20px;
}

/* Toolbar Mobile */
.shop-toolbar {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.toolbar-actions {
    width: 100%;
    justify-content: space-between;
}

.sort-dropdown select {
    width: 150px;
    padding: 8px;
    border-radius: 5px;
}

/* Products Grid Mobile */
.products-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 0 10px;
}

.product-card {
    border-radius: 10px;
    overflow: hidden;
}

.product-image {
    height: 150px;
}

.product-actions {
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.product-info {
    padding: 10px;
}

.product-title {
    font-size: 14px;
    margin: 5px 0;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
}

/* Wishlist Mobile */
.wishlist-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

.wishlist-item {
    display: flex;
    gap: 15px;
    padding: 15px;
}

.item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    padding: 0;
}

.item-actions {
    flex-direction: column;
    gap: 8px;
}

.item-actions .btn {
    padding: 8px 12px;
    font-size: 12px;
}

/* Quick View Mobile */
.quick-view-product {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100%;
    padding: 20px;
}

.main-image img {
    height: 250px;
}

.thumbnail-images {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 10px 0;
}

.quick-view-actions {
    flex-direction: column;
    gap: 10px;
}

/* Modal Mobile */
.modal-content {
    width: 95%;
    max-width: 400px;
    margin: 5% auto;
    max-height: 90vh;
    overflow-y: auto;
}

/* Forms Mobile */
.form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

.filter-form {
    flex-direction: column;
    gap: 15px;
}

.search-box {
    width: 100%;
}

.search-box input {
    padding: 12px;
    font-size: 16px;
    border-radius: 25px 0 0 25px;
}

.search-box button {
    padding: 12px 15px;
    border-radius: 0 25px 25px 0;
}

/* Pagination Mobile */
.pagination {
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.pagination .btn {
    padding: 8px 12px;
    font-size: 14px;
    min-width: 40px;
}

/* Touch Optimizations */
.btn {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
}

input, select, textarea {
    min-height: 44px;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
}

/* Swipe Gestures */
.swiper-container {
    overflow: hidden;
}

.swiper-slide {
    user-select: none;
}

/* Tablet Styles (768px+) */
@media (min-width: 768px) {
    .container {
        padding: 0 30px;
    }
    
    .header-inner {
        height: 70px;
        padding: 0 30px;
    }
    
    .logo img {
        max-height: 45px;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .main-nav {
        display: block;
        position: static;
        height: auto;
        background: transparent;
    }
    
    .nav-menu {
        flex-direction: row;
        padding: 0;
    }
    
    .nav-menu li {
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 10px 15px;
    }
    
    .shop-hero {
        height: 60vh;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .shop-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
    
    .shop-sidebar {
        position: static;
        width: auto;
        height: auto;
        box-shadow: none;
    }
    
    .filter-toggle {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
        padding: 0;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-actions {
        flex-direction: row;
        position: absolute;
        top: 10px;
        right: 10px;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .product-card:hover .product-actions {
        opacity: 1;
    }
    
    .wishlist-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .wishlist-item {
        display: block;
    }
    
    .item-image {
        width: 100%;
        height: 200px;
    }
    
    .item-details {
        padding: 15px;
    }
    
    .item-actions {
        flex-direction: row;
    }
    
    .quick-view-product {
        grid-template-columns: 1fr 1fr;
    }
}

/* Desktop Styles (1024px+) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding: 0 40px;
    }
    
    .header-inner {
        height: 80px;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .shop-hero {
        height: 70vh;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    
    .product-image {
        height: 250px;
    }
    
    .shop-layout {
        grid-template-columns: 320px 1fr;
        gap: 40px;
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* Print Styles */
@media print {
    .header, .shop-sidebar, .pagination, .modal {
        display: none !important;
    }
    
    .shop-content {
        width: 100% !important;
    }
    
    .product-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}