/**
 * 부산어디? — Design System v2 (2025 Modern Refresh)
 * Layered on top of style.css + components.css
 *
 * Key improvements:
 * - Scroll-transparent header
 * - Naver-style map integration
 * - Modern card hover effects
 * - Split view (map + list) for desktop
 * - Better mobile experience
 * - Skeleton loaders, toast, filter chips
 * - WCAG AA compliant contrast
 */

/* ── 0. Enhanced Design Tokens ──────────────────────────── */
:root {
  --color-primary-500: #0EA5E9;   /* Sky blue — more vibrant */
  --color-primary-300: #7DD3FC;
  --color-primary-100: #E0F2FE;

  --color-accent-gold: #F59E0B;
  --color-accent-coral: #EF4444;
  --color-success: #10B981;

  --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.14);
  --shadow-float: 0 16px 48px rgba(0, 0, 0, 0.18);

  --radius-card: 20px;
  --radius-chip: 100px;

  --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 1. Scroll-aware Header ─────────────────────────────── */
#site-header {
  transition: background var(--transition-base),
              box-shadow var(--transition-base),
              border-bottom-color var(--transition-base);
}

#site-header.scrolled {
  background: rgba(10, 35, 66, 0.97);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Header search bar (inlined) */
.header-search-inline {
  flex: 1;
  max-width: 320px;
  position: relative;
  display: none;
}
@media (min-width: 1024px) { .header-search-inline { display: block; } }
.header-search-inline input {
  width: 100%;
  padding: 9px 40px 9px 16px;
  border-radius: var(--radius-chip);
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.header-search-inline input::placeholder { color: rgba(255,255,255,0.5); }
.header-search-inline input:focus {
  border-color: var(--color-primary-300);
  background: rgba(255,255,255,0.16);
}
.header-search-inline .search-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  pointer-events: none;
}

/* ── 2. Modern Cards ─────────────────────────────────────── */
.card {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow var(--transition-base),
              transform var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.card-img-wrapper {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  overflow: hidden;
  position: relative;
}

/* Overlay on hover */
.card-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,35,66,0.4) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.card:hover .card-img-wrapper::after { opacity: 1; }

.card-img-wrapper img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card:hover .card-img-wrapper img { transform: scale(1.07); }

/* Badge overlays on card images */
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-badge {
  padding: 3px 10px;
  border-radius: var(--radius-chip);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}
.card-badge-hot   { background: rgba(239,68,68,0.85); color: #fff; }
.card-badge-new   { background: rgba(16,185,129,0.85); color: #fff; }
.card-badge-ai    { background: rgba(139,92,246,0.85); color: #fff; }

/* Bookmark button on card */
.card-bookmark {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-secondary);
  transition: all var(--transition-bounce);
  backdrop-filter: blur(8px);
}
.card-bookmark:hover,
.card-bookmark.active { color: var(--color-accent-coral); transform: scale(1.15); }

/* Rating stars */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
}
.star-rating .star { color: var(--color-accent-gold); font-size: 12px; }
.star-rating .star.empty { color: var(--color-neutral-200); }
.star-rating .count { color: var(--text-secondary); margin-left: 4px; font-size: 12px; }

/* Card body improvements */
.card-body { padding: 14px 16px 16px; }

.card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 5px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

.card-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── 3. Split-View Layout (map + list side-by-side) ─────── */
@media (min-width: 1024px) {
  .split-view {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 0;
    min-height: calc(100vh - 140px);
    align-items: start;
  }
  .split-view-list {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
    position: sticky;
    top: 68px;
  }
  .split-view-map {
    position: sticky;
    top: 68px;
    height: calc(100vh - 68px);
    border-left: 1px solid var(--border);
  }
  .split-view-map .map-section {
    height: 100% !important;
    min-height: unset;
  }
}

/* Map section improvements */
.map-section {
  position: relative;
  background: #e8f4f8;
}

/* Naver map watermark fix */
.map-section .naver-map-copyright,
.map-section .logo_naver { opacity: 0.7; }

/* ── 4. Filter Chips (Horizontal scroll on mobile) ──────── */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 4px 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-chip);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.filter-chip:hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
}
.filter-chip.active {
  background: var(--color-primary-900);
  border-color: var(--color-primary-900);
  color: white;
}
.filter-chip .chip-count {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
}
.filter-chip:not(.active) .chip-count {
  background: var(--color-neutral-100);
  color: var(--text-secondary);
}

