/* Responsive CSS */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 0 20px;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .top-bar {
        display: none;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    .search-bar {
        margin: 15px 0;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .main-menu {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        z-index: 9999;
        transition: left 0.3s;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .main-menu.active {
        left: 0;
    }
    
    .main-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-menu a {
        color: var(--text-color);
        padding: 15px 20px;
    }
    
    .header-nav .nav-menu a {
        color: #28a745 !important;
    }
    
    .header-nav .nav-menu .nav-dropdown a {
        color: #28a745 !important;
    }
    
    /* Mobile mega menu - vertical layout */
    .header-nav .mega-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
    
    .header-nav .mega-menu > div {
        display: block !important;
        grid-template-columns: none !important;
    }

    /* Store page product grid - 2 columns on tablet */
    .store-page .product-grid .col-5 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .store-page .product-grid .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .header-nav .mega-menu > div > div {
        border-right: none !important;
        border-bottom: 1px solid #e0e0e0;
        padding: 15px 20px !important;
    }

    .header-nav .mega-menu > div > div:last-child {
        border-bottom: none;
    }
    
    .header-nav .mega-menu .nav-dropdown {
        position: static !important;
        display: block !important;
        box-shadow: none !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .header-nav .mega-menu ul {
        display: block !important;
        padding-left: 20px !important;
    }
    
    .header-nav .mega-menu ul li {
        margin: 5px 0 !important;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: var(--light-color);
        display: none;
    }
    
    .main-menu li:hover .submenu {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-section {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .newsletter-section .row {
        text-align: center;
    }
    
    .newsletter-section .col-md-6 {
        margin-bottom: 20px;
    }
    
    .footer-widget {
        margin-bottom: 30px;
    }
}

/* Mobile (576px to 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .main-header .row {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .search-bar {
        margin-bottom: 15px;
    }
    
    .header-actions {
        justify-content: center;
        gap: 20px;
    }
    
    .hero-section {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .original-price {
        font-size: 12px;
    }
    
    .newsletter-section h3 {
        font-size: 20px;
    }
    
    .newsletter-section p {
        font-size: 14px;
    }
    
    .main-footer .row > div {
        margin-bottom: 30px;
    }
    
    .copyright .row {
        text-align: center;
    }
    
    .copyright .col-md-6 {
        margin-bottom: 15px;
    }
    
    .payment-methods {
        text-align: center;
        margin-top: 10px;
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Small Mobile (575px and below) */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .hero-section {
        height: 250px;
        margin-bottom: 20px;
    }
    
    .hero-content h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .section-header {
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-subtitle {
        font-size: 13px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .category-card {
        height: 150px;
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .current-price {
        font-size: 15px;
    }
    
    .original-price {
        font-size: 11px;
    }
    
    .product-rating {
        margin-bottom: 8px;
    }
    
    .stars {
        font-size: 12px;
    }
    
    .rating-count {
        font-size: 11px;
    }
    
    .add-to-cart-btn {
        padding: 8px;
        font-size: 13px;
    }
    
    .newsletter-section {
        padding: 30px 0;
        margin: 30px 0;
    }
    
    .newsletter-section h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .newsletter-section p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .main-footer {
        padding: 30px 0 15px;
    }
    
    .footer-widget h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-links li,
    .contact-info li {
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .social-links a {
        width: 30px;
        height: 30px;
        line-height: 30px;
        margin-right: 8px;
    }
    
    .copyright {
        margin-top: 20px;
        padding-top: 15px;
        font-size: 13px;
    }
    
    .payment-methods i {
        font-size: 20px;
        margin-left: 8px;
    }
    
    .breadcrumb-section {
        padding: 10px 0;
    }
    
    .breadcrumb {
        font-size: 13px;
    }
    
    .cookie-consent {
        padding: 15px 0;
    }
    
    .cookie-consent .container {
        padding: 0 15px;
    }
    
    .cookie-consent p {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .cookie-consent .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        height: 200px;
    }
    
    .hero-content h1 {
        font-size: 22px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
}

/* Mobile (576px and below) */
@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 14px;
    }

    /* Store page product grid - 1 column on mobile */
    .store-page .product-grid .col-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .store-page .product-grid .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Store page sort bar - stack vertically on mobile */
    .store-page .sort-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .store-page .sort-bar .sort-options {
        width: 100%;
        margin-top: 10px;
    }

    .store-page .sort-bar .sort-options form {
        width: 100%;
    }

    .store-page .sort-bar .sort-options .form-select {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .main-header,
    .main-nav,
    .newsletter-section,
    .main-footer,
    .back-to-top,
    .cookie-consent,
    .product-actions,
    .add-to-cart-btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .product-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 18pt;
        margin-bottom: 10pt;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #ffffff;
        --bg-color: #1a1a1a;
        --light-color: #2d2d2d;
        --border-color: #404040;
    }
    
    .main-header {
        background-color: var(--bg-color);
        border-color: var(--border-color);
    }
    
    .product-card {
        background-color: var(--bg-color);
        border-color: var(--border-color);
    }
    
    .main-menu {
        background-color: var(--bg-color);
    }
    
    .main-menu a {
        color: var(--text-color);
    }
    
    .submenu {
        background-color: var(--bg-color);
    }
}
