/* ============================================
   MODESTORE - Responsive CSS
   Earth Tones Renk Paleti
   ============================================ */

/* ============================================
   BREAKPOINTS
   Mobile: 320px - 767px
   Tablet: 768px - 991px
   Desktop: 992px - 1199px
   Large Desktop: 1200px+
   ============================================ */

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

/* Container */
.container {
    padding: 0 var(--spacing-md);
}

/* Top Bar - Hide on Mobile */
.top-bar {
    display: none;
}

/* Header */
.header-main .container {
    flex-wrap: wrap;
    padding: var(--spacing-md);
}

/* Logo */
.logo a {
    font-size: 1.5rem;
}


/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
}

/* Main Navigation - Hide on mobile, show in hamburger */
.main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--white);
    box-shadow: var(--shadow-xl);
    transition: left var(--transition-normal);
    z-index: 2000;
    overflow-y: auto;
}

.main-nav.active {
    left: 0;
}

.main-nav .container {
    flex-direction: column;
    padding: 0;
}

.nav-menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.nav-item {
    width: 100%;
    border-bottom: 1px solid var(--gray-200);
}

.nav-link {
    padding: var(--spacing-md) var(--spacing-lg);
}

.nav-link::after {
    display: none;
}

/* Mega Menu - Show as dropdown on mobile */
.nav-item .mega-menu-toggle {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
}

.mega-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    min-width: 100%;
    display: none;
    background-color: var(--gray-100);
}

.nav-item.active .mega-menu {
    display: block;
}

.mega-menu-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.mega-menu-column {
    padding: var(--spacing-md);
}

.mega-menu-column h4 {
    font-size: 0.9375rem;
}

/* Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1500;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero-slide {
    height: 400px;
}

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

.hero-slide p {
    font-size: 1rem;
}

.slider-nav {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
}

.slider-nav button {
    width: 40px;
    height: 40px;
}

.slider-dots {
    bottom: var(--spacing-md);
}

/* Section */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title h2 {
    font-size: 1.75rem;
}

/* Product Grid */
.products-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

/* Category Grid */
.category-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

/* Features */
.features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

/* Testimonials */
.testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

/* Newsletter Form */
.newsletter-form {
    flex-direction: column;
}

.newsletter-form input,
.newsletter-form button {
    width: 100%;
}


.footer-bottom .container {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
}

.payment-methods {
    justify-content: center;
}

/* Product Detail */
.product-gallery {
    flex-direction: column;
}

.product-gallery-thumbnails {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
}

.product-gallery-thumbnails img {
    min-width: 80px;
}

/* Contact Info Grid */
.contact-info-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

/* ============================================
   2. TABLET (768px - 991px)
   ============================================ */
@media (min-width: 768px) {

    /* Top Bar - Show on tablet */
    .top-bar {
        display: block;
    }

    /* Container */
    .container {
        max-width: 720px;
    }

    /* Header Icons */
    .header-icons {
        gap: var(--spacing-sm);
    }

    /* Hero Section */
    .hero-slide {
        height: 500px;
    }

    .hero-slide h1 {
        font-size: 2.5rem;
    }

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

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

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* Filter Sidebar */
    .filter-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        overflow-y: auto;
        z-index: 2000;
        transition: right var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }

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

    /* Product Detail */
    .product-gallery-thumbnails {
        width: 80px;
    }

    .product-gallery-thumbnails img {
        min-width: auto;
    }

    /* Contact Info Grid */
    .contact-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   3. DESKTOP (992px - 1199px)
   ============================================ */
@media (min-width: 992px) {

    /* Container */
    .container {
        max-width: 960px;
    }

    /* Mobile Menu Toggle - Hide */
    .mobile-menu-toggle {
        display: none;
    }

    /* Main Navigation - Show horizontal */
    .main-nav {
        position: static;
        width: 100%;
        height: auto;
        background-color: var(--white);
        box-shadow: none;
        overflow-y: visible;
    }

    .main-nav .container {
        flex-direction: row;
    }

    .nav-menu {
        flex-direction: row;
        gap: var(--spacing-lg);
    }

    .nav-item {
        width: auto;
        border-bottom: none;
    }

    /* Mega Menu - Show as dropdown */
    .mega-menu {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        box-shadow: var(--shadow-lg);
        border-radius: var(--radius-lg);
        padding: var(--spacing-xl);
        min-width: 500px;
    }

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

    /* Hero Section */
    .hero-slide {
        height: 550px;
    }

    .hero-slide h1 {
        font-size: 3rem;
    }

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

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

    /* Features */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Footer */
    .footer-top .container {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Filter Sidebar */
    .filter-sidebar {
        position: static;
        width: 100%;
        height: auto;
        box-shadow: none;
    }

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

/* ============================================
   4. LARGE DESKTOP (1200px+)
   ============================================ */
@media (min-width: 1200px) {

    /* Container */
    .container {
        max-width: 1200px;
    }

    /* Hero Section */
    .hero-slide {
        height: 600px;
    }

    .hero-slide h1 {
        font-size: 3.5rem;
    }

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

    /* Mega Menu - Full width */
    .mega-menu {
        min-width: 600px;
    }

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

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

/* ============================================
   5. UTILITY RESPONSIVE CLASSES
   ============================================ */

/* Hide elements 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 elements on specific breakpoints */
.show-mobile {
    display: block;
}

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

.show-tablet {
    display: none;
}

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

/* Text responsive sizing */
@media (max-width: 767px) {
    .text-responsive {
        font-size: 0.875rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .text-responsive {
        font-size: 1rem;
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
}

@media (min-width: 992px) {
    .text-responsive {
        font-size: 1.125rem;
    }
}

/* ============================================
   6. TOUCH-FRIENDLY SIZES
   ============================================ */
@media (max-width: 767px) {
    .hero-slider {
        min-height: 400px;
    }
    /* Buttons - Minimum 44x44px for touch */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .product-action-btn {
        width: 44px;
        height: 44px;
    }

    /* Form inputs - Larger touch targets */
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Pagination - Larger touch targets */
    .pagination-item {
        min-width: 44px;
        min-height: 44px;
    }

    /* Nav links - Larger touch targets */
    .nav-link {
        min-height: 48px;
    }
}

/* ============================================
   7. LANDSCAPE ORIENTATION
   ============================================ */
@media (max-width: 991px) and (orientation: landscape) {

    /* Hero - Smaller height on landscape */
    .hero-slide {
        height: 300px;
    }

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

    .hero-slide p {
        font-size: 0.875rem;
    }
}

/* ============================================
   8. PRINT STYLES
   ============================================ */
@media print {

    /* Hide non-essential elements */
    .top-bar,
    .header-search,
    .header-icons,
    .main-nav,
    .footer,
    .product-actions,
    .slider-nav,
    .slider-dots,
    .btn {
        display: none !important;
    }

    /* Ensure text is readable */
    body {
        color: #000;
        background: #fff;
    }

    /* Show links */
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ============================================
   9. REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    /* Disable animations for users who prefer reduced motion */
    *,
    *::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) {

    /* Increase contrast for better readability */
    :root {
        --text-dark: #000000;
        --white: #FFFFFF;
        --primary-color: #6B4423;
    }

    .btn {
        border: 2px solid currentColor;
    }

    .form-control,
    .form-select {
        border-width: 2px;
    }
}
