/* =========================================================
   FoodMitra — Global Design System
   One consistent stylesheet powering every page.
   ========================================================= */

:root {
  --primary: #E11D2E;
  --primary-dark: #A8121F;
  --primary-light: #FFECED;
  --accent: #FF8C00;
  --accent-dark: #E07600;
  --success: #1E8E5A;
  --dark: #14141F;
  --dark-2: #1E1E2C;
  --text: #26272B;
  --text-light: #6B7280;
  --bg: #F7F7FA;
  --bg-alt: #FFF6F1;
  --white: #FFFFFF;
  --border: #E7E7EE;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(20, 20, 31, 0.06);
  --shadow: 0 12px 30px rgba(20, 20, 31, 0.09);
  --shadow-lg: 0 24px 60px rgba(20, 20, 31, 0.16);

  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --nav-height: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}

p { color: var(--text-light); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(225, 29, 46, 0.28);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(225, 29, 46, 0.36); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.7);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-3px); }

.btn-dark {
  background: var(--dark);
  color: var(--white);
}
.btn-dark:hover { background: var(--dark-2); transform: translateY(-3px); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(20, 20, 31, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.2px;
}

.nav-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }

.nav-links a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
}

.nav-check { display: none; }
.nav-toggle { display: none; font-size: 1.5rem; color: var(--white); cursor: pointer; }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    flex-direction: column;
    justify-content: center;
    top: var(--nav-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: var(--dark);
    transition: left 0.35s ease;
    gap: 6px;
  }
  .nav-links a { font-size: 1.05rem; width: 220px; text-align: center; }
  .nav-check:checked ~ .nav-links { left: 0; }
}

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  color: var(--white);
  text-align: center;
  padding: 150px 24px 110px;
  background:
    linear-gradient(135deg, rgba(20,20,31,0.92), rgba(161,18,31,0.88)),
    radial-gradient(circle at 20% 20%, rgba(255,140,0,0.35), transparent 45%);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 16px; color: var(--white); }
.hero h3 { font-size: 1.25rem; font-weight: 500; margin-bottom: 18px; color: rgba(255,255,255,0.9); }
.hero p { font-size: 1.08rem; color: rgba(255,255,255,0.82); max-width: 620px; margin: 0 auto 34px; }

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page Header (inner pages) ---------- */
.page-hero {
  position: relative;
  color: var(--white);
  text-align: center;
  padding: 130px 24px 70px;
  background:
    linear-gradient(135deg, rgba(20,20,31,0.94), rgba(161,18,31,0.9)),
    radial-gradient(circle at 80% 30%, rgba(255,140,0,0.3), transparent 45%);
}

.page-hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--white); margin-bottom: 12px; }
.page-hero p { max-width: 620px; margin: 0 auto; color: rgba(255,255,255,0.82); font-size: 1.05rem; }

/* ---------- Sections ---------- */
.section { padding: 80px 24px; }
.section-alt { background: var(--white); }
.section-tint { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 12px; }
.section-head p { font-size: 1.03rem; }

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  gap: 26px;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }

.card-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-light), #FFF3E0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
}

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { font-size: 0.96rem; margin: 0; }

