/* ==========================================================================
   Emoji Cafe — Public Menu Stylesheet
   Brand-aligned: kawaii cafe aesthetic with warm palette.
   Crows Nest, North Sydney.
   ========================================================================== */

/* ---------- Design Tokens (from Emoji Cafe brand resource) ---------- */
:root {
  /* Brand palette — warm, kawaii-inspired */
  --color-gold:        #E8B923;
  --color-gold-light:  #F0CC55;
  --color-gold-dark:   #C99E1A;
  --color-terracotta:  #E07A5F;
  --color-sage:        #A8C4A0;
  --color-blush:       #F4A9A8;
  --color-espresso:    #4A3F35;
  --color-sand:        #F8F1E9;
  --color-cream:       #F5EDE4;
  --color-cream-dark:  #EBE0D5;
  --color-latte:       #E0D4C8;
  --color-white:       #FAF7F0;
  --color-pure-white:  #FFFFFF;
  --color-text:        #3A322B;
  --color-text-light:  #6E625A;
  --color-text-muted:  #A09489;
  --color-success:     #5C9E6A;
  --color-error:       #C24B3B;
  --color-info:        #5B8DB8;

  /* Category accent colors (from brand resource rounded cards) */
  --cat-breakfast:     #E8B923;
  --cat-breakfast-bg:  rgba(232, 185, 35, 0.12);
  --cat-coffee:        #E07A5F;
  --cat-coffee-bg:     rgba(224, 122, 95, 0.10);
  --cat-lunch:         #A8C4A0;
  --cat-lunch-bg:      rgba(168, 196, 160, 0.15);
  --cat-healthy:       #F4A9A8;
  --cat-healthy-bg:    rgba(244, 169, 168, 0.12);
  --cat-drinks:        #4A3F35;
  --cat-drinks-bg:     rgba(74, 63, 53, 0.08);
  --cat-sandwich:      #D4A96A;
  --cat-sandwich-bg:   rgba(248, 241, 233, 0.6);
  --cat-sweet:         #C8A4D4;
  --cat-sweet-bg:      rgba(200, 164, 212, 0.10);

  /* Shadows — soft and warm */
  --shadow-sm:   0 1px 4px rgba(74, 63, 53, 0.06);
  --shadow-md:   0 4px 14px rgba(74, 63, 53, 0.08);
  --shadow-lg:   0 8px 28px rgba(74, 63, 53, 0.10);
  --shadow-xl:   0 14px 44px rgba(74, 63, 53, 0.13);

  /* Radii — rounder for kawaii feel */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;

  /* Layout */
  --header-height: 60px;
  --max-width: 960px;
  --cart-width: 420px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-normal: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);
}


/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 60px);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }


