/* =====================================================================
   NAP MANOR — GUEST MENU  ·  styles.css
   Mobile-first. You normally never need to edit this file.
   Brand colours live in the :root block right below if you want a tweak.
   ===================================================================== */

:root {
  --bg:            #FAF6EF;   /* warm cream page background        */
  --card:          #FFFFFF;   /* card / surface                   */
  --ink:           #21231F;   /* primary text                     */
  --muted:         #7C7A70;   /* secondary text                   */
  --line:          #ECE6DA;   /* hairline borders                 */
  --brand:         #1877F2;   /* primary brand — BRIGHT BLUE      */
  --brand-dark:    #0E5FCC;
  --brand-tint:    #E7F0FE;   /* light blue background            */
  --accent:        #FFC02E;   /* accent — YELLOW                  */
  --accent-ink:    #3D2E00;   /* readable dark text on yellow     */
  --whatsapp:      #25D366;
  --whatsapp-dark: #1EBE5B;
  --veg:           #1E9E5A;
  --nonveg:        #C0392B;
  --danger:        #C0392B;
  --shadow:        0 6px 20px rgba(28, 32, 28, .07);
  --shadow-soft:   0 2px 10px rgba(28, 32, 28, .05);
  --radius:        18px;
  --radius-sm:     12px;
  --maxw:          620px;     /* keeps it phone-shaped on desktop */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  max-width: var(--maxw);
  margin: 0 auto;
  /* leave room for the sticky cart bar */
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background: var(--bg);
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ------------------------------ HEADER ------------------------------ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.app-header.scrolled { box-shadow: var(--shadow-soft); border-color: var(--line); }

.header-inner { padding: 18px 18px 10px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 40px; width: auto; border-radius: 10px; }
.brand-text .name {
  font-size: 25px; font-weight: 800; letter-spacing: -.5px; line-height: 1.05;
}
.brand-text .sub {
  display: inline-block; margin-top: 6px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent);
  padding: 3px 9px; border-radius: 999px;
}
.tagline { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* search */
.search-wrap { position: relative; margin-top: 14px; }
.search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px; opacity: .55; pointer-events: none;
}
.search-input {
  width: 100%; height: 46px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  padding: 0 16px 0 40px; font-size: 15px; color: var(--ink);
  outline: none; box-shadow: var(--shadow-soft);
}
.search-input::placeholder { color: #A8A498; }
.search-input:focus { border-color: var(--brand); }

/* category tabs */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 6px 18px 12px; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.tab .tab-ico { margin-right: 5px; }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ------------------------------ MENU ------------------------------ */
.menu { padding: 6px 14px 8px; }

.cat-section { margin-top: 18px; scroll-margin-top: 150px; }
.cat-title {
  font-size: 18px; font-weight: 800; letter-spacing: -.3px;
  margin: 6px 6px 12px; display: flex; align-items: center; gap: 8px;
}
.cat-title .cat-ico { font-size: 18px; }
.cat-hours { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: -6px 6px 12px; }
.cat-hours.closed { color: var(--brand-dark); }
.item.closed .item-thumb { opacity: .55; filter: grayscale(.3); }

/* item card */
.item {
  display: flex; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-soft);
  animation: rise .32s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.item-main { flex: 1 1 auto; min-width: 0; }
.item-name-row { display: flex; align-items: center; gap: 7px; }
.veg-dot {
  flex: 0 0 auto; width: 15px; height: 15px; border-radius: 4px;
  display: inline-grid; place-items: center; border: 1.5px solid var(--veg);
}
.veg-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--veg); }
.veg-dot.nonveg { border-color: var(--nonveg); }
.veg-dot.nonveg::after { background: var(--nonveg); }

