/* Hawker Finder — Style v6 Premium */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #E65100;
  --primary-light: #FF833A;
  --primary-dark: #AC1900;
  --primary-subtle: #FFF3E0;
  --bg: #FAFAFA;
  --card-shadow: 0 2px 12px rgba(0,0,0,.06);
  --card-hover-shadow: 0 16px 48px rgba(230,81,0,0.12);
  --glass-bg: rgba(255,255,255,0.85);
  --glass-border: rgba(255,255,255,0.2);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* Navbar Premium */
.navbar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 1.25rem;
}
.navbar-brand i { display: inline-block; animation: eggFloat 3s ease-in-out infinite; }
@keyframes eggFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.nav-link { font-weight: 500; font-size: 0.9rem; transition: opacity .2s; }
.nav-link:hover { opacity: 0.8; }

/* Button Premium */
.btn {
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: var(--radius-sm);
  transition: all .25s cubic-bezier(.25,.8,.25,1);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(230,81,0,0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(230,81,0,0.35);
}
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-light { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #fff; backdrop-filter: blur(4px); }
.btn-light:hover { background: rgba(255,255,255,0.25); color: #fff; }
.btn-sm { border-radius: 8px; }

/* Typography */
a { color: var(--primary); transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* Hero Section Premium */
.hero-section {
  background: linear-gradient(135deg, #AC1900 0%, #E65100 40%, #FF833A 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(-5%, -5%) rotate(0deg); }
  100% { transform: translate(5%, 5%) rotate(5deg); }
}
.hero-section .container { position: relative; z-index: 1; }
.hero-section h1 {
  font-weight: 900;
  font-size: 2.75rem;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.hero-section h1 i { display: inline-block; animation: eggFloat 3s ease-in-out infinite; }
.hero-section p {
  opacity: .9;
  font-size: 1.15rem;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* Search Card — Glass morphism */
.search-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 12px 48px rgba(0,0,0,0.12);
  margin-top: -2.75rem;
  position: relative;
  z-index: 10;
}

/* Form Controls */
.form-control-lg, .form-select-lg {
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid #e5e5e5;
  padding: 0.6rem 1rem;
  transition: all .2s;
}
.form-control-lg:focus, .form-select-lg:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(230,81,0,0.1);
}
.location-input-group { position: relative; }
.location-input-group .form-control { padding-right: 3rem; }
.location-input-group .btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
}
@media (max-width: 576px) {
  .location-input-group .form-control { padding-right: 2.6rem; font-size: 0.9rem; }
  .location-input-group .btn { padding: 0.2rem 0.45rem; font-size: 0.85rem; }
}

/* Map Premium */
#map { height: 520px; border-radius: var(--radius-md); }
.map-wrapper {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transition: box-shadow .3s;
}
.map-wrapper:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.12); }

/* Bib Gourmand Legend */
.michelin-legend {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e8e0d0;
  border-left: 4px solid #daa520;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.michelin-legend img { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
.michelin-legend strong { color: #b8860b; }
.michelin-legend.show { display: flex; }
@media (max-width: 576px) {
  .michelin-legend { font-size: 0.78rem; padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .michelin-legend img { width: 1.2rem; height: 1.2rem; }
}

.main-col, .sidebar-col, .row { overflow: visible !important; }

/* Result Header */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.5rem 0.75rem 0;
  border-bottom: 2px solid #f0f0f0;
}
.result-count { font-size: 0.9rem; color: #666; font-weight: 600; }
.result-count strong { color: var(--primary); font-weight: 800; }

/* Thumbnail */
.thumb-fallback {
  width: 80px; height: 80px; border-radius: 12px;
  background: linear-gradient(135deg, #f5f0eb, #e8d5c0);
  display: flex; align-items: center; justify-content: center;
}
.thumb-fallback span { font-size: 2rem; }

/* Result Cards Premium */
.result-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all .35s cubic-bezier(.25,.8,.25,1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 0.75rem;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
  overflow: hidden;
}
.result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity .3s ease;
}
.result-card:hover::before { opacity: 1; }
.result-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(230,81,0,0.02), transparent);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.result-card:hover::after { opacity: 1; }

.result-card:nth-child(1) { animation-delay: 0.03s; }
.result-card:nth-child(2) { animation-delay: 0.06s; }
.result-card:nth-child(3) { animation-delay: 0.09s; }
.result-card:nth-child(4) { animation-delay: 0.12s; }
.result-card:nth-child(n+5) { animation-delay: 0.15s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-4px);
  border-color: rgba(230,81,0,0.2);
}
.result-card .name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.3rem;
  transition: color .2s;
  letter-spacing: -0.3px;
}
.result-card:hover .name { color: var(--primary); }
.result-card .address {
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.card-thumb {
  width: 80px; height: 80px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #f0f0f0;
  transition: all .3s ease;
}
.result-card:hover .card-thumb {
  transform: scale(1.1);
  border-color: var(--primary-light);
  box-shadow: 0 8px 24px rgba(230,81,0,0.15);
}

/* Sidebar Premium */
.sidebar-filters {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  position: sticky;
  top: 80px;
}
.sidebar-filters h6 {
  font-weight: 700;
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .8px;
  color: #888;
  margin-bottom: 0.75rem;
}
.sidebar-filters .section { margin-bottom: 1rem; }
.sidebar-filters .section:last-child { margin-bottom: 0; }

/* Detail Hero Premium */
.detail-hero {
  background: linear-gradient(135deg, #AC1900 0%, #E65100 40%, #FF833A 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.detail-hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 60% 40%, rgba(255,255,255,0.1) 0%, transparent 60%);
}
.detail-hero h2 {
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
}
.detail-hero p, .detail-hero .badge, .detail-hero .btn { position: relative; }

/* Badge Premium */
.badge {
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 0.35em 0.75em;
  border-radius: 99px;
}
.bg-success { background: #2E7D32 !important; }
.bg-primary { background: var(--primary) !important; }
.bg-info { background: #0288D1 !important; }
.bg-warning { background: #F9A825 !important; }

.badge.bg-success, .badge.bg-primary, .badge.bg-info, .badge.bg-warning {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Distance Badge */
.distance-badge {
  background: #E8F5E9;
  color: #2E7D32;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

/* Loading Spinner Premium */
.loading-spinner {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  border: 2.5px solid #e0e0e0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s cubic-bezier(.6,.2,.4,.8) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Load More Button */
.load-more-btn {
  border-width: 2px;
  font-weight: 700;
  transition: all .3s cubic-bezier(.25,.8,.25,1);
  font-size: .9rem;
  padding: 0.6rem 1.5rem !important;
  position: relative;
  overflow: hidden;
}
.load-more-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(230,81,0,0.08);
  transition: all .5s;
  transform: translate(-50%, -50%);
}
.load-more-btn:hover::after { width: 200%; height: 200%; }
.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(230,81,0,0.2);
}

/* Footer Premium */
footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
  color: #a0a0b0 !important;
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
footer a {
  color: var(--primary-light) !important;
  transition: all .2s;
  font-weight: 500;
}
footer a:hover { color: #fff !important; }
footer .fw-bold { color: #e0e0e0 !important; font-weight: 800 !important; }
footer h6 i { margin-right: 0.4rem; }

/* Map Marker Popup Premium */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 12px 48px rgba(0,0,0,.18) !important;
  padding: 2px !important;
}
.leaflet-popup-content {
  margin: 14px 16px !important;
  line-height: 1.5 !important;
}
.leaflet-popup-tip { box-shadow: none !important; }
.leaflet-popup-close-button {
  top: 10px !important;
  right: 10px !important;
  font-size: 1rem !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.03) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .2s !important;
}
.leaflet-popup-close-button:hover { background: rgba(0,0,0,0.08) !important; }

/* Detail Page Cards */
.card {
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
  transition: box-shadow .3s;
}
.card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.card.shadow-sm { box-shadow: 0 1px 8px rgba(0,0,0,0.04); }
.card.shadow-sm:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.card-img-top { border-radius: var(--radius-md) var(--radius-md) 0 0; }

/* Photo fallback container */
.card:has(img[onerror]) .card-body { border-radius: var(--radius-md); }

/* Breadcrumb */
.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item a { text-decoration: none; font-weight: 500; }
.breadcrumb-item.active { font-weight: 600; color: #333; }

/* Selection dropdowns - glass style */
.form-select-lg { font-size: 0.9rem; border-radius: var(--radius-sm); }
.form-control-lg { border-radius: var(--radius-sm); font-size: 0.95rem; }

/* Clear Filters Button */
#clear-filters { font-size: 0.8rem; border-radius: 99px; padding: 0.25rem 0.75rem; }

/* Results container */
#results { scroll-margin-top: 100px; }

/* NEA Badge */
.badge.bg-success i { margin-right: 0.3rem; }

/* Responsive Premium */
@media (max-width: 992px) {
  .hero-section h1 { font-size: 2.25rem; }
  .sidebar-filters { position: static; margin-top: 1rem; }
}
@media (max-width: 768px) {
  .hero-section { padding: 2.5rem 0 2rem; }
  .hero-section h1 { font-size: 1.75rem; }
  .hero-section p { font-size: 1rem; }
  .search-card { margin-top: -1.75rem; padding: 1.25rem; border-radius: var(--radius-md); }
  #map { height: 300px; }
  .result-card { padding: 1rem; }
  .result-card .name { font-size: 1rem; }
  .card-thumb, .thumb-fallback { width: 65px; height: 65px; }
  .detail-hero { padding: 1.5rem; border-radius: var(--radius-sm); }
  .detail-hero .btn { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
  .leaflet-control-zoom { display: none; }
  .leaflet-control-locate { margin-top: 10px !important; }
}
@media (max-width: 576px) {
  .hero-section h1 { font-size: 1.5rem; }
  .hero-section { padding: 2rem 0 1.5rem; }
  .search-card { padding: 1rem; border-radius: var(--radius-sm); }
  .result-card .name { font-size: 0.95rem; }
  #map { height: 320px; }
  .search-card .row > div { margin-bottom: 0.5rem; }
  .search-card .row > div:last-child { margin-bottom: 0; }
  .form-select-lg { font-size: 0.85rem; padding: 0.35rem 1.5rem 0.35rem 0.5rem; }
  .result-card { padding: 0.85rem 0.75rem; }
  .result-card .badge { font-size: 0.6rem !important; }
  .distance-badge { font-size: 0.65rem !important; padding: 0.15rem 0.4rem; }
  .detail-hero h2 { font-size: 1.25rem; }
  .stall-num { width: 24px; height: 24px; font-size: 0.7rem; }
  .stall-badge { font-size: 0.78rem; padding: 0.3rem 0.5rem; }
  footer .d-flex { flex-direction: column; gap: 0.25rem !important; }
  footer .opacity-25 { display: none; }
  .card-thumb, .thumb-fallback { width: 55px; height: 55px; border-radius: 8px; }
  .leaflet-popup-content { font-size: 0.8rem !important; }
  .leaflet-popup-content-wrapper { padding: 10px !important; border-radius: 10px !important; }
}
