:root {
  --radius: 16px;
  --radius-sm: 12px;
  --keyboard-offset: 0px;

  --primary: #ff6a3d;
  --primary-2: #ff8b61;
  --primary-contrast: #ffffff;

  --bg: #0b0e14;
  --bg-2: #0f131a;
  --surface: #121722;
  --surface-2: #141a25;
  --border: #1f2937;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);

  --chip-bg: #0f1722;
  --chip-border: #223047;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
}

.theme-light {
  --bg: #f8fafc;
  --bg-2: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --chip-bg: #f1f5f9;
  --chip-border: #cbd5e1;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(255, 106, 61, 0.12), rgba(255, 106, 61, 0) 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(80, 227, 194, 0.14), rgba(80, 227, 194, 0) 55%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
}

.theme-light body {
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(255, 106, 61, 0.04), rgba(255, 106, 61, 0) 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(80, 227, 194, 0.05), rgba(80, 227, 194, 0) 55%),
    var(--bg);
}

.subtle {
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* Header */
header.site {
  position: relative;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.theme-light header.site {
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.header-top {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 14px 0 18px;
  background: linear-gradient(135deg, #1a1d24 0%, #252932 100%);
  min-height: 80px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: visible;
}

.theme-light .header-top {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: none;
  border-bottom: 1px solid #e2e8f0;
}

.theme-light .header-top::before {
  opacity: 0.3;
}

.header-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 15% 0%, rgba(255, 106, 61, 0.18), rgba(255, 106, 61, 0) 55%);
  opacity: 0.7;
  pointer-events: none;
}

.header-content {
  width: min(1200px, 92vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 20;
}

/* Floating Cart */
.floating-cart-container {
  position: fixed;
  top: 15px;
  left: 0;
  right: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-cart-container.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.floating-cart-content {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}

.floating-cart-btn {
  pointer-events: auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  background: var(--bg-2) !important;
  color: var(--text) !important;
  border: 1.5px solid var(--primary) !important;
  height: 48px !important;
  border-radius: 999px !important;
  padding: 0 24px !important;
  min-width: unset !important;
}

.floating-cart-btn .badge {
  top: -4px;
  right: -4px;
}

.theme-light .floating-cart-btn {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.15);
  border-color: #cbd5e1 !important;
}

.floating-cart-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary) !important;
}

.banner-container {
  flex: 1;
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(10, 14, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  height: clamp(160px, 20vw, 230px);
  min-height: 160px;
  position: relative;
  clip-path: inset(0 round 18px);
}

.banner-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: right bottom;
  border-radius: inherit;
  filter: saturate(1.05) contrast(1.02);
}

.banner-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 20, 0.35), rgba(10, 14, 20, 0) 45%, rgba(10, 14, 20, 0.25));
  border-radius: inherit;
  pointer-events: none;
}

.nav-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(12, 16, 24, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.theme-light .banner-container {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.theme-light .banner-container::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 40%, rgba(248, 250, 252, 0.65));
}

