﻿/* ═══════════════════════════════════════════════
   chai pe charcha · hyd cafes — style.css
   Palette: cream / terracotta / sage / ink
═══════════════════════════════════════════════ */

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

:root {
  --cream:      #FAF7F2;
  --cream-dark: #F2EDE6;
  --white:      #FFFFFF;
  --terra:      #E8622A;
  --terra-soft: #FAEDE6;
  --terra-dark: #C94E1D;
  --sage:       #5C7A5B;
  --sage-soft:  #DCE9DB;
  --ink:        #1A1A1A;
  --ink-2:      #3D3D3D;
  --ink-muted:  #7A7A7A;
  --border:     #E0DAD3;
  --nav-h: 60px;
  --filter-h: 0px; /* set by JS */
  --panel-w: 430px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 0 var(--border), 0 0 0 1px var(--border);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ════════════════════════════════
   NAVBAR
════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--cream);
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 1000;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-emoji { font-size: 22px; line-height: 1; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.brand-sub {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--terra);
}

.search-wrap {
  flex: 1;
  position: relative;
  max-width: 380px;
}
.search-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}
.search-input {
  width: 100%;
  padding: 10px 36px 10px 40px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.search-input::placeholder { color: var(--ink-muted); }
.search-input:focus { border-color: var(--terra); }

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-muted);
  display: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.search-clear:hover { color: var(--terra); }
.search-clear.visible { display: block; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 2000;
  padding: 6px;
}
.search-dropdown.open { display: block; }

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
}
.search-result:hover { background: var(--cream); }
.sr-icon { font-size: 18px; flex-shrink: 0; }
.sr-name { font-weight: 500; font-size: 14px; color: var(--ink); }
.sr-area { font-size: 12px; color: var(--ink-muted); }
.sr-empty { padding: 16px 12px; font-size: 13px; color: var(--ink-muted); text-align: center; }

.nav-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ════════════════════════════════
   FILTER BAR
════════════════════════════════ */
.filter-bar {
  position: fixed;
  left: 0; right: 0;
  top: var(--nav-h);
  background: var(--cream);
  border-bottom: 1.5px solid var(--border);
  z-index: 999;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chips-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.chips-row::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  user-select: none;
}
.chip:hover { border-color: var(--terra); color: var(--terra); background: var(--terra-soft); }
.chip.active { background: var(--terra); border-color: var(--terra); color: var(--white); }
.chip.vibe-chip.active { background: var(--sage); border-color: var(--sage); color: var(--white); }
.chip.vibe-chip.active:hover { background: var(--sage); }

/* ════════════════════════════════
   MAP
════════════════════════════════ */
#map {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  /* top is set by JS */
  z-index: 1;
}

/* Override Leaflet zoom */
.leaflet-control-zoom {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}
.leaflet-control-zoom a {
  font-family: 'Syne', sans-serif !important;
  color: var(--ink) !important;
  background: var(--white) !important;
  border-color: var(--border) !important;
  font-size: 16px !important;
  line-height: 28px !important;
  width: 28px !important;
  height: 28px !important;
}
.leaflet-control-zoom a:hover { background: var(--cream-dark) !important; }
.leaflet-control-attribution { font-size: 10px !important; }

/* Custom cluster markers */
.cafe-cluster-outer {
  background: rgba(232, 98, 42, 0.18);
  border: 2px solid var(--terra);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cafe-cluster-inner {
  background: var(--terra);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  width: 32px;
  height: 32px;
}

/* ════════════════════════════════
   CAFE PANEL
════════════════════════════════ */
.card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.35);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}
.card-overlay.active { opacity: 1; pointer-events: all; }

.cafe-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--panel-w);
  background: var(--cream);
  border-left: 1.5px solid var(--border);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.cafe-panel.open { transform: translateX(0); }

.panel-drag-handle { display: none; }

.panel-header {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px 0;
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 5;
}
.close-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.15s;
  flex-shrink: 0;
}
.close-btn:hover { border-color: var(--terra); color: var(--terra); }

.panel-body {
  overflow-y: auto;
  flex: 1;
  padding: 0 0 48px;
}

