* {
  box-sizing: border-box;
}

:root {
  --bg: #0b3d2e;
  --card: #145c43;
  --card-alt: #1a6b52;
  --text: #f6f1e8;
  --muted: #d7e7de;
  --accent: #ffb347;
  --accent-dark: #111;
  --border: rgba(255, 255, 255, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

.navbar {
  background: #1a6b52;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffd27a;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.08);
}

.map-btn {
  background: #ffb347;
  color: #111;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  border-radius: 10px;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
}

button {
  background: var(--accent);
  color: var(--accent-dark);
  border: 0;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.05);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

main {
  padding: 24px 20px 96px;
}

.public-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 22px;
  border-radius: 18px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.public-header h1,
.admin-card h2 {
  margin-top: 0;
}

.public-header p,
#publicHours p,
#publicHours li,
.item-description,
.cart-subtitle,
.cart-empty,
.dine-in-only {
  color: var(--muted);
}

#publicHours ul {
  margin: 12px 0;
  padding-left: 18px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.menu-column {
  min-width: 0;
}

.cart-column {
  min-width: 0;
}

.cart-panel {
  position: sticky;
  top: 20px;
}

.cart-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.cart-count-pill {
  background: rgba(255, 179, 71, 0.16);
  color: #ffd27a;
  border: 1px solid rgba(255, 210, 122, 0.22);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.menu-public-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 190px;
}

.menu-public-item.is-out {
  opacity: 0.75;
}

.menu-public-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.menu-public-head h3 {
  margin: 0;
  font-size: 1.18rem;
}

.menu-public-head span {
  font-weight: 700;
  white-space: nowrap;
}

.item-description {
  margin: 0;
  line-height: 1.5;
  flex-grow: 1;
}

.item-actions {
  margin-top: auto;
}

.add-to-cart-btn {
  width: 100%;
}

.dine-in-only {
  display: inline-block;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

.out-label {
  margin: 0;
  color: #ffd7a3;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  padding-right: 2px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cart-item-info strong,
.cart-item-actions strong {
  color: var(--text);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn,
.remove-cart-btn {
  padding: 7px 10px;
  min-width: 36px;
}

.qty-btn {
  line-height: 1;
}

.cart-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.checkout-btn {
  width: 100%;
}

.mobile-cart-bar {
  display: none;
}

@media (max-width: 980px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }

  .mobile-cart-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(11, 61, 46, 0.96);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    z-index: 1000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  }

  .mobile-cart-bar button {
    padding: 10px 14px;
    white-space: nowrap;
  }

  main {
    padding-bottom: 110px;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    background: #1a6b52;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
  }

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

@media (max-width: 640px) {
  main {
    padding: 16px 12px 110px;
  }

  .admin-card {
    padding: 16px;
    border-radius: 14px;
  }

  .public-grid {
    grid-template-columns: 1fr;
  }

  .menu-public-head {
    flex-direction: column;
  }

  .cart-item {
    flex-direction: column;
  }

  .cart-item-actions {
    align-items: flex-start;
  }
}
