/* ============================================
   PETALPINK — Responsive Design
   Mobile-first breakpoints
   ============================================ */

/* --- Small screens (max 640px) --- */
@media (max-width: 640px) {
  :root {
    --text-5xl: 2.25rem;
    --text-6xl: 2.75rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }

  .container { padding: 0 var(--space-4); }
  .section { padding: var(--space-12) 0; }

  /* Nav */
  .navbar-links { display: none; }
  .menu-toggle { display: flex; }

  .navbar-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    padding: var(--space-8);
    gap: var(--space-8);
    z-index: 999;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .navbar-links.open a {
    font-size: var(--text-xl);
    text-transform: none;
    letter-spacing: 0;
  }

  /* Hero */
  .hero { min-height: 70vh; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero p { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-image { display: none; }
  .hero .btn { width: 100%; }

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

  /* Features */
  .feature-strip { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; gap: var(--space-4); text-align: center; }

  /* Newsletter */
  .newsletter { padding: var(--space-10) var(--space-6); }
  .newsletter-form { flex-direction: column; }

  /* Product cards — 2 columns on mobile */
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: var(--space-4); }
  .product-card-body { padding: var(--space-3); }
  .product-card-title { font-size: var(--text-sm); }
  .product-card-price .current { font-size: var(--text-base); }
}

/* --- Medium screens (641px – 1024px) --- */
@media (min-width: 641px) and (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  
  .hero-image { width: 45%; right: -8%; }
  .hero h1 { font-size: var(--text-4xl); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* --- Large screens (1025px+) --- */
@media (min-width: 1025px) {
  .products-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* --- Hover only on non-touch --- */
@media (hover: hover) {
  .product-card:hover { transform: translateY(-6px); }
  .btn-primary:hover { transform: translateY(-2px); }
  .btn-secondary:hover { transform: translateY(-2px); }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in, .fade-in-left, .fade-in-right {
    opacity: 1;
    transform: none;
  }
}
