/* ─── TIANGUIS MAP (standalone) ─── */

/* ─── TIANGUIS MAP ─── */
.cafeycon-map-section {
  background: var(--warm-black);
  padding: 20px 24px 20px;
  color: var(--cream);
}

.cafeycon-map-container {
  max-width: 100%;
  margin: 0 auto;
}

.cafeycon-map-container .cafeycon-section-label {
  color: var(--gold);
}

.cafeycon-map-container .cafeycon-section-label::after {
  background: var(--gold);
}

/* ── Filter bar ── */
.cafeycon-map-filters {
  background: #252525;
  padding: 16px 20px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

/* Row 1: Search + Near Me + Reset */
.cafeycon-filter-primary {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cafeycon-filter-primary .cafeycon-map-search-wrap {
  flex: 1;
}

/* Row 2: Day buttons + Open Now + Filters btn */
.cafeycon-filter-secondary {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cafeycon-filter-secondary::-webkit-scrollbar {
  display: none;
}

.cafeycon-filter-spacer {
  flex: 1;
  min-width: 8px;
}

/* "Filters" button with badge */
.cafeycon-more-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(245, 240, 235, 0.2);
  background: transparent;
  color: rgba(245, 240, 235, 0.6);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.cafeycon-more-filters-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cafeycon-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--gold);
  color: var(--warm-black);
  font-size: 0.55rem;
  font-weight: 700;
  border-radius: 8px;
  line-height: 1;
}

/* More Filters Popover */
.cafeycon-more-filters-popover {
  display: none;
  position: absolute;
  top: 100%;
  right: 20px;
  z-index: 50;
  background: #2a2a2a;
  border: 1px solid rgba(201, 169, 110, 0.2);
  padding: 16px 20px;
  min-width: 280px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.cafeycon-more-filters-popover.open {
  display: block;
}

.cafeycon-popover-section {
  padding: 10px 0;
  border-bottom: 1px solid rgba(245, 240, 235, 0.08);
}

.cafeycon-popover-section:last-child {
  border-bottom: none;
}

.cafeycon-popover-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.cafeycon-popover-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cafeycon-popover-backdrop {
  display: none;
}

/* Legacy row (kept for day buttons outside popover) */
.cafeycon-map-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cafeycon-day-filter-btn,
.cafeycon-cat-filter-btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(245, 240, 235, 0.2);
  background: transparent;
  color: rgba(245, 240, 235, 0.6);
  cursor: pointer;
  transition: all 0.2s;
}

.cafeycon-day-filter-btn:hover,
.cafeycon-cat-filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cafeycon-day-filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--warm-black);
}

.cafeycon-cat-filter-btn.active {
  background: var(--cat-color, var(--gold));
  border-color: var(--cat-color, var(--gold));
  color: var(--cream);
}

.cafeycon-cat-filter-btn[data-category="Vintage"].active {
  color: var(--cream);
}

/* ── Map + list grid ── */
.cafeycon-map-inner {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 0;
  align-items: stretch;
}

.cafeycon-map-sidebar {
  background: #1e1e1e;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(245, 240, 235, 0.08);
  max-height: calc(100vh - 200px);
  overflow: hidden;
}

/* ── Leaflet map container ── */
.cafeycon-leaflet-map {
  height: calc(100vh - 200px);
  min-height: 400px;
  background: #1a1a1a;
  z-index: 1;
}

/* ── Marker reset ── */
.cafeycon-leaflet-marker {
  background: none !important;
  border: none !important;
}

/* ── Leaflet popup overrides ── */
.cafeycon-leaflet-popup .leaflet-popup-content-wrapper {
  background: #252525;
  color: var(--cream);
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(201, 169, 110, 0.2);
}

.cafeycon-leaflet-popup .leaflet-popup-content {
  margin: 0;
  font-family: var(--font-body);
}

.cafeycon-leaflet-popup .leaflet-popup-tip {
  background: #252525;
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-top: none;
  border-left: none;
}

.cafeycon-leaflet-popup .leaflet-popup-close-button {
  color: #F5F0EB !important;
  font-size: 16px !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
  text-align: center !important;
  padding: 0 !important;
  top: 6px !important;
  right: 6px !important;
  background: rgba(26, 26, 26, 0.7) !important;
  border-radius: 50% !important;
  z-index: 10 !important;
}

