/* ==========================================================================
   Shripati Dwarkadhish — Food on Train
   Dark-luxury brand (matches main site): gold #d4af37, Playfair + Poppins.
   Signature element: the railway-route progress line.
   ========================================================================== */

:root {
    --ink:        #0f0c08;
    --panel:      #1a1510;
    --panel-2:    #241d14;
    --gold:       #d4af37;
    --gold-hi:    #f9e076;
    --cream:      #f5efe2;
    --muted:      #a89a80;
    --line:       rgba(212, 175, 55, 0.22);
    --veg:        #4caf6d;
    --danger:     #e0674e;
    --board:      #f7c723;   /* IR station-board yellow */
    --board-ink:  #14100a;
    --radius:     14px;
    --shadow:     0 10px 30px rgba(0, 0, 0, 0.45);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background:
        radial-gradient(1200px 500px at 50% -10%, #2a2116 0%, transparent 60%),
        var(--ink);
    color: var(--cream);
    min-height: 100vh;
    line-height: 1.55;
    font-size: 16px;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

a { color: var(--gold); }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 120px; }

/* ---- Header ---- */
.site-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0 10px;
}
.brand { text-decoration: none; color: var(--cream); display: flex; flex-direction: column; }
.brand .eyebrow {
    font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold); font-weight: 600;
}
.brand .name {
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 700; line-height: 1.2;
}
.head-call {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); border-radius: 999px;
    color: var(--cream); text-decoration: none;
    padding: 8px 14px; font-size: 13px; background: var(--panel);
}
.head-call:hover { border-color: var(--gold); }

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 6vw, 34px);
    font-weight: 900; line-height: 1.15;
    margin: 6px 0 2px;
}
.page-title em { color: var(--gold); font-style: normal; }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

.notice {
    background: rgba(212, 175, 55, 0.1); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px;
    margin-bottom: 14px; display: none;
}
.notice.show { display: block; }

/* ---- Signature: railway route progress ---- */
.route {
    position: sticky; top: 0; z-index: 40;
    background: linear-gradient(var(--ink) 75%, transparent);
    padding: 10px 0 18px; margin: 0 -2px;
}
.route-track { position: relative; height: 46px; }
.route-rail {
    position: absolute; left: 8%; right: 8%; top: 14px; height: 6px;
    border-top: 2px solid #4a3d26;
    border-bottom: 2px solid #4a3d26;
    background: repeating-linear-gradient(90deg, #4a3d26 0 3px, transparent 3px 12px);
    background-position: center;
}
.route-rail-done {
    position: absolute; left: 8%; top: 14px; height: 6px; width: 0;
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    background: repeating-linear-gradient(90deg, var(--gold) 0 3px, transparent 3px 12px);
    transition: width 0.5s ease;
}
.route-stops { position: absolute; inset: 0; display: flex; justify-content: space-between; padding: 0 8%; }
.route-stop { position: relative; width: 0; display: flex; flex-direction: column; align-items: center; }
.route-dot {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--panel-2); border: 2px solid #4a3d26;
    margin-top: 9px; transition: all 0.3s ease; flex-shrink: 0;
}
.route-stop.done .route-dot { background: var(--gold); border-color: var(--gold); }
.route-stop.current .route-dot {
    background: var(--gold-hi); border-color: var(--gold-hi);
    box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.25), 0 0 18px rgba(249, 224, 118, 0.5);
}
.route-label {
    margin-top: 7px; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted); white-space: nowrap; font-weight: 500;
}
.route-stop.current .route-label { color: var(--gold-hi); font-weight: 600; }
.route-stop.done .route-label { color: var(--gold); }

