/*
=========================================
TechShop E-Commerce Theme
Responsive CSS
Mobile-First Approach
=========================================
*/

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

/* ========================================
   Desktop to Tablet (992px to 1199px)
   ======================================== */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }

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

    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   Tablet (768px to 991px)
   ======================================== */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }

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

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

    .section-title {
        font-size: 1.8rem;
    }

    /* Header */
    .main-header {
        padding: 15px 0;
    }

    .header-actions {
        gap: 15px;
    }

    .search-box {
        margin: 15px 0;
    }

    /* Navigation */
    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mega-menu {
        position: static;
        box-shadow: none;
        padding: 20px;
    }

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

    /* Product Cards */
    .product-card {
        margin-bottom: 30px;
    }

    /* Category Cards */
    .category-card {
        height: 200px;
        margin-bottom: 20px;
    }

    /* Banner */
    .banner-box {
        height: 250px;
        margin-bottom: 20px;
    }

    /* Footer */
    .footer-widget {
        margin-bottom: 40px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    /* Product Detail */
    .product-detail-gallery {
        position: static;
        margin-bottom: 40px;
    }

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

    /* Blog */
    .blog-card {
        margin-bottom: 30px;
    }

    /* Contact */
    .contact-info-box {
        margin-bottom: 30px;
    }

    .map-wrapper {
        height: 300px;
        margin-top: 30px;
    }

    /* About */
    .about-image {
        margin-bottom: 30px;
    }

    .stats-counter {
        margin-bottom: 30px;
    }
}

/* ========================================
   Mobile Landscape (576px to 767px)
   ======================================== */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }

    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    .section-title {
        font-size: 1.6rem;
    }

    .section-description {
        font-size: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 12px 30px;
        font-size: 15px;
    }

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

    /* Header */
    .main-header {
        padding: 12px 0;
    }

    .logo {
        font-size: 22px;
    }

    .header-actions {
        gap: 12px;
    }

    .header-action-item i {
        font-size: 20px;
    }

    .search-box {
        margin: 10px 0;
    }

    .search-box input {
        padding: 10px 45px 10px 15px;
        font-size: 14px;
    }

    .search-box button {
        width: 35px;
        height: 35px;
    }

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

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

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

    .hero-content .btn {
        padding: 10px 25px;
    }

    /* Section Spacing */
    .section {
        padding: 40px 0;
    }

    .section-header {
        margin-bottom: 35px;
    }

    /* Product Grid - 2 columns on mobile */
    .product-grid .col-lg-3,
    .product-grid .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Product Cards */
    .product-card {
        margin-bottom: 20px;
    }

    .product-body {
        padding: 15px;
    }

    .product-title {
        font-size: 14px;
    }

    .price-current {
        font-size: 18px;
    }

    .price-old {
        font-size: 14px;
    }

    .product-footer {
        padding: 0 15px 15px;
    }

    .btn-add-to-cart .product-btn {
        padding: 10px;
        font-size: 14px;
    }

    /* Product Actions - Always visible on mobile */
    .product-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .product-action-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    /* Category Cards */
    .category-card {
        height: 180px;
        margin-bottom: 15px;
    }

    .category-title {
        font-size: 18px;
    }

    /* Banner */
    .banner-box {
        height: 220px;
        margin-bottom: 15px;
    }

    .banner-content {
        padding: 25px;
    }

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

    .banner-content p {
        font-size: 0.95rem;
    }

    /* Newsletter */
    .newsletter-section {
        padding: 40px 0;
    }

    .newsletter-content {
        text-align: center;
        margin-bottom: 25px;
    }

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

    .newsletter-form {
        max-width: 100%;
    }

    .newsletter-form input {
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    .newsletter-form button {
        position: static;
        transform: none;
        width: 100%;
        border-radius: var(--radius-md);
    }

    /* Footer */
    .footer {
        padding-top: 40px;
    }

    .footer-widget {
        margin-bottom: 35px;
    }

    .footer-widget h5 {
        font-size: 16px;
    }

    .footer-social {
        justify-content: center;
    }

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

    .footer-bottom {
        margin-top: 30px;
        padding: 20px 0;
    }

    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Breadcrumb */
    .breadcrumb-section {
        padding: 20px 0;
    }

    .breadcrumb-item {
        font-size: 13px;
    }

    /* Filter Sidebar - Mobile */
    .filter-sidebar {
        margin-bottom: 30px;
    }

    .filter-widget {
        padding: 20px;
        margin-bottom: 15px;
    }

    .filter-widget h6 {
        font-size: 15px;
    }

    /* Pagination */
    .pagination {
        margin-top: 30px;
    }

    .pagination .page-item .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* Product Detail */
    .product-detail-gallery {
        margin-bottom: 30px;
    }

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

    .product-detail-info h1 {
        font-size: 1.5rem;
    }

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

    .product-detail-price .price-old {
        font-size: 1.2rem;
    }

    .variant-options {
        gap: 8px;
    }

    .variant-option {
        padding: 8px 16px;
        font-size: 14px;
    }

    .product-detail-actions {
        flex-direction: column;
    }

    .product-detail-actions .btn {
        width: 100%;
    }

    .nav-tabs .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }

    .tab-content {
        padding: 20px 0;
    }

    /* Blog */
    .blog-body {
        padding: 20px;
    }

    .blog-title {
        font-size: 1.1rem;
    }

    .blog-meta {
        font-size: 12px;
    }

    /* Contact */
    .contact-info-box {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .contact-form-wrapper {
        padding: 25px 20px;
    }

    .map-wrapper {
        height: 250px;
    }

    /* About */
    .stats-counter {
        padding: 25px 20px;
        margin-bottom: 20px;
    }

    .stats-icon {
        font-size: 2.5rem;
    }

    .stats-number {
        font-size: 2rem;
    }
}