.cafeycon-leaflet-popup .leaflet-popup-close-button:hover {
  color: var(--gold);
  background: rgba(26, 26, 26, 0.9);
}

/* ── Popup card inner styles ── */
.cafeycon-map-popup {
  padding: 16px 18px;
}

.cafeycon-map-popup-cat {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cafeycon-map-popup-name {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--cream);
  margin-bottom: 4px;
}

.cafeycon-map-popup-hood {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.cafeycon-map-popup-days {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.5);
  margin-bottom: 8px;
}

.cafeycon-map-popup-transit {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(245, 240, 235, 0.45);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.cafeycon-map-popup-transit svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.cafeycon-map-popup-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(245, 240, 235, 0.65);
}

/* ── Leaflet zoom/attribution dark overrides ── */
.cafeycon-map-section .leaflet-control-zoom a {
  background: #252525;
  color: var(--cream);
  border-color: rgba(245, 240, 235, 0.15);
}

.cafeycon-map-section .leaflet-control-zoom a:hover {
  background: #333;
}

.cafeycon-map-section .leaflet-control-attribution {
  background: rgba(26, 26, 26, 0.8) !important;
  color: rgba(245, 240, 235, 0.35);
  font-size: 0.6rem;
}

.cafeycon-map-section .leaflet-control-attribution a {
  color: rgba(201, 169, 110, 0.6);
}

/* ── Count display ── */
.cafeycon-tianguis-count {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

/* ── Tianguis list ── */
.cafeycon-tianguis-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 110, 0.3) transparent;
}

.cafeycon-tianguis-list::-webkit-scrollbar {
  width: 4px;
}

.cafeycon-tianguis-list::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.3);
}

.cafeycon-tianguis-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(245, 240, 235, 0.06);
  font-size: 0.82rem;
  color: rgba(245, 240, 235, 0.7);
  cursor: pointer;
  transition: all 0.2s;
}

.cafeycon-tianguis-list li:hover {
  color: var(--gold);
  padding-left: 14px;
}

.cafeycon-tianguis-list li.active {
  color: var(--gold);
  background: rgba(201, 169, 110, 0.08);
  padding-left: 14px;
}

.cafeycon-tianguis-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}

.cafeycon-tianguis-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cafeycon-tianguis-day {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.4);
  flex-shrink: 0;
  font-family: var(--font-body);
}

.cafeycon-tianguis-transit {
  width: 100%;
  padding-left: 20px;
  font-size: 0.6rem;
  color: rgba(245, 240, 235, 0.35);
  letter-spacing: 0.04em;
  margin-top: -2px;
}

/* ── MarkerCluster overrides ── */
.cafeycon-cluster {
  background: rgba(26, 26, 26, 0.85);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cafeycon-cluster div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cafeycon-cluster span {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  line-height: 1;
}

.cafeycon-cluster-small {
  width: 32px !important;
  height: 32px !important;
  margin-left: -16px !important;
  margin-top: -16px !important;
}

.cafeycon-cluster-small span { font-size: 0.65rem; }

.cafeycon-cluster-medium {
  width: 40px !important;
  height: 40px !important;
  margin-left: -20px !important;
  margin-top: -20px !important;
}

.cafeycon-cluster-medium span { font-size: 0.72rem; }

.cafeycon-cluster-large {
  width: 48px !important;
  height: 48px !important;
  margin-left: -24px !important;
  margin-top: -24px !important;
  border-width: 3px;
}

.cafeycon-cluster-large span { font-size: 0.8rem; }

/* ── Basic popup extras ── */
.cafeycon-map-popup-address {
  font-size: 0.72rem;
  color: rgba(245, 240, 235, 0.55);
  line-height: 1.4;
  margin-bottom: 6px;
}

.cafeycon-map-popup-hours {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(245, 240, 235, 0.45);
  margin-bottom: 4px;
}

.cafeycon-map-popup-alcaldia {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.5);
  margin-top: 6px;
}

/* ── Popover alcaldia + toggle (moved from old third row) ── */

.cafeycon-alcaldia-select {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(245, 240, 235, 0.2);
  background: transparent;
  color: rgba(245, 240, 235, 0.6);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23C9A96E' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.cafeycon-alcaldia-select:hover,
.cafeycon-alcaldia-select:focus {
  border-color: var(--gold);
  color: var(--gold);
  outline: none;
}

.cafeycon-alcaldia-select option {
  background: #252525;
  color: var(--cream);
}

.cafeycon-tier-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.6);
  cursor: pointer;
  user-select: none;
}