/* Sort tabs */
.sort-tab-bar {
  display: flex;
  gap: 4px;
}
.sort-tab {
  padding: 7px 16px;
  border-radius: var(--radius-chip);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}
.sort-tab:hover { background: var(--color-neutral-100); }
.sort-tab.active {
  background: var(--color-primary-500);
  color: white;
  font-weight: 600;
}

/* ── 5. Section Headers ──────────────────────────────────── */
.section-header-v2 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}

.section-title-v2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.section-title-v2 .emoji { margin-right: 4px; }
.section-title-v2 .highlight { color: var(--color-primary-500); }

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.see-all-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-500);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: gap var(--transition-bounce);
}
.see-all-link:hover { gap: 8px; }

@media (max-width: 767px) {
  .section-title-v2 { font-size: 20px; }
}

/* ── 6. Empty State ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-secondary);
}
.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.5;
}
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; margin-bottom: 20px; }

/* ── 7. Pagination ───────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-8) 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  transition: all var(--transition-base);
  text-decoration: none;
}
.pagination a:hover { border-color: var(--color-primary-500); color: var(--color-primary-500); }
.pagination .active {
  background: var(--color-primary-500);
  border-color: var(--color-primary-500);
  color: white;
}
.pagination .dots { border: none; color: var(--text-secondary); }
.pagination .prev-btn, .pagination .next-btn { border-radius: var(--radius-chip); width: auto; padding: 0 16px; }

/* ── 8. Toast Notification ───────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius-chip);
  background: var(--color-neutral-950);
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-accent-coral); }

/* ── 9. Review Section ───────────────────────────────────── */
.review-form-box {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 1.5px solid var(--border);
  margin-bottom: 24px;
}

.star-input {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.star-input .star-btn {
  font-size: 28px;
  cursor: pointer;
  color: var(--color-neutral-200);
  transition: color var(--transition-bounce), transform var(--transition-bounce);
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}
.star-input .star-btn.selected,
.star-input .star-btn:hover { color: var(--color-accent-gold); transform: scale(1.15); }

.review-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg-page);
  color: var(--text-primary);
}
.review-textarea:focus { border-color: var(--color-primary-500); }

/* ── 10. Detail Page Layout ──────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 40px 0;
}

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

.detail-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* Info cards in detail sidebar */
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  border: 1.5px solid var(--border);
  margin-bottom: 16px;
}

