/* ===========================
   DABBMAP — DESIGN SYSTEM
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,700&family=DM+Sans:wght@400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  /* Colors */
  --primary:        #C8771A;
  --primary-dark:   #A05E10;
  --primary-light:  #F5A623;
  --primary-pale:   #FEF3E2;
  --secondary:      #4A7C59;
  --secondary-light:#6DAF82;
  --secondary-pale: #E8F5EC;
  --bg:             #FDF8F0;
  --card-bg:        #FFFFFF;
  --text:           #2C1810;
  --text-muted:     #7C6B5A;
  --border:         #E8DDD0;
  --border-dark:    #C9B8A8;
  --whatsapp:       #25D366;
  --error:          #DC2626;
  --success:        #16A34A;

  /* Shadows */
  --shadow-card:     0px 2px 16px rgba(44, 24, 16, 0.08);
  --shadow-elevated: 0px 8px 40px rgba(44, 24, 16, 0.14);

  /* Radius */
  --radius-card:    16px;
  --radius-btn:     10px;
  --radius-pill:    100px;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing (8px grid) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); }
ul { list-style: none; }

/* ── Typography ── */
.t-h1 { font-family: var(--font-display); font-size: 52px; font-weight: 800; line-height: 1.15; }
.t-h2 { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.2; }
.t-h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.3; }
.t-body-lg { font-size: 18px; font-weight: 400; }
.t-body   { font-size: 16px; font-weight: 400; }
.t-body-sm{ font-size: 14px; font-weight: 400; }
.t-label  { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.t-caption{ font-size: 12px; font-weight: 400; }
.t-price  { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--primary); }
.t-muted  { color: var(--text-muted); }
.t-primary{ color: var(--primary); }
.t-italic { font-style: italic; }