/* ---- Steps ---- */
.step { display: none; }
.step.active { display: block; animation: stepIn 0.35s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.card h2 {
    font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700;
    margin-bottom: 4px;
}
.card .hint { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

/* Station board chip — IR yellow signage */
.board {
    display: inline-flex; flex-direction: column; align-items: center;
    background: var(--board); color: var(--board-ink);
    border-radius: 6px; padding: 6px 18px 7px;
    font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    box-shadow: inset 0 0 0 2px var(--board-ink), inset 0 0 0 4px var(--board);
    font-size: 15px; line-height: 1.3;
}
.board small { font-weight: 600; font-size: 10px; letter-spacing: 0.18em; }

/* Station select */
.station-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.station-btn {
    background: var(--panel-2); border: 1.5px solid var(--line); border-radius: var(--radius);
    color: var(--cream); padding: 14px 10px; text-align: center; transition: all 0.2s;
}
.station-btn .code { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--gold); display: block; }
.station-btn .st-name { font-size: 12.5px; color: var(--muted); }
.station-btn.selected { border-color: var(--gold); background: rgba(212, 175, 55, 0.12); }
.station-btn.selected .st-name { color: var(--cream); }

/* Date chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    border: 1.5px solid var(--line); background: var(--panel-2); color: var(--cream);
    border-radius: 999px; padding: 8px 16px; font-size: 13.5px; transition: all 0.2s;
}
.chip.selected { border-color: var(--gold); background: rgba(212, 175, 55, 0.14); color: var(--gold-hi); }

/* Tabs (PNR / list / manual) */
.tab-row { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab-btn {
    background: none; border: none; color: var(--muted); padding: 9px 12px;
    font-size: 13.5px; font-weight: 500; border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab-btn.active { color: var(--gold-hi); border-bottom-color: var(--gold); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Inputs */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field input, .field select, .field textarea {
    width: 100%; background: var(--panel-2); border: 1.5px solid var(--line);
    border-radius: 10px; color: var(--cream); padding: 12px 14px; font-size: 16px;
    outline: none; transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field .err { color: var(--danger); font-size: 12px; margin-top: 4px; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .err { display: block; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; border: none; font-weight: 600; font-size: 15.5px;
    padding: 14px 22px; transition: all 0.2s; text-decoration: none;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hi) 55%, var(--gold) 100%);
    color: #17120a; width: 100%;
}
.btn-gold:hover { filter: brightness(1.07); }
.btn-gold:disabled { filter: grayscale(0.7) brightness(0.6); cursor: not-allowed; }
.btn-ghost {
    background: none; border: 1.5px solid var(--line); color: var(--cream);
}
.btn-ghost:hover { border-color: var(--gold); }
.btn-back { background: none; border: none; color: var(--muted); font-size: 13.5px; padding: 8px 0; margin-bottom: 8px; }
.btn-back:hover { color: var(--gold); }

/* Train results */
.train-list { max-height: 330px; overflow-y: auto; margin-top: 4px; }
.train-row {
    width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center;
    background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 10px;
    color: var(--cream); padding: 11px 14px; margin-bottom: 8px; transition: border-color 0.15s;
}
.train-row:hover { border-color: var(--gold); }
.train-row.selected { border-color: var(--gold); background: rgba(212, 175, 55, 0.12); }
.train-row .t-name { font-size: 14px; font-weight: 500; }
.train-row .t-no { color: var(--muted); font-size: 12px; }
.train-row .t-arr { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gold-hi); font-size: 15px; white-space: nowrap; }
.train-row .t-arr small { display: block; color: var(--muted); font-weight: 400; font-size: 10.5px; text-align: right; }

.pnr-result {
    border: 1.5px solid var(--gold); border-radius: var(--radius);
    background: rgba(212, 175, 55, 0.08); padding: 14px; margin-top: 12px; display: none;
}
.pnr-result.show { display: block; }

/* Cutoff strip */
.cutoff {
    display: none; align-items: center; gap: 10px;
    background: rgba(212, 175, 55, 0.1); border: 1px solid var(--line);
    border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-top: 12px;
}
.cutoff.show { display: flex; }
.cutoff.late { background: rgba(224, 103, 78, 0.12); border-color: rgba(224, 103, 78, 0.4); }
.cutoff strong { font-variant-numeric: tabular-nums; }

/* ---- Menu ---- */
.menu-toolbar { position: sticky; top: 64px; z-index: 30; background: var(--ink); padding: 4px 0 10px; }
.search-box { position: relative; margin-bottom: 10px; }
.search-box input {
    width: 100%; background: var(--panel); border: 1.5px solid var(--line);
    border-radius: 999px; color: var(--cream); padding: 11px 42px 11px 18px; font-size: 15px; outline: none;
}
.search-box input:focus { border-color: var(--gold); }
.search-box .s-ico { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cat-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-row .chip { flex-shrink: 0; }

.menu-cat-title {
    font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700;
    margin: 22px 0 10px; display: flex; align-items: center; gap: 12px;
}
.menu-cat-title::after { content: ''; height: 1px; background: var(--line); flex: 1; }

.mi {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px; margin-bottom: 10px;
}
.mi.featured { border-color: rgba(212, 175, 55, 0.5); }
.mi-info { flex: 1; min-width: 0; }
.mi-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.veg-dot {
    width: 13px; height: 13px; border: 1.5px solid var(--veg); border-radius: 3px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.veg-dot::after { content: ''; width: 6px; height: 6px; background: var(--veg); border-radius: 50%; }
.mi-badge {
    font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
    color: var(--gold-hi); border: 1px solid var(--line); padding: 2px 7px; border-radius: 999px;
}
.mi-desc { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.mi-price { font-weight: 600; color: var(--gold-hi); font-size: 15px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.mi-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--gold); border-radius: 10px; overflow: hidden; }
.stepper button {
    background: none; border: none; color: var(--gold-hi); width: 36px; height: 36px;
    font-size: 18px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.stepper button:hover { background: rgba(212, 175, 55, 0.15); }
.stepper .qty { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.add-btn {
    background: rgba(212, 175, 55, 0.12); color: var(--gold-hi);
    border: 1.5px solid var(--gold); border-radius: 10px;
    padding: 7px 20px; font-weight: 600; font-size: 14px;
}
.add-btn:hover { background: rgba(212, 175, 55, 0.22); }

.menu-empty { color: var(--muted); text-align: center; padding: 30px 10px; display: none; }

/* Cart bar */
.cart-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--ink) 30%);
    display: none;
}
.cart-bar.show { display: block; }
.cart-bar-inner {
    max-width: 648px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hi) 55%, var(--gold) 100%);
    color: #17120a; border-radius: 14px; padding: 13px 18px; font-weight: 600;
    box-shadow: var(--shadow); border: none; width: 100%; font-size: 15px;
}
.cart-bar-inner .cb-total { font-variant-numeric: tabular-nums; }

/* ---- Cart & checkout ---- */
.cart-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-line:last-of-type { border-bottom: none; }
.cl-name { font-size: 14px; flex: 1; }
.cl-price { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--gold-hi); min-width: 64px; text-align: right; }
.bill { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; font-size: 14px; }
.bill-row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.bill-row.total { color: var(--cream); font-weight: 700; font-size: 17px; padding-top: 8px; }
.bill-row.total span:last-child { color: var(--gold-hi); font-variant-numeric: tabular-nums; }

.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-opt {
    border: 1.5px solid var(--line); background: var(--panel-2); border-radius: var(--radius);
    padding: 13px; color: var(--cream); text-align: left; transition: all 0.2s;
}
.pay-opt.selected { border-color: var(--gold); background: rgba(212, 175, 55, 0.12); }
.pay-opt .p-title { font-weight: 600; font-size: 14px; display: block; }
.pay-opt .p-sub { color: var(--muted); font-size: 11.5px; }

.summary-strip {
    display: flex; align-items: center; gap: 12px; justify-content: space-between;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 14px; margin-bottom: 14px; font-size: 13px; flex-wrap: wrap;
}
.summary-strip b { color: var(--gold-hi); }

/* ---- Confirmation ---- */
.confirm-hero { text-align: center; padding: 26px 0 8px; }
.confirm-check {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px;
    background: rgba(76, 175, 109, 0.14); border: 2px solid var(--veg);
    display: flex; align-items: center; justify-content: center;
    color: var(--veg); font-size: 28px;
}
.order-no {
    font-family: 'Playfair Display', serif; font-size: clamp(34px, 9vw, 46px);
    font-weight: 900; color: var(--gold-hi); letter-spacing: 0.04em;
}
.upi-box {
    background: var(--panel-2); border: 1.5px dashed var(--gold); border-radius: var(--radius);
    padding: 14px; text-align: center; margin-top: 10px;
}
.upi-box .upi-id { font-size: 18px; font-weight: 700; color: var(--gold-hi); word-break: break-all; }
.copy-btn { margin-top: 8px; }

.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.confirm-actions .btn { font-size: 14px; padding: 12px 10px; }
.wa-btn { background: #1faa53; color: #fff; border: none; }
.wa-btn:hover { filter: brightness(1.1); }

/* Toast */
.toast {
    position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--panel-2); border: 1px solid var(--gold); color: var(--cream);
    border-radius: 10px; padding: 11px 20px; font-size: 14px; z-index: 100;
    opacity: 0; pointer-events: none; transition: all 0.3s; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Loading skeleton */
.loading { color: var(--muted); text-align: center; padding: 26px; font-size: 14px; }

.foot-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 26px; }
.foot-note a { color: var(--gold); }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

@media (max-width: 420px) {
    .field-row { grid-template-columns: 1fr; }
    .route-label { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