.info-card-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.info-card-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-card-row .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-primary-100);
  color: var(--color-primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.info-card-row .label { font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.info-card-row .value { color: var(--text-primary); font-weight: 500; line-height: 1.4; }

/* ── 11. Mobile Enhancements ─────────────────────────────── */
@media (max-width: 767px) {
  /* Touch-friendly tap targets */
  .btn { min-height: 44px; }
  .filter-chip { min-height: 36px; }

  /* Better card grid on mobile */
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-title { font-size: 14px; }

  /* Full-width cards for food/stay pages */
  .grid-list .card {
    display: flex;
    flex-direction: row;
    height: 120px;
    border-radius: 14px;
  }
  .grid-list .card-img-wrapper {
    width: 120px;
    height: 120px;
    aspect-ratio: unset;
    border-radius: 14px 0 0 14px;
    flex-shrink: 0;
  }
  .grid-list .card-body {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* Map toggle on mobile */
  .map-toggle-bar {
    display: flex;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-chip);
    overflow: hidden;
    margin-bottom: 16px;
  }
  .map-toggle-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .map-toggle-btn.active {
    background: var(--color-primary-900);
    color: white;
  }
}

/* ── 12. Naver Map Branding ──────────────────────────────── */
.map-provider-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #03C75A;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 13. Spot List Grid - Desktop ────────────────────────── */
@media (min-width: 1024px) {
  /* When NOT in split-view mode */
  .spot-grid-desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* ── 14. Map Marker Popup ─────────────────────────────────── */
.bw-map-popup {
  font-family: var(--font-ko);
  min-width: 160px;
  padding: 10px 14px;
}
.bw-map-popup a {
  font-size: 14px;
  font-weight: 700;
  color: #0A2342;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.bw-map-popup a:hover { color: var(--color-primary-500); }
.bw-map-popup .cat { font-size: 12px; color: #666; }

/* ── 15. Header Scroll Effect (JS-driven class) ──────────── */
#site-header.at-top {
  background: transparent;
  border-bottom-color: transparent;
}

/* Only transparent on hero pages */
body.has-hero #site-header.at-top {
  background: transparent;
}
body.has-hero #site-header.scrolled {
  background: rgba(10, 35, 66, 0.97);
}

/* ── 16. Loading Shimmer ─────────────────────────────────── */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--color-neutral-100) 25%,
    var(--color-neutral-50) 50%,
    var(--color-neutral-100) 75%
  );
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Card skeleton */
.card-skeleton {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.card-skeleton .sk-img  { aspect-ratio: 4/3; }
.card-skeleton .sk-body { padding: 14px; }
.card-skeleton .sk-line { height: 14px; border-radius: 7px; margin-bottom: 8px; }
.card-skeleton .sk-line.w-75 { width: 75%; }
.card-skeleton .sk-line.w-50 { width: 50%; }

/* ── 17. Event Cards ─────────────────────────────────────── */
.event-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}
.event-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.event-card-img { aspect-ratio: 16/9; overflow: hidden; }
.event-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.event-card:hover .event-card-img img { transform: scale(1.05); }
.event-card-body { padding: 16px 18px; }
.event-card-date {
  font-size: 12px;
  color: var(--color-primary-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.event-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.event-tag {
  padding: 3px 10px;
  border-radius: var(--radius-chip);
  background: var(--color-primary-100);
  color: var(--color-primary-700);
  font-size: 11px;
  font-weight: 600;
}

/* ── 18. Blog Improvements ───────────────────────────────── */
.blog-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
}
.blog-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.blog-card-img { aspect-ratio: 16/9; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 18px 20px; }
.blog-card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.blog-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── 19. robots and SEO page fixes ──────────────────────── */
/* Pagination SEO labels */
.page-number-nav { display: flex; align-items: center; gap: 8px; }
.page-info { font-size: 14px; color: var(--text-secondary); }

/* ── 20. Footer Modernization ────────────────────────────── */
#site-footer {
  background: var(--color-neutral-950);
  color: var(--color-neutral-400);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 599px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.footer-brand .logo {
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}
.footer-brand .logo span { color: var(--color-primary-300); }
.footer-brand p { font-size: 14px; line-height: 1.7; }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--color-neutral-600);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-neutral-400);
  font-size: 16px;
  transition: all var(--transition-base);
}
.social-btn:hover {
  border-color: var(--color-primary-300);
  color: var(--color-primary-300);
  background: rgba(125,211,252,0.1);
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--color-neutral-400);
  transition: color var(--transition-base);
}
.footer-col ul li a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid var(--color-neutral-800);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 12px; opacity: 0.6; }

/* ── 21. Accessibility Improvements ─────────────────────── */
:focus-visible {
  outline: 3px solid var(--color-primary-300);
  outline-offset: 2px;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-primary-500);
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ═══════════════════════════════════════════════════════════
   SECTION V2.1 — Competitive Analysis Improvements
   Based on TripAdvisor / Klook / Airbnb / visitbusan.net patterns
   ═══════════════════════════════════════════════════════════ */

/* ── V2.1-A: Updated Color Tokens (Ocean + Sunset palette) ── */
:root {
  /* Busan Ocean Blue — inspired by visitbusan.net */
  --color-ocean:        #1A8FD1;
  --color-ocean-dark:   #0D6FA8;
  --color-ocean-light:  #38AED6;

  /* Busan Sunset Orange — Klook-style accent / CTA */
  --color-sunset:       #FF6B35;
  --color-sunset-light: #FF8C5A;
  --color-gold:         #FFC240;   /* festival yellow/gold */

  /* Glassmorphism overlays */
  --glass-white:  rgba(255, 255, 255, 0.85);
  --glass-dark:   rgba(15, 25, 50, 0.65);
  --glass-border: rgba(255, 255, 255, 0.25);

  /* Shadows — colored variants */
  --shadow-ocean:   0 4px 20px rgba(26, 143, 209, 0.35);
  --shadow-sunset:  0 4px 20px rgba(255, 107, 53, 0.35);
}