.cafeycon-tier-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 18px;
  background: rgba(245, 240, 235, 0.15);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid rgba(245, 240, 235, 0.2);
}

.cafeycon-tier-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: rgba(245, 240, 235, 0.5);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.cafeycon-tier-toggle:checked {
  background: rgba(201, 169, 110, 0.3);
  border-color: var(--gold);
}

.cafeycon-tier-toggle:checked::after {
  transform: translateX(14px);
  background: var(--gold);
}

/* ── Basic list item styles ── */
.cafeycon-list-basic {
  opacity: 0.6;
}

.cafeycon-list-basic .cafeycon-tianguis-name {
  font-size: 0.78rem;
}

.cafeycon-dot-basic {
  width: 6px !important;
  height: 6px !important;
}

.cafeycon-list-basic-summary {
  border-top: 1px solid rgba(245, 240, 235, 0.1);
  margin-top: 4px;
  padding-top: 12px !important;
  opacity: 0.5;
  font-style: italic;
  pointer-events: none;
}

/* ── Map legend (slide-out drawer) ── */
.cafeycon-map-legend {
  background: rgba(26, 26, 26, 0.92);
  border: 1px solid rgba(245, 240, 235, 0.1);
  border-radius: 6px 0 0 6px;
  font-family: var(--font-body);
  color: var(--cream);
  position: absolute;
  right: 0;
  bottom: 30px;
  z-index: 800;
  display: flex;
  align-items: stretch;
  transform: translateX(calc(100% - 32px));
  transition: transform 0.3s ease;
}

.cafeycon-map-legend.cafeycon-legend-expanded {
  transform: translateX(0);
}

.cafeycon-legend-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 32px;
  flex-shrink: 0;
  padding: 8px 6px;
  border-right: 1px solid rgba(245, 240, 235, 0.08);
}

.cafeycon-legend-toggle:hover {
  background: rgba(245, 240, 235, 0.06);
}

.cafeycon-legend-body {
  padding: 10px 14px;
  white-space: nowrap;
}

.cafeycon-legend-section {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 8px 0 4px;
  font-weight: 600;
}

.cafeycon-legend-section:first-child {
  margin-top: 0;
}

.cafeycon-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 0.72rem;
  opacity: 0.85;
}

.cafeycon-legend-row em {
  opacity: 0.5;
  font-style: normal;
}

/* ── Search bar ── */
.cafeycon-map-search-row {
  display: flex;
}

.cafeycon-map-search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.cafeycon-map-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(245, 240, 235, 0.4);
  pointer-events: none;
}

.cafeycon-map-search-input {
  width: 100%;
  padding: 8px 32px 8px 34px;
  background: rgba(245, 240, 235, 0.08);
  border: 1px solid rgba(245, 240, 235, 0.2);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.2s;
}

.cafeycon-map-search-input::placeholder {
  color: rgba(245, 240, 235, 0.35);
}

.cafeycon-map-search-input:focus {
  border-color: var(--gold);
}

.cafeycon-map-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(245, 240, 235, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.cafeycon-map-search-clear:hover {
  color: var(--gold);
}

/* ── Action buttons (Near Me, Open Now, Reset) ── */
.cafeycon-nearme-btn,
.cafeycon-open-now-btn,
.cafeycon-reset-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(245, 240, 235, 0.2);
  background: transparent;
  color: rgba(245, 240, 235, 0.6);
  cursor: pointer;
  transition: all 0.2s;
}

.cafeycon-nearme-btn:hover,
.cafeycon-open-now-btn:hover,
.cafeycon-reset-filters-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cafeycon-nearme-btn.active,
.cafeycon-open-now-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--warm-black);
}

.cafeycon-nearme-btn.active svg,
.cafeycon-open-now-btn.active svg {
  stroke: var(--warm-black);
}

.cafeycon-nearme-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.cafeycon-reset-filters-btn {
  border-color: rgba(160, 82, 45, 0.4);
  color: var(--terracotta);
}

.cafeycon-reset-filters-btn:hover {
  border-color: var(--terracotta);
  background: rgba(160, 82, 45, 0.15);
  color: var(--terracotta-light);
}

