/* Shared tokens & base styles for mobile megamenu examples */

:root {
  --color-bg: #f8f9fb;
  --color-surface: #ffffff;
  --color-text: #1a1d26;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #2d6a4f;
  --color-accent-soft: #ecf5f0;
  --color-overlay: rgba(15, 23, 42, 0.45);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Demo page shell */
.demo-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.demo-header__brand {
  font-weight: 700;
  font-size: 1.05rem;
}

.demo-header__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  color: var(--color-accent);
}

.demo-content {
  padding: 20px 16px 32px;
  max-width: 480px;
  margin: 0 auto;
}

.demo-content h1 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.demo-content p {
  margin: 0 0 20px;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* Icon tile used in menu items */
.menu-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.menu-icon svg {
  width: 20px;
  height: 20px;
}

/* Centered category cards with photos */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 16px 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 10px 14px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.category-card:active {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: scale(0.98);
}

.category-card__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--color-bg);
}

.category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-card__title {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.category-card__desc {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* Compact utility rows (help, account, etc.) */
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}

.menu-item:active {
  background: var(--color-accent-soft);
}

.menu-item__body {
  flex: 1;
  min-width: 0;
}

.menu-item__title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.menu-item__desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.menu-item__chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.menu-item__chevron svg {
  width: 18px;
  height: 18px;
}

/* Section label inside menus */
.menu-section__label {
  padding: 16px 16px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Odd count in last row spans full width on 3-item grids */
.category-grid .category-card:last-child:nth-child(odd):not(:nth-last-child(2)) {
  grid-column: 1 / -1;
  max-width: calc(50% - 6px);
  justify-self: center;
}

/* Landing page cards */
.example-cards {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.example-card {
  display: block;
  padding: 18px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.example-card:active {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.example-card__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.example-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