/* ── V2.1-B: Card Aspect Ratio Update (3:4 portrait) ────── */
/* Industry standard: TripAdvisor + Klook both use ~3:4 portrait */
.card-img-wrapper {
  aspect-ratio: 3 / 4;
}

/* Editorial/blog/event cards keep 16:9 */
.card-img-wrapper.ratio-landscape { aspect-ratio: 16 / 9; }
.card-img-wrapper.ratio-square    { aspect-ratio: 1 / 1; }
.card-img-wrapper.ratio-4-3       { aspect-ratio: 4 / 3; }

/* ── V2.1-C: Social Proof Badges (Klook pattern) ────────── */
/* "3,200명 예약" — trust builder  */
.social-proof {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.social-proof::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
}

/* Urgency/status badges on card images */
.badge-urgent {
  background: var(--color-sunset);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-popular {
  background: rgba(255, 107, 53, 0.9);
  color: #fff;
  backdrop-filter: blur(6px);
}
.badge-free {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  backdrop-filter: blur(6px);
}
.badge-gold {
  background: var(--color-gold);
  color: #1A1A2E;
}

/* ── V2.1-D: Glassmorphism Hero Search (Airbnb pattern) ──── */
.hero-search-glass {
  display: flex;
  align-items: stretch;
  max-width: 680px;
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  padding: 5px 5px 5px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
}

.hero-search-glass input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: white;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  min-width: 0;
}
.hero-search-glass input::placeholder { color: rgba(255,255,255,0.65); }

.hero-search-glass .search-submit {
  background: var(--color-sunset);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: var(--shadow-sunset);
}
.hero-search-glass .search-submit:hover {
  background: var(--color-sunset-light);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.5);
}

/* ── V2.1-E: Wave Divider between Hero and Content ────────── */
.hero-wave {
  position: relative;
  overflow: hidden;
  margin-bottom: -2px;
}
.hero-wave svg {
  display: block;
  width: 100%;
  height: 64px;
}

/* Static wave as pure CSS fallback */
.wave-divider {
  position: relative;
  height: 60px;
  overflow: hidden;
  margin-top: -60px;
  pointer-events: none;
  z-index: 2;
}
.wave-divider::after {
  content: '';
  position: absolute;
  bottom: 0; left: -5%;
  width: 110%;
  height: 100%;
  background: var(--bg-page);
  border-radius: 50% 50% 0 0 / 80px 80px 0 0;
}

/* ── V2.1-F: Destination Image Cards (Klook-style 4:5) ────── */
.dest-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  display: block;
  text-decoration: none;
}
.dest-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.dest-card:hover img { transform: scale(1.06); }
.dest-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.75) 100%);
}
.dest-card-info {
  position: absolute;
  bottom: 20px; left: 20px; right: 20px;
  color: #fff;
}
.dest-card-info h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.dest-card-info p {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;
}
.dest-card-count {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}

/* ── V2.1-G: Enhanced Category Strip (Klook-style) ─────────── */
.cat-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-strip::-webkit-scrollbar { display: none; }

.cat-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
  padding: 16px 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.cat-strip-item:hover,
.cat-strip-item.active {
  border-color: var(--color-ocean);
  background: rgba(26, 143, 209, 0.06);
  color: var(--color-ocean);
}
.cat-strip-item .cat-emoji { font-size: 26px; line-height: 1; }

/* ── V2.1-H: Improved Bottom Nav (Klook/Airbnb glassmorphism) */
#mobile-tabbar {
  background: var(--glass-white);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0,0,0,0.08);
  /* iOS notch */
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