/* ── Spin animation for loading state ── */
@keyframes cafeycon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cafeycon-spin {
  animation: cafeycon-spin 1s linear infinite;
}

/* ── User location marker ── */
.cafeycon-user-marker-container {
  background: none !important;
  border: none !important;
}

.cafeycon-user-marker {
  position: relative;
  width: 24px;
  height: 24px;
}

.cafeycon-user-marker-dot {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--cream);
  box-shadow: 0 0 8px rgba(201, 169, 110, 0.6);
}

.cafeycon-user-marker-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.25);
  animation: cafeycon-pulse 2s ease-out infinite;
}

@keyframes cafeycon-pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* ── Rich popup extras ── */
.cafeycon-popup-divider {
  height: 1px;
  background: rgba(245, 240, 235, 0.12);
  margin: 10px 0;
}

.cafeycon-popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.cafeycon-popup-tag {
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid rgba(201, 169, 110, 0.3);
  padding: 2px 8px;
  line-height: 1.4;
}

.cafeycon-popup-tip {
  font-size: 0.72rem;
  font-style: italic;
  color: rgba(245, 240, 235, 0.55);
  line-height: 1.5;
  border-left: 2px solid var(--gold);
  padding-left: 10px;
  margin: 8px 0 10px;
}

.cafeycon-popup-actions {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(245, 240, 235, 0.1);
  margin-top: 10px;
  padding-top: 8px;
}

.cafeycon-popup-directions,
.cafeycon-popup-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.5);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  transition: color 0.2s;
  text-decoration: none;
}

.cafeycon-popup-directions:hover,
.cafeycon-popup-share:hover {
  color: var(--gold);
}

.cafeycon-popup-share.copied {
  color: var(--gold);
}

/* ── Phase 4: Popup photo ── */
.cafeycon-popup-photo {
  position: relative;
  margin: -15px -20px 10px;
  height: 140px;
  overflow: hidden;
}

.cafeycon-popup-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cafeycon-popup-photo-credit {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 5px;
  border-radius: 2px;
  font-family: var(--font-body);
}

/* ── Phase 4: Seasonal badge ── */
.cafeycon-popup-seasonal {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(201, 169, 110, 0.08);
  border-left: 3px solid var(--gold);
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(245, 240, 235, 0.7);
}

.cafeycon-popup-seasonal-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

.cafeycon-popup-seasonal strong {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* ── Phase 4: Vendor spotlights ── */
.cafeycon-popup-vendors {
  margin: 8px 0 4px;
  border-top: 1px solid rgba(245, 240, 235, 0.08);
}

.cafeycon-vendor-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: rgba(245, 240, 235, 0.6);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.cafeycon-vendor-toggle:hover {
  color: var(--gold);
}

.cafeycon-vendor-chevron {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.cafeycon-popup-vendors.expanded .cafeycon-vendor-chevron {
  transform: rotate(180deg);
}

.cafeycon-vendor-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.cafeycon-popup-vendors.expanded .cafeycon-vendor-list {
  max-height: 300px;
}

.cafeycon-vendor-card {
  padding: 6px 0;
  border-top: 1px solid rgba(245, 240, 235, 0.06);
}

.cafeycon-vendor-card:first-child {
  border-top: none;
}

.cafeycon-vendor-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: rgba(245, 240, 235, 0.85);
  font-weight: 600;
}

.cafeycon-vendor-specialty {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2px 0;
}

.cafeycon-vendor-tip {
  font-size: 0.68rem;
  font-style: italic;
  color: rgba(245, 240, 235, 0.5);
  line-height: 1.4;
}

/* ── Phase 4: Popup scrollbar ── */
.cafeycon-leaflet-popup .leaflet-popup-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 110, 0.3) transparent;
}

.cafeycon-leaflet-popup .leaflet-popup-content::-webkit-scrollbar {
  width: 4px;
}

.cafeycon-leaflet-popup .leaflet-popup-content::-webkit-scrollbar-track {
  background: transparent;
}

.cafeycon-leaflet-popup .leaflet-popup-content::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.3);
  border-radius: 2px;
}

/* ── Neighborhood guide banner ── */
.cafeycon-guide-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(26, 26, 26, 0.92);
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
  font-family: var(--font-body);
  color: var(--cream);
  max-height: 0;
  opacity: 0;
  padding: 0 20px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}

