/* ========================================
   桃の香水比較サイト — style.css
   Design: design-perfume SKILL.md 準拠
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Noto+Sans+JP:wght@300;400;500;700;900&display=swap');

/* --- CSS Variables --- */
:root {
  /* Base */
  --bg-page: #faf8f5;
  --bg-warm: #f3efe8;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f7f4ee;
  --bg-hover: #ede9e2;

  /* Text */
  --text-primary: #2a2725;
  --text-secondary: #5c5550;
  --text-muted: #9a948d;

  /* Accent */
  --accent: #c47a3a;
  --accent-light: #d48a4a;
  --accent-dim: rgba(196,122,58,0.08);
  --herb: #6b7f52;
  --herb-dim: rgba(107,127,82,0.08);
  --wood: #7a6650;
  --wood-dim: rgba(122,102,80,0.10);
  --positive: #6b7f52;
  --positive-dim: rgba(107,127,82,0.10);
  --negative: #a85c4a;
  --negative-dim: rgba(168,92,74,0.10);
  --rank-gold: #b8963e;
  --peach-pale: #f5dcc8;

  /* Border & Shadow */
  --border: #ddd7cf;
  --border-light: #e8e3db;
  --shadow-sm: 0 1px 4px rgba(42,39,37,0.06);
  --shadow: 0 4px 20px rgba(42,39,37,0.08);
  --shadow-lg: 0 8px 30px rgba(42,39,37,0.10);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 2.0;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1 { font-size: 30px; font-weight: 900; line-height: 1.5; }
h2 { font-size: 25px; font-weight: 700; line-height: 1.5; margin-bottom: 16px; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.5; margin-bottom: 12px; }

.section-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-lead { font-size: 16px; color: var(--text-secondary); line-height: 2.0; margin-bottom: 32px; }

.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.product-name { font-size: 17px; font-weight: 700; line-height: 1.4; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,245,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 60px;
  display: flex;
  align-items: center;
}

.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.site-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.site-logo a { color: inherit; }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); margin: 5px 0; transition: 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-menu { display: flex; gap: 24px; list-style: none; }
.nav-menu a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav-menu a:hover { color: var(--accent); }

/* --- Hero --- */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--peach-pale) 0%, var(--bg-page) 100%);
  text-align: center;
}

.hero h1 { margin-bottom: 16px; }

.hero-catch {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hero-lead {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
  max-width: 640px;
  margin: 0 auto 20px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* Star Rating */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: var(--rank-gold);
  margin-top: 8px;
}
.star-rating .star-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-left: 4px;
}

/* --- Section --- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-warm); }

.section-header { text-align: center; margin-bottom: 48px; }

/* --- Positioning MAP --- */
.map-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto 48px;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, rgba(245,220,200,0.3) 0%, rgba(245,220,200,0.05) 50%, rgba(245,220,200,0.3) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.map-axis-x, .map-axis-y {
  position: absolute;
  background: var(--border);
}
.map-axis-x { width: 100%; height: 1px; top: 50%; left: 0; }
.map-axis-y { width: 1px; height: 100%; top: 0; left: 50%; }

.map-label {
  position: absolute;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.map-label--top { top: 8px; left: 50%; transform: translateX(-50%); }
.map-label--bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.map-label--left { left: 8px; top: 50%; transform: translateY(-50%); }
.map-label--right { right: 8px; top: 50%; transform: translateY(-50%); }

.map-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.2s;
}
.map-dot:hover { transform: translate(-50%, -50%) scale(1.5); z-index: 10; }

.map-dot--highend { background: var(--wood); }
.map-dot--middle { background: var(--accent); }
.map-dot--budget { background: var(--text-muted); }
.map-dot--korean { background: var(--herb); }
.map-dot--bodymist { background: #b0aba5; }

.map-dot--kuoca {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: 3px solid var(--rank-gold);
  z-index: 5;
  animation: pulse 2s infinite;
}
.map-dot--kuoca:hover { transform: translate(-50%, -50%) scale(1.3); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,150,62,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(184,150,62,0); }
}

.map-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  z-index: 20;
  pointer-events: none;
}
.map-dot:hover .map-tooltip { display: block; }

.map-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}
.map-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* --- Ranking Cards --- */
.ranking-list { display: flex; flex-direction: column; gap: 32px; }

.ranking-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 32px;
  position: relative;
}
.ranking-card:hover { box-shadow: var(--shadow); }

.ranking-card--first {
  border-top: 3px solid var(--rank-gold);
}

.rank-badge {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--wood);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
}
.ranking-card--first .rank-badge { background: var(--rank-gold); }

.ranking-card-header {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.ranking-card-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg-surface-alt);
  flex-shrink: 0;
}

.ranking-card--first .ranking-card-img {
  width: 120px;
  height: 120px;
}

.ranking-card-info { flex: 1; }
.ranking-card-info .brand-name { margin-bottom: 4px; }

.ranking-card-price {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
}

.ranking-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ranking-card-summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 16px;
}

.ranking-card-assessment {
  background: var(--bg-warm);
  border-radius: 8px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.8;
}

.ranking-card-assessment strong { color: var(--accent); }

