/* Adyita theme - logo colors */
:root {
  --primary: #8B2C79;
  --primary-dark: #7F225E;
  --accent: #F56B2D;
  --gradient-start: #8B2C79;
  --gradient-end: #F56B2D;
  --background: #FAF8F9;
  --surface: #FFFFFF;
  --text: #2D1B26;
  --text-muted: #6B5364;
  --border: #E8DEE4;
  --error: #D32F2F;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(139, 44, 121, 0.15);
}

.site-header .inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.site-header a:hover {
  color: var(--primary);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.logo-wrap img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 2px;
}

.gradient-text {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-profile {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.cart-link {
  position: relative;
  font-weight: 600;
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.5rem;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main */
main {
  flex: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-accent:hover {
  opacity: 0.9;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(139, 44, 121, 0.1);
}

.card h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Forms */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 44, 121, 0.2);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--primary);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.site-footer .inner {
  max-width: 72rem;
  margin: 0 auto;
}

.site-footer .footer-logo {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  border-radius: 0.5rem;
  display: block;
  margin: 0 auto;
}

.site-footer .copy {
  opacity: 0.7;
  font-size: 0.75rem;
  margin-top: 1rem;
}

/* Footer links */
.footer-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Legal pages */
.legal-meta {
  margin-top: -1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.prose {
  line-height: 1.65;
}

.prose h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  color: var(--primary-dark);
}

.prose p {
  margin: 0.5rem 0;
  color: var(--text-muted);
}

.prose ul {
  margin: 0.5rem 0 0.75rem 1.25rem;
  color: var(--text-muted);
}

.prose li {
  margin: 0.25rem 0;
}

/* Home hero */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero-logo {
  width: 6rem;
  height: 6rem;
  border-radius: 1.25rem;
  object-fit: contain;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.25rem 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1rem;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero .sub {
  max-width: 36rem;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Section headings */
.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

/* Menu grid */
.menu-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.food-card .price {
  margin-top: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
}

.qty-row {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.qty-controls button {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-controls button:hover {
  background: rgba(139, 44, 121, 0.1);
}

.qty-controls span {
  min-width: 2.5rem;
  text-align: center;
  font-weight: 600;
}

/* Cart page */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cart-item .info p:first-child {
  font-weight: 600;
  color: var(--text);
}

.cart-item .meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--error);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem;
}

.cart-total {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
}

.cart-total .amount {
  color: var(--primary);
}

/* Checkout */
.form-group {
  margin-bottom: 1rem;
}

.radio-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0;
}

/* Orders list */
.order-card {
  margin-bottom: 1rem;
}

.order-card .order-id {
  font-family: monospace;
  font-weight: 700;
  color: var(--primary);
}

.order-card .badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(139, 44, 121, 0.15);
  color: var(--primary);
}

.order-card .live-link {
  margin-top: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.order-card .live-link:hover {
  text-decoration: underline;
}

/* Live kitchen */
.jitsi-container {
  aspect-ratio: 16/9;
  min-height: 400px;
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
}

.jitsi-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-state h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Cart added bar */
.cart-added-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1rem;
  width: min(42rem, calc(100% - 2rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  padding: 0.75rem 1rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 100;
}

.cart-added-bar.is-open {
  display: flex;
}

.cart-added-bar .msg {
  font-weight: 700;
  color: var(--text);
}

.cart-added-bar .submsg {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cart-added-bar .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cart-added-bar .btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 800;
  background: rgba(245, 107, 45, 0.15);
  color: var(--accent);
  border: 1px solid rgba(245, 107, 45, 0.35);
}

.cart-added-bar .btn-link:hover {
  background: rgba(245, 107, 45, 0.22);
}

.cart-added-bar .close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links.is-open {
    display: flex;
  }

  /* On mobile, keep the cart-added popup above the footer links */
  .cart-added-bar {
    bottom: 8rem;
  }
}

/* Fix invalid selector (::root) so CSS variables apply everywhere */
:root {
  --primary: #8B2C79;
  --primary-dark: #7F225E;
  --accent: #F56B2D;
  --gradient-start: #8B2C79;
  --gradient-end: #F56B2D;
  --background: #FAF8F9;
  --surface: #FFFFFF;
  --text: #2D1B26;
  --text-muted: #6B5364;
  --border: #E8DEE4;
  --error: #D32F2F;
}
