/* ========================================
   Responsive Styles - Full Device Support
======================================== */

/* Large Desktop (1200px and above) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}

/* Tablet Landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .header-content {
        gap: 15px;
    }
    
    .search-bar {
        max-width: 350px;
    }
}

/* Tablet Portrait (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile Landscape (481px - 575px) */
@media (min-width: 481px) and (max-width: 575px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-img {
        height: 40px;
    }
}

/* Mobile Portrait (320px - 480px) */
@media (min-width: 320px) and (max-width: 480px) {
    .logo-img {
        height: 35px;
    }
    
    .search-bar input {
        font-size: 14px;
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    /* Top Bar */
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .top-bar-left,
    .top-bar-right {
        width: 100%;
        justify-content: center;
    }
    
    .top-bar-left span,
    .top-bar-right a {
        display: inline-block;
        margin: 5px 10px;
    }
    
    /* Header */
    .header-content {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
    }
    
    .logo {
        flex: 0 0 auto;
        order: 1;
    }
    
    .header-actions {
        order: 2;
        flex: 0 0 auto;
    }
    
    .search-bar {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 15px;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--secondary-color);
        transition: left 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 80px 0 20px;
        align-items: stretch;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu > li > a {
        padding: 15px 20px;
        display: block;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        display: none;
    }
    
    .has-dropdown.active .dropdown {
        display: block;
    }
    
    .has-dropdown > a i {
        float: right;
        transition: transform 0.3s ease;
    }
    
    .has-dropdown.active > a i {
        transform: rotate(180deg);
    }
    
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9998;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Categories Grid */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Section Title */
    .section-title {
        font-size: 28px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* Newsletter Form */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

/* Mobile (576px and below) */
@media (max-width: 576px) {
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Top Bar - Hide on very small screens */
    .top-bar {
        font-size: 12px;
    }
    
    .top-bar-left span:not(:first-child) {
        display: none;
    }
    
    /* Header */
    .logo-img {
        height: 40px;
        max-width: 150px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-action-btn {
        font-size: 18px;
        padding: 5px;
    }
    
    .header-action-btn .badge {
        font-size: 10px;
        min-width: 16px;
        padding: 1px 4px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    /* Categories Grid */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-image {
        height: 180px;
    }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 250px;
    }
    
    .product-actions {
        flex-direction: row;
    }
    
    /* Section */
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    /* Footer Grid */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-title {
        font-size: 18px;
    }
    
    .footer-text,
    .footer-links,
    .footer-contact {
        font-size: 14px;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
    
    /* Toast */
    .toast {
        right: 15px;
        left: 15px;
        min-width: auto;
        font-size: 14px;
    }
    
    /* Newsletter */
    .newsletter-content h2 {
        font-size: 24px;
    }
    
    .newsletter-content p {
        font-size: 14px;
    }
}

/* Extra Small (400px and below) */
@media (max-width: 400px) {
    .logo-img {
        height: 35px;
        max-width: 120px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .product-title a {
        font-size: 14px;
    }
    
    .price-new {
        font-size: 18px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* iPhone SE and similar (375px) */
@media (max-width: 375px) {
    .header-content {
        padding: 15px 0;
    }
    
    .search-bar input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .search-bar button {
        padding: 10px 15px;
    }
}

/* Galaxy Fold and similar (280px) */
@media (max-width: 320px) {
    .logo-img {
        height: 30px;
    }
    
    .header-action-btn {
        font-size: 16px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

/* Landscape Mode for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .main-nav {
        padding-top: 10px;
    }
    
    .nav-menu > li > a {
        padding: 10px 20px;
    }
}

/* iPad Pro Portrait */
@media (min-width: 1024px) and (max-width: 1024px) and (orientation: portrait) {
    .container {
        max-width: 960px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* iPad Pro Landscape */
@media (min-width: 1366px) and (max-width: 1366px) and (orientation: landscape) {
    .container {
        max-width: 1200px;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .main-nav,
    .header-actions,
    .mobile-menu-toggle,
    .footer,
    .back-to-top,
    .product-actions,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
    }
}