.cafeycon-guide-banner.open {
  max-height: 80px;
  opacity: 1;
  padding: 10px 20px;
}

.cafeycon-guide-banner-inner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.cafeycon-guide-banner-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--gold);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease 0.15s, transform 0.3s ease 0.15s;
}

.cafeycon-guide-banner-text {
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(245, 240, 235, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease 0.25s, transform 0.3s ease 0.25s;
}

.cafeycon-guide-banner.open .cafeycon-guide-banner-name,
.cafeycon-guide-banner.open .cafeycon-guide-banner-text {
  opacity: 1;
  transform: translateX(0);
}

.cafeycon-guide-banner-close {
  background: none;
  border: none;
  color: rgba(245, 240, 235, 0.4);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
}

.cafeycon-guide-banner-close:hover {
  color: var(--gold);
}

/* ── Neighborhood labels on map ── */
.cafeycon-neighborhood-label {
  background: none !important;
  border: none !important;
  white-space: nowrap;
  pointer-events: none;
}

.cafeycon-neighborhood-label span {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.3);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  position: relative;
  left: -50%;
}

/* ── Distance label in sidebar ── */
.cafeycon-tianguis-dist {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(201, 169, 110, 0.12);
  padding: 2px 6px;
  flex-shrink: 0;
}

/* ── Mobile view toggle ── */
.cafeycon-map-view-toggle {
  display: none;
  gap: 0;
}

.cafeycon-view-toggle-map,
.cafeycon-view-toggle-list {
  flex: 1;
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  border: none;
  background: #252525;
  color: rgba(245, 240, 235, 0.5);
  cursor: pointer;
  transition: all 0.2s;
}

.cafeycon-view-toggle-map.active,
.cafeycon-view-toggle-list.active {
  background: var(--gold);
  color: var(--warm-black);
}


/* =============================================
   RESPONSIVE — Tianguis Map
   ============================================= */

/* ── 1024px breakpoint ── */
@media (max-width: 1024px) {
  .cafeycon-map-inner {
    grid-template-columns: 1fr;
  }
}

/* ── 768px breakpoint ── */
@media (max-width: 768px) {
  .cafeycon-map-inner {
    grid-template-columns: 1fr;
  }

  .cafeycon-map-section {
    padding: 60px 20px;
  }

  .cafeycon-leaflet-map {
    height: 400px;
    min-height: 320px;
  }

  .cafeycon-filter-primary {
    flex-wrap: wrap;
  }

  .cafeycon-filter-primary .cafeycon-map-search-wrap {
    flex: 1 1 100%;
  }

  .cafeycon-filter-secondary {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .cafeycon-day-filter-btn,
  .cafeycon-cat-filter-btn {
    flex-shrink: 0;
    min-height: 40px;
    font-size: 0.72rem;
    padding: 8px 16px;
  }

  .cafeycon-more-filters-btn {
    min-height: 40px;
    font-size: 0.72rem;
    padding: 8px 16px;
  }

  /* Popover -> mobile bottom sheet */
  .cafeycon-more-filters-popover {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    min-width: auto;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .cafeycon-more-filters-popover.open {
    display: block;
    transform: translateY(0);
  }

  .cafeycon-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .cafeycon-popover-backdrop.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .cafeycon-tianguis-transit {
    display: none;
  }

  .cafeycon-map-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(245, 240, 235, 0.08);
    max-height: none;
  }

  .cafeycon-tianguis-list {
    max-height: 50vh;
  }

  .cafeycon-map-view-toggle {
    display: flex;
  }

  .cafeycon-map-search-wrap {
    max-width: 100%;
  }

  .cafeycon-map-search-input {
    font-size: 0.85rem;
    padding: 10px 32px 10px 36px;
  }

  .cafeycon-nearme-btn,
  .cafeycon-open-now-btn,
  .cafeycon-reset-filters-btn {
    min-height: 40px;
    font-size: 0.72rem;
    padding: 8px 16px;
  }

  .cafeycon-alcaldia-select {
    min-height: 40px;
    font-size: 0.72rem;
  }

  .cafeycon-map-legend {
    bottom: 10px;
  }

  .cafeycon-tianguis-list li {
    min-height: 40px;
    font-size: 0.85rem;
    padding: 14px 8px;
  }

  .cafeycon-guide-banner {
    display: none !important;
  }
}
