/**
 * Responsive Styles - Mobile-first approach
 */

/* =========================
   MOBILE (Default)
   < 600px
   ========================= */

/* Ya definido en base styles */

/* =========================
   TABLET
   >= 600px
   ========================= */

@media (width >= 600px) {
  /* Layout */
  .container {
    padding: 0 var(--spacing-xl);
  }

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

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

  /* Hero section */
  .hero-title {
    font-size: var(--font-size-4xl);
  }
}

/* =========================
   DESKTOP
   >= 960px
   ========================= */

@media (width >= 960px) {
  /* Layout */
  main {
    padding: var(--spacing-3xl) 0;
  }

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

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

  /* Hero section */
  .hero-title {
    font-size: var(--font-size-5xl);
  }

  /* Product page layout */
  .product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
  }

  /* Cart page layout */
  .cart-page {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-3xl);
  }
}

/* =========================
   LARGE DESKTOP
   >= 1400px
   ========================= */

@media (width >= 1400px) {
  /* Grids */
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Increase spacing */
  :root {
    --spacing-3xl: 5rem;
  }
}

/* =========================
   BREAKPOINT UTILITIES
   ========================= */

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

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

/* Hide on desktop */
.hide-desktop {
  display: block;
}

@media (width >= 768px) {
  .hide-desktop {
    display: none;
  }
}

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

@media (width >= 600px) and (width < 960px) {
  .show-tablet {
    display: block;
  }
}

/* =========================
   RESPONSIVE TYPOGRAPHY
   ========================= */

@media (width <= 768px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
  h4 { font-size: var(--font-size-lg); }
}

/* =========================
   RESPONSIVE SPACING
   ========================= */

@media (width <= 768px) {
  .section-header {
    margin-bottom: var(--spacing-lg);
  }

  .page-header {
    margin-bottom: var(--spacing-lg);
  }
}

/* =========================
   TOUCH DEVICE OPTIMIZATIONS
   ========================= */

@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  /* Disable hover effects */
  .card:hover {
    transform: none;
  }

  .product-card:hover {
    transform: none;
  }

  .category-card:hover {
    transform: none;
  }
}

/* =========================
   PRINT STYLES
   ========================= */

@media print {
  header,
  footer,
  .sidebar,
  .toast-container {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}
