/*
 * ==========================================
 * INNOVE FASHION THEME - RESPONSIVE CSS
 * Mobile-First Responsive Breakpoints
 * ==========================================
 * Breakpoints:
 * - Mobile: 320px - 767px
 * - Tablet: 768px - 991px
 * - Desktop: 992px - 1199px
 * - Large Desktop: 1200px+
 * ==========================================
 */

/* ============================================
   1. MOBILE FIRST (Base Styles)
   ============================================ */

/* Small Mobile (320px - 479px) */
@media (max-width: 479px) {
    /* Hero Section */
    .hero-section {
        height: 70vh;
        min-height: 450px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.9375rem;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
    }

    /* Section Headings */
    .section-title {
        font-size: 1.5rem;
    }

    /* Product Cards */
    .product-actions {
        justify-content: flex-start;
        bottom: 0;
        padding: 0.75rem;
    }

    /* Header */
    .logo {
        font-size: 1.25rem;
    }

    .search-box input {
        min-width: 150px;
    }

    /* Footer */
    .footer-section {
        margin-bottom: 2rem;
    }

    /* Product Detail */
    .product-gallery {
        gap: 0.5rem;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
    }

    .detail-price .price-current {
        font-size: 1.5rem;
    }

    /* Contact */
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* Mobile (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    /* Hero Section */
    .hero-content h1 {
        font-size: 2.25rem;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   2. TABLET (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    /* Hero Section */
    .hero-content h1 {
        font-size: 2.75rem;
    }

    /* Header */
    .search-box input {
        min-width: 200px;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Banner Section */
    .banner-card {
        min-height: 250px;
        padding: 2rem;
    }

    .banner-content h3 {
        font-size: 1.5rem;
    }

    /* Footer */
    .footer-section {
        margin-bottom: 2rem;
    }
}

/* ============================================
   3. DESKTOP (992px - 1199px)
   ============================================ */
@media (min-width: 992px) and (max-width: 1199px) {
    /* Hero Section */
    .hero-content h1 {
        font-size: 3rem;
    }

    /* Product Cards */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Blog Grid */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   4. LARGE DESKTOP (1200px+)
   ============================================ */
@media (min-width: 1200px) {
    /* Hero Section */
    .hero-content h1 {
        font-size: 3.5rem;
    }

    /* Product Cards */
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================
   4.5. DESKTOP NAVBAR LAYOUT (992px+)
   ============================================ */
@media (min-width: 992px) {
    /* Navbar flex layout for three-column design */
    .site-header .navbar {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    .site-header .navbar-brand {
        flex: 0 0 auto;
        order: 0 !important;
    }

    .site-header .navbar-collapse {
        flex: 1 1 auto;
        display: flex !important;
        justify-content: center;
        order: 1 !important;
    }

    .site-header .header-right {
        flex: 0 0 auto;
        display: flex !important;
        align-items: center;
        gap: 1rem;
        order: 2 !important;
    }

    /* Hide mobile icons on desktop */
    .mobile-icons {
        display: none !important;
    }
}

/* ============================================
   5. MOBILE-SPECIFIC OVERRIDES
   ============================================ */

/* Hamburger Menu Styles - Drawer Menu */
@media (max-width: 991px) {
    /* Mobile Navbar Layout */
    .site-header .navbar {
        padding: 0.5rem 0;
    }

    /* Navbar Toggler */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1051;
    }

    .navbar-toggler i {
        font-size: 1.25rem;
        color: var(--color-primary);
    }

    /* Mobile Drawer Menu - Slide from Left */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
        background-color: var(--color-white);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1050;
        overflow-y: auto;
        overflow-x: hidden;
        transition: left 0.3s ease;
        padding: 0;
        margin: 0;
        border: none;
        display: block !important;
    }

    /* When menu is open */
    .navbar-collapse.show {
        left: 0;
        z-index: 9999;
    }

    /* Mobile Drawer Close Button */
    .mobile-drawer-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        border: none;
        background: #f5f5f5;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.125rem;
        color: var(--color-primary);
        transition: all var(--transition-fast);
        z-index: 10;
    }

    .mobile-drawer-close:hover {
        background: var(--color-secondary);
        color: var(--color-white);
    }

    /* Mobile Nav Styling */
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 4rem 0 1rem 0;
        height: 100%;
        min-height: 100vh;
        box-sizing: border-box;
    }

    .navbar-nav .nav-link {
        padding: 0.875rem 1.5rem !important;
        border-bottom: 1px solid #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }

    /* Dropdown on mobile - drawer style */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
        background-color: #f9f9f9;
        border-radius: 0;
    }

    /* Mobile Icons */
    .mobile-icons {
        display: flex !important;
    }

    /* Mobile Search Box */
    .mobile-search-box {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-white);
        z-index: 1060;
        transition: left 0.3s ease;
        padding: 1rem;
        display: flex;
        flex-direction: column;
    }

    .mobile-search-box.active {
        left: 0;
    }

    .mobile-search-box .search-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #eee;
        margin-bottom: 1rem;
    }

    .mobile-search-box .search-back {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    .mobile-search-box input {
        flex: 1;
        border: none;
        border-bottom: 2px solid var(--color-secondary);
        padding: 0.75rem;
        font-size: 1.125rem;
        outline: none;
    }

    .mobile-search-box .search-close-mobile {
        background: none;
        border: none;
        font-size: 1.25rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    /* Mobile Filter Modal */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: var(--shadow-lg);
        z-index: 1050;
        overflow-y: auto;
        transition: left var(--transition-normal);
    }

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

    .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid #eee;
        margin: -1.5rem -1.5rem 1.5rem;
    }

    .filter-close {
        width: 32px;
        height: 32px;
        border: none;
        background-color: #f5f5f5;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   6. TOUCH-FRIENDLY ELEMENTS (Mobile)
   ============================================ */
@media (max-width: 767px) {
    /* Increase touch target sizes */
    .action-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .qty-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .view-btn,
    .page-link {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .btn {
        min-height: 44px;
    }

    /* Mobile Product Card */
    .product-card {
        margin-bottom: 1rem;
    }

    /* Mobile Product Actions - Always Visible */
    .product-actions {
        position: static;
        background: none;
        padding: 0.75rem 1rem;
        justify-content: center;
    }

    /* Mobile Filter Button */
    .filter-toggle {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background-color: var(--color-white);
        border: 1px solid #ddd;
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        cursor: pointer;
    }

    .filter-toggle i {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .filter-toggle {
        display: none;
    }
}

/* ============================================
   7. ORIENTATION-SPECIFIC STYLES
   ============================================ */

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 400px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .slider-controls {
        bottom: 1rem;
        right: 1rem;
    }
}

/* ============================================
   8. PRINT STYLES
   ============================================ */
@media print {
    .top-bar,
    .header-icons,
    .hero-section,
    .product-actions,
    .pagination,
    .footer-bottom,
    .social-links,
    .newsletter-form {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .section {
        page-break-inside: avoid;
    }

    .product-card,
    .blog-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ============================================
   9. REDUCED MOTION PREFERENCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   10. HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #000000;
        --color-white: #ffffff;
    }

    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }

    .product-card,
    .card {
        border: 2px solid var(--color-primary);
    }
}

/* ============================================
   11. DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --color-primary: #f5f5f5;
        --color-white: #1a1a1a;
        --color-light: #2d2d2d;
        --color-dark: #ffffff;
    }

    body {
        background-color: var(--color-dark);
        color: var(--color-primary);
    }

    .site-header,
    .card,
    .product-card,
    .filter-sidebar,
    .contact-info-card,
    .contact-form {
        background-color: #252525;
    }

    .form-control,
    .form-select {
        background-color: #333;
        border-color: #444;
        color: var(--color-primary);
    }

    .footer-links a {
        color: rgba(255, 255, 255, 0.7);
    }
    */
}

/* ============================================
   12. ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus Visible for Keyboard Navigation */
@media (max-width: 767px) {
    :focus-visible {
        outline: 2px solid var(--color-secondary);
        outline-offset: 2px;
    }

    /* Skip to Content Link (Mobile) */
    .skip-link {
        position: fixed;
        top: -40px;
        left: 0;
        background-color: var(--color-primary);
        color: var(--color-white);
        padding: 0.5rem 1rem;
        z-index: 10000;
        transition: top var(--transition-fast);
    }

    .skip-link:focus {
        top: 0;
    }
}

/* ============================================
   13. GRID LAYOUT ADJUSTMENTS
   ============================================ */

/* Responsive Product Grids */
@media (max-width: 575px) {
    .product-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .product-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product-grid-2 {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .product-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   14. FONT SIZE ADJUSTMENTS
   ============================================ */

/* Small Mobile */
@media (max-width: 479px) {
    html {
        font-size: 14px;
    }

    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    h4, .h4 { font-size: 1.125rem; }
    h5, .h5 { font-size: 1rem; }
    h6, .h6 { font-size: 0.875rem; }
}

/* Mobile */
@media (min-width: 480px) and (max-width: 767px) {
    html {
        font-size: 15px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    html {
        font-size: 15px;
    }
}

/* Desktop */
@media (min-width: 992px) {
    html {
        font-size: 16px;
    }
}

/* ============================================
   15. CONTAINER ADJUSTMENTS
   ============================================ */

@media (max-width: 575px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section {
        padding: 2.5rem 0;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .section {
        padding: 3rem 0;
    }
}

/* ============================================
   16. MOBILE NAVIGATION SPECIFIC
   ============================================ */

@media (max-width: 991px) {
    /* Close button for mobile menu */
    .menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        border: none;
        background-color: #f5f5f5;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    /* Mobile menu item styling */
    .nav-item {
        position: relative;
    }

    .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-toggle::after {
        display: none;
    }

    .dropdown-icon {
        transition: transform var(--transition-fast);
    }

    .nav-item.show .dropdown-icon {
        transform: rotate(180deg);
    }

    /* Mega Menu on Mobile */
    .mega-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .mega-menu-title {
        font-weight: 600;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
    }

    .mega-menu-links {
        list-style: none;
        padding-left: 1rem;
    }

    .mega-menu-links li {
        padding: 0.375rem 0;
    }
}

/* ============================================
   17. TABLET-SPECIFIC ADJUSTMENTS
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .search-box {
        max-width: 200px;
    }
}

/* ============================================
   18. UTILITY CLASSES FOR RESPONSIVE
   ============================================ */

/* Hide on specific breakpoints */
.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }

    .hide-tablet {
        display: none;
    }
}

@media (min-width: 992px) {
    .hide-tablet {
        display: block;
    }

    .hide-desktop {
        display: none;
    }
}

/* Show only on mobile */
.show-mobile {
    display: block;
}

@media (min-width: 768px) {
    .show-mobile {
        display: none;
    }
}

/* Show only on tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .show-tablet {
        display: block;
    }
}

/* Show only on desktop */
.show-desktop {
    display: none;
}

@media (min-width: 992px) {
    .show-desktop {
        display: block;
    }
}

/* ============================================
   19. LANDSCAPE MOBILE ADJUSTMENTS
   ============================================ */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 400px;
    }

    .hero-content {
        padding: 1rem 2rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .slider-controls {
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

/* ============================================
   20. SPECIAL CASES
   ============================================ */

/* Extra Small Devices */
@media (max-width: 374px) {
    .logo {
        font-size: 1.25rem;
    }

    .header-icons {
        gap: 0.5rem;
    }

    .header-icon {
        font-size: 1rem;
        width: 32px;
        height: 32px;
    }

    .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Extra Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Ultra Wide Screen (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    html {
        font-size: 18px;
    }
}