/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.938rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-terracotta);
  color: var(--color-pure-white);
}
.btn-primary:hover { background: #c96a50; }
.btn-primary:active { background: #b85d45; transform: scale(0.97); }
.btn-primary:disabled {
  background: var(--color-latte);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--color-pure-white);
  color: var(--color-espresso);
  border: 1.5px solid var(--color-latte);
}
.btn-secondary:hover { border-color: var(--color-terracotta); background: var(--color-cream); }

.btn-full { width: 100%; }


/* ---------- Sticky Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-pure-white);
  border-bottom: 1px solid var(--color-cream-dark);
  box-shadow: 0 1px 4px rgba(74, 63, 53, 0.05);
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-emoji {
  font-size: 1.6rem;
}

.header-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-espresso);
  letter-spacing: -0.01em;
}

.cart-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-espresso);
  transition: background var(--transition-fast);
}
.cart-toggle:hover { background: var(--color-cream-dark); }

.cart-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--color-terracotta);
  color: var(--color-pure-white);
  font-size: 0.688rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePop 300ms var(--ease-out);
}

@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}


/* ---------- Hero Section ---------- */
.hero {
  margin-top: var(--header-height);
  background: var(--color-cream);
  color: var(--color-espresso);
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle warm gradient glow */
.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(232, 185, 35, 0.08) 0%, rgba(224, 122, 95, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

/* Kawaii food emoji cards — matching brand resource rounded pill shapes */
.hero-emoji-row {
  font-size: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: var(--space-xl);
}

.hero-emoji-row span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 72px;
  border-radius: var(--radius-xl);
  font-size: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 300ms var(--ease-out);
}

.hero-emoji-row span:hover {
  transform: translateY(-4px) scale(1.05);
}

/* Each emoji gets its brand color background (matching 7-color resource) */
.hero-emoji-row span:nth-child(1) { background: rgba(232, 185, 35, 0.18); }   /* coffee — gold */
.hero-emoji-row span:nth-child(2) { background: rgba(168, 196, 160, 0.22); }   /* avocado — sage */
.hero-emoji-row span:nth-child(3) { background: rgba(244, 169, 168, 0.18); }   /* croissant — blush */
.hero-emoji-row span:nth-child(4) { background: rgba(224, 122, 95, 0.14); }    /* egg — terracotta */
.hero-emoji-row span:nth-child(5) { background: rgba(74, 63, 53, 0.10); }      /* drink — espresso */
.hero-emoji-row span:nth-child(6) { background: rgba(248, 241, 233, 0.85); border: 1px solid rgba(224, 212, 200, 0.4); }   /* sandwich — sand */
.hero-emoji-row span:nth-child(7) { background: rgba(250, 247, 240, 0.90); border: 1px solid rgba(224, 212, 200, 0.4); }   /* tart — warm white */

.hero-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--color-espresso);
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.hero-details {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.hero-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--color-text-light);
  background: var(--color-pure-white);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.hero-detail svg { opacity: 0.6; flex-shrink: 0; }

.hero-cta {
  background: var(--color-terracotta);
  color: var(--color-pure-white);
  padding: 0.875rem 2.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(224, 122, 95, 0.3);
}
.hero-cta:hover { background: #c96a50; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(224, 122, 95, 0.35); }
.hero-cta:active { transform: translateY(0); }


/* ---------- Main Content ---------- */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-2xl);
}


/* ---------- Category Navigation ---------- */
.category-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  background: var(--color-cream);
  padding: var(--space-md) 0 var(--space-sm);
  margin: 0 calc(-1 * var(--space-md));
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.category-pills {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-xs);
}
.category-pills::-webkit-scrollbar { display: none; }

.category-pill {
  flex-shrink: 0;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-pure-white);
  border: 1.5px solid var(--color-latte);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.category-pill:hover {
  border-color: var(--color-terracotta);
  color: var(--color-espresso);
}
.category-pill.active {
  background: var(--color-espresso);
  color: var(--color-cream);
  border-color: var(--color-espresso);
  font-weight: 600;
}


/* ---------- Menu Loading / Error ---------- */
.menu-loading {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--color-text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-latte);
  border-top-color: var(--color-terracotta);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  margin: 0 auto var(--space-md);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.menu-error {
  text-align: center;
  padding: var(--space-2xl) 0;
}
.error-icon { font-size: 2.5rem; margin-bottom: var(--space-md); }


/* ---------- Menu Grid ---------- */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding-top: var(--space-md);
}

.menu-category-section {
  scroll-margin-top: calc(var(--header-height) + 64px);
}

.menu-category-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-espresso);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2.5px solid var(--color-latte);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Category title gets a colored pip + underline matching its brand colour */
.menu-category-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-terracotta);
  flex-shrink: 0;
}