/* Photo gallery */
.cafe-gallery {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: var(--cream-dark);
  flex-shrink: 0;
}
.cafe-gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-photos {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.gallery-photos::-webkit-scrollbar { display: none; }
.gallery-photos img {
  flex-shrink: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--terra-soft) 0%, var(--sage-soft) 100%);
  gap: 10px;
}
.gallery-placeholder .placeholder-emoji { font-size: 52px; }
.gallery-placeholder .placeholder-text {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.gallery-add-btn {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(255,255,255,0.92);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gallery-add-btn:hover { background: var(--white); border-color: var(--terra); color: var(--terra); }
.gallery-add-btn input { display: none; }

/* Cafe info block */
.cafe-info {
  padding: 20px 24px 0;
}

.cafe-area-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--terra);
  background: var(--terra-soft);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.cafe-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 12px;
}

.cafe-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.meta-score {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
}
.meta-score .stars { color: var(--terra); letter-spacing: -1px; font-size: 15px; }
.meta-price, .meta-time {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 400;
}

.vibe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.vibe-tag {
  padding: 4px 12px;
  background: var(--sage-soft);
  color: var(--sage);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

/* Gen-Z summary block */
.genz-block {
  background: var(--white);
  border-left: 3.5px solid var(--terra);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin: 0 24px 24px;
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Divider label */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  margin-bottom: 12px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-muted);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Reddit reviews */
.reviews-list { padding: 0 24px; margin-bottom: 24px; }
.review-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.review-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.review-text::before { content: '"'; }
.review-text::after  { content: '"'; }
.review-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.review-author {
  font-size: 12px;
  font-weight: 500;
  color: var(--terra);
}
.review-upvotes {
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.arrow-up { color: var(--terra); }

/* Action buttons */
.actions-block { padding: 0 24px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 10px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-ride {
  background: var(--terra);
  color: var(--white);
}
.btn-ride:hover { background: var(--terra-dark); }

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-zomato {
  background: var(--white);
  border: 1.5px solid #E23744;
  color: #E23744;
}
.btn-zomato:hover { background: #FFF0F1; }

.btn-swiggy {
  background: var(--white);
  border: 1.5px solid #FC8019;
  color: #FC8019;
}
.btn-swiggy:hover { background: #FFF5EE; }

.btn-secondary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-reddit {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--ink-muted);
  font-size: 13px;
  padding: 11px 16px;
}
.btn-reddit:hover { border-color: #FF4500; color: #FF4500; }

.btn-photo {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--ink-muted);
  font-size: 13px;
  padding: 11px 16px;
  cursor: pointer;
}
.btn-photo:hover { border-color: var(--sage); color: var(--sage); }

/* ════════════════════════════════
   RESULTS PILL
════════════════════════════════ */
.results-pill {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  z-index: 500;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: opacity 0.3s;
  white-space: nowrap;
}

/* ════════════════════════════════
   TOAST
════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: var(--white);
  padding: 11px 20px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════
   MOBILE  (≤ 768px)
════════════════════════════════ */
@media (max-width: 768px) {
  :root { --panel-w: 100%; }

  .nav-count { display: none; }

  .search-wrap { max-width: none; }

  /* Bottom sheet */
  .cafe-panel {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 82vh;
    border-left: none;
    border-top: 1.5px solid var(--border);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .cafe-panel.open { transform: translateY(0); }

  .panel-drag-handle {
    display: block;
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 100px;
    margin: 12px auto 0;
    flex-shrink: 0;
  }

  .panel-header { padding: 8px 16px 0; }
  .panel-body { padding-bottom: 32px; }

  .cafe-gallery { height: 180px; }
  .cafe-info { padding: 16px 18px 0; }
  .cafe-title { font-size: 24px; }
  .genz-block { margin: 0 18px 20px; }
  .section-label { padding: 0 18px; }
  .reviews-list { padding: 0 18px; }
  .actions-block { padding: 0 18px; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 12px; gap: 10px; }
  .brand-text { display: none; }
  .filter-bar { padding: 6px 12px; }
  .cafe-title { font-size: 21px; }

  .results-pill { bottom: 12px; }
  .toast { bottom: 16px; }
}
