/* ============================================================
   맛집큐레이팅 — style.css
   Font    : Pretendard Variable
   Primary : #E74C3C  Secondary : #F39C12  Green : #27AE60
   ============================================================ */

/* ============================================================
   1. RESET + BASE
   ============================================================ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #1a1a2e;
  background-color: #f5f5f5;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}


/* ============================================================
   2. NAVIGATION (.nav)
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: #E74C3C;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: #1a1a2e;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
  padding-bottom: 2px;
}

.nav-link:hover {
  color: #E74C3C;
}

.nav-link.active {
  color: #E74C3C;
  border-bottom: 2px solid #E74C3C;
}

.nav-search {
  font-size: 1.2rem;
  text-decoration: none;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.nav-search:hover {
  color: #E74C3C;
}


/* ============================================================
   3. LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-content {
  padding-top: 80px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a2e;
}

.section-subtitle {
  color: #666;
  margin-bottom: 16px;
  font-size: 0.95rem;
}


/* ============================================================
   4. SEARCH (.hero-search)
   ============================================================ */
.hero-search {
  display: flex;
  justify-content: center;
  margin: 32px auto;
  max-width: 600px;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 14px 120px 14px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  color: #1a1a2e;
  background-color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder {
  color: #bbb;
}

.search-input:focus {
  border-color: #E74C3C;
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #E74C3C;
  color: #fff;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
}

.search-btn:hover {
  background-color: #c0392b;
}


/* ============================================================
   5. FILTER TABS (.filter-bar)
   ============================================================ */
.filter-bar {
  margin-bottom: 24px;
}

.area-tabs,
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.area-tabs::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 8px 16px;
  border-radius: 20px;
  background-color: #f0f0f0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: #1a1a2e;
  border: none;
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.tab:hover {
  background-color: #e0e0e0;
}

.tab.active {
  background-color: #E74C3C;
  color: #fff;
}


/* ============================================================
   6. CARD GRID (.card-grid)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* SSR: cards are <a> tags — reset link defaults while preserving block layout */
a.card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.card-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #f0f0f0;
  display: block;
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Score color utilities — apply to .card-score or any score element */
.score-high  { color: #27AE60; }
.score-mid   { color: #F39C12; }
.score-low   { color: #E74C3C; }

.card-meta {
  color: #888;
  font-size: 0.85rem;
  margin-top: 4px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.card-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  background-color: #f0f0f0;
  border-radius: 10px;
  color: #666;
}


/* ============================================================
   7. RESTAURANT DETAIL
   ============================================================ */
.detail-header {
  padding: 24px 0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a2e;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #666;
  margin-top: 8px;
  font-size: 0.9rem;
  align-items: center;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}


/* ============================================================
   8. SCORE SECTION (.score-section)
   ============================================================ */
.score-section {
  padding: 24px 0;
}

.score-overview {
  display: flex;
  align-items: center;
  gap: 32px;
}

.score-big {
  font-size: 3rem;
  font-weight: 800;
  color: #E74C3C;
  line-height: 1;
  flex-shrink: 0;
}

.score-bars {
  flex: 1;
}

.score-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.score-item:last-child {
  margin-bottom: 0;
}

.score-label {
  width: 60px;
  font-size: 0.875rem;
  color: #666;
  flex-shrink: 0;
}

.score-bar {
  flex: 1;
  height: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

/* SSR: width set via inline style="width: X%", color via inline style or fill-* class */
.score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  background-color: #E74C3C;
}

.score-fill.fill-high   { background-color: #27AE60; }
.score-fill.fill-mid    { background-color: #F39C12; }
.score-fill.fill-low    { background-color: #E74C3C; }

.score-value {
  width: 30px;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
  color: #1a1a2e;
}


/* ============================================================
   9. INFO GRID (.info-grid)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 4px;
}

.info-value {
  font-weight: 500;
  color: #1a1a2e;
  font-size: 0.95rem;
}


/* ============================================================
   10. MAP (.map-container)
   ============================================================ */
.map-container {
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0;
  position: relative;
}

#map,
#detail-map {
  width: 100%;
  height: 300px;
}

/* Map page: full viewport height minus fixed nav (60px) */
.map-page #map {
  height: calc(100vh - 60px);
  border-radius: 0;
}

.map-filters {
  position: absolute;
  top: 80px;
  left: 20px;
  z-index: 1000;
  background-color: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}


/* ============================================================
   11. MENU (.menu-section)
   ============================================================ */
.menu-section {
  padding: 20px 0;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-name {
  font-weight: 500;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu-price {
  font-weight: 600;
  color: #1a1a2e;
  flex-shrink: 0;
  margin-left: 12px;
}

.menu-badge {
  display: inline-block;
  background-color: #FFF3E0;
  color: #E65100;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}


/* ============================================================
   12. REVIEWS (.review-section)
   ============================================================ */
.review-section {
  padding: 20px 0;
}

.review-item {
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.review-platform {
  font-weight: 600;
  font-size: 0.85rem;
}

.review-platform[data-platform="naver"] {
  color: #03C75A;
}

.review-platform[data-platform="kakao"] {
  color: #3a2a00;
  background-color: #FEE500;
  padding: 2px 6px;
  border-radius: 4px;
}

.review-platform[data-platform="google"] {
  color: #4285F4;
}

.review-platform[data-platform="blog"] {
  color: #FF6F61;
}

.review-stars {
  color: #F39C12;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.review-text {
  line-height: 1.6;
  color: #333;
  font-size: 0.95rem;
}

.review-meta {
  font-size: 0.8rem;
  color: #999;
  margin-top: 4px;
}


/* ============================================================
   13. RANKING TABLE (.ranking-section)
   ============================================================ */
.ranking-section {
  padding: 20px 0;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid #1a1a2e;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a2e;
}

.ranking-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: #1a1a2e;
}

.ranking-table tr:hover td {
  background-color: #fafafa;
  cursor: pointer;
}

.rank-num {
  font-weight: 800;
  font-size: 1.2rem;
  color: #666;
}

.rank-num.top3 {
  color: #E74C3C;
}

/* Convenience: auto-color top 3 via CSS counter is not feasible;
   add class="top3" on rank 1-3 cells in HTML */


/* ============================================================
   14. CURATION (.curation-grid)
   ============================================================ */
.curation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.curation-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.curation-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.curation-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.curation-desc {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.curation-count {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #E74C3C;
  font-weight: 600;
}

.curation-restaurants {
  margin-top: 16px;
}


/* ============================================================
   15. BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-category {
  background-color: #EBF5FB;
  color: #2980B9;
}

.badge-area {
  background-color: #FDEBD0;
  color: #E67E22;
}

.badge-price-저가 {
  background-color: #E8F8F5;
  color: #27AE60;
}

.badge-price-중가 {
  background-color: #FEF9E7;
  color: #F39C12;
}

.badge-price-고가 {
  background-color: #FDEDEC;
  color: #E74C3C;
}


/* ============================================================
   16. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.empty-state p {
  font-size: 1rem;
  color: #bbb;
}


/* ============================================================
   17. RESPONSIVE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    gap: 12px;
    font-size: 0.85rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .curation-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .score-overview {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .score-bars {
    width: 100%;
  }

  .detail-title {
    font-size: 1.5rem;
  }

  .score-big {
    font-size: 2.5rem;
  }

  .hero-search {
    margin: 20px auto;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    padding: 0 12px;
  }

  .container {
    padding: 0 12px;
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .card-body {
    padding: 12px;
  }

  .curation-card {
    padding: 16px;
  }
}
