.container {
  width: min(100%, var(--layout-width));
  margin-inline: auto;
}

/* Dashboard grids share the same 90% viewport column as standard pages */
.fd-shell,
.adm-shell {
  width: min(100%, var(--layout-width));
  margin-inline: auto;
}

@media (max-width: 768px) {
  main {
    padding-block: 1rem 2rem;
  }
}

.app-shell,
[data-app-shell] {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-top: var(--nav-offset);
}

[data-mount="navbar"] {
  position: fixed;
  top: 0.75rem;
  left: 0;
  right: 0;
  z-index: 45;
  flex-shrink: 0;
  pointer-events: none;
}

[data-mount="navbar"] .nav {
  pointer-events: auto;
}

main {
  flex: 1;
  padding-block: 1.25rem 2.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.cols-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  main {
    padding-block: 1.75rem 3rem;
  }

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

@media (min-width: 1024px) {
  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Mobile typography scale ─────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --text-2xl: 1.5rem;
    --text-3xl: 1.75rem;
    --text-4xl: 2.1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --text-xl: 1.125rem;
    --text-2xl: 1.35rem;
    --text-3xl: 1.55rem;
  }
}

/* ─── Touch-friendly actions on small screens ─────────────────────── */
@media (max-width: 768px) {
  .btn {
    min-height: 44px;
    padding-block: 0.7rem;
  }

  .btn-full-mobile,
  .hero-actions .btn,
  .market-layout .filters-grid .btn,
  .seller-box .btn,
  .product-layout .btn-primary,
  .product-layout form .btn-primary,
  .order-modal-actions .btn,
  .pager .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

body.nav-open {
  overflow: hidden;
}

