/* Responsive Design - Mobile First Approach */
/* Base styles are mobile, media queries enhance for larger screens */

/* Tablet (768px and up) */
@media (min-width: 768px) {
  /* Container adjustments */
  .container {
    padding: 0 var(--space-6);
  }

  /* Header */
  .header-content {
    padding: 0 var(--space-6);
  }
  
  /* Logo 3x bigger on desktop */
  .header-logo-img {
    height: 180px;
  }

  /* Hide bottom nav on tablet and desktop */
  .bottom-nav {
    display: none;
  }

  /* Adjust main content padding when no bottom nav */
  .main-content {
    padding-bottom: var(--space-8);
  }

  /* Product Grid - 3 columns on tablet */
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  /* Search and Category sections - not fixed on larger screens */
  .search-section,
  .category-section {
    position: relative;
    top: auto;
  }

  .main-content {
    padding-top: calc(var(--header-height) + var(--space-4));
  }

  /* Product Detail - side by side layout */
  .product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: start;
  }

  .image-gallery-wrapper {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
  }

  .image-gallery {
    position: relative;
  }

  .product-actions {
    position: relative;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* Cart layout - side by side */
  .cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-6);
    align-items: start;
  }

  .cart-summary {
    position: relative;
  }

  /* Checkout layout */
  .checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-6);
    align-items: start;
  }

  .checkout-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
  }

  /* Typography adjustments */
  .heading-1 {
    font-size: 2.5rem;
  }

  .heading-2 {
    font-size: 2rem;
  }

  .product-detail-title {
    font-size: 2rem;
  }

  /* Footer - multi column */
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
  /* Container */
  .container {
    padding: 0 var(--space-8);
  }

  .header-content {
    padding: 0 var(--space-8);
  }

  /* Product Grid - 4 columns on desktop */
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }

  /* Hover effects for desktop */
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }

  .btn:hover {
    transform: translateY(-2px);
  }

  /* Category scroll becomes wrapped grid */
  .category-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  /* Larger spacing */
  .main-content {
    padding-top: calc(var(--header-height) + var(--space-6));
  }

  /* Product detail adjustments */
  .product-detail-layout {
    gap: var(--space-12);
  }

  /* Cart items larger */
  .cart-item-image {
    width: 120px;
    height: 120px;
  }

  /* Checkout wider form */
  .checkout-layout {
    grid-template-columns: 1.5fr 500px;
    gap: var(--space-8);
  }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
  /* Product Grid - 5 columns on large desktop */
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  /* Even larger spacing */
  .product-detail-layout {
    max-width: 1400px;
    margin: 0 auto;
  }

  .checkout-layout {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Print styles */
@media print {
  .header,
  .bottom-nav,
  .search-section,
  .category-section,
  .site-footer,
  .btn,
  button {
    display: none !important;
  }

  body {
    background: white;
  }

  .main-content {
    padding: 0;
  }
}

/* Landscape mobile adjustments */
@media (max-width: 767px) and (orientation: landscape) {
  .header {
    height: 48px;
  }

  .bottom-nav {
    height: 56px;
  }

  .main-content {
    padding-top: calc(48px + 120px);
    padding-bottom: calc(56px + var(--space-4));
  }
}

/* Small mobile (max 375px) */
@media (max-width: 375px) {
  .product-grid {
    gap: var(--space-2);
  }

  .product-info {
    padding: var(--space-2);
  }

  .heading-1 {
    font-size: 1.5rem;
  }

  .heading-2 {
    font-size: 1.25rem;
  }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode */
  /*
  :root {
    --color-neutral-900: #FAFAFA;
    --color-neutral-800: #F5F5F5;
    --color-neutral-700: #E8E8E8;
    --color-neutral-600: #D4D4D4;
    --color-neutral-500: #ADADAD;
    --color-neutral-400: #8C8C8C;
    --color-neutral-300: #6B6B6B;
    --color-neutral-200: #4A4A4A;
    --color-neutral-100: #2D2D2D;
    --color-neutral-50: #1A1A1A;
    --color-white: #000000;
  }

  body {
    background-color: #1A1A1A;
  }
  */
}