/* ── V2.1-I: Improved Skeleton Loaders (Klook shimmer) ─────── */
@keyframes shimmer-v2 {
  0%   { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.skeleton,
[data-skeleton] {
  background: linear-gradient(
    90deg,
    #f0f2f5 25%,
    #e8eaed 50%,
    #f0f2f5 75%
  );
  background-size: 936px 100%;
  animation: shimmer-v2 1.4s ease-in-out infinite;
  border-radius: 6px;
  color: transparent !important;
}
.skeleton * { visibility: hidden; }

/* Properly sized skeleton image */
.skeleton-img-portrait  { aspect-ratio: 3/4; }
.skeleton-img-landscape { aspect-ratio: 16/9; }
.skeleton-img-square    { aspect-ratio: 1/1; }

/* Skeleton text lines */
.skeleton-line { height: 14px; margin: 8px 0; }
.skeleton-line.w-90 { width: 90%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }

/* ── V2.1-J: Price Display Component ───────────────────────── */
.price-tag {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--text-primary);
}
.price-tag .currency  { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.price-tag .amount    { font-size: 18px; font-weight: 800; color: var(--color-ocean-dark); }
.price-tag .unit      { font-size: 12px; color: var(--text-secondary); }
.price-tag .original  { font-size: 13px; color: var(--text-secondary); text-decoration: line-through; margin-left: 4px; }
.price-tag .discount  { font-size: 12px; font-weight: 700; color: var(--color-sunset); margin-left: 4px; }

/* ── V2.1-K: Enhanced Card — "Service Tags" ─────────────────── */
/* "무료 취소" / "즉시 확정" inline tags */
.service-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.service-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--color-primary-100);
  color: var(--color-ocean-dark);
}
.service-tag.free-cancel { background: #ECFDF5; color: #065F46; }
.service-tag.instant     { background: #EFF6FF; color: #1E40AF; }

/* ── V2.1-L: CTA Buttons (Sunset Orange variant) ────────────── */
.btn-sunset {
  background: var(--color-sunset);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: var(--shadow-sunset);
}
.btn-sunset:hover {
  background: var(--color-sunset-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,107,53,0.45);
}

.btn-ocean {
  background: var(--color-ocean);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: var(--shadow-ocean);
}
.btn-ocean:hover {
  background: var(--color-ocean-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26,143,209,0.45);
}

/* ── V2.1-M: Section Wave Dividers ─────────────────────────── */
.section-wave-top,
.section-wave-bottom {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}
.section-wave-top    { transform: scaleY(-1); }
.section-wave-top svg,
.section-wave-bottom svg { width: 100%; height: 48px; }

/* ── V2.1-N: Dark Mode — improved tokens ───────────────────── */
[data-theme="dark"] {
  --color-ocean:        #38AED6;
  --color-ocean-dark:   #1A8FD1;
  --glass-white:  rgba(30, 40, 60, 0.85);
  --glass-border: rgba(255, 255, 255, 0.12);
}

/* ── V2.1-O: Responsive Grid Improvements ──────────────────── */
@media (min-width: 480px) and (max-width: 767px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .grid-cards { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* Large desktop 5-col grid */
@media (min-width: 1440px) {
  .grid-cards-wide { grid-template-columns: repeat(5, 1fr); }
}

/* ── V2.1-P: Category Bar Modernization ────────────────────── */
/* Existing #category-bar on index.php — pill-chip style */
#category-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 500;
  padding: 10px 0;
}
#category-bar .category-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 var(--container-padding, 16px);
  scrollbar-width: none;
}
#category-bar .category-track::-webkit-scrollbar { display: none; }
#category-bar .cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.18s;
  flex-shrink: 0;
}
#category-bar .cat-item .cat-icon { font-size: 18px; line-height: 1; }
#category-bar .cat-item .cat-label { font-size: 12px; font-weight: 500; }
#category-bar .cat-item:hover,
#category-bar .cat-item.active {
  border-color: var(--color-ocean);
  background: rgba(26,143,209,0.07);
  color: var(--color-ocean);
}