/* ========================================
   Mobile Portrait (320px to 575px)
   ======================================== */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Typography */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.2rem; }

    .section-title {
        font-size: 1.4rem;
    }

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

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

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

    /* Section */
    .section {
        padding: 30px 0;
    }

    /* Product Grid - Stack to single column if needed */
    .product-grid.single-column .col-lg-3,
    .product-grid.single-column .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Banner */
    .banner-box {
        height: 200px;
    }

    .banner-content {
        padding: 20px;
    }

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

    .banner-content p {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-widget h5 {
        font-size: 15px;
    }

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

    .product-detail-info h1 {
        font-size: 1.3rem;
    }

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

    /* Blog */
    .blog-title {
        font-size: 1rem;
    }
}

/* ========================================
   Landscape Orientation
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slide {
        height: 100vh;
    }

    .section {
        padding: 30px 0;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .top-bar,
    .main-header,
    .main-nav,
    .footer,
    .newsletter-section,
    .breadcrumb-section,
    .product-actions,
    .btn-add-to-cart,
    .filter-sidebar {
        display: none !important;
    }

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

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

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Make all interactive elements larger for touch */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .header-action-item {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    /* Remove hover effects on touch devices */
    .product-card:hover,
    .category-card:hover,
    .blog-card:hover,
    .banner-box:hover {
        transform: none;
    }

    /* Make product actions always visible */
    .product-actions {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   High DPI Screens
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Use higher quality images for retina displays */
    /* This would typically be handled in HTML with srcset */
}

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Uncomment and customize if dark mode is needed */
    /*
    :root {
        --dark-color: #ffffff;
        --white-color: #1a1a1a;
        --gray-100: #2d2d2d;
        --gray-200: #3a3a3a;
    }
    */
}

/* ========================================
   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;
    }
}

/* ========================================
   Mobile Menu Styles
   ======================================== */
/* Mobile menu styles moved to custom.css for better organization */