.menu-category-section[data-category="breakfast"] .menu-category-title { border-bottom-color: var(--color-gold-light); }
.menu-category-section[data-category="breakfast"] .menu-category-title::before { background: var(--color-gold); }
.menu-category-section[data-category="lunch"] .menu-category-title { border-bottom-color: rgba(168, 196, 160, 0.5); }
.menu-category-section[data-category="lunch"] .menu-category-title::before { background: var(--color-sage); }
.menu-category-section[data-category="sandwiches"] .menu-category-title { border-bottom-color: rgba(212, 169, 106, 0.4); }
.menu-category-section[data-category="sandwiches"] .menu-category-title::before { background: var(--cat-sandwich); }
.menu-category-section[data-category="salad"] .menu-category-title { border-bottom-color: rgba(168, 196, 160, 0.5); }
.menu-category-section[data-category="salad"] .menu-category-title::before { background: var(--color-sage); }
.menu-category-section[data-category="wrap"] .menu-category-title { border-bottom-color: rgba(244, 169, 168, 0.4); }
.menu-category-section[data-category="wrap"] .menu-category-title::before { background: var(--color-blush); }
.menu-category-section[data-category="coffee"] .menu-category-title,
.menu-category-section[data-category="hot-drinks"] .menu-category-title { border-bottom-color: rgba(224, 122, 95, 0.35); }
.menu-category-section[data-category="coffee"] .menu-category-title::before,
.menu-category-section[data-category="hot-drinks"] .menu-category-title::before { background: var(--color-terracotta); }
.menu-category-section[data-category="cold-drinks"] .menu-category-title { border-bottom-color: rgba(244, 169, 168, 0.4); }
.menu-category-section[data-category="cold-drinks"] .menu-category-title::before { background: var(--color-blush); }
.menu-category-section[data-category="sweet-treats"] .menu-category-title,
.menu-category-section[data-category="drink-and-cake"] .menu-category-title { border-bottom-color: rgba(200, 164, 212, 0.35); }
.menu-category-section[data-category="sweet-treats"] .menu-category-title::before,
.menu-category-section[data-category="drink-and-cake"] .menu-category-title::before { background: var(--cat-sweet); }
.menu-category-section[data-category="open-melt"] .menu-category-title { border-bottom-color: var(--color-gold-light); }
.menu-category-section[data-category="open-melt"] .menu-category-title::before { background: var(--color-gold); }
.menu-category-section[data-category="emoji-special"] .menu-category-title { border-bottom-color: var(--color-gold-light); }
.menu-category-section[data-category="emoji-special"] .menu-category-title::before { background: var(--color-gold); }

.menu-items-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

/* Menu Item Card — soft, rounded, warm */
.menu-item-card {
  background: var(--color-pure-white);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  border: 1.5px solid transparent;
  position: relative;
}

/* Subtle left accent bar on each card */
.menu-item-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  border-radius: 0 4px 4px 0;
  background: var(--color-latte);
  transition: background var(--transition-fast), height var(--transition-fast);
}

.menu-item-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(224, 122, 95, 0.2);
}
.menu-item-card:hover::before {
  background: var(--color-terracotta);
  height: 70%;
}
.menu-item-card:active {
  transform: scale(0.985);
}

.menu-item-card.unavailable {
  opacity: 0.45;
  pointer-events: none;
}

/* Category-specific left accent colours */
.menu-item-card[data-category="breakfast"]::before { background: var(--color-gold); }
.menu-item-card[data-category="breakfast"]:hover::before { background: var(--color-gold-dark); }
.menu-item-card[data-category="lunch"]::before { background: var(--color-sage); }
.menu-item-card[data-category="lunch"]:hover::before { background: #8FB396; }
.menu-item-card[data-category="sandwiches"]::before { background: var(--cat-sandwich); }
.menu-item-card[data-category="sandwiches"]:hover::before { background: #C49A5A; }
.menu-item-card[data-category="salad"]::before { background: var(--color-sage); }
.menu-item-card[data-category="salad"]:hover::before { background: #8FB396; }
.menu-item-card[data-category="wrap"]::before { background: var(--color-blush); }
.menu-item-card[data-category="wrap"]:hover::before { background: #E8918F; }
.menu-item-card[data-category="coffee"]::before,
.menu-item-card[data-category="hot-drinks"]::before { background: var(--color-terracotta); }
.menu-item-card[data-category="cold-drinks"]::before { background: var(--color-blush); }
.menu-item-card[data-category="sweet-treats"]::before,
.menu-item-card[data-category="drink-and-cake"]::before { background: var(--cat-sweet); }
.menu-item-card[data-category="open-melt"]::before { background: var(--color-gold); }
.menu-item-card[data-category="emoji-special"]::before { background: var(--color-gold); }

.menu-item-info {
  flex: 1;
  min-width: 0;
}

.menu-item-name {
  font-weight: 600;
  font-size: 0.938rem;
  color: var(--color-text);
  margin-bottom: 2px;
}

.menu-item-desc {
  font-size: 0.813rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-price {
  font-weight: 700;
  font-size: 0.938rem;
  color: var(--color-terracotta);
  white-space: nowrap;
}

.menu-item-add {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--color-terracotta);
  color: var(--color-pure-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(224, 122, 95, 0.25);
}
.menu-item-add:hover {
  background: #c96a50;
  transform: scale(1.1);
}
.menu-item-add:active { transform: scale(0.95); }


/* ---------- Cart Panel (Bottom Sheet / Sidebar) ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 63, 53, 0.35);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.cart-overlay.visible {
  opacity: 1;
}

.cart-panel {
  position: fixed;
  z-index: 210;
  background: var(--color-pure-white);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-slow);

  /* Mobile: Bottom sheet */
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%);
  box-shadow: var(--shadow-xl);
}

.cart-panel.open {
  transform: translateY(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--color-cream-dark);
  flex-shrink: 0;
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-espresso);
}

.cart-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-light);
  transition: all var(--transition-fast);
}
.cart-close:hover { background: var(--color-cream); color: var(--color-text); }

