/* Japan Best Finds - 6-Language Foreigner Portal Stylesheet */
:root {
  --primary: #1E3A8A;
  --primary-dark: #172554;
  --rakuten: #BF0000;
  --rakuten-dark: #990000;
  --accent: #0D9488;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --border: #E2E8F0;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Microsoft YaHei", "Leelawadee UI", "Tahoma", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Sticky Language Switcher Bar */
.lang-bar {
  background: #0B1120;
  color: #E2E8F0;
  border-bottom: 1px solid #1E293B;
  position: sticky;
  top: 0;
  z-index: 60;
}
.lang-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.lang-bar-label {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 700;
  white-space: nowrap;
}
.lang-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #E2E8F0;
  background: #1E293B;
  border: 1px solid #334155;
  transition: all 0.15s ease;
  text-decoration: none;
}
.lang-pill:hover {
  background: #334155;
  color: #FFFFFF;
  text-decoration: none;
}
.lang-pill.active {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #FFFFFF;
}

/* PR Notice */
.pr-bar {
  background: #F1F5F9;
  color: #475569;
  font-size: 12px;
  text-align: center;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
}
.brand-name {
  font-size: 20px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.site-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}
.site-nav a { color: #334155; }
.site-nav a:hover { color: var(--primary); }
.nav-room-btn {
  background: var(--rakuten);
  color: #FFFFFF !important;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
}
.nav-room-btn:hover { background: var(--rakuten-dark); text-decoration: none !important; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 52%, #0F766E 100%);
  color: #F8FAFC;
  padding: 46px 0 42px;
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.25;
  max-width: 860px;
}
.hero-desc {
  margin: 0 0 24px;
  font-size: 15.5px;
  color: #E2E8F0;
  max-width: 780px;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  max-width: 720px;
}
.kpi-box {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
}
.kpi-box strong {
  display: block;
  font-size: 22px;
  color: #FFFFFF;
  line-height: 1.2;
}
.kpi-box span {
  font-size: 12px;
  color: #CBD5E1;
}

/* Sections */
.section { padding: 42px 0 12px; }
.section-title {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 900;
  color: #0F172A;
}
.section-desc {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14.5px;
}

/* Search & Filter Toolbar */
.toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 240px;
  padding: 12px 16px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  background: #F8FAFC;
  color: var(--text);
}
.search-input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
}
.result-count {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: #334155;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}
.item-card.hidden { display: none; }
.item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.genre-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.rating-pill {
  font-size: 12px;
  font-weight: 800;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 9px;
  border-radius: 999px;
}
.item-title {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.4;
  font-weight: 800;
  color: #0F172A;
}
.item-jp-sub {
  font-size: 11.5px;
  color: #64748B;
  background: #F8FAFC;
  border-left: 3px solid #CBD5E1;
  padding: 3px 8px;
  border-radius: 4px;
}
.item-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  flex: 1;
}
.item-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
}
.price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #334155;
}
.price-val {
  font-size: 16px;
  font-weight: 900;
  color: #0F172A;
}
.btn-rakuten {
  display: block;
  text-align: center;
  background: var(--rakuten);
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 13.5px;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-rakuten:hover {
  background: var(--rakuten-dark);
  transform: translateY(-1px);
}
.no-results {
  display: none;
  text-align: center;
  padding: 36px 20px;
  background: var(--surface);
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
}

/* 5 Topic Sites Grid */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.topic-card h3 {
  margin: 0;
  font-size: 18px;
  color: #0F172A;
}
.topic-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  flex: 1;
}
.topic-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.btn-site {
  flex: 1;
  text-align: center;
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none !important;
}
.btn-site:hover { opacity: 0.92; }
.btn-outline {
  text-align: center;
  border: 1px solid #CBD5E1;
  color: #334155 !important;
  font-weight: 700;
  font-size: 12.5px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none !important;
}
.btn-outline:hover { background: #F1F5F9; }

/* Guide & Community Cards (Events & Shops) */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.comm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.comm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}
.comm-card.hidden { display: none; }
.comm-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: #334155;
  background: #F8FAFC;
  border-radius: 8px;
  padding: 8px 10px;
}
.online-pill {
  font-size: 11px;
  font-weight: 800;
  color: #065F46;
  background: #D1FAE5;
  padding: 2px 9px;
  border-radius: 999px;
}
.btn-official {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 9px;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}
.btn-official:hover { opacity: 0.9; }

/* Japan Living Guide Cards */
.living-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.living-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.living-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: #0F172A;
}
.living-summary {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.living-details {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
}
.living-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  user-select: none;
}
.living-list {
  margin: 10px 0 2px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: #1E293B;
}
.living-actions {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* How to Buy Guide */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.guide-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--primary);
}
.guide-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* ROOM CTA Banner */
.room-banner {
  margin-top: 34px;
  background: linear-gradient(135deg, #7F1D1D 0%, #BF0000 100%);
  color: #FFFFFF;
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.room-banner h2 { margin: 0 0 6px; font-size: 21px; }
.room-banner p { margin: 0; font-size: 14px; color: #FEE2E2; }
.room-banner-btn {
  background: #FFFFFF;
  color: #990000 !important;
  font-weight: 900;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  white-space: nowrap;
  text-decoration: none !important;
}
.room-banner-btn:hover { background: #FEF2F2; }

/* Footer */
.site-footer {
  margin-top: 48px;
  background: #0F172A;
  color: #CBD5E1;
  padding: 34px 0;
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-langs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.footer-langs a { color: #93C5FD; font-weight: 700; }

@media (max-width: 640px) {
  .hero { padding: 34px 0 30px; }
  .product-grid, .sites-grid { grid-template-columns: 1fr; }
}