/* ── Layout ── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 var(--sp-6); }
.section    { padding: var(--sp-20) 0; }
.section-sm { padding: var(--sp-12) 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 600; border-radius: var(--radius-pill);
  transition: all 0.2s ease; white-space: nowrap; cursor: pointer; border: 2px solid transparent;
  min-height: 44px; padding: 0 var(--sp-6);
}
.btn-sm  { min-height: 32px; padding: 0 var(--sp-4); font-size: 13px; }
.btn-lg  { min-height: 52px; padding: 0 var(--sp-8); font-size: 17px; }

.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover  { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent; color: var(--primary); border-color: var(--primary);
}
.btn-secondary:hover  { background: var(--primary-pale); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }

.btn-whatsapp {
  background: var(--whatsapp); color: #fff;
}
.btn-whatsapp:hover  { background: #1EBE57; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.3); }
.btn-whatsapp svg    { width: 20px; height: 20px; fill: #fff; flex-shrink: 0; }

.btn-ghost {
  background: transparent; color: var(--text-muted); border-color: transparent;
}
.btn-ghost:hover { color: var(--primary); background: var(--primary-pale); }

.btn-danger {
  background: var(--error); color: #fff;
}
.btn-danger:hover { background: #B91C1C; transform: translateY(-1px); }

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; }

.form-input, .form-textarea, .form-select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-btn);
  font-family: var(--font-body); font-size: 15px; color: var(--text); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200, 119, 26, 0.12);
}
.form-input.error, .form-textarea.error { border-color: var(--error); }
.form-input:disabled, .form-textarea:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select   { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237C6B5A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer; }

.form-input-prefix {
  position: relative;
}
.form-input-prefix .prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-weight: 500; pointer-events: none;
}
.form-input-prefix .form-input { padding-left: 28px; }

.search-bar {
  display: flex; align-items: center; background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius-pill); padding: 6px 6px 6px 16px; gap: var(--sp-3);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar:focus-within {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200,119,26,0.12);
}
.search-bar input {
  flex: 1; border: none; outline: none; font-size: 16px; color: var(--text);
  background: transparent; font-family: var(--font-body);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon { color: var(--text-muted); font-size: 18px; flex-shrink: 0; }

.char-count { font-size: 12px; color: var(--text-muted); text-align: right; }

/* ── Checkbox Pill ── */
.checkbox-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s;
  background: #fff; color: var(--text-muted); user-select: none;
}
.checkbox-pill:hover   { border-color: var(--primary); color: var(--primary); background: var(--primary-pale); }
.checkbox-pill.active  { border-color: var(--primary); color: var(--primary); background: var(--primary-pale); }
.checkbox-pill input   { display: none; }
.checkbox-pills-row    { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600;
}
.badge-veg     { background: #dcfce7; color: #16a34a; }
.badge-nonveg  { background: #fee2e2; color: #dc2626; }
.badge-jain    { background: #ede9fe; color: #7c3aed; }
.badge-diet    { background: #e0f2fe; color: #0284c7; }
.badge-cuisine { background: var(--primary-pale); color: var(--primary-dark); }
.badge-meal    { background: var(--secondary-pale); color: var(--secondary); }
.badge-pick    { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; }
.badge-trial   { background: #fef9c3; color: #92400e; }
.badge-stale   { background: #fef3c7; color: #b45309; }
.badge-dot::before { content: '●'; font-size: 8px; }

.tags-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ── Cards ── */
.card {
  background: var(--card-bg); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); border: 1px solid var(--border); overflow: hidden;
}
.card-hover {
  transition: box-shadow 0.2s, transform 0.2s, border-top-color 0.2s;
  border-top: 3px solid transparent;
}
.card-hover:hover {
  box-shadow: var(--shadow-elevated); transform: translateY(-3px);
  border-top-color: var(--primary);
}
.card-body { padding: var(--sp-6); }
.card-body-sm { padding: var(--sp-4); }

/* Dabba Card */
.dabba-card { display: flex; flex-direction: column; gap: var(--sp-4); }
.dabba-card-header { display: flex; align-items: center; gap: var(--sp-3); }
.dabba-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 18px;
  flex-shrink: 0; font-family: var(--font-display);
}
.dabba-avatar-lg {
  width: 64px; height: 64px; font-size: 24px;
}
.dabba-name   { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.dabba-area   { font-size: 13px; color: var(--text-muted); }
.dabba-price  { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--primary); }
.dabba-desc   { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.dabba-footer { display: flex; justify-content: space-between; align-items: center; padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.dabba-date   { font-size: 12px; color: var(--text-muted); }

/* Stat Card */
.stat-card { text-align: center; padding: var(--sp-6); }
.stat-card .number { font-family: var(--font-display); font-size: 40px; font-weight: 800; color: var(--primary); }
.stat-card .label  { font-size: 13px; color: var(--text-muted); margin-top: var(--sp-1); }

/* How-it-works Card */
.hiw-card { text-align: center; padding: var(--sp-8) var(--sp-6); }
.hiw-card .icon { font-size: 40px; margin-bottom: var(--sp-4); }
.hiw-card h3    { margin-bottom: var(--sp-2); }
.hiw-card p     { font-size: 15px; color: var(--text-muted); }

/* ── Step Progress ── */
.step-progress {
  display: flex; align-items: center; justify-content: center; gap: 0; padding: var(--sp-8) 0;
}
.step-item { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); position: relative; }
.step-dot {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  background: #fff; color: var(--text-muted); transition: all 0.2s; z-index: 1;
}
.step-dot.current  { border-color: var(--primary); background: var(--primary); color: #fff; }
.step-dot.complete { border-color: var(--secondary); background: var(--secondary); color: #fff; }
.step-line { width: 80px; height: 2px; background: var(--border); margin: 0 -2px; margin-bottom: 24px; }
.step-line.complete { background: var(--secondary); }
.step-label { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.step-label.current { color: var(--primary); }
.step-label.complete { color: var(--secondary); }

/* ── Map Pin ── */
.map-pin {
  width: 36px; height: 44px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.map-pin .inner { transform: rotate(45deg); font-size: 16px; }
.map-pin-veg    { background: var(--secondary); }
.map-pin-nonveg { background: var(--error); }
.map-pin-jain   { background: #7c3aed; }

/* ── Misc ── */
.divider { height: 1px; background: var(--border); margin: var(--sp-6) 0; }
.divider-v { width: 1px; background: var(--border); align-self: stretch; }

.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 12px 24px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500; z-index: 9999; white-space: nowrap;
  animation: toastIn 0.25s ease, toastOut 0.25s ease 2.5s forwards;
}
@keyframes toastIn  { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

.empty-state { text-align: center; padding: var(--sp-16) var(--sp-6); }
.empty-state .emoji { font-size: 56px; margin-bottom: var(--sp-4); }
.empty-state h3     { margin-bottom: var(--sp-2); }
.empty-state p      { color: var(--text-muted); margin-bottom: var(--sp-6); }

.stale-bar {
  background: #fef3c7; color: #b45309; padding: var(--sp-3) var(--sp-4);
  font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: var(--sp-2);
  border-bottom: 1px solid #fde68a;
}

.secret-url-block {
  background: var(--primary-pale); border-radius: var(--radius-btn);
  border: 1px dashed var(--primary); padding: var(--sp-4);
}
.secret-url-block .url-text {
  font-family: 'Courier New', monospace; font-size: 13px; color: var(--primary-dark);
  word-break: break-all; margin-bottom: var(--sp-3);
}

.whatsapp-box {
  background: #e7f7ef; border-radius: var(--radius-btn);
  border: 1px solid #b7e4c7; padding: var(--sp-4);
}
.whatsapp-box p { font-size: 14px; color: #1a5c35; line-height: 1.6; }

.anon-box {
  background: var(--card-bg); border-radius: var(--radius-card);
  border: 1px solid var(--border); padding: var(--sp-6);
  box-shadow: var(--shadow-card);
}

.privacy-box {
  background: var(--secondary-pale); border-radius: var(--radius-btn);
  border: 1px solid var(--secondary-light); padding: var(--sp-4);
}
.privacy-box p { font-size: 14px; color: var(--secondary); }

.tip-box {
  background: #fef9c3; border-radius: var(--radius-btn);
  border: 1px solid #fde68a; padding: var(--sp-4);
}
.tip-box p { font-size: 14px; color: #92400e; }

.info-box {
  background: var(--primary-pale); border-radius: var(--radius-btn);
  border: 1px solid var(--primary-light); padding: var(--sp-4);
}
.info-box p { font-size: 14px; color: var(--primary-dark); }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

/* ── Flex helpers ── */
.flex    { display: flex; }
.flex-col{ display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* ── Spacing helpers ── */
.mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); } .mt-10{ margin-top: var(--sp-10); } .mt-12{ margin-top: var(--sp-12); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

/* ── Tabs ── */
.tab-nav { display: flex; border-bottom: 2px solid var(--border); gap: 0; }
.tab-btn {
  padding: 12px 24px; font-size: 15px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s;
  cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font-body);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Message Thread ── */
.message-thread { display: flex; flex-direction: column; gap: var(--sp-4); }
.message-item { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.message-item.unread { border-color: var(--primary); background: var(--primary-pale); }
.message-bubble { padding: var(--sp-4); }
.message-bubble.customer { background: #f4f4f5; border-radius: 12px 12px 12px 4px; }
.message-bubble.provider { background: var(--secondary-pale); border-radius: 12px 12px 4px 12px; }
.message-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: var(--sp-1); }
.message-reply-area { padding: var(--sp-4); border-top: 1px solid var(--border); display: flex; gap: var(--sp-2); }
.message-reply-area textarea { flex: 1; }

/* ── Page-specific hero patterns ── */
.hero-gradient {
  background: linear-gradient(135deg, #FFF8ED 0%, #F5ECD7 100%);
  position: relative; overflow: hidden;
}
.hero-gradient::before {
  content: ''; position: absolute; top: -120px; right: -120px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .t-h1 { font-size: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--sp-4); }
  .section    { padding: var(--sp-12) 0; }
  .t-h1 { font-size: 32px; }
  .t-h2 { font-size: 26px; }
  .t-price { font-size: 24px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .step-line { width: 40px; }
  .tab-btn { padding: 10px 16px; font-size: 14px; }
}

@media (max-width: 480px) {
  .btn-lg { min-height: 48px; font-size: 16px; padding: 0 var(--sp-6); }
}