/* Cart Empty State */
.cart-empty {
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  color: var(--color-text-muted);
}
.cart-empty-emoji { font-size: 2.5rem; margin-bottom: var(--space-md); }
.cart-empty-hint { font-size: 0.813rem; margin-top: var(--space-xs); }

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cart-item {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  position: relative;
}

.cart-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.938rem;
  flex: 1;
}

.cart-item-price {
  font-weight: 700;
  font-size: 0.938rem;
  color: var(--color-terracotta);
  white-space: nowrap;
}

.cart-item-addons {
  font-size: 0.813rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}
.cart-item-addons span {
  display: inline-block;
  background: var(--color-pure-white);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin: 2px 4px 2px 0;
  font-size: 0.75rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--color-latte);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-pure-white);
}

.qty-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-espresso);
  transition: background var(--transition-fast);
}
.qty-btn:hover { background: var(--color-cream); }
.qty-btn.qty-remove { color: var(--color-error); }

.qty-value {
  width: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.cart-item-note-btn {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.cart-item-note-btn:hover { background: var(--color-pure-white); color: var(--color-text); }

.cart-item-edit-addons {
  font-size: 0.75rem;
  color: var(--color-terracotta);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.cart-item-edit-addons:hover { background: var(--color-pure-white); }

.cart-item-note-input {
  width: 100%;
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  border: 1.5px solid var(--color-latte);
  border-radius: var(--radius-sm);
  font-size: 0.813rem;
  resize: none;
  background: var(--color-pure-white);
  transition: border-color var(--transition-fast);
}
.cart-item-note-input:focus {
  outline: none;
  border-color: var(--color-terracotta);
}

/* Cart Footer */
.cart-footer {
  border-top: 1px solid var(--color-cream-dark);
  padding: var(--space-md);
  flex-shrink: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-espresso);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-cream-dark);
}

.cart-total-amount {
  font-size: 1.375rem;
  color: var(--color-gold-dark);
}


/* ---------- Customer Form ---------- */
.customer-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.form-group input,
.form-group textarea {
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--color-latte);
  border-radius: var(--radius-sm);
  background: var(--color-cream);
  transition: all var(--transition-fast);
  font-size: 0.938rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-terracotta);
  background: var(--color-pure-white);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

/* Pickup Time Selector */
.pickup-selector {
  display: flex;
  gap: var(--space-sm);
}

.pickup-opt {
  flex: 1;
  padding: 0.5rem;
  border: 1.5px solid var(--color-latte);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-cream);
  transition: all var(--transition-fast);
  text-align: center;
}
.pickup-opt:hover { border-color: var(--color-terracotta); }
.pickup-opt.active {
  background: var(--color-terracotta);
  color: var(--color-pure-white);
  border-color: var(--color-terracotta);
  font-weight: 600;
}