/* ── V2.1-Q: Wishlist/Bookmark unified button ──────────────── */
.wishlist-btn {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.wishlist-btn:hover,
.wishlist-btn.active {
  color: var(--color-accent-coral);
  transform: scale(1.18);
}
.wishlist-btn.active { background: rgba(255,255,255,1); }

/* ── V2.1-R: Review card improvement ───────────────────────── */
.review-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.review-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); }

/* ── V2.1-S: Hero subtitle + badge improvements ─────────────── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ── V2.1-T: Map section height ────────────────────────────── */
#kakao-map,
#naver-map,
#leaflet-map {
  width: 100%;
  height: 420px;
}
@media (max-width: 767px) {
  #kakao-map,
  #naver-map,
  #leaflet-map {
    height: 280px;
  }
}

/* ── V2.1-U: Page header backgrounds (dark navy) ───────────── */
.page-hero {
  background: linear-gradient(135deg, #0A2342 0%, #0D3B6E 60%, #1A8FD1 100%);
  padding: 48px 0 40px;
  margin-top: 68px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.page-hero h1 {
  color: white;
  margin-bottom: 8px;
}
.page-hero p {
  color: rgba(255,255,255,0.75);
}

/* ── V2.1-V: Improved sort tab bar ────────────────────────── */
.sort-tab-bar {
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.sort-tab-bar::-webkit-scrollbar { display: none; }

/* ── V2.2: YouTube IFrame 크기 보정 ─────────────────────── */
/*
 * YT IFrame API가 <div>를 <iframe>으로 교체할 때 자동으로
 * 컨테이너를 가득 채우도록 강제
 */
.video-foreground iframe,
.video-foreground #hero-youtube-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── V2.2: Hero YouTube Video Fallback ───────────────────── */
/*
 * 유튜브 로드 실패 시 표시되는 CSS 전용 배경
 * 광안대교 야경을 연상시키는 그라디언트 + 애니메이션 조명 효과
 */
#hero-video-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(30, 144, 165, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse at 20% 80%,  rgba(14, 165, 233, 0.3)  0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%,  rgba(245, 158, 11, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, #020F1F 0%, #0A2342 40%, #0E3A6B 70%, #071A35 100%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 0;
}

#hero-video-fallback.visible {
  opacity: 1;
}

/* 광안대교 교량 조명 시뮬레이션 */
#hero-video-fallback::before {
  content: '';
  position: absolute;
  bottom: 28%;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 5%,
    rgba(30,144,165,0.6) 15%,
    rgba(14,165,233,0.9) 30%,
    rgba(30,144,165,0.9) 50%,
    rgba(14,165,233,0.9) 70%,
    rgba(30,144,165,0.6) 85%,
    transparent 95%
  );
  box-shadow: 0 0 12px 3px rgba(14,165,233,0.5);
  animation: bw-bridge-glow 3s ease-in-out infinite alternate;
}

/* 수면 반사 */
#hero-video-fallback::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 28%;
  background: linear-gradient(
    180deg,
    rgba(14,165,233,0.08) 0%,
    rgba(14,165,233,0.15) 30%,
    rgba(10,35,66,0.6) 100%
  );
  animation: bw-water-shimmer 4s ease-in-out infinite alternate;
}

@keyframes bw-bridge-glow {
  from { opacity: 0.7; box-shadow: 0 0 8px 2px rgba(14,165,233,0.4); }
  to   { opacity: 1;   box-shadow: 0 0 18px 5px rgba(14,165,233,0.7); }
}

@keyframes bw-water-shimmer {
  from { opacity: 0.5; transform: scaleX(1); }
  to   { opacity: 0.8; transform: scaleX(1.02); }
}

/* ── V2.2: Lang Switcher Dark Mode ───────────────────────── */
[data-theme="dark"] .lang-btn {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
}

/* ── V2.2: Footer Column Translation Keys ────────────────── */
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

/* ── V2.2: sr-only utility ───────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════════════
   V3.0 UI REDESIGN — Header · Category Bar · Hero Wave
   ══════════════════════════════════════════════════════════ */

/* ── V3.0-A: Remove Wave / Rounded Hero Bottom ─────────── */
.wave-divider,
.wave-divider::before,
.wave-divider::after,
.hero-wave { display: none !important; height: 0 !important; margin: 0 !important; }

