/* ==========================================================================
   CORNER ROAST — Responsive adjustments
   Mobile-first base lives in styles.css; this file layers breakpoint
   refinements for comfortable use from 320px through 1440px+.
   ========================================================================== */

/* ---- Small phones (<=374px): tighten spacing & type ---- */
@media (max-width: 374px) {
  :root {
    --space-xl: 3.25rem;
    --space-2xl: 5rem;
  }
  .wrap { padding-inline: 1.1rem; }
  .cart-line { grid-template-columns: 52px 1fr auto; }
  .cart-line__media { width: 52px; height: 52px; }
}

/* ---- Phones up to large phones (375–767px) ---- */
@media (max-width: 767px) {
  .hero__media { min-height: 72vh; }
  .hero__title { max-width: 13ch; }
  .split { gap: var(--space-md); }
  .order-nav { flex-direction: column-reverse; }
  .order-nav .btn { width: 100%; justify-content: center; }
  .cart-drawer { width: 100vw; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Order-step tracker: numbers only, evenly spaced, no wrap/scroll */
  .order-steps {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.25rem;
  }
  .order-step {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.3rem;
    gap: 0;
  }
  .order-step__label { display: none; }
}

/* ---- Tablets (768–1023px) ---- */
@media (min-width: 768px) {
  .section { padding-block: var(--space-2xl); }
  .hero__content { padding: clamp(2rem, 6vw, 4rem); }
  .page-hero { padding-block: var(--space-2xl) var(--space-xl); }
}

/* ---- Desktop (1024px+) ---- */
@media (min-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero__media { min-height: 82vh; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Large desktop (1280px+) ---- */
@media (min-width: 1280px) {
  .hero__content { padding-inline: 4.5rem; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Touch / no hover devices: remove hover-only affordances ---- */
@media (hover: none) {
  .product-card:hover .product-card__media img { transform: none; }
  .btn-primary:hover { background: var(--ink); }
}

/* ---- Safe-area support for notch/home-indicator devices ---- */
.site-header {
  padding-top: env(safe-area-inset-top, 0px);
}
.cart-drawer__foot {
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
}
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- Prevent any horizontal scroll from wide inline content ---- */
.filter-list,
.menu-category,
.time-grid {
  max-width: 100%;
}
html, body { overflow-x: hidden; }
