/* Mobile Styles */

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    /* Header Mobile */
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .logo {
        order: 1;
    }
    .header-actions {
        order: 2;
    }
    .search-container {
        order: 3;
        width: 100%;
        max-width: none;
    }
    /* Hero Mobile */
    .hero {
        height: 300px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .cta-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    /* Category Tabs Mobile */
    .tabs-container {
        padding: 0 15px;
    }
    /* Content Layout Mobile */
    .content-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sidebar {
        display: none;
    }
    /* Product Header Mobile */
    .product-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .results-info {
        text-align: center;
    }
    /* Product Grid Mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .product-card {
        font-size: 0.9rem;
    }
    .product-info {
        padding: 0.75rem;
    }
    .product-title {
        font-size: 0.9rem;
    }
    .price-current {
        font-size: 1rem;
    }
    /* Carousel Mobile */
    .carousel-item {
        flex: 0 0 250px;
    }
    .carousel-nav {
        display: none;
    }
    /* Membership Banner Mobile */
    .membership-banner {
        padding: 2rem 0;
    }
    .membership-title {
        font-size: 1.5rem;
    }
    .membership-subtitle {
        font-size: 1rem;
    }
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .page-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* Tablet Styles */

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
    /* Content Layout Tablet */
    .content-layout {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }
    .sidebar {
        position: static;
    }
    /* Product Grid Tablet */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Hero Tablet */
    .hero-title {
        font-size: 2.5rem;
    }
    /* Carousel Tablet */
    .carousel-item {
        flex: 0 0 260px;
    }
}

/* Large Desktop */

@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .carousel-item {
        flex: 0 0 300px;
    }
}

/* Mobile Filter Button */

@media (max-width: 768px) {
    .mobile-filter-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: #007bff;
        color: white;
        border: none;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        font-size: 24px;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-filter-btn:hover {
        transform: scale(1.1);
    }
}

/* Print Styles */

@media print {
    .header,
    .hero,
    .category-tabs,
    .sidebar,
    .membership-banner,
    .footer {
        display: none;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */

@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    .tab-btn {
        border: 2px solid #000;
    }
    .search-input {
        border: 2px solid #000;
    }
}

/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .carousel {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    .product-card {
        background: var(--card-bg);
        color: var(--text-color);
    }
    .header {
        background: var(--card-bg);
        border-bottom-color: var(--border-color);
    }
    .search-input {
        background: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }
    .sidebar {
        background: var(--card-bg);
    }
    .footer {
        background: #0d0d0d;
    }
}