/* ==========================================================================
   DEHAT EXPRESS — Design Tokens & Base
   Theme: rural logistics — deep forest green, marigold gold, soil brown, cream
   Signature motif: dashed "village road" route line used as a divider,
   progress track, and ambient hero device.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Hind:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---- Color tokens ---- */
  --de-forest: #143D2B;
  --de-forest-deep: #0D2B1D;
  --de-forest-light: #1E5940;
  --de-marigold: #E3A62F;
  --de-marigold-deep: #C88A1B;
  --de-soil: #8A5A34;
  --de-soil-light: #C99A6C;
  --de-cream: #FBF6EC;
  --de-cream-deep: #F2E8D3;
  --de-ink: #1C1C1A;
  --de-ink-soft: #6B6558;
  --de-white: #FFFFFF;
  --de-red: #B23A2E;
  --de-red-bg: #FBEAE7;
  --de-green-status: #2E7D46;
  --de-green-status-bg: #E7F3EA;
  --de-amber-bg: #FCF1DC;
  --de-border: #E6DCC6;

  /* ---- Typography ---- */
  --font-display: 'Poppins', 'Hind', sans-serif;
  --font-hindi: 'Hind', 'Poppins', sans-serif;
  --font-body: 'Hind', 'Inter', sans-serif;
  --font-data: 'Inter', sans-serif;

  /* ---- Layout ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 61, 43, 0.06), 0 1px 3px rgba(20, 61, 43, 0.08);
  --shadow-md: 0 4px 14px rgba(20, 61, 43, 0.10), 0 2px 4px rgba(20, 61, 43, 0.06);
  --shadow-lg: 0 12px 32px rgba(20, 61, 43, 0.16), 0 4px 10px rgba(20, 61, 43, 0.08);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--de-cream);
  color: var(--de-ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  color: var(--de-forest-deep);
  line-height: 1.22;
  margin: 0 0 0.4em;
  font-weight: 700;
}

p { margin: 0 0 0.8em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

:focus-visible {
  outline: 3px solid var(--de-marigold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--de-marigold); color: var(--de-forest-deep); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--de-marigold-deep); box-shadow: var(--shadow-md); }
.btn-forest { background: var(--de-forest); color: var(--de-white); box-shadow: var(--shadow-sm); }
.btn-forest:hover { background: var(--de-forest-light); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--de-forest); border: 1.5px solid var(--de-forest); }
.btn-outline:hover { background: var(--de-forest); color: var(--de-white); }
.btn-outline-light { background: transparent; color: var(--de-white); border: 1.5px solid rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); }
.btn-ghost { background: transparent; color: var(--de-forest); }
.btn-ghost:hover { background: var(--de-cream-deep); }
.btn-danger { background: var(--de-red-bg); color: var(--de-red); }
.btn-danger:hover { background: #f3d5d0; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Cards ---- */
.card {
  background: var(--de-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--de-border);
}

/* ---- Badges / status pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-data);
}
.badge-open { background: var(--de-green-status-bg); color: var(--de-green-status); }
.badge-closed { background: var(--de-red-bg); color: var(--de-red); }
.badge-pending { background: var(--de-amber-bg); color: var(--de-marigold-deep); }
.badge-forest { background: var(--de-forest); color: var(--de-white); }
.badge-soil { background: #F0E2D2; color: var(--de-soil); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-dot-off::before { display: none; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--de-forest-deep);
  margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--de-ink-soft); margin-top: 4px; }
.field .error-text { font-size: 12px; color: var(--de-red); margin-top: 4px; display: none; }
.field.has-error .error-text { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--de-red); background: var(--de-red-bg); }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="number"], input[type="time"], input[type="file"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--de-border);
  background: var(--de-white);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--de-ink);
  transition: border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--de-forest); outline: none; }
textarea { resize: vertical; min-height: 80px; }
.input-group { display: flex; gap: 10px; }
.input-group > * { flex: 1; }

/* ---- Route-line signature motif ---- */
.route-divider {
  height: 2px;
  background-image: linear-gradient(to right, var(--de-soil) 60%, transparent 0%);
  background-position: top;
  background-size: 16px 2px;
  background-repeat: repeat-x;
  position: relative;
  margin: 8px 0;
}
.route-divider.vertical {
  height: auto; width: 2px; align-self: stretch;
  background-image: linear-gradient(to bottom, var(--de-soil) 60%, transparent 0%);
  background-size: 2px 14px;
  background-repeat: repeat-y;
  background-position: left;
}