.form-error {
  color: var(--color-error);
  font-size: 0.813rem;
  font-weight: 500;
  padding: var(--space-sm);
  background: rgba(194, 75, 59, 0.08);
  border-radius: var(--radius-sm);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-xs);
}


/* ---------- Addon Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(74, 63, 53, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.modal-overlay.visible {
  opacity: 1;
}

.modal-card {
  background: var(--color-pure-white);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.modal-overlay.visible .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-md) var(--space-md);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-espresso);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--color-cream); color: var(--color-text); }

.addon-list {
  padding: 0 var(--space-md);
  overflow-y: auto;
  flex: 1;
}

.addon-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-cream-dark);
}
.addon-item:last-child { border-bottom: none; }

.addon-checkbox {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--color-terracotta);
  cursor: pointer;
}

.addon-label {
  flex: 1;
  font-size: 0.938rem;
  cursor: pointer;
}

.addon-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-light);
  white-space: nowrap;
}

.modal-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--color-cream-dark);
}


/* ---------- Order Tracking ---------- */
.tracking-section {
  padding-top: calc(var(--header-height) + var(--space-xl));
  min-height: 80vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.tracking-card {
  background: var(--color-pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-lg);
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.tracking-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
}

.tracking-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-espresso);
  margin-bottom: var(--space-sm);
}

.tracking-card > p {
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

/* Verification Code Input */
.verify-form {
  margin-top: var(--space-lg);
}

.code-inputs {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.code-digit {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 1.375rem;
  font-weight: 700;
  border: 2px solid var(--color-latte);
  border-radius: var(--radius-sm);
  background: var(--color-cream);
  transition: all var(--transition-fast);
  color: var(--color-espresso);
}
.code-digit:focus {
  outline: none;
  border-color: var(--color-terracotta);
  background: var(--color-pure-white);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.15);
}

.verify-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
}

/* Order Status */
.order-id-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.order-id-value {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-espresso);
  background: var(--color-cream);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.status-timeline {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-lg);
  padding: var(--space-md) 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
  flex: 1;
  max-width: 80px;
}

.timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-latte);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.813rem;
  z-index: 2;
  transition: all var(--transition-normal);
  color: var(--color-text-muted);
}

.timeline-step.active .timeline-dot,
.timeline-step.done .timeline-dot {
  background: var(--color-terracotta);
  color: var(--color-pure-white);
}
.timeline-step.done .timeline-dot {
  background: var(--color-success);
  color: var(--color-pure-white);
}

.timeline-label {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.timeline-step.active .timeline-label,
.timeline-step.done .timeline-label {
  color: var(--color-text);
  font-weight: 600;
}

.timeline-step::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-latte);
  z-index: 1;
}
.timeline-step:last-child::after { display: none; }
.timeline-step.done::after { background: var(--color-success); }

.status-details {
  text-align: left;
  background: var(--color-cream);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.status-details p {
  font-size: 0.875rem;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}
.status-details p:last-child { margin-bottom: 0; }


/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  background: var(--color-espresso);
  color: var(--color-cream);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 300ms var(--ease-out), toastOut 300ms var(--ease-out) 2.2s forwards;
  white-space: nowrap;
  pointer-events: auto;
}

.toast.toast-success { background: var(--color-success); color: var(--color-pure-white); }
.toast.toast-error { background: var(--color-error); color: var(--color-pure-white); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}


/* ---------- Tablet (768px+) ---------- */
@media (min-width: 768px) {
  .hero {
    padding: var(--space-2xl) var(--space-xl) calc(var(--space-2xl) + var(--space-md));
  }

  .hero-title {
    font-size: 3.25rem;
  }

  .hero-emoji-row span {
    width: 64px;
    height: 82px;
    font-size: 2rem;
  }

  .header-logo-img {
    width: 48px;
    height: 48px;
  }

  .menu-items-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .menu-item-card {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding-left: var(--space-md);
  }

  .menu-item-card::before {
    display: none;
  }

  .menu-item-card > :last-child {
    align-self: flex-end;
  }

  .cart-panel {
    /* Sidebar on tablet+ */
    bottom: auto;
    top: 0;
    left: auto;
    right: 0;
    width: var(--cart-width);
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    transform: translateX(100%);
  }

  .cart-panel.open {
    transform: translateX(0);
  }

  .modal-card {
    border-radius: var(--radius-lg);
    margin-bottom: auto;
    align-self: center;
  }

  .code-digit {
    width: 52px;
    height: 60px;
    font-size: 1.5rem;
  }
}


