@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== Swadishtam order — design system ===== */
:root {
  --paper: oklch(0.96 0.015 90);
  --paper-2: oklch(0.93 0.02 85);
  --ink: oklch(0.22 0.02 60);
  --ink-2: oklch(0.42 0.02 60);
  --leaf: oklch(0.32 0.06 145);
  --leaf-deep: oklch(0.24 0.05 145);
  --turmeric: oklch(0.78 0.15 80);
  --rasam: oklch(0.55 0.16 35);
  --line: oklch(0.85 0.02 80);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
h1, h2, h3, h4, p, a, span, li, b, label { overflow-wrap: break-word; word-wrap: break-word; }
body {
  overflow-x: hidden;
  background: var(--paper);
  background-image: radial-gradient(oklch(0.30 0.04 80 / 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px;
}

/* top bar */
.order-topbar {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.96 0.015 90 / 0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.order-topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.order-brand { display: flex; align-items: center; gap: 10px; font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--leaf-deep); text-decoration: none; }
.order-brand .mark { width: 32px; height: 32px; border-radius: 50%; background: var(--leaf); color: var(--paper); display: grid; place-items: center; font-size: 16px; }
.order-back { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--leaf); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
.order-back:hover { background: var(--leaf); color: var(--paper); }

.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.container > h1 {
  font-family: 'DM Serif Display', serif; font-weight: 400;
  font-size: clamp(30px, 5vw, 46px); line-height: 1.05; color: var(--leaf-deep);
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.page-sub { color: var(--ink-2); margin-bottom: 28px; max-width: 60ch; }

/* info box */
.info-box {
  background: var(--leaf-deep); color: var(--paper);
  border-radius: 14px; padding: 24px 28px; margin-bottom: 28px;
}
.info-box h3 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 22px; margin-bottom: 12px; color: var(--turmeric); }
.info-box ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.info-box li { font-size: 14px; color: oklch(0.96 0.015 90 / 0.88); }
.info-box strong { color: #fff; }

/* sections */
.section {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 28px; margin-bottom: 24px;
}
.section h2 {
  font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 24px;
  color: var(--leaf-deep); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line);
}

/* form fields */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--leaf); box-shadow: 0 0 0 3px oklch(0.32 0.06 145 / 0.12); background: #fff;
}
.help-text { display: block; font-size: 12px; color: var(--ink-2); margin-top: 5px; }

/* use-my-location button (shown only when ENABLE_LOCATION_MAP is on) */
.loc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 8px 0 4px; padding: 10px 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
  letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--paper); background: var(--leaf);
  border: none; border-radius: 999px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.loc-btn:hover { background: var(--leaf-deep); transform: translateY(-1px); }
.loc-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* menu grid */
.menu-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.menu-item {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.menu-item:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px oklch(0.30 0.04 80 / 0.5); }
.item-image { aspect-ratio: 4/3; overflow: hidden; background: var(--paper-2); }
.item-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-info { padding: 14px 16px 8px; flex: 1; }
.item-info h4 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 17px; line-height: 1.2; color: var(--leaf-deep); margin-bottom: 6px; }
.item-info .price { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--rasam); }
.meals-item { border-color: var(--turmeric); }

/* quantity control */
.quantity-control { display: flex; align-items: center; justify-content: center; gap: 0; padding: 12px 16px 16px; }
.qty-btn {
  width: 38px; height: 38px; border: 1px solid var(--leaf); background: #fff;
  color: var(--leaf-deep); font-size: 20px; cursor: pointer; line-height: 1;
  display: grid; place-items: center; transition: background .15s, color .15s;
}
.qty-btn:hover { background: var(--leaf); color: #fff; }
.qty-btn.minus { border-radius: 10px 0 0 10px; }
.qty-btn.plus { border-radius: 0 10px 10px 0; }
.qty-input {
  width: 54px; height: 38px; text-align: center; border: 1px solid var(--line);
  border-left: none; border-right: none; font-family: 'JetBrains Mono', monospace;
  font-size: 15px; color: var(--ink); background: #fff; -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* summary */
.summary { display: flex; flex-direction: column; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-2); }
.summary-row span:last-child { font-family: 'JetBrains Mono', monospace; color: var(--ink); }
.summary-row.total {
  border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px;
  font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--leaf-deep);
}
.summary-row.total span:last-child { font-family: 'DM Serif Display', serif; color: var(--leaf-deep); font-size: 24px; }

/* submit */
.submit-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 18px 24px; border: none; border-radius: 999px;
  background: var(--leaf); color: var(--paper); font-family: inherit;
  font-size: 17px; font-weight: 600; cursor: pointer; transition: background .15s, transform .15s;
}
.submit-btn:hover { background: var(--leaf-deep); transform: translateY(-1px); }

/* map */
#map { border: 1px solid var(--line); border-radius: 10px; }

/* ===== Floating cart ===== */
.order-notification {
  position: fixed; right: 20px; bottom: 20px; z-index: 2000;
  background: var(--leaf-deep); color: var(--paper);
  border-radius: 999px; padding: 12px 20px 12px 14px;
  box-shadow: 0 16px 40px -12px oklch(0.24 0.05 145 / 0.6);
  cursor: pointer; transform: translateY(140%); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), opacity .35s;
}
.order-notification.show { transform: translateY(0); opacity: 1; }
.order-notification.pulse { animation: cartPulse .45s ease; }
@keyframes cartPulse { 0%,100% { transform: translateY(0) scale(1); } 40% { transform: translateY(0) scale(1.12); } }
.notification-content { display: flex; align-items: center; gap: 12px; }
.notification-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--turmeric); color: var(--leaf-deep);
  display: grid; place-items: center; font-size: 20px; position: relative; flex-shrink: 0;
}
#notification_item_count.badge,
.notification-icon .count-badge { position: absolute; top: -4px; right: -4px; }
.notification-details { display: flex; flex-direction: column; line-height: 1.25; }
.notification-items { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--turmeric); }
.notification-total { font-family: 'DM Serif Display', serif; font-size: 18px; }

/* count badge on the cart icon */
.count-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--rasam); color: #fff;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500;
  display: grid; place-items: center; border: 2px solid var(--leaf-deep);
}

/* flying image clone */
.fly-img {
  position: fixed; z-index: 3000; border-radius: 10px; object-fit: cover;
  pointer-events: none; box-shadow: 0 12px 30px rgba(0,0,0,.35);
  transition: left .85s cubic-bezier(.4,.5,.3,1), top .85s cubic-bezier(.6,-0.2,.7,1),
              width .85s ease, height .85s ease, opacity .85s ease, transform .85s ease;
}

@media (max-width: 600px) {
  .container { padding: 24px 16px; }
  .section { padding: 20px; }
  .menu-items { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .item-info h4 { font-size: 15px; }
  .order-notification { right: 12px; bottom: 12px; left: 12px; border-radius: 14px; }
}
