* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* Header */
.header {
  text-align: center;
  padding: 32px 0 20px;
  border-bottom: 2px solid #c0392b;
  margin-bottom: 24px;
  position: relative;
}

.header-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 8px;
}

.header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #c0392b;
  letter-spacing: -0.02em;
}

.header .rating {
  color: #777;
  font-size: 0.9rem;
  margin-top: 4px;
}

.header .rating .stars {
  color: #e6b800;
  letter-spacing: 2px;
}

/* Cart Summary (sticky) */
.cart-summary {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #c0392b;
  color: #fff;
  padding: 12px 20px;
  margin: 0 -16px 24px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.cart-summary.visible {
  display: block;
}

.cart-summary:hover {
  background: #a93226;
}

/* Category Nav */
.category-nav {
  position: sticky;
  top: 48px;
  z-index: 99;
  background: #fff;
  border-bottom: 1px solid #e0d5d5;
  padding: 0 0 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
  height: 0;
}

.category-nav a {
  display: inline-block;
  padding: 6px 14px;
  margin-right: 4px;
  background: #fafafa;
  border: 1px solid #e0d5d5;
  border-radius: 20px;
  font-size: 0.82rem;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}

.category-nav a:hover,
.category-nav a.active {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

/* Category Section */
.category {
  margin-bottom: 36px;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #c0392b;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0d5d5;
}

.category-note {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 12px;
  font-style: italic;
}

/* Menu Items */
.menu-items {
  display: grid;
  gap: 6px;
}

.menu-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  transition: background 0.15s;
}

.menu-item:hover {
  background: #fef5f5;
}

.menu-item .info {
  min-width: 0;
}

.menu-item .name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 2px;
}

.menu-item .desc {
  font-size: 0.78rem;
  color: #999;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item .price {
  font-weight: 700;
  font-size: 0.95rem;
  color: #333;
  white-space: nowrap;
  text-align: right;
  min-width: 52px;
}

.menu-item .add-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item .add-btn:hover {
  background: #a93226;
}

.menu-item .add-btn.in-cart {
  background: #27ae60;
}

/* Cart Sidebar */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
}

.cart-overlay.open {
  display: block;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: #fff;
  z-index: 201;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-sidebar .cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background: #c0392b;
  color: #fff;
}

.cart-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item .name {
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-item .price-info {
  font-size: 0.82rem;
  color: #888;
}

.cart-item .qty {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.cart-item .qty button {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.cart-item .qty button:hover {
  background: #f0f0f0;
}

.cart-item .qty span {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item .remove {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 0;
  text-align: left;
}

.cart-empty {
  text-align: center;
  padding: 40px 0;
  color: #aaa;
  font-size: 0.95rem;
}

/* Checkout Form */
.cart-footer {
  border-top: 1px solid #eee;
  padding: 16px 20px;
  background: #fafafa;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.checkout-form {
  display: none;
}

.checkout-form.active {
  display: block;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #333;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192,57,43,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}

.btn-primary {
  background: #c0392b;
  color: #fff;
}

.btn-primary:hover {
  background: #a93226;
}

.btn-primary:disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
}

.btn-outline {
  background: #fff;
  color: #c0392b;
  border: 2px solid #c0392b;
  margin-top: 8px;
}

.btn-outline:hover {
  background: #fef5f5;
}

/* Success */
.order-success {
  display: none;
  text-align: center;
  padding: 32px 20px;
}

.order-success.active {
  display: block;
}

.order-success .check {
  font-size: 3rem;
  margin-bottom: 12px;
}

.order-success h3 {
  color: #27ae60;
  margin-bottom: 8px;
}

.order-success p {
  color: #777;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 0 16px;
  margin-top: 40px;
  border-top: 1px solid #e0d5d5;
  color: #999;
  font-size: 0.78rem;
}

.footer a {
  color: #888;
  text-decoration: none;
}

.footer a:hover {
  color: #c0392b;
}

.footer .sep {
  color: #ddd;
  margin: 0 6px;
}

/* Version */
.version {
  font-size: 0.7rem;
  color: #ccc;
  text-align: center;
  margin-top: 4px;
}

/* Delivery Info Bar */
.info-bar {
  background: #fef5f5;
  border: 1px solid #f5d5d5;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.info-bar .hours strong,
.info-bar .note strong {
  color: #c0392b;
}

@media (max-width: 600px) {
  .header h1 { font-size: 1.6rem; }
  .header-logo { max-width: 140px; }
  .menu-item { grid-template-columns: 1fr auto; }
  .menu-item .desc { display: none; }
  .cart-sidebar { max-width: 100%; }
  .info-bar { flex-direction: column; gap: 4px; text-align: center; }
}