/* ---------- Desktop (1024px+) ---------- */
@media (min-width: 1024px) {
  :root {
    --max-width: 1080px;
  }

  .hero {
    padding: var(--space-2xl) var(--space-xl) calc(var(--space-2xl) + var(--space-lg));
  }

  .hero-title {
    font-size: 3.75rem;
  }

  .hero-emoji-row span {
    width: 72px;
    height: 92px;
    font-size: 2.25rem;
  }

  .hero-emoji-row {
    gap: var(--space-md);
  }

  .menu-items-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .menu-item-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding-left: var(--space-lg);
  }

  .menu-item-card::before {
    display: block;
  }

  .menu-item-card > :last-child {
    align-self: center;
  }
}


/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}


/* ---------- Print ---------- */
@media print {
  .site-header,
  .cart-toggle,
  .cart-panel,
  .cart-overlay,
  .toast-container,
  .hero-cta,
  .menu-item-add,
  .modal-overlay {
    display: none !important;
  }

  .hero {
    background: none;
    color: var(--color-text);
    padding: var(--space-md);
  }

  .menu-item-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .contact-bar { display: none !important; }
}


/* ---------- Header Nav Links ---------- */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  z-index: 10;
}

.header-nav a {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-espresso);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-full);
  transition: all 150ms;
  cursor: pointer;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--color-gold-dark);
  background: var(--color-cream);
}

.header-nav a.nav-active {
  color: var(--color-espresso);
  background: var(--color-cream);
}

@media (max-width: 480px) {
  .header-nav { gap: 0.15rem; }
  .header-nav a { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
  .header-title { font-size: 1.1rem; }
}


/* ---------- Header Logo Image ---------- */
.header-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--color-gold);
  box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.15);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.header-logo-img:hover {
  box-shadow: 0 0 0 5px rgba(232, 185, 35, 0.25);
  transform: scale(1.05);
}


/* ---------- Review Links (Hero — centred) ---------- */
.review-links {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: var(--space-lg);
}

.review-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: var(--color-pure-white);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.review-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.review-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.review-icon--ta { background: #E8F5E9; }
.review-icon--google { background: #F3F4F6; }

.review-stars {
  font-size: 0.8rem;
  letter-spacing: 1px;
  line-height: 1;
}

.review-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 1px;
}

@media (max-width: 480px) {
  .review-widget { padding: 0.45rem 0.7rem; }
  .review-icon { width: 30px; height: 30px; }
  .review-icon svg { width: 16px; height: 16px; }
}


/* ---------- Fixed Contact Bar (WhatsApp + Message) ---------- */
.contact-bar {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 90;
  display: flex;
  gap: 0.5rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.contact-whatsapp {
  background: #25D366;
  color: #fff;
}

.contact-sms {
  background: var(--color-pure-white);
  color: var(--color-espresso);
  border: 1px solid var(--color-cream-dark);
}

@media (max-width: 480px) {
  .contact-btn span { display: none; }
  .contact-btn { padding: 0.7rem; border-radius: 50%; width: 48px; height: 48px; justify-content: center; }
}


/* ---------- Kawaii Category Cards ---------- */
.category-cards {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0 var(--space-md) var(--space-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-cards::-webkit-scrollbar { display: none; }

.category-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.8rem 0.5rem;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  min-width: 80px;
  text-align: center;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-card.active {
  border-color: var(--color-gold);
  box-shadow: 0 2px 8px rgba(232, 185, 35, 0.25);
}

.category-card-emoji {
  font-size: 2rem;
  line-height: 1;
}

.category-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
