/**
 * GameStop Medellín - Responsive Styles
 * Version: 1.0
 * Date: 2025-10-27
 *
 * Breakpoints:
 * - Mobile: 0-639px
 * - Mobile Large: 640-767px
 * - Tablet: 768-1023px
 * - Desktop: 1024-1279px
 * - Large Desktop: 1280-1535px
 * - Extra Large: 1536px+
 */

/* ===================================
   MOBILE LARGE (640px and up)
=================================== */
@media (min-width: 640px) {
    /* Container adjustments */
    .container {
        padding: 0 var(--space-6);
    }

    /* Hero Section */
    .hero-section {
        height: 70vh;
    }

    .hero-content {
        padding: var(--space-8);
    }

    .hero-buttons {
        flex-direction: row;
    }

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

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

    /* Newsletter Form */
    .form-group {
        flex-direction: row;
        justify-content: center;
        max-width: 500px;
        margin: 0 auto;
    }

    .newsletter-input {
        flex: 1;
    }

    /* Trust Indicators - 3 columns */
    .trust-indicators {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }

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

/* ===================================
   TABLET (768px and up)
=================================== */
@media (min-width: 768px) {
    /* Header adjustments */
    .header {
        height: 150px;
    }

    .navbar {
        height: 150px;
        padding: 0;
    }

    /* Show desktop navigation */
    .nav-menu {
        display: flex;
    }

    /* Show search bar */
    .search-container {
        display: block;
    }

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

    /* Typography scaling */
    h1 { font-size: calc(var(--text-h1) * 1.2); }
    h2 { font-size: calc(var(--text-h2) * 1.1); }

    /* Section padding increase */
    .featured-products,
    .categories-section,
    .special-offers,
    .new-arrivals,
    .newsletter-section {
        padding: var(--section-padding-tablet) 0;
    }

    /* Hero adjustments */
    .hero-section {
        min-height: 500px;
    }

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

    /* New Arrivals - 3 columns */
    .arrivals-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--grid-gap-md);
    }

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

    /* Footer - 3 columns */
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: var(--space-8);
    }

    .footer-brand {
        grid-column: span 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

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

/* ===================================
   DESKTOP (1024px and up)
=================================== */
@media (min-width: 1024px) {
    /* Container max-width */
    .container {
        padding: 0 var(--space-8);
    }

    /* Typography - Desktop sizes */
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.75rem;
    }

    /* Navigation spacing */
    .nav-menu {
        gap: var(--space-8);
    }

    /* Search bar wider */
    .search-container {
        max-width: 400px;
    }

    /* Section padding - Desktop */
    .featured-products,
    .categories-section,
    .special-offers,
    .new-arrivals,
    .newsletter-section {
        padding: var(--section-padding-desktop) 0;
    }

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

    /* New Arrivals - 4 columns */
    .arrivals-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Offers - 3 columns possible */
    .offers-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    /* Hero carousel controls */
    .carousel-prev,
    .carousel-next {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .carousel-prev { left: var(--space-6); }
    .carousel-next { right: var(--space-6); }

    /* Product card enhancements */
    .product-card {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .product-card:hover {
        transform: translateY(-8px);
    }

    /* Category cards - larger */
    .category-card {
        aspect-ratio: 16 / 10;
    }
}

/* ===================================
   LARGE DESKTOP (1280px and up)
=================================== */
@media (min-width: 1280px) {
    /* Container adjustments */
    .container {
        max-width: var(--container-xl);
    }

    /* Hero section height */
    .hero-section {
        height: 75vh;
        max-height: 700px;
    }

    /* Products Grid - 4-5 columns */
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--grid-gap-lg);
    }

    /* New Arrivals - 5 columns */
    .arrivals-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Newsletter - larger padding */
    .newsletter-content {
        max-width: 700px;
    }

    /* Footer - better spacing */
    .footer-grid {
        gap: var(--space-10);
    }
}

/* ===================================
   EXTRA LARGE (1536px and up)
=================================== */
@media (min-width: 1536px) {
    /* Container max width */
    .container {
        max-width: var(--container-2xl);
        padding: 0 var(--space-10);
    }

    /* Typography - Extra large screens */
    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    /* Section spacing */
    .featured-products,
    .categories-section,
    .special-offers,
    .new-arrivals,
    .newsletter-section {
        padding: calc(var(--section-padding-desktop) * 1.25) 0;
    }

    /* Grids - maximum columns */
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }

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

/* ===================================
   HOVER EFFECTS (Desktop only)
=================================== */
@media (hover: hover) and (pointer: fine) {
    /* Enhanced button hover effects */
    .btn:hover {
        transform: translateY(-2px);
    }

    /* Card hover animations */
    .product-card {
        position: relative;
        overflow: hidden;
    }

    .product-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--primary-red);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .product-card:hover::before {
        transform: translateX(0);
    }

    /* Category card overlay effect */
    .category-overlay {
        transition: background 0.3s ease;
    }

    .category-card:hover .category-overlay {
        background: linear-gradient(
            to top,
            rgba(227, 25, 55, 0.9) 0%,
            rgba(227, 25, 55, 0.3) 100%
        );
    }
}

/* ===================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
=================================== */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce hero height on landscape mobile */
    .hero-section {
        height: 80vh;
        min-height: 300px;
    }

    /* Adjust header height */
    .header {
        height: 60px;
    }

    .navbar {
        height: 60px;
    }

    /* Reduce section padding */
    .featured-products,
    .categories-section,
    .special-offers,
    .new-arrivals,
    .newsletter-section {
        padding: var(--space-6) 0;
    }
}

