/* ===== Tablet (≥640px) ===== */
@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-legal {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ===== Tablet grande / notebook pequeno (≥768px) ===== */
@media (min-width: 768px) {
  body {
    padding-top: 80px;
  }

  .header-inner {
    height: 80px;
  }

  .nav-desktop {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .hero .container {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .categorias-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

/* ===== Desktop (≥1024px) ===== */
@media (min-width: 1024px) {
  /* Exatamente 5 cards cabem na largura do container — do 6º produto em
     diante, só rolando (.products-grid já é scroll horizontal). */
  .product-card {
    width: calc((100% - 4 * 16px) / 5);
  }
}

/* ===== Menu mobile aberto ===== */
@media (max-width: 767px) {
  .nav-desktop {
    display: none;
  }

  .nav-desktop.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 24px 20px;
  }

  .nav-desktop.open .nav-link {
    padding: 14px 2px;
    border-bottom: 1px solid var(--border);
  }

  .nav-desktop.open .header-cta {
    display: inline-flex;
    margin-top: 14px;
  }
}


/* Respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