.theme-light .nav-right {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.nav-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.nav-bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

/* Navigation Buttons */
.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-nav:active {
  transform: translateY(0);
}

.btn-nav:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.theme-light .btn-nav {
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.theme-light .btn-nav:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.btn-nav svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-text {
  white-space: nowrap;
}

.btn-login {
  min-width: 100px;
}

.btn-profile {
  position: relative;
}

.btn-profile .btn-text {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-emoji {
  font-size: 16px;
  line-height: 1;
}

.ghostBtn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
}

.ghostBtn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-light .ghostBtn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.ghostBtn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.profileMenu {
  position: relative;
  display: flex;
  align-items: center;
}

.profileMenu[hidden] {
  display: none !important;
}

.profileChevron {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 2px;
}

.profileMenu.open .profileChevron {
  transform: rotate(180deg);
}

.profileDropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 8px;
  display: none;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profileMenu.open .profileDropdown {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.theme-light .profileDropdown {
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.profileDropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-right: none;
  transform: rotate(45deg);
}

.theme-light .profileDropdown::before {
  background: #ffffff;
}

.profileDropdownItem {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: none;
  border-radius: 8px;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.profileDropdownItem:hover,
.profileDropdownItem:focus {
  background: rgba(255, 106, 61, 0.1);
  transform: translateX(2px);
}

.theme-light .profileDropdownItem:hover,
.theme-light .profileDropdownItem:focus {
  background: rgba(255, 106, 61, 0.08);
}

.profileDropdownItem:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.dropdown-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.profileDropdownSignOut {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
  padding-top: 14px;
  color: #ef4444;
}

.theme-light .profileDropdownSignOut {
  border-color: rgba(15, 23, 42, 0.08);
}

.profileDropdownSignOut:hover,
.profileDropdownSignOut:focus {
  background: rgba(239, 68, 68, 0.1);
}

.theme-light .profileDropdownSignOut:hover,
.theme-light .profileDropdownSignOut:focus {
  background: rgba(239, 68, 68, 0.08);
}

.auth-form .form-section.is-hidden {
  display: none !important;
}

.locale-select {
  position: relative;
}

.langSwitcher {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 32px 8px 12px;
  height: 38px;
  font-size: 0.875rem;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 600;
}

.langSwitcher option {
  background: #1e293b;
  color: #f8fafc;
  padding: 10px;
  font-weight: 600;
}

.langSwitcher:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.langSwitcher:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.locale-select::after {
  content: "\25BE";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: currentColor;
  pointer-events: none;
  opacity: 0.7;
}

.theme-light .langSwitcher {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.theme-light .langSwitcher option {
  background: #ffffff;
  color: #1e293b;
  padding: 10px;
  font-weight: 600;
}

.theme-light .langSwitcher:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

/* Theme toggle */
.switch {
  --w: 60px;
  --h: 38px;
  --thumb-gap: 4px;
  position: relative;
  display: inline-flex;
  align-items: center;
  width: var(--w);
  height: var(--h);
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.switch:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-light .switch {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.theme-light .switch:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.switch input {
  display: none;
}

.switch .track {
  position: relative;
  flex: 1;
  height: 100%;
  border-radius: 999px;
  overflow: visible;
}

.switch .thumb {
  position: absolute;
  top: var(--thumb-gap);
  left: var(--thumb-gap);
  width: calc(var(--h) - 8px);
  height: calc(var(--h) - 8px);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease;
}

.switch input:checked + .track .thumb {
  transform: translateX(calc(var(--w) - var(--h)));
  background: #1e293b;
}

.theme-light .switch .thumb {
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.theme-light .switch input:checked + .track .thumb {
  background: #0f172a;
}

.switch .icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.switch .sun {
  left: 8px;
  opacity: 0.4;
}

.switch .moon {
  right: 8px;
  opacity: 0.9;
}

.switch input:checked + .track .sun {
  opacity: 0.95;
}

.switch input:checked + .track .moon {
  opacity: 0.35;
}

.theme-light .switch .sun {
  opacity: 0.9;
}

.theme-light .switch .moon {
  opacity: 0.4;
}

.theme-light .switch input:checked + .track .sun {
  opacity: 0.35;
}

.theme-light .switch input:checked + .track .moon {
  opacity: 0.95;
}

/* Cart button */
.btn-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(255, 106, 61, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 700;
  min-width: 100px;
}

.btn-cart:hover {
  background: linear-gradient(135deg, #ff7a4d 0%, #ffa971 100%);
  box-shadow: 0 8px 24px rgba(255, 106, 61, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-cart svg {
  width: 18px;
  height: 18px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ghost-link.ghost-link-small {
  font-size: 0.9rem;
  font-weight: 700;
}

.ghost-link:hover {
  background: rgba(255, 106, 61, 0.1);
  border-color: rgba(255, 106, 61, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.theme-light .ghost-link {
  background: rgba(15, 23, 42, 0.04);
  color: #ea580c;
  border-color: #cbd5e1;
}

.theme-light .ghost-link:hover {
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
  border-color: #ea580c;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.ghost-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.form-aux-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.form-aux-actions .ghost-link {
  margin: 0;
}

.form-error-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(248, 113, 113, 0.18));
  color: var(--text);
  box-shadow: 0 12px 20px rgba(239, 68, 68, 0.12);
  animation: banner-in 0.24s ease forwards;
}

.form-error-banner.is-visible {
  display: grid;
}

.form-error-banner.is-hidden {
  display: none;
}

.form-error-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.form-error-content svg {
  color: #ef4444;
}

.form-error-banner .iconBtn {
  background: none;
  border: none;
  color: inherit;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.form-error-banner .iconBtn:hover,
.form-error-banner .iconBtn:focus-visible {
  background: rgba(239, 68, 68, 0.18);
}

@keyframes banner-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(255, 106, 61, 0.5);
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.14s ease;
}

.cartBtn.bump .badge {
  animation: bump 0.4s ease;
}

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

/* Filters */
.filters {
  padding: 16px 0;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(140%) blur(10px);
  isolation: isolate;
}

.filters::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: -1;
}

.theme-light .filters {
  background: transparent;
  box-shadow: none;
}

.theme-light .filters::before {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
}

.chips-dots {
  display: none;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
}

.chips-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted, #94a3b8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  opacity: 0.3;
}

.chips-dot:hover {
  opacity: 0.6;
  background: var(--primary);
}

.chips-dot.active {
  background: var(--primary);
  transform: scale(1.2);
  opacity: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.theme-light .chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-light .chip:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--primary-contrast);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(255, 106, 61, 0.3);
}

.theme-light .chip.active {
  box-shadow: 0 8px 20px rgba(255, 106, 61, 0.25), 0 1px 3px rgba(255, 106, 61, 0.15);
}

.chip.search-chip {
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.18), rgba(255, 159, 107, 0.1));
  border-color: rgba(255, 106, 61, 0.4);
}

.theme-light .chip.search-chip {
  background: #fff7f2;
  border-color: rgba(255, 106, 61, 0.45);
}

/* Grid */
main {
  padding: 22px 0 80px;
}

.theme-light main {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  justify-content: center;
}

/* Card */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.theme-light .card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.theme-light .card:hover {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  border-color: #cbd5e1;
}

.thumb {
  position: relative;
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .thumb-image {
  transform: scale(1.05);
}

.info {
  padding: 14px 14px 16px;
}

.name {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0.1px;
}

.desc {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
  min-height: 40px;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.price {
  font-weight: 800;
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0.2px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 14px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn.primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: var(--primary-contrast);
  box-shadow: 0 12px 24px rgba(255, 106, 61, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-light .btn.primary {
  box-shadow: 0 8px 20px rgba(255, 106, 61, 0.3), 
              0 2px 6px rgba(255, 106, 61, 0.2),
              inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.btn.primary:hover {
  filter: brightness(1.04);
}

.theme-light .btn.primary:hover {
  box-shadow: 0 12px 28px rgba(255, 106, 61, 0.35), 
              0 4px 10px rgba(255, 106, 61, 0.25),
              inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 106, 61, 0.38);
  animation: ripple 0.6s ease-out forwards;
  pointer-events: none;
  mix-blend-mode: normal;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 5px;
  height: 44px;
  font-size: 15px;
}

.theme-light .stepper {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.stepper .iconBtn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stepper .iconBtn svg {
  width: 18px;
  height: 18px;
}

.stepper .iconBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 106, 61, 0.35);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, rgba(255, 106, 61, 0.16), rgba(255, 106, 61, 0.06));
}

.theme-light .stepper .iconBtn:hover {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
  background: linear-gradient(180deg, rgba(255, 106, 61, 0.14), rgba(255, 106, 61, 0.04));
}

.stepper .iconBtn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
}

.theme-light .stepper .iconBtn:active {
  box-shadow: inset 0 2px 10px rgba(15, 23, 42, 0.18);
}

.stepper .iconBtn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.qty {
  min-width: 30px;
  text-align: center;
  font-weight: 700;
  line-height: 1;
}

.hidden {
  display: none !important;
}

/* Cart Drawer */
.cartDrawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.cartDrawer .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cartDrawer .panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  flex-direction: column;
}

.theme-light .cartDrawer .panel {
  background: #ffffff;
  border-left: 1.5px solid #e2e8f0;
  box-shadow: -20px 0 40px rgba(15, 23, 42, 0.15);
}

.cartDrawer.open {
  pointer-events: auto;
}

.cartDrawer.open .overlay {
  opacity: 1;
}

.cartDrawer.open .panel {
  transform: translateX(0%);
}

.cartDrawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  flex-shrink: 0;
}

.cartDrawer header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-light .cartDrawer header h2 {
  background: none;
  -webkit-text-fill-color: #0f172a;
  color: #0f172a;
  font-weight: 800;
}

.closeBtn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.closeBtn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: rotate(90deg);
}

.theme-light .closeBtn:hover {
  background: rgba(239, 68, 68, 0.08);
}

.closeBtn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.cartItems {
  flex: 1 1 auto;
  overflow: auto;
  padding: 10px;
  min-height: 0;
}

.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}

.cartItem {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  margin-bottom: 10px;
}

.theme-light .cartItem {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.miniThumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ci-name {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
  overflow-wrap: break-word;
  word-break: break-word; /* Ensure long words wrap */
}

.ci-info {
  min-width: 0; /* Critical for flex/grid 1fr columns to actually shrink */
  padding-top: 2px;
}

.ci-sub {
  font-size: 12px;
  color: var(--muted);
}

.ci-right {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  justify-items: end;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  flex-shrink: 0;
}

.ci-right .stepper {
  grid-column: 1 / -1;
}

.lineTotal {
  font-weight: 800;
  white-space: nowrap;
}

.remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(239, 68, 68, 0.15);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
}

.remove:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.theme-light .remove {
  background: #fef2f2;
  border-color: #fee2e2;
}

.theme-light .remove:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.remove svg {
  stroke-width: 2.5px;
}
  overflow: hidden;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.remove:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(255, 106, 61, 0.28);
  background: rgba(255, 106, 61, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.theme-light .remove:hover {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.remove:active {
  transform: translateY(0) scale(0.96);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
}

.theme-light .remove:active {
  box-shadow: inset 0 2px 10px rgba(15, 23, 42, 0.18);
}

.remove:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.summary {
  padding: 20px;
  border-top: 2px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.theme-light .summary {
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.03);
}

.rows {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.theme-light .rows {
  background: #ffffff;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 15px;
}

.row.total {
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 2px solid var(--border);
}

.checkout {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.4px;
  box-shadow: 0 8px 24px rgba(255, 106, 61, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.checkout::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 106, 61, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.checkout:hover:not(:disabled)::before {
  opacity: 1;
}

.checkout:active:not(:disabled) {
  transform: translateY(0);
}

.checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.3);
}

.checkout:disabled::before {
  display: none;
}

/* Flyer animation */
.flyer {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  will-change: transform, opacity;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  background: var(--surface);
}

.flyer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toast */
.toastWrap {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
  align-items: end;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(.2, .9, .2, 1), 
              transform 0.3s cubic-bezier(.2, .9, .2, 1);
  pointer-events: auto;
  font-weight: 500;
  font-size: 15px;
  backdrop-filter: blur(8px);
}

.theme-light .toast {
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2),
              0 0 0 1px rgba(15, 23, 42, 0.05);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.exit {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.revealed {
  opacity: 1;
  transform: none;
  transition: all 0.45s cubic-bezier(.2, .8, .2, 1);
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Business Info Footer */
.business-info {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 40px;
}

.theme-light .business-info {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px solid #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-title {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 28px;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: 0.2px;
}

.info-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.info-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
  color: var(--primary);
}

.info-text {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
  font-style: normal;
}

.info-text a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.info-text a:hover {
  color: var(--primary-2);
  text-decoration: underline;
}

/* Modals & Dialogs */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Prevent Android keyboard from pushing modal out of viewport */
  height: 100%;
  height: 100dvh;
}

.modal .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light .modal .overlay {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
}

.modal.open {
  pointer-events: auto;
}

.modal.open .overlay {
  opacity: 1;
}

.modal-panel {
  position: relative;
  width: min(600px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 
              0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transform: scale(0.94) translateY(30px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), 
              opacity 0.25s ease;
  overflow: hidden;
}

.theme-light .modal-panel {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2),
              0 0 0 1px rgba(15, 23, 42, 0.05);
}

.modal.open .modal-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-panel.small {
  width: min(480px, 100%);
}

.modal-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-panel header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-light .modal-panel header h2 {
  background: none;
  -webkit-text-fill-color: #0f172a;
  color: #0f172a;
  font-weight: 800;
}

.modal-body {
  overflow-y: auto;
  padding: 28px;
  background: var(--surface);
  flex: 1 1 auto;
  min-height: 0;
}

.modal-panel.search-panel {
  width: min(760px, 100%);
}

.search-body {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.search-input {
  font-size: 16px;
}

.search-results {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.search-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  min-width: 0;
}

.theme-light .search-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.search-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.theme-light .search-thumb {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.search-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.search-price {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn.compact {
  padding: 6px 14px;
  min-height: 34px;
  font-size: 0.82rem;
}

.stepper.compact {
  height: 36px;
  padding: 4px;
  gap: 6px;
}

.stepper.compact .iconBtn {
  width: 26px;
  height: 26px;
}

.stepper.compact .iconBtn svg {
  width: 14px;
  height: 14px;
}

.search-empty {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.debugSnapshotHint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.debugSnapshotTextarea {
  min-height: 42vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  white-space: pre;
}

.debugSnapshotActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--surface-2);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.checkout-form {
  display: grid;
  gap: 20px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-method {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-method:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 106, 61, 0.35);
}

.auth-method.is-active {
  color: #ffffff;
  border-color: rgba(255, 106, 61, 0.4);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  box-shadow: 0 10px 24px rgba(255, 106, 61, 0.35);
}

.auth-method:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.theme-light .auth-method {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  border-width: 1.5px;
}

.theme-light .auth-method:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #000000;
}

.theme-light .auth-method.is-active {
  background: #ea580c;
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.2);
}

.form-section {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}

.form-helper {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.theme-light .form-helper {
  color: #334155;
}

.form-helper.subtle {
  font-size: 0.875rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.theme-light .form-helper.subtle {
  color: #475569;
}

.form-helper.muted {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
  opacity: 0.85;
}

.form-helper.delivery-note {
  display: none;
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.12), rgba(255, 159, 107, 0.12));
  color: var(--text);
  border: 1px solid rgba(255, 106, 61, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  gap: 8px;
  align-items: flex-start;
  box-shadow: 0 6px 18px rgba(255, 106, 61, 0.12);
}

.form-helper.delivery-note.is-visible {
  display: flex;
}

.form-helper.delivery-note::before {
  content: 'ℹ️';
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  margin-top: 2px;
}

.form-helper.delivery-warning {
  display: none;
  background: rgba(255, 76, 76, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 76, 76, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}

.form-helper.delivery-warning.is-visible {
  display: block;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator,
input[type="date"].form-input::-webkit-calendar-picker-indicator,
input[type="time"].form-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.theme-light input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator,
.theme-light input[type="date"].form-input::-webkit-calendar-picker-indicator,
.theme-light input[type="time"].form-input::-webkit-calendar-picker-indicator {
  filter: none;
}

.theme-light .form-input,
.theme-light .form-textarea {
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.theme-light .form-input::placeholder,
.theme-light .form-textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

.form-input:hover,
.form-textarea:hover {
  border-color: rgba(255, 106, 61, 0.3);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 106, 61, 0.12),
              inset 0 1px 2px rgba(0, 0, 0, 0.05);
  background: var(--surface);
}

.theme-light .form-input:focus,
.theme-light .form-textarea:focus {
  box-shadow: 0 0 0 4px rgba(255, 106, 61, 0.1),
              inset 0 1px 2px rgba(15, 23, 42, 0.04);
  background: #ffffff;
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.form-input.is-readonly,
.form-input[readonly],
.form-textarea.is-readonly,
.form-textarea[readonly] {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
  border-color: var(--border);
  opacity: 0.7;
}

.schedule-asap-btn {
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  background: var(--surface);
}

.theme-light .schedule-asap-btn {
  background: #ffffff;
}

.schedule-asap-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-section-group {
  display: grid;
  gap: 16px;
}

.form-advanced {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--surface);
  transition: all 0.2s ease;
}

.form-advanced summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  outline: none;
  user-select: none;
}

.form-advanced[open] {
  padding-bottom: 16px;
}

.profile-body {
  display: grid;
  gap: 24px;
}

.profile-card,
.profile-form {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  padding: 18px 20px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.theme-light .profile-card,
.theme-light .profile-form {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.profile-summary {
  display: grid;
  gap: 10px;
}

.profile-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.profile-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.profile-value {
  color: var(--text);
  font-weight: 600;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.checkbox-grid.allergens-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.address-list {
  display: grid;
  gap: 12px;
}

.address-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.theme-light .address-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.address-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.address-title {
  font-weight: 700;
  font-size: 15px;
}

.address-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.address-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 106, 61, 0.15);
  color: var(--text);
  border: 1px solid rgba(255, 106, 61, 0.35);
}

.address-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.theme-light .btn.secondary {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-actions .btn-submit {
  flex: 1;
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-option {
  position: relative;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  padding: 12px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.checkbox-option:hover {
  background: rgba(255, 106, 61, 0.05);
}

.theme-light .checkbox-option:hover {
  background: rgba(255, 106, 61, 0.04);
}

.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.theme-light .radio-label {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.radio-label:hover {
  border-color: rgba(255, 106, 61, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-light .radio-label:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.radio-option input[type="radio"]:checked + .radio-label {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.15) 0%, rgba(255, 159, 107, 0.1) 100%);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(255, 106, 61, 0.25);
}

.theme-light .radio-option input[type="radio"]:checked + .radio-label {
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.12) 0%, rgba(255, 159, 107, 0.08) 100%);
}

.radio-label svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.checkout-summary {
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 2px solid var(--border);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.theme-light .checkout-summary {
  background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.03);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--muted);
  font-size: 15px;
}

.summary-row.total {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 2px solid var(--border);
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.btn-submit {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 106, 61, 0.4), 
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 106, 61, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-submit:hover::before {
  opacity: 1;
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 6px 20px rgba(255, 106, 61, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: grayscale(0.3);
}

.btn-submit:disabled::before {
  display: none;
}

.code-input {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 10px;
  font-family: 'Courier New', monospace;
  padding: 18px;
}

.verification-message {
  margin: 0 0 28px;
  color: var(--text);
  line-height: 1.7;
  text-align: center;
  font-size: 15px;
}

.verification-message::before {
  content: '📧';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
}

.success-content {
  text-align: center;
}

.success-message {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.success-message::before {
  content: '✅';
  display: block;
  font-size: 56px;
  margin-bottom: 20px;
  animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-details {
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 2px solid var(--border);
  text-align: left;
  font-size: 14px;
  line-height: 1.9;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.theme-light .success-details {
  background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.03);
}

.success-details strong {
  color: var(--primary);
  font-weight: 700;
}

.success-signup {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.success-signup p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.success-signup .btn {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 960px) {
  .header-content {
    gap: 12px;
  }

  .banner-container {
    height: clamp(120px, 22vw, 160px);
    min-height: 120px;
  }

  .nav-right {
    gap: 8px;
    padding: 10px 12px;
  }

  .nav-top-row,
  .nav-bottom-row {
    gap: 6px;
  }

  .btn-text {
    display: none;
  }

  .btn-nav {
    min-width: auto;
    padding: 0 12px;
  }

  .btn-login,
  .btn-cart {
    min-width: auto;
  }

  .profile-emoji {
    font-size: 18px;
  }

  .profileChevron {
    display: none;
  }

  .badge {
    top: -8px;
    right: -8px;
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100vh - 20px);
    border-radius: 12px;
  }

  .modal-panel header {
    padding: 18px 20px;
  }

  .modal-panel header h2 {
    font-size: 18px;
  }

  .modal-body {
    padding: 20px;
  }

  .radio-group {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .chips {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 4px 48px 12px 4vw;
    margin: 0 -4vw;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chip {
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  .chips-dots {
    display: flex;
  }

  .header-content {
    gap: 8px;
  }

  .banner-container {
    min-width: 120px;
    height: clamp(110px, 30vw, 150px);
    min-height: 110px;
  }

  .nav-right {
    padding: 8px;
    gap: 10px;
  }

  .btn-nav {
    height: 36px;
    padding: 0 10px;
  }

  .btn-cart {
    height: 36px;
    padding: 0 12px;
  }

  .switch {
    --w: 40px;
    --h: 22px;
  }

  .switch .thumb {
    width: 16px;
    height: 16px;
  }

  .switch input:checked + .track .thumb {
    transform: translateX(18px);
  }

  .langSwitcher {
    padding: 6px 28px 6px 10px;
    height: 36px;
    font-size: 0.8rem;
  }

  .profileDropdown {
    min-width: 200px;
  }

  .modal {
    padding: 10px;
    /* Align to top on mobile so header is visible when keyboard opens */
    align-items: flex-start;
    padding-top: env(safe-area-inset-top, 10px);
    overflow: hidden;
  }

  .modal-panel {
    /* On mobile, take full available height and anchor to top */
    max-height: calc(100dvh - 20px - var(--keyboard-offset, 0px));
    max-height: calc(100svh - 20px);
    margin-top: 0;
  }

  .modal-panel header {
    padding: 16px;
    /* Ensure header is always visible above scrollable content */
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    /* Prevent header from shrinking when content is long */
    min-height: 56px;
  }

  .modal-body {
    padding: 16px;
    /* Allow body to scroll independently, keeping header fixed */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .checkout-summary {
    padding: 16px;
  }

  .btn-submit {
    height: 50px;
    font-size: 15px;
  }

  .ghost-link {
    height: 50px;
    font-size: 15px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    display: flex;
    flex-direction: row;
    height: auto;
    align-items: stretch;
  }

  .card .thumb {
    width: 100px;
    height: auto;
    aspect-ratio: 1;
    min-height: 100px;
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1.5px solid var(--border);
  }

  .card .info {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
  }

  .card .name {
    font-size: 15px;
    margin: 0 0 2px 0;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card .desc {
    font-size: 12px;
    margin: 0 0 8px 0;
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    color: var(--muted);
  }

  .card .meta {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .card .price {
    font-size: 15px;
    font-weight: 600;
  }

  .card .actions {
    display: flex;
    align-items: center;
  }

  .card .btn.primary.addBtn {
    padding: 0 12px;
    height: 32px;
    font-size: 13px;
    border-radius: 8px;
  }

  .card .stepper {
    height: 32px;
    padding: 2px;
    gap: 8px;
  }

  .card .stepper .iconBtn {
    width: 28px;
    height: 28px;
    padding: 0;
  }

  .card .qty {
    font-size: 14px;
    min-width: 20px;
  }
}

@media (hover: none) {
  .btn-nav:hover,
  .btn-cart:hover,
  .radio-label:hover {
    transform: none;
  }
}