/* ===================================
   PRINT STYLES
=================================== */
@media print {
    /* Hide non-essential elements */
    .header,
    .hero-section,
    .newsletter-section,
    .footer,
    .carousel-prev,
    .carousel-next,
    .carousel-indicators,
    .btn,
    .social-icons {
        display: none !important;
    }

    /* Adjust layout for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    /* Show all products in a list */
    .products-grid,
    .categories-grid,
    .arrivals-grid {
        display: block;
    }

    .product-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
        border: 1px solid #ddd;
    }

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

/* ===================================
   HIGH CONTRAST MODE
=================================== */
@media (prefers-contrast: high) {
    /* Increase contrast for accessibility */
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }

    .btn-secondary {
        border-width: 3px;
    }

    .product-card {
        border: 2px solid currentColor;
    }

    .search-input,
    .newsletter-input {
        border-width: 3px;
    }

    /* Stronger focus indicators */
    *:focus {
        outline-width: 3px;
        outline-offset: 3px;
    }
}

/* ===================================
   DARK MODE (if preferred)
=================================== */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles here if needed */
    /* Currently keeping light theme as per design */
}

/* ===================================
   NEW ARRIVALS TIMELINE - RESPONSIVE
=================================== */

/* Mobile (0-767px) - Vertical Grid */
@media (max-width: 767px) {
    .new-arrivals-timeline {
        padding: 2rem 0;
        min-height: auto;
    }

    .timeline-header {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .timeline-badge {
        padding: 0.375rem 1rem;
    }

    .badge-icon {
        font-size: 1rem;
    }

    .badge-text {
        font-size: 0.7rem;
    }

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

    .timeline-subtitle {
        font-size: 0.95rem;
    }

    /* Convert to vertical grid on mobile */
    .timeline-carousel {
        padding: 1rem;
        overflow-x: visible;
        overflow-y: visible;
    }

    .timeline-track {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        min-height: auto;
    }

    .timeline-card {
        flex: none;
        width: 100%;
        scroll-snap-align: none;
    }

    .timeline-card-image {
        height: 180px;
    }

    .timeline-card-title {
        font-size: 0.95rem;
        min-height: 2.4rem;
    }

    .timeline-card-price {
        font-size: 1.5rem;
    }

    .timeline-card-actions {
        flex-direction: column;
    }

    .btn-timeline-cart,
    .btn-timeline-view {
        width: 100%;
    }

    /* Hide navigation buttons on mobile */
    .timeline-nav {
        display: none !important;
    }

    /* Hide progress bar on mobile */
    .timeline-progress {
        display: none;
    }

    .timeline-footer {
        margin-top: 2rem;
    }

    .btn-timeline-view-all {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Mobile Small (max-width: 480px) - Single Column */
@media (max-width: 480px) {
    .timeline-track {
        grid-template-columns: 1fr;
    }

    .timeline-title {
        font-size: 1.75rem;
    }

    .timeline-card {
        max-width: 100%;
    }
}

/* Tablet (768px - 1023px) - Horizontal Scroll with Fewer Cards */
@media (min-width: 768px) and (max-width: 1023px) {
    .timeline-carousel {
        padding: 2rem 2rem;
    }

    .timeline-track {
        gap: 1.5rem;
    }

    .timeline-card {
        flex: 0 0 280px;
        width: 280px;
    }

    .timeline-nav {
        width: 48px;
        height: 48px;
    }

    .timeline-nav-prev {
        left: 1rem;
    }

    .timeline-nav-next {
        right: 1rem;
    }

    .timeline-card-image {
        height: 200px;
    }
}

/* Desktop (1024px and up) - Full Horizontal Experience */
@media (min-width: 1024px) {
    .timeline-title {
        font-size: 3.5rem;
    }

    .timeline-subtitle {
        font-size: 1.25rem;
    }

    .timeline-card {
        flex: 0 0 340px;
        width: 340px;
    }

    .timeline-card-image {
        height: 260px;
    }
}

/* Large Desktop (1280px and up) - Optimal Viewing */
@media (min-width: 1280px) {
    .timeline-carousel {
        padding: 2rem 5rem;
    }

    .timeline-card {
        flex: 0 0 360px;
        width: 360px;
    }

    .timeline-card-image {
        height: 280px;
    }

    .timeline-card-title {
        font-size: 1.25rem;
    }

    .timeline-card-price {
        font-size: 2rem;
    }
}

/* Extra Large (1536px and up) - Maximum Experience */
@media (min-width: 1536px) {
    .timeline-carousel {
        padding: 2rem 6rem;
    }

    .timeline-track {
        gap: 2.5rem;
    }

    .timeline-card {
        flex: 0 0 380px;
        width: 380px;
    }

    .timeline-card-image {
        height: 300px;
    }
}

/* Touch Devices - Enhanced Touch Targets */
@media (hover: none) and (pointer: coarse) {
    .timeline-card {
        cursor: default;
    }

    .timeline-nav {
        width: 64px;
        height: 64px;
        opacity: 1;
        pointer-events: all;
    }

    .btn-timeline-cart,
    .btn-timeline-view {
        min-height: 44px;
    }
}

/* Landscape Mobile - Horizontal Scroll */
@media (orientation: landscape) and (max-height: 600px) {
    .new-arrivals-timeline {
        padding: 2rem 0;
        min-height: auto;
    }

    .timeline-header {
        margin-bottom: 1.5rem;
    }

    .timeline-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .timeline-carousel {
        padding: 1rem 2rem;
    }

    .timeline-track {
        display: flex;
        min-height: 380px;
    }

    .timeline-card {
        flex: 0 0 260px;
        width: 260px;
    }

    .timeline-card-image {
        height: 160px;
    }
}