/* ── V3.0-B: Header Redesign ────────────────────────────── */
#site-header {
  height: 62px !important;
}

/* Logo — gradient accent */
.header-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  text-decoration: none;
}
.header-logo span {
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav links — clean underline animation (remove background-pill) */
.header-nav a {
  position: relative;
  padding: 6px 10px !important;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 0 !important;
  background: none !important;
  transition: color 0.22s ease;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, #38BDF8, #0EA5E9);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s ease;
}
.header-nav a:hover {
  color: #fff !important;
  background: none !important;
}
.header-nav a:hover::after,
.header-nav a.active::after {
  transform: scaleX(1);
}
.header-nav a.active {
  color: #fff !important;
  background: none !important;
}

/* Scrolled state — class only (JS now uses classList.toggle) */
#site-header.scrolled {
  background: rgba(8, 18, 45, 0.97) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  box-shadow: 0 2px 28px rgba(0, 0, 0, 0.38);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Login button — frosted glass pill */
.header-login-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 7px 18px !important;
  border-radius: 100px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  white-space: nowrap;
  text-decoration: none !important;
  font-family: inherit;
  line-height: 1;
}
.header-login-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

/* Category bar top must match new header height */
#category-bar { top: 62px !important; }

/* ── V3.0-C: Category Bar Redesign ──────────────────────── */
#category-bar {
  padding: 10px 0 !important;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* Track with fade edges */
.category-track {
  display: flex !important;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 24px !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0px,
    black 24px,
    black calc(100% - 24px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0px,
    black 24px,
    black calc(100% - 24px),
    transparent 100%
  );
}
.category-track::-webkit-scrollbar { display: none; }

/* Cat pill — horizontal layout (row, not column) */
.cat-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 7px 15px !important;
  border-radius: 100px !important;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: auto !important;
  width: auto !important;
  transition: all 0.2s ease;
  line-height: 1.2;
}
.cat-item:hover {
  border-color: #0EA5E9 !important;
  color: #0EA5E9 !important;
  background: rgba(14, 165, 233, 0.07) !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.18);
}
.cat-item[aria-pressed="true"],
.cat-item.active {
  background: linear-gradient(135deg, #0EA5E9, #0369A1) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.45);
  transform: translateY(-1px);
}
.cat-item .cat-icon {
  font-size: 15px !important;
  line-height: 1;
  flex-shrink: 0;
}
.cat-item .cat-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

/* Dark mode tweaks */
[data-theme="dark"] .cat-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .cat-item:hover {
  background: rgba(14, 165, 233, 0.14) !important;
  border-color: rgba(14, 165, 233, 0.5) !important;
  color: #38BDF8 !important;
}
[data-theme="dark"] #category-bar {
  background: rgba(8, 14, 32, 0.98);
  border-bottom-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* ── V3.0-D: YouTube iframe fill ────────────────────────── */
.video-foreground iframe,
.video-foreground #hero-youtube-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ══════════════════════════════════════════════════════════
   V4.0 FULL AUDIT FIX — Desktop + Mobile Layout Overhaul
   2026-04 — Based on live browser audit (desktop 1920px)
   ══════════════════════════════════════════════════════════ */

/* ── V4.0-A: Section Padding Reduction ──────────────────
   Base style.css uses --space-16 = 64px top+bottom.
   Reduce to 48px for tighter, more connected layout.       */
.section { padding: 48px 0 !important; }

/* ── V4.0-B: Category Bar — Remove Left Edge Fade ───────
   The left mask was transparent 0→24px, clipping the
   "All" button. Keep only right fade.                      */
.category-track {
  padding: 4px 16px 4px 16px !important;
  -webkit-mask-image: linear-gradient(
    to right,
    black 0px,
    black calc(100% - 32px),
    transparent 100%
  ) !important;
  mask-image: linear-gradient(
    to right,
    black 0px,
    black calc(100% - 32px),
    transparent 100%
  ) !important;
}

/* ── V4.0-C: Body Scroll Safety ──────────────────────────
   Prevent JS scroll-lock from persisting unintentionally.  */
html { overflow-y: auto !important; }
body { min-height: 100vh; }

/* ── V4.0-D: Featured Card — Category Chip ──────────────
   PHP adds .featured-card-cat above the title.             */
.featured-card-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary-500, #0EA5E9);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
  line-height: 1.2;
}

