:root {
  --bg: #ffffff;
  --text: #020023;
  --sub: #475569;
  --line: rgba(9, 18, 37, 0.12);
  --shadow: 0 12px 32px rgba(2, 6, 23, 0.08);

  /* These variables are controlled by app.js */
  --green: #16a34a; 
  --green2: #15803d; 

  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.brandMark {
  width: 42px;
  height: 42px;
  border-radius: 12px; /* Slightly sharper look for logos */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* background: #fff;  <- Uncomment this if your logos have dark colors */
  background: transparent; 
  border: 1px solid var(--line);
}

.brandTxt {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brandTxt .t1 {
  font-family: Poppins, Inter, sans-serif;
  font-size: 15px;
  font-weight: 900;
}
.brandTxt .t2 {
  font-size: 12px;
  color: var(--sub);
  font-weight: 700;
}

.navActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.18s ease;
  user-select: none;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: var(--green); /* UPDATED: Dynamic hover border */
}
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green2));
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.1);
}
.btn-ghost {
  background: rgba(15, 23, 42, 0.02);
}

/* HERO */
.hero {
  padding: 46px 0 18px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -140px -170px auto auto;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35; /* Softened slightly for better look */
  background: radial-gradient(circle, var(--green), transparent); /* UPDATED: Dynamic glow */
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--green); /* UPDATED: Dynamic border */
  background: rgba(15, 23, 42, 0.04);
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

.hero h1 {
  font-family: Poppins, Inter, sans-serif;
  margin: 12px 0 10px;
  font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: -1px;
  line-height: 1.05;
}

.hero p {
  margin: 0;
  color: var(--sub);
  font-size: 15px;
  max-width: 60ch;
}

.heroActions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.heroCard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.01));
  padding: 16px;
  box-shadow: var(--shadow);
}
.mini {
  font-size: 13px;
  color: var(--sub);
  font-weight: 800;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.stat .k {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.3px;
}
.stat .d {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
}

section { padding: 36px 0; }

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-title h2 {
  margin: 0;
  font-family: Poppins, Inter, sans-serif;
  letter-spacing: -0.5px;
  font-size: 22px;
}
.section-title p {
  margin: 0;
  color: var(--sub);
  font-size: 14px;
  max-width: 72ch;
}

/* DISH GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dish {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.18s ease;
  position: relative;
}
.dish:hover {
  transform: translateY(-2px);
  border-color: var(--green); /* UPDATED: Dynamic hover border */
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.08);
}

.dish-top {
  padding: 14px 14px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid var(--green); /* UPDATED: Dynamic border */
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
  white-space: nowrap;
}

.dish h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.3px;
}
.dish .subline {
  margin-top: 4px;
  color: var(--sub);
  font-size: 13px;
  font-weight: 700;
}

.viewer {
  padding: 12px 14px 0;
}

model-viewer {
  width: 100%;
  height: 280px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.01));
  overflow: hidden;
}

.dish-actions {
  padding: 12px 14px 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-wide {
  flex: 1;
  justify-content: center;
  min-width: 140px;
}

/* HOW TO */
.howbox {
  border: 1px solid var(--green); /* UPDATED: Dynamic border */
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.01));
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.howgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.howstep {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}
.no {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: var(--green); /* UPDATED: Dynamic background */
  opacity: 0.50; /* Subtler feel for steps */
  border: 1px solid var(--green);
  margin-bottom: 8px;
}
.howstep p {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
  font-weight: 700;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.02);
  padding: 22px 0;
  color: var(--sub);
  font-size: 13px;
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* FALLBACK AR */
.fakeArScreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: none;
}
.fakeArVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.fakeArViewerWrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
}
.fakeArOverlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  pointer-events: none;
}
.fakeArTopBar, .fakeArBottomBar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fakeArTag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}
.fakeArClose {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 50, 50, 0.85);
  color: #fff;
  border: 0;
  font-weight: 900;
  cursor: pointer;
  font-size: 13px;
}
.fakeArBottomBar {
  background: rgba(20, 20, 30, 0.85);
  backdrop-filter: blur(12px);
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}
.fakeArTitle { font-weight: 900; font-size: 15px; color: #fff; }
.fakeArSub { opacity: 0.95; font-size: 12px; color: #d1d5db; margin-top: 2px; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--green); /* UPDATED: Dynamic loader */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .howgrid { grid-template-columns: 1fr; }
}
/* ==========================================
   MODE SYSTEM
========================================== */

/* CUSTOMER MODE */
.customer-mode .heroCard {
  display: none;
}

.customer-mode .pill {
  display: none;
}

.customer-mode .hero p {
  display: none;
}

.customer-mode .hero {
  padding: 16px 0 6px;
}

.customer-mode .heroActions {
  display: none;
}

/* Make dishes come up immediately */
.customer-mode #dishes {
  padding-top: 10px;
}

/* OWNER MODE */
.owner-mode .hero {
  padding: 46px 0 18px;
}
.customer-mode .btn-primary {
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}

/* Add this to your style.css */
.dish-interaction-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  cursor: pointer;
}

.dish-interaction-overlay span {
  background: #fff;
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.category-filter {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0 20px;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  margin-bottom: 10px;
}

.category-filter::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.cat-btn {
  padding: 10px 20px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s ease;
}

.cat-btn.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* AR Hint Container */
.ar-hint-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* Hidden on menu */
  align-items: center;
  justify-content: center;
  z-index: 2147483647 !important; /* Forces it over the AR layer */
  pointer-events: none;
}

.hint-content {
  text-align: center;
  color: white;
}

.circular-hand {
  font-size: 50px;
  display: inline-block;
  animation: rotateAR 2s linear infinite;
}

.hint-content p {
  font-weight: 800;
  margin-top: 15px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Visibility Toggle */
.show-hint {
  display: flex !important;
}

/* Circular Animation */
@keyframes rotateAR {
  0% { transform: rotate(0deg) translate(-40px) rotate(0deg); }
  100% { transform: rotate(360deg) translate(-40px) rotate(-360deg); }
}
/* AR Surface Scanning Overlay */

.ar-scan-overlay {
  position: absolute;
  inset: 0;
  display: none; /* important */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 2147483647;
  pointer-events: none;
}

.scan-content {
  text-align: center;
  color: white;
}

.scan-phone {
  font-size: 48px;
  animation: phoneMove 1.8s ease-in-out infinite;
}

.scan-content p {
  font-weight: 800;
  margin-top: 12px;
  font-size: 14px;
  letter-spacing: .5px;
}

.show-scan {
  display: flex !important;
}

@keyframes phoneMove {
  0% { transform: translateX(-20px) rotate(-8deg); }
  50% { transform: translateX(20px) rotate(8deg); }
  100% { transform: translateX(-20px) rotate(-8deg); }
}