/* ---- Toast ---- */
#toast-stack {
  position: fixed; z-index: 3000; right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  max-width: 92vw;
}
.toast {
  background: var(--de-forest-deep); color: var(--de-white);
  padding: 13px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.25s ease;
  max-width: 340px;
}
.toast.success { background: var(--de-forest); }
.toast.error { background: var(--de-red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 61, 43, 0.45);
  z-index: 2500; display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--de-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-width: 460px; width: 100%; padding: 26px; max-height: 88vh; overflow-y: auto;
  animation: modal-in 0.2s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-box h3 { margin-bottom: 6px; }
.modal-close { position: absolute; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--de-white);
  border-bottom: 1px solid var(--de-border);
  height: var(--header-h);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--de-forest);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--de-forest-deep); line-height: 1.1; }
.brand-tagline { font-size: 10.5px; color: var(--de-soil); font-weight: 600; letter-spacing: 0.2px; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a {
  padding: 9px 13px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--de-ink);
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover, .main-nav a.active { background: var(--de-cream-deep); color: var(--de-forest); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--de-cream-deep); color: var(--de-forest); border: none; cursor: pointer; position: relative;
  transition: background 0.15s;
  text-decoration: none;
}
.icon-btn:hover { background: var(--de-border); }
.cart-count {
  position: absolute; top: -4px; right: -4px; background: var(--de-marigold); color: var(--de-forest-deep);
  font-size: 10.5px; font-weight: 800; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-data);
  border: 2px solid var(--de-white);
}
.loc-pill {
  display: flex; align-items: center; gap: 6px; background: var(--de-cream-deep);
  border: none; border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; color: var(--de-forest-deep);
  cursor: pointer; max-width: 190px;
}
.loc-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}

/* Mobile drawer nav */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 1500; display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer .drawer-backdrop { position: absolute; inset: 0; background: rgba(20,61,43,0.4); }
.mobile-drawer .drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 82%; max-width: 320px;
  background: var(--de-white); box-shadow: var(--shadow-lg); padding: 22px; overflow-y: auto;
  animation: drawer-in 0.2s ease;
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.mobile-drawer nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.mobile-drawer nav a { padding: 12px 10px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.mobile-drawer nav a:hover { background: var(--de-cream-deep); }

/* ---- Sticky mobile bottom nav (customer-facing pages) ---- */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  background: var(--de-white); border-top: 1px solid var(--de-border);
  box-shadow: 0 -2px 14px rgba(20,61,43,0.10);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav .bn-row { display: flex; justify-content: space-around; }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px;
  font-size: 10.5px; font-weight: 600; color: var(--de-ink-soft); border-radius: 10px; position: relative;
}
.bottom-nav a.active { color: var(--de-forest); }
@media (max-width: 980px) {
  .bottom-nav { display: block; }
  body.has-bottom-nav { padding-bottom: 66px; }
}

/* ---- Footer ---- */
.site-footer { background: var(--de-forest-deep); color: #DCE6DF; margin-top: 60px; }
.site-footer .container { padding: 48px 20px 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: var(--de-white); font-size: 14px; margin-bottom: 14px; }
.footer-grid a { display: block; padding: 5px 0; font-size: 13.5px; color: #B9C7BD; }
.footer-grid a:hover { color: var(--de-marigold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 32px; padding-top: 18px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: #93A296;
}
.social-row { display: flex; gap: 10px; }
.social-row a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.social-row a:hover { background: var(--de-marigold); color: var(--de-forest-deep); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Floating WhatsApp button ---- */
.wa-float {
  position: fixed; right: 18px; bottom: 84px; z-index: 980;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 6px 18px rgba(37,211,102,0.45);
  transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
@media (min-width: 981px) {
  .wa-float { bottom: 26px; }
}
body.has-bottom-nav .wa-float { bottom: 84px; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-soil { color: var(--de-soil); }
.text-soft { color: var(--de-ink-soft); }
.text-marigold { color: var(--de-marigold-deep); }
.font-data { font-family: var(--font-data); }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.section { padding: 56px 0; }
.section-head { margin-bottom: 28px; }
.eyebrow {
  display: inline-block; font-family: var(--font-data); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--de-soil);
  background: #F0E2D2; padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}
.empty-state { text-align: center; padding: 50px 20px; color: var(--de-ink-soft); }
.empty-state svg { margin-bottom: 14px; opacity: 0.6; }
.skeleton { background: linear-gradient(90deg, var(--de-cream-deep) 25%, #EFE4CC 37%, var(--de-cream-deep) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
