/* food.css - Modern Responsive Styles for WebETrip Gourmet, Restaurant & Street Food Search */
:root {
  --primary: #ea580c;         /* Vibrant gourmet orange */
  --primary-hover: #c2410c;
  --primary-light: #ffedd5;
  --secondary: #0f172a;
  --accent: #f59e0b;          /* Rating gold */
  --accent-hover: #d97706;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --rose: #e11d48;
  --rose-bg: #ffe4e6;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #fb923c;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 14px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header & Banner */
.site-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #7c2d12 50%, #ea580c 100%);
  color: white;
  padding: 30px 20px 40px;
  box-shadow: var(--shadow);
  position: relative;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.brand-link {
  color: #fed7aa;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.brand-link:hover {
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 12px;
}

.nav-item {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
  background: rgba(255,255,255,0.08);
}

.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
}

.site-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-subtitle {
  color: #ffedd5;
  font-size: 1.05rem;
  font-weight: 400;
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: -25px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

/* Search Card */
.search-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 24px;
}

.search-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 1.3fr 1fr auto;
  gap: 14px;
  align-items: end;
}

@media (max-width: 1024px) {
  .search-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .search-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
  background-color: #fff;
  color: var(--text-main);
}

.input-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.btn-search {
  background: linear-gradient(135deg, var(--primary) 0%, #c2410c 100%);
  color: white;
  border: none;
  padding: 11px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
}

.btn-search:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #9a3412 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* Quick City Selector */
.quick-cities {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.city-pill {
  font-size: 0.82rem;
  padding: 4px 11px;
  border-radius: 16px;
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.city-pill:hover, .city-pill.active {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: #fdba74;
  font-weight: 600;
}

/* Category Quick Bar */
.category-pills {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  font-size: 0.85rem;
  padding: 5px 13px;
  border-radius: 20px;
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.cat-pill:hover, .cat-pill.active {
  background: #ea580c;
  color: white;
  border-color: #ea580c;
  font-weight: 600;
}

/* Content Layout */
.content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

/* Filters Sidebar */
.filter-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  height: fit-content;
}

.filter-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Results Section */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.results-count span {
  color: var(--primary);
}

.sort-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sort-select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  background-color: #fff;
  color: var(--text-main);
  outline: none;
}

/* Stats Ribbon */
.stats-ribbon {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  background: white;
  border-radius: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--text-main);
  font-size: 1rem;
}

.badge-cache {
  font-size: 0.75rem;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.badge-crawl {
  font-size: 0.75rem;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #ffedd5;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Food Spot Card */
.food-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 240px 1fr 180px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.food-card:hover {
  box-shadow: var(--shadow);
  border-color: #fdba74;
  transform: translateY(-2px);
}

@media (max-width: 800px) {
  .food-card {
    grid-template-columns: 1fr;
  }
}

.food-img-wrapper {
  position: relative;
  background-color: #e2e8f0;
  min-height: 180px;
}

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

.food-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.food-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.food-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.food-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.food-name-en {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.food-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.food-dishes {
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 8px;
  line-height: 1.4;
}

.food-dishes strong {
  color: var(--primary);
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.feature-tag {
  font-size: 0.76rem;
  background: #fff7ed;
  color: #c2410c;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #fed7aa;
}

.food-pricing-side {
  padding: 16px;
  background: #fdfefe;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  text-align: right;
}

@media (max-width: 800px) {
  .food-pricing-side {
    border-left: none;
    border-top: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
}

.rating-badge-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.rating-score-box {
  background: #ea580c;
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 4px 8px;
  border-radius: 6px 6px 6px 0;
}

.rating-meta-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.price-avg-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.price-avg-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.price-level-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.btn-map {
  display: inline-block;
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-top: 10px;
  transition: all 0.2s;
  text-align: center;
}

.btn-map:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Loading & Empty States */
.state-container {
  background: white;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #fed7aa;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.state-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}