/* --- Tags --- */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.4;
}
.tag--highend { background: var(--wood-dim); color: var(--wood); }
.tag--middle { background: var(--accent-dim); color: var(--accent); }
.tag--budget { background: rgba(154,148,141,0.1); color: var(--text-muted); }
.tag--korean { background: var(--herb-dim); color: var(--herb); }
.tag--bodymist { background: rgba(176,171,165,0.1); color: #8a857e; }
.tag--unisex { background: rgba(122,102,80,0.06); color: var(--wood); }
.tag--women { background: rgba(196,122,58,0.06); color: var(--accent); }
.tag--award { background: rgba(184,150,62,0.12); color: var(--rank-gold); font-weight: 600; }

/* --- Reviews --- */
.review-block { margin-top: 16px; }
.review-block h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

.review-item {
  background: var(--bg-warm);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.9;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3px solid var(--herb);
}
.review-item--negative { border-left-color: var(--negative); }

.review-source {
  font-size: 12px;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Category Section --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.product-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(196,122,58,0.3);
}

.product-card-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg-surface-alt);
  float: right;
  margin: 0 0 8px 12px;
}

.product-card .brand-name { margin-bottom: 4px; }
.product-card .product-name { margin-bottom: 8px; }

.product-card-detail {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.product-card-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
}

.product-card-review {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  border-left: 2px solid var(--herb);
  padding-left: 10px;
  line-height: 1.8;
}
.product-card-review--negative { border-left-color: var(--negative); }

.product-card-impression {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: normal;
}

/* --- Comparison Table --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.compare-table th {
  background: var(--bg-warm);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.compare-table tr:hover td { background: var(--bg-hover); }

.compare-table .item-cell {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* --- FAQ --- */
.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 20px 0;
}

.faq-question {
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 24px;
  color: var(--text-muted);
  transition: transform 0.3s;
}
.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding-top: 12px;
  font-size: 16px;
  line-height: 2.0;
  color: var(--text-secondary);
}
.faq-item.active .faq-answer { display: block; }

/* --- Footer --- */
.site-footer {
  background: #3a3632;
  color: #b5afa8;
  padding: 40px 0;
  font-size: 14px;
}
.site-footer a { color: #d4cfc8; }
.site-footer a:hover { color: #fff; }
.footer-content { text-align: center; }
.footer-nav { display: flex; justify-content: center; gap: 24px; list-style: none; margin-bottom: 16px; }
.footer-copy { color: var(--text-muted); font-size: 12px; }

/* --- Floating Button --- */
.floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: #fff;
  padding: 14px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  transition: background 0.2s;
}
.floating-btn:hover { background: var(--accent-light); color: #fff; }

/* --- Responsive: Tablet --- */
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 24px; }
  h2 { font-size: 21px; }
  h3 { font-size: 18px; }
  .hero { padding: 60px 0 40px; }
  .hero-catch { font-size: 16px; }
  .ranking-card { padding: 24px; }
  .ranking-card-header { flex-direction: row; align-items: center; }
  .ranking-card-img { width: 80px; height: 80px; }
  .ranking-card--first .ranking-card-img { width: 90px; height: 90px; }

  .hamburger { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-menu.active { display: flex; }
  .site-header .container { position: relative; }
}

/* --- Responsive: Mobile --- */
@media (max-width: 480px) {
  body { font-size: 15px; }
  h1 { font-size: 21px; }
  h2 { font-size: 19px; }
  h3 { font-size: 17px; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }

  .category-grid { grid-template-columns: 1fr; }
  .product-card-img { width: 60px; height: 60px; }
  .ranking-card-img { width: 70px; height: 70px; }
  .ranking-card--first .ranking-card-img { width: 80px; height: 80px; }

  .ranking-card { padding: 20px 16px; }
  .ranking-card-price { font-size: 17px; }

  .map-container { aspect-ratio: 1 / 1.1; }

  /* Table Card化 */
  .compare-table thead { display: none; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td {
    display: block;
    width: 100%;
  }
  .compare-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
  }
  .compare-table td {
    padding: 6px 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .compare-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 12px;
  }
  .compare-table td.item-cell {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--accent);
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
  }
  .compare-table td.item-cell::before { display: none; }
}

/* ========== Article Page Styles ========== */

/* TOC */
.toc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}
.toc-box h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.toc-list {
  list-style: none;
  counter-reset: toc;
}
.toc-list li {
  counter-increment: toc;
  margin-bottom: 8px;
}
.toc-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.7;
  display: block;
  transition: color 0.2s;
}
.toc-list li a:hover { color: var(--accent); }
.toc-list li a::before {
  content: counter(toc) ". ";
  color: var(--accent);
  font-weight: 600;
}

/* Article Content */
.article-content {
  max-width: 760px;
  margin: 0 auto;
}
.article-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.article-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}
.article-content p {
  margin-bottom: 16px;
  line-height: 2.0;
}
.article-content ul, .article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}
.article-content li {
  margin-bottom: 8px;
  line-height: 1.9;
}

/* Info Box (tip/note) */
.info-box {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.9;
}
.info-box--herb {
  background: var(--herb-dim);
  border-left-color: var(--herb);
}
.info-box strong {
  display: block;
  margin-bottom: 4px;
}

/* Section Image */
.section-image {
  margin: 40px auto;
  max-width: 760px;
  text-align: center;
}
.section-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

/* Article Grid (Related Articles) */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: block;
}
.article-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(196,122,58,0.3);
}
.article-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.article-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Product Mini Card (for article pages) */
.product-mini {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.product-mini img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--bg-surface-alt);
}
.product-mini-info { flex: 1; }
.product-mini-info .brand-name { margin-bottom: 2px; }
.product-mini-info .product-name { font-size: 16px; margin-bottom: 4px; }
.product-mini-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

/* Internal Link */
.internal-link {
  margin: 12px 0 20px;
  font-size: 15px;
  font-weight: 500;
}
.internal-link a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.internal-link a:hover {
  border-bottom-color: var(--accent);
}

@media (max-width: 480px) {
  .toc-box { padding: 16px 20px; }
  .article-grid { grid-template-columns: 1fr; }
  .product-mini { flex-direction: column; align-items: center; text-align: center; }
}
