/* 아기랑 - 커스텀 스타일 v2 */

/* ── 스켈레톤 UI ── */
@keyframes skeleton-shine {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #F0F0F0 25%, #E8E8E8 50%, #F0F0F0 75%);
  background-size: 800px 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.skeleton-img   { width: 100%; height: 200px; }
.skeleton-body  { padding: 16px; }
.skeleton-line  { height: 14px; margin-bottom: 10px; border-radius: 4px; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }

/* ── 로딩 오버레이 ── */
.loading-overlay {
  position: absolute; inset: 0;
  background: rgba(255,249,240,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 10; border-radius: 16px;
}

/* ── 더 보기 버튼 ── */
.load-more-btn {
  display: block;
  margin: 24px auto 0;
  padding: 14px 40px;
  background: white;
  border: 2px solid #FF8C42;
  color: #FF8C42;
  font-weight: 700;
  font-size: 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.load-more-btn:hover { background: #FF8C42; color: white; }
.load-more-btn:disabled { border-color: #ddd; color: #aaa; cursor: default; }

/* ── SNS 공유 버튼 ── */
.share-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none;
}
.share-kakao   { background: #FEE500; color: #3C1E1E; }
.share-kakao:hover   { background: #F0D800; }
.share-link    { background: #F0F0F0; color: #444; }
.share-link:hover    { background: #E0E0E0; }
.share-copy    { background: #4ECDC4; color: white; }
.share-copy:hover    { background: #3bb8af; }

/* ── 리뷰 폼 모달 ── */
.review-form-section { background: #F8FAFC; border-radius: 14px; padding: 20px; }
.star-select { display: flex; gap: 4px; cursor: pointer; font-size: 28px; }
.star-select span { color: #ddd; transition: color 0.15s; }
.star-select span.active { color: #FFB800; }

.situation-tag-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.situation-tag {
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid #ddd; background: white;
  font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.situation-tag.selected { border-color: #FF8C42; background: #FFF3E8; color: #FF8C42; font-weight: 600; }

/* ── 광고 슬롯 ── */
.ad-slot {
  background: #F8F8F8;
  border: 1.5px dashed #ddd;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: #bbb;
  font-size: 12px;
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.ad-slot-banner {
  min-height: 120px;
  background: linear-gradient(135deg, #FFF9F0, #E8F8F7);
  border: 1.5px dashed #FF8C42;
  border-radius: 16px;
  color: #FF8C42;
}

/* ── 랭킹 ── */
.rank-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: white; border-radius: 14px;
  border: 1px solid #F0F0F0; text-decoration: none; color: #2D2D2D;
  transition: all 0.2s; cursor: pointer;
}
.rank-item:hover { border-color: #FF8C42; transform: translateX(3px); }
.rank-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: #F0F0F0; color: #888;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; flex-shrink: 0;
}
.rank-num.top1 { background: #FFD700; color: #7A5800; }
.rank-num.top2 { background: #C0C0C0; color: #444; }
.rank-num.top3 { background: #CD7F32; color: white; }

/* ── 파트너 대시보드 ── */
.partner-stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px;
}
@media (max-width: 768px) { .partner-stat-grid { grid-template-columns: 1fr 1fr; } }

/* ── 카카오맵 영역 ── */
.map-container {
  width: 100%; height: 300px; border-radius: 14px;
  background: linear-gradient(135deg, #E8EDF5, #D4DCF0);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px; color: #6B7DB3;
  border: 1px solid #D4DCF0; overflow: hidden; position: relative;
}
.map-placeholder-icon { font-size: 48px; opacity: 0.6; }
.map-placeholder-text { font-size: 14px; font-weight: 600; opacity: 0.7; }

/* ── PWA 설치 배너 ── */
.pwa-install-banner {
  display: none;
  position: fixed; bottom: 80px; left: 16px; right: 16px;
  background: white; border-radius: 16px; padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 500; align-items: center; gap: 12px;
}
.pwa-install-banner.show { display: flex; }
@media (min-width: 769px) { .pwa-install-banner { max-width: 400px; left: auto; right: 24px; } }

:root {
  --color-primary: #FF8C42;
  --color-primary-light: #FFB380;
  --color-primary-dark: #E07030;
  --color-secondary: #4ECDC4;
  --color-secondary-light: #7EDDD6;
  --color-bg: #FFF9F0;
  --color-card: #FFFFFF;
  --color-beige: #F5E6D3;
  --color-mint-light: #E8F8F7;
  --color-text: #2D2D2D;
  --color-text-muted: #888888;
  --color-border: #EAEAEA;
  --font-main: 'Noto Sans KR', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* ── 네비게이션 ── */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo span { color: var(--color-primary); font-weight: 900; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-links a:hover { background: var(--color-beige); }

.btn-primary {
  background: var(--color-primary);
  color: white !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
}

.btn-primary:hover { background: var(--color-primary-dark) !important; }

/* ── 모바일 메뉴 ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    list-style: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 99;
  }
  .nav-links.open li { list-style: none; }
}

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-orange {
  background: var(--color-primary);
  color: white;
}
.btn-orange:hover { background: var(--color-primary-dark); transform: translateY(-1px); }

.btn-mint {
  background: var(--color-secondary);
  color: white;
}
.btn-mint:hover { background: #3bb8af; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-beige); }

.btn-ghost {
  background: var(--color-beige);
  color: var(--color-text);
}
.btn-ghost:hover { background: #ebd9c4; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn-full { width: 100%; }

/* ── 카드 ── */
.card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-beige), var(--color-mint-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.card-body { padding: 16px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.card-subtitle { font-size: 13px; color: var(--color-text-muted); margin-bottom: 10px; }

/* ── 추천 이유 태그 ── */
.reason-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF3E8;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #FFD4B0;
}

.reason-badge.mint {
  background: var(--color-mint-light);
  color: #2ba89f;
  border-color: #b0e8e4;
}

/* ── 섹션 ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* ── 그리드 ── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 32px 16px; }
  .section-title { font-size: 18px; }
}
@media (max-width: 480px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── 태그 ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.tag-orange { background: #FFF0E4; color: var(--color-primary); }
.tag-mint { background: var(--color-mint-light); color: var(--color-secondary); }
.tag-gray { background: #F0F0F0; color: #666; }
.tag-green { background: #E8F5E9; color: #2E7D32; }
.tag-red { background: #FFEBEE; color: #C62828; }

/* ── 폼 ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-main);
  transition: border-color 0.2s;
  background: white;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255,140,66,0.15);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: #E53935; margin-top: 4px; }

/* ── 체크박스/라디오 ── */
.checkbox-group { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-group input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px;
  accent-color: var(--color-primary); cursor: pointer; flex-shrink: 0;
}
.checkbox-group label { font-size: 14px; cursor: pointer; }

/* ── 탭 ── */
.tabs { display: flex; border-bottom: 2px solid var(--color-border); margin-bottom: 24px; }
.tab-btn {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* ── 필터 칩 ── */
.filter-chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  font-size: 13px;
  cursor: pointer;
  background: white;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-chip.active { border-color: var(--color-primary); background: #FFF3E8; color: var(--color-primary); font-weight: 600; }
.filter-chip:hover { border-color: var(--color-primary); }

/* ── 히어로 배너 ── */
.hero {
  background: linear-gradient(135deg, #FFF3E8 0%, #E8F8F7 100%);
  padding: 60px 16px;
  text-align: center;
}

.hero-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero-title em {
  color: var(--color-primary);
  font-style: normal;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .hero { padding: 40px 16px; }
  .hero-title { font-size: 24px; }
  .hero-subtitle { font-size: 14px; }
}

/* ── 날씨 배너 ── */
.weather-banner {
  background: linear-gradient(135deg, #4ECDC4, #2ba89f);
  color: white;
  padding: 16px 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.weather-banner.rain { background: linear-gradient(135deg, #5C7CFA, #3D5FDB); }
.weather-banner.dust { background: linear-gradient(135deg, #F5A623, #E08B00); }
.weather-banner.hot { background: linear-gradient(135deg, #FF6B6B, #E04040); }
.weather-banner.cold { background: linear-gradient(135deg, #74B9FF, #4A90D9); }

/* ── 찜 버튼 ── */
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
  font-size: 18px;
}
.like-btn:hover { background: #FFF3E8; transform: scale(1.1); }
.like-btn.liked { color: #FF6B6B; }

/* ── 별점 ── */
.stars { color: #FFB800; font-size: 14px; }
.rating-num { font-size: 13px; color: var(--color-text-muted); margin-left: 4px; }

/* ── 뱃지 ── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.badge-premium { background: #FFD700; color: #7A5800; }
.badge-new { background: var(--color-primary); color: white; }
.badge-free { background: #E8F5E9; color: #2E7D32; }
.badge-ad { background: #F0F0F0; color: #888; font-weight: 400; }

/* ── 진행 바 ── */
.progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 0.3s;
}

/* ── 모달 ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* ── 알림 팝업 ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2D2D2D;
  color: white;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 2000;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 푸터 ── */
.footer {
  background: #2D2D2D;
  color: #AAAAAA;
  padding: 48px 16px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo { font-size: 20px; font-weight: 800; color: white; margin-bottom: 8px; }
.footer-desc { font-size: 13px; margin-bottom: 24px; line-height: 1.7; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-links a { color: #AAAAAA; text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 12px; border-top: 1px solid #444; padding-top: 20px; margin-top: 20px; }

/* ── 헤더 중앙 검색 (2026-10-07) ──
   로고보다 우측 메뉴가 넓어서 "가용영역 중앙"은 화면 기준 왼쪽으로 치우쳐 보임(사장님 지적).
   1150px 이상: 화면(컨테이너) 정중앙에 absolute 고정 — 관리자 메뉴가 길어도 안 겹치는 폭.
   1150px 미만: 겹침 방지를 위해 로고~메뉴 사이 중앙(플로우). 600px 이하: .hide-mobile로 숨김. */
.nav-search-center { flex: 1; margin: 0 16px; min-width: 0; }
.nav-search-center > div { position: relative; max-width: 320px; margin: 0 auto; }
@media (min-width: 1150px) {
  .nav-inner { position: relative; }
  /* .nav-squeeze: 우측 메뉴가 길어 정중앙과 겹칠 때 main.js가 붙임 → 플로우 배치로 양보 */
  .nav-search-center:not(.nav-squeeze) { position: absolute; left: 50%; transform: translateX(-50%); width: 320px; flex: none; margin: 0; }
}

/* ── 반응형 유틸 ── */
.hide-mobile { display: block; }
.show-mobile { display: none; }
@media (max-width: 600px) {
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
}

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ── 바텀 네비 (모바일) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--color-border);
  padding: 8px 0 env(safe-area-inset-bottom);
  z-index: 100;
}
.bottom-nav-inner { display: flex; justify-content: space-around; }
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s;
}
.bottom-nav-item.active { color: var(--color-primary); }
.bottom-nav-item .icon { font-size: 22px; }

@media (max-width: 768px) {
  .bottom-nav { display: block; }
  .footer { margin-bottom: 70px; }
}

/* ── 로딩 스피너 ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 스크롤 가능한 가로 목록 ── */
.scroll-x {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .card { min-width: 240px; flex-shrink: 0; }

/* ── 관리자 사이드바 ── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  background: #1E293B;
  color: white;
  padding: 24px 0;
  flex-shrink: 0;
}
.admin-content {
  flex: 1;
  background: #F8FAFC;
  padding: 32px;
  overflow-x: auto;
}
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-content { padding: 16px; }
}

/* ── 테이블 ── */
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.data-table th { background: #F8FAFC; padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: #64748B; border-bottom: 1px solid var(--color-border); }
.data-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #F0F0F0; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FFF9F0; }

/* ── 통계 카드 ── */
.stat-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-num { font-size: 32px; font-weight: 900; color: var(--color-primary); }
.stat-label { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }
.stat-change { font-size: 12px; margin-top: 8px; }
.stat-up { color: #2E7D32; }
.stat-down { color: #C62828; }