/* ---------- Forms ---------- */
.form-shell {
  padding: 130px 20px 80px;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(20,20,31,0.94), rgba(161,18,31,0.86)),
    radial-gradient(circle at 15% 15%, rgba(255,140,0,0.25), transparent 45%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.form-card {
  background: var(--white);
  width: 100%;
  max-width: 620px;
  border-radius: var(--radius-lg);
  padding: 46px 42px;
  box-shadow: var(--shadow-lg);
}

.form-card h2 {
  text-align: center;
  color: var(--primary);
  font-size: 1.6rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.form-card .form-subtitle {
  text-align: center;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

textarea { resize: vertical; }

.form-card .btn { margin-top: 26px; }

.back-link {
  display: block;
  text-align: center;
  margin-top: 22px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
}
.back-link:hover { text-decoration: underline; }

/* ---------- Tables ---------- */
.table-wrap {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Let wide tables scroll horizontally on small screens instead of
   squashing/clipping their columns. */
@media (max-width: 700px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 560px; }
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 15px 18px;
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

tbody tr:nth-child(even) { background: var(--bg); }
tbody tr:hover { background: var(--primary-light); }
td, th { border-bottom: 1px solid var(--border); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state a { color: var(--primary); font-weight: 600; }

/* ---------- Listing / Product Cards ---------- */
.listing-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.listing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }

.listing-image { width: 100%; height: 190px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.listing-image img { width: 100%; height: 100%; object-fit: contain; }

.listing-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.listing-title { font-size: 1.1rem; margin-bottom: 8px; color: var(--dark); }
.listing-meta { font-size: 0.88rem; color: var(--text-light); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.listing-meta i { color: var(--primary); width: 14px; }
.listing-body .btn { margin-top: auto; padding-top: 14px; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-success { background: #E4F6EC; color: var(--success); }
.badge-muted { background: #EDEDF2; color: var(--text-light); }

/* ---------- Confirmation / Result cards ---------- */
.result-shell {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background:
    linear-gradient(135deg, rgba(20,20,31,0.94), rgba(161,18,31,0.86)),
    radial-gradient(circle at 85% 20%, rgba(255,140,0,0.25), transparent 45%);
}

.result-card {
  background: var(--white);
  max-width: 520px;
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 46px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.result-icon {
  width: 76px; height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #E4F6EC;
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}

.result-card h1, .result-card h2 { color: var(--dark); margin-bottom: 12px; }
.result-card p { margin: 6px 0; }

.result-details {
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 22px 0;
}
.result-details p { color: var(--text); margin: 6px 0; font-size: 0.95rem; }
.result-details span, .result-details strong { color: var(--dark); font-weight: 700; }

.result-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Serviceable areas / info blocks ---------- */
.info-strip {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-strip i { color: var(--accent); }

/* ---------- Leaderboard progress bars ---------- */
.progress-row { margin: 18px 0; text-align: left; }
.progress-row .label-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.progress-track { background: var(--border); border-radius: 20px; overflow: hidden; height: 18px; }
.progress-fill { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; color: var(--white); font-size: 0.72rem; font-weight: 700; border-radius: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.75); }

.footer-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 800; color: var(--white);
  margin-bottom: 14px;
}
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.92rem; max-width: 320px; }

.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}
.footer-social a:hover { background: var(--primary); transform: translateY(-3px); }

.footer-links h4, .footer-contact h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 18px;
}
.footer-links a { display: block; margin-bottom: 11px; font-size: 0.92rem; color: rgba(255,255,255,0.65); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--white); }

.footer-contact p { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: rgba(255,255,255,0.65); margin-bottom: 12px; }
.footer-contact i { color: var(--accent); margin-top: 3px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom span { color: var(--primary); font-weight: 600; }

@media (max-width: 860px) {
  .footer-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .footer-container { grid-template-columns: 1fr; }
}

/* ---------- Floating Chat Widget ---------- */
.chat-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(225, 29, 46, 0.4);
  z-index: 1100;
  transition: transform 0.25s ease;
}
.chat-fab:hover { transform: scale(1.08); }

.chat-window {
  position: fixed;
  bottom: 96px; right: 24px;
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 460px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1100;
}
.chat-window.open { display: flex; }

.chat-window-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-window-header button { background: none; border: none; color: var(--white); font-size: 1rem; cursor: pointer; }

.chat-window-body { flex: 1; padding: 14px; overflow-y: auto; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }

.chat-message { padding: 9px 13px; border-radius: 12px; max-width: 82%; font-size: 0.88rem; line-height: 1.4; white-space: pre-line; }
.chat-message.user { align-self: flex-end; background: var(--primary); color: var(--white); border-bottom-right-radius: 3px; }
.chat-message.bot { align-self: flex-start; background: var(--white); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 3px; }

.chat-window-input { display: flex; border-top: 1px solid var(--border); }
.chat-window-input input { flex: 1; border: none; border-radius: 0; padding: 12px 14px; font-size: 0.9rem; }
.chat-window-input input:focus { box-shadow: none; }
.chat-window-input button { border: none; background: var(--primary); color: var(--white); padding: 0 18px; cursor: pointer; }
.chat-window-input button:hover { background: var(--primary-dark); }

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  display: none;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  z-index: 1090;
  transition: transform 0.2s ease;
}
.scroll-top.show { display: flex; }
.scroll-top:hover { transform: translateY(-4px); }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 40px; }
.divider-icon { color: var(--primary); font-size: 1.8rem; margin-bottom: 8px; }

@media (max-width: 640px) {
  .form-card { padding: 34px 24px; }
  .hero { padding: 130px 20px 80px; }
  .page-hero { padding: 110px 20px 56px; }
}

/* =========================================================
   Admin Auth / Alerts / Small UI helpers
   ========================================================= */
.form-error {
  background: #FDECEC;
  border: 1px solid #F5B5B5;
  color: #A8121F;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-success {
  background: #E4F6EC;
  border: 1px solid #A9E2C1;
  color: #1E6B41;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 18px 0;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.form-divider span { padding: 0 12px; }

.badge-warning { background: #FFF4DE; color: #9A6700; }
.badge-danger { background: #FDECEC; color: #A8121F; }
.badge-info { background: #E7F1FF; color: #1E4FA8; }

.listing-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.listing-type-free { background: #E4F6EC; color: var(--success); }
.listing-type-paid { background: #FFF4DE; color: #9A6700; }

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.form-switch { text-align: center; margin-top: 18px; font-size: 0.92rem; color: var(--text-light); }
.form-switch a { color: var(--primary); font-weight: 600; }

.btn-ghost {
  background: var(--white);
  color: var(--dark);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); transform: translateY(-2px); }

.nav-admin-link { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Pincode search on Listings ---------- */
.page-hero-compact { padding: 120px 24px 50px; }

.listings-search-bar { padding-top: 34px; padding-bottom: 6px; }

.pincode-search {
  display: flex;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.pincode-search-field {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
}
.pincode-search-field i { color: var(--primary); }
.pincode-search-field input {
  border: none;
  background: transparent;
  padding: 13px 0;
  box-shadow: none !important;
}
.pincode-search-field input:focus { outline: none; }

.search-result-note {
  text-align: center;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--text-light);
}

/* ---------- Listing quantity + sold out state ---------- */
.listing-image { position: relative; }
.listing-badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.18); }

.listing-card-sold-out { opacity: 0.7; }
.listing-card-sold-out .listing-image img { filter: grayscale(45%); }

.quantity-indicator { margin: 12px 0 6px; }
.quantity-track { background: var(--border); border-radius: 20px; height: 6px; overflow: hidden; margin-bottom: 6px; }
.quantity-fill { height: 100%; background: linear-gradient(90deg, var(--success), #2FAE73); border-radius: 20px; }
.quantity-label { font-size: 0.8rem; color: var(--text-light); font-weight: 600; }

/* =========================================================
   Admin Panel Layout
   ========================================================= */
.admin-body { padding-top: 0; background: var(--bg); }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--dark);
  color: rgba(255,255,255,0.85);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.admin-sidebar-tag {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 30px;
  padding-left: 50px;
}

.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-nav a i { width: 18px; text-align: center; }
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.admin-nav a.active { background: var(--primary); color: var(--white); }

.admin-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.admin-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.admin-sidebar-user { display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; }
.admin-sidebar-user strong { color: var(--white); }
.admin-logout-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.admin-logout-btn:hover { color: var(--primary); }

.admin-main { flex: 1; padding: 32px 36px 60px; min-width: 0; }

.admin-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.admin-topbar h1 { font-size: 1.5rem; margin-bottom: 4px; }
.admin-topbar p { font-size: 0.92rem; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}
.admin-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.admin-stat-icon-success { background: #E4F6EC; color: var(--success); }
.admin-stat-icon-muted { background: #EDEDF2; color: var(--text-light); }
.admin-stat-value { display: block; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.admin-stat-label { display: block; font-size: 0.82rem; color: var(--text-light); }

.admin-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 26px;
}
.admin-panel-head { margin-bottom: 16px; }
.admin-panel-head h2 { font-size: 1.1rem; }

.admin-table-wrap { border: none; box-shadow: none; }
.admin-table-item { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.admin-table-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }

.admin-table-actions { display: flex; gap: 8px; }
.admin-icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
}
.admin-icon-btn:hover { background: var(--primary-light); color: var(--primary); }
.admin-icon-btn-danger:hover { background: #FDECEC; color: var(--primary-dark); }

.admin-form-panel { max-width: 900px; }
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
}
.admin-current-image { width: 100%; max-width: 220px; border-radius: var(--radius-sm); margin-top: 12px; object-fit: cover; }

@media (max-width: 900px) {
  .admin-sidebar { position: fixed; left: -280px; z-index: 1200; transition: left 0.3s ease; }
  .admin-main { padding: 24px 18px 50px; }
  .admin-form-grid { grid-template-columns: 1fr; }
}

/* ---------- Admin mobile sidebar toggle ---------- */
.admin-nav-check { display: none; }
.admin-nav-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 1300;
  width: 42px; height: 42px;
  background: var(--dark);
  color: var(--white);
  border-radius: 8px;
  align-items: center; justify-content: center;
  cursor: pointer;
}

@media (max-width: 900px) {
  .admin-nav-toggle { display: flex; }
  .admin-nav-check:checked ~ .admin-sidebar { left: 0; }
  .admin-main { padding-top: 76px; }
}

/* =========================================================
   Extra small-screen polish (phones, ~480px and below)
   ========================================================= */
@media (max-width: 480px) {
  .hero { padding: 116px 16px 64px; }
  .page-hero, .page-hero-compact { padding: 100px 16px 44px; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; text-align: center; justify-content: center; }

  .form-card { padding: 26px 18px; }
  .form-shell { padding: 0 12px; }

  .admin-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .admin-topbar { flex-direction: column; align-items: stretch; }
  .admin-topbar > div[style] { width: 100%; }

  th, td { padding: 11px 12px; font-size: 0.85rem; }

  .chat-window { width: calc(100vw - 24px); right: 12px; height: 70vh; max-height: 480px; }
  .chat-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; font-size: 1.3rem; }
  .scroll-top { left: 16px; bottom: 16px; }

  .pincode-search { flex-direction: column; }
  .pincode-search-field { min-width: 0; }
}

/* Fluid tap targets & no horizontal scroll on any phone width */
@media (max-width: 380px) {
  .admin-stats { grid-template-columns: 1fr; }
  .nav-logo { font-size: 1.05rem; }
}
