:root {
  --primary: #d32f2f;
  --dark: #111;
  --light: #fff;
  --bg: #faf7f2;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: #222;
}

.topbar {
  background: linear-gradient(90deg, #ff9800, #d32f2f);
  color: var(--light);
  padding: 0.8rem 1.3rem;
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  margin: 0;
  font-size: 1.8rem;
}

.topbar p {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
}

.topbar-sub {
  opacity: 0.9;
}

.btn-location {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: none;
  font-size: 0.8rem;
  background: #ffffffdd;
  color: #d32f2f;
  cursor: pointer;
  white-space: nowrap;
}

.layout {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

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

  .topbar-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .btn-location {
    align-self: stretch;
    text-align: center;
  }
}

section {
  background: var(--light);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.menu h2,
.cart h2 {
  margin-top: 0;
}

.menu-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.item {
  border: 1px solid #eee;
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
}

.item-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 0.4rem;
  margin-bottom: 0.3rem;
}

.item-cat {
  font-size: 0.7rem;
  color: #777;
  text-transform: uppercase;
}

.item h4 {
  margin: 0.15rem 0 0.15rem;
  font-size: 0.95rem;
}

.item p {
  margin: 0 0 0.45rem;
  font-weight: 600;
}

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

.item-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.add-btn {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: var(--light);
  font-size: 0.8rem;
  cursor: pointer;
}

.item-qty-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 999px;
  overflow: hidden;
}

.item-qty-btn {
  border: none;
  background: #f5f5f5;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 0.8rem;
}

.item-qty-value {
  width: 28px;
  text-align: center;
  font-size: 0.8rem;
}

/* Cart / bill */

#cart-items {
  border: 1px solid #eee;
  border-radius: 0.5rem;
  padding: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}

.cart-row {
  display: grid;
  grid-template-columns: 2fr auto auto auto auto;
  gap: 0.35rem;
  font-size: 0.85rem;
  align-items: center;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f2f2f2;
}

.cart-row:last-child {
  border-bottom: none;
}

.qty-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 999px;
  overflow: hidden;
}

.qty-btn {
  border: none;
  background: #f5f5f5;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.9rem;
}

.qty-input {
  width: 50px;
  border: none;
  text-align: center;
  font-size: 0.85rem;
}

.qty-input:focus {
  outline: none;
}

.remove-btn {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1rem;
}

.remove-btn:hover {
  color: #d32f2f;
}

.totals {
  border-top: 1px solid #eee;
  padding-top: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.totals p {
  margin: 0.15rem 0;
}

form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.loc-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.loc-label {
  flex: 1;
}

.loc-btn {
  height: 38px;
  white-space: nowrap;
}

.loc-status {
  display: block;
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 0.4rem;
}

.btn-main,
.btn-secondary,
.btn-upi {
  margin-top: 0.6rem;
  padding: 0.5rem 0.8rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-main {
  background: var(--primary);
  color: var(--light);
}

.btn-secondary {
  background: #eee;
}

.btn-upi {
  background: #1e7d32;
  color: var(--light);
  display: inline-block;
}

.btn-main:hover {
  background: #b71c1c;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-upi:hover {
  background: #145522;
}

.note {
  font-size: 0.8rem;
  color: #777;
}

.footer {
  text-align: center;
  padding: 0.8rem;
  font-size: 0.8rem;
  color: #777;
}