.item-name { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.item-desc { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 4px 0 8px; }
.item-price { font-size: 15px; font-weight: 800; }

/* right column: image + add control */
.item-side { flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.item-thumb {
  width: 92px; height: 82px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; font-size: 34px;
  background: linear-gradient(135deg, #F3EEE3, #EAF1FB);
  border: 1px solid var(--line);
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* add button + stepper */
.add-btn {
  width: 92px; height: 38px; border-radius: 11px; margin-top: -22px;
  background: #fff; color: var(--brand); border: 1.5px solid var(--brand);
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
  box-shadow: var(--shadow-soft); position: relative; z-index: 2;
}
.add-btn:active { transform: scale(.97); }

.stepper {
  width: 92px; height: 38px; margin-top: -22px; position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); color: #fff; border-radius: 11px; box-shadow: var(--shadow-soft);
}
.stepper button {
  width: 34px; height: 38px; color: #fff; font-size: 20px; font-weight: 700;
  display: grid; place-items: center;
}
.stepper .qty { font-size: 15px; font-weight: 800; min-width: 20px; text-align: center; }

/* sold out */
.item.sold-out .item-thumb,
.item.sold-out .item-main { opacity: .5; filter: grayscale(.4); }
.sold-out-btn {
  width: 92px; height: 38px; margin-top: -22px; border-radius: 11px;
  background: #F1EEE7; color: #A29E92; border: 1px solid var(--line);
  font-weight: 700; font-size: 12.5px; position: relative; z-index: 2;
  cursor: not-allowed; text-transform: uppercase; letter-spacing: .5px;
}

/* no results / footer */
.no-results { text-align: center; color: var(--muted); padding: 40px 20px; }
.no-results-emoji { font-size: 34px; margin-bottom: 8px; }
.page-footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 24px; line-height: 1.5; }
.footer-brand { margin-top: 6px; font-weight: 700; color: #B4AFA2; }

/* ------------------------------ CART BAR ------------------------------ */
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(120%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(var(--maxw), calc(100% - 24px)); z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); color: #fff; border-radius: 16px;
  padding: 12px 18px; box-shadow: 0 10px 28px rgba(24, 119, 242, .35);
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.cart-bar.show { transform: translateX(-50%) translateY(0); }
.cart-bar-left { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.cart-bar-count { font-size: 12.5px; opacity: .85; font-weight: 600; }
.cart-bar-total { font-size: 17px; font-weight: 800; }
.cart-bar-cta { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 4px; color: var(--accent); }

/* ------------------------------ CART SHEET ------------------------------ */
.sheet-scrim {
  position: fixed; inset: 0; background: rgba(20, 20, 18, .45);
  z-index: 70; opacity: 0; transition: opacity .25s ease;
}
.sheet-scrim.show { opacity: 1; }

.cart-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%) translateY(100%);
  width: min(var(--maxw), 100%); max-height: 92vh; z-index: 80;
  background: var(--bg); border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
  display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
  padding-bottom: env(safe-area-inset-bottom);
}
.cart-sheet.show { transform: translateX(-50%) translateY(0); }

.sheet-handle { flex: 0 0 auto; width: 42px; height: 5px; border-radius: 999px; background: #D9D3C6; margin: 10px auto 4px; }
.sheet-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 6px 20px 10px; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.sheet-close { width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); font-size: 15px; color: var(--muted); }
/* the whole cart (items + form + total + button) scrolls together */
.sheet-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-body { padding: 4px 18px 8px; }

/* cart line */
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line-emoji { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg,#F3EEE3,#EAF1FB); border: 1px solid var(--line); flex: 0 0 auto; overflow: hidden; }
.cart-line-emoji img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-main { flex: 1 1 auto; min-width: 0; }
.cart-line-name { font-size: 15px; font-weight: 700; }
.cart-line-price { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cart-line-remove { margin-top: 6px; padding: 0; font-size: 12.5px; font-weight: 700; color: var(--danger); background: none; border: none; text-decoration: underline; }
.cart-line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-line-total { font-weight: 800; font-size: 15px; }
.mini-stepper { display: flex; align-items: center; gap: 0; background: var(--brand-tint); border-radius: 9px; }
.mini-stepper button { width: 30px; height: 30px; color: var(--brand); font-size: 18px; font-weight: 800; display: grid; place-items: center; }
.mini-stepper .qty { min-width: 20px; text-align: center; font-weight: 800; font-size: 14px; color: var(--brand-dark); }

/* empty cart */
.cart-empty { text-align: center; padding: 34px 20px 40px; color: var(--muted); }
.cart-empty-emoji { font-size: 44px; margin-bottom: 10px; }
.cart-empty h3 { margin: 0 0 4px; color: var(--ink); font-size: 17px; }
.cart-empty p { margin: 0; font-size: 14px; }

/* checkout block */
.checkout { padding: 8px 20px 22px; border-top: 1px solid var(--line); background: var(--bg); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.req { color: var(--danger); }
.opt { color: var(--muted); font-weight: 500; }
.text-input {
  width: 100%; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font-size: 16px; color: var(--ink);
  outline: none; resize: none;
}
.text-input:focus { border-color: var(--brand); }
.text-input.invalid { border-color: var(--danger); background: #FDF3F2; }

/* bed / room dropdown */
.select-wrap { position: relative; }
.select-wrap::after {
  content: "▾"; position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--muted); font-size: 13px;
}
.select-input {
  -webkit-appearance: none; appearance: none; padding-right: 38px; background-image: none;
}
.select-input:required:invalid { color: #A8A498; }   /* greyed until a real choice */
.help { margin: 6px 2px 0; font-size: 12.5px; color: var(--muted); }
.error { margin: 6px 2px 0; font-size: 12.5px; color: var(--danger); font-weight: 600; }

.summary { padding: 6px 2px 12px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 14px; color: var(--muted); }
.sum-row.total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 16px; }
.sum-row.total strong { font-size: 20px; }
.enquire-btn {
  width: 92px; margin-top: -22px; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink); border: none;
  font-weight: 800; font-size: 11.5px; line-height: 1.2; padding: 7px 6px;
  white-space: normal; box-shadow: var(--shadow-soft); position: relative; z-index: 2;
}
.enquire-btn:active { transform: scale(.97); }
.pickup-note {
  background: var(--brand-tint); color: var(--brand-dark);
  border-radius: 12px; padding: 11px 14px; font-size: 13px; font-weight: 600;
  line-height: 1.45; margin: 2px 0 14px;
}

.whatsapp-btn {
  width: 100%; height: 54px; border-radius: 14px;
  background: var(--whatsapp); color: #fff; font-size: 16.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .35);
}
.whatsapp-btn:active { transform: scale(.99); }
.whatsapp-btn:disabled { background: #CFE9D8; color: #fff; box-shadow: none; cursor: not-allowed; }
.wa-ico { font-size: 19px; }
.whatsapp-note { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* ------------------------------ TOAST ------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px); z-index: 90;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; box-shadow: var(--shadow);
  max-width: calc(100% - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