/* ── V4.0-E: Naver/Leaflet Map Section ──────────────────── */
.map-section-home { background: var(--bg-page); }
.map-container-home {
  width: 100%;
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
}
#bw-home-map { width: 100%; height: 100%; }

/* ── V4.0-F: Sort Tab Bar ────────────────────────────────── */
.sort-tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px 0;
  flex-wrap: wrap;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.sort-tab-bar::-webkit-scrollbar { display: none; }
.sort-tab {
  flex-shrink: 0;
  padding: 7px 20px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s;
  font-family: inherit;
  white-space: nowrap;
}
.sort-tab:hover { border-color: #0EA5E9; color: #0EA5E9; }
.sort-tab.active {
  background: linear-gradient(135deg, #0EA5E9, #0369A1);
  border-color: transparent;
  color: white;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.35);
}

/* ── V4.0-G: Review Card Styling ────────────────────────── */
.review-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}
.review-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
}
.review-stars { color: var(--color-accent-gold, #F59E0B); }

/* ── V4.0-H: Featured Card Hover Enhancement ────────────── */
.featured-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
}

/* ── V4.0-I: Grid Cards — Explicit Grid ─────────────────── */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1200px) {
  .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 768px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .grid-cards { grid-template-columns: 1fr; gap: 10px; }
}

/* ── V4.0-J: Mobile Responsive Overhaul ─────────────────── */
@media (max-width: 767px) {
  /* Reduce section padding on mobile */
  .section { padding: 32px 0 !important; }

  /* HOT10 card smaller on mobile */
  .hot10-card { width: 155px !important; }

  /* Featured card smaller on mobile */
  .featured-card { width: 250px !important; }

  /* Category pills slightly smaller */
  .cat-item {
    padding: 6px 11px !important;
    font-size: 12px !important;
    gap: 4px !important;
  }
  .cat-item .cat-icon { font-size: 13px !important; }
  .cat-item .cat-label { font-size: 12px !important; }

  /* Map section height */
  .map-container-home { height: 260px; }

  /* Section header stacking on small screens */
  .section-header { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  /* Very small screens: reduce further */
  .section { padding: 24px 0 !important; }
  .hot10-card { width: 135px !important; }
  .featured-card { width: 220px !important; }
}

/* ── V4.0-K: Footer Spacing ─────────────────────────────── */
.pagination { margin: 32px 0 !important; }

/* ── V4.0-L: Card Address Ellipsis ──────────────────────── */
.card-address {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 5px 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── V4.0-M: Slider Track Width Enforcement ──────────────── */
.slider-track { width: 100%; }

/* ══════════════════════════════════════════════════════════
   V4.1 MOBILE AUDIT FIXES
   ══════════════════════════════════════════════════════════ */

/* V4.1-A: Body bottom padding — prevents content from hiding under fixed mobile tab bar (~62px) */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 8px));
  }
}

/* V4.1-B: Hide slider arrow buttons on mobile — use touch swipe instead */
@media (max-width: 767px) {
  .slider-btn { display: none !important; }
}

/* V4.1-C: Prevent section title overflow on small screens */
@media (max-width: 480px) {
  .section-title {
    font-size: 18px !important;
  }
  .section-title-v2 {
    font-size: 18px !important;
  }
}

/* V4.1-D: AI banner cards scrollable on mobile — ensure full-width strip */
@media (max-width: 767px) {
  .ai-mini-card { width: 100px; }
}

/* V4.1-E: Review cards single column on mobile */
@media (max-width: 767px) {
  .reviews-grid {
    grid-template-columns: 1fr !important;
  }
}

/* V4.1-F: Slider sections — remove container side padding so cards go edge-to-edge on mobile */
@media (max-width: 767px) {
  .hot10-section .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .hot10-section .section-header {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* Featured slider: keep container padding, but slider cards touch edges */
  #featured-track {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}


