/* KAKURU - メインスタイルシート */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
  --primary: #0D9488;
  --primary-dark: #0a7a6e;
  --primary-light: #e6f7f6;
  --text: #1a1a1a;
  --text-sub: #666;
  --border: #e0e0e0;
  --bg: #f8f9fa;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.14);
}

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

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

/* ========== HEADER ========== */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; opacity: 0.85; }
.header-search {
  flex: 1;
  min-width: 200px;
}
.header-search form {
  display: flex;
  gap: 0.5rem;
}
.header-search input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.header-search input[type="search"]:focus {
  border-color: var(--primary);
}
.btn {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.2s, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); opacity: 1; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

/* カテゴリナビ */
.cat-nav {
  background: var(--primary);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cat-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0;
}
.cat-nav a {
  color: var(--white);
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.2s;
}
.cat-nav a:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}
.cat-nav svg { width: 14px; height: 14px; }

/* ========== MAIN ========== */
main {
  flex: 1;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 3.5rem 1rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.hero p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.8rem;
}
.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}
.hero-search input[type="search"] {
  flex: 1;
  padding: 0.85rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}
.hero-search .btn {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  background: var(--white);
  color: var(--primary);
}
.hero-search .btn:hover { background: var(--primary-light); }

/* ========== SECTION ========== */
.section {
  padding: 2.5rem 0;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}
.section-title svg { color: var(--primary); width: 22px; height: 22px; }

/* ========== PRODUCT CARD ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 0.5rem;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}
.product-card-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.product-card-img-placeholder svg {
  width: 48px; height: 48px; color: var(--primary); opacity: 0.5;
}
.product-card-body {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-title {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
  flex: 1;
}
.product-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.product-card-meta {
  font-size: 0.75rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-sale { background: #fff1f0; color: #e53935; }
.badge-hot { background: #fff8e1; color: #f57c00; }

/* ========== CATEGORY CARDS ========== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 0.75rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}
.cat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--primary);
}
.cat-card svg {
  width: 36px; height: 36px; color: var(--primary);
}
.cat-card span { font-size: 0.85rem; font-weight: 700; }

/* ========== PROVIDER BADGES ========== */
.provider-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}
.provider-amazon { background: #FF9900; color: #111; }
.provider-rakuten { background: #BF0000; }
.provider-yahoo { background: #6001D2; }

/* ========== PRODUCT DETAIL ========== */
.product-detail {
  padding: 2rem 0;
}
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: start;
}
.product-images .main-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: contain;
  max-height: 350px;
  background: #fafafa;
}
.product-images .sub-imgs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.product-images .sub-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  background: #fafafa;
}
.product-images .sub-img:hover { border-color: var(--primary); }
.product-info h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.product-price-main {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.product-price-label {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 1rem;
}

/* KAKURUの判断 */
.kakuru-verdict {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.kakuru-verdict .verdict-label {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.kakuru-verdict .verdict-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.kakuru-verdict .verdict-sub {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-top: 0.25rem;
}
.verdict-buy { border-left-color: #16a34a; background: #f0fdf4; }
.verdict-buy .verdict-label { color: #16a34a; }
.verdict-wait { border-left-color: #d97706; background: #fffbeb; }
.verdict-wait .verdict-label { color: #d97706; }
.verdict-best { border-left-color: #7c3aed; background: #f5f3ff; }
.verdict-best .verdict-label { color: #7c3aed; }

/* EC比較テーブル */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.compare-table th {
  background: var(--primary);
  color: var(--white);
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  text-align: left;
}
.compare-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr.best-deal td { background: var(--primary-light); }
.effective-price { font-weight: 700; color: var(--primary); }

/* グラフ */
.chart-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.chart-title svg { color: var(--primary); width: 18px; height: 18px; }

/* ========== BREADCRUMB ========== */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-sub);
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.breadcrumb a { color: var(--text-sub); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg { width: 12px; height: 12px; }

/* ========== SEARCH ========== */
.search-meta {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 1rem;
}
.search-meta strong { color: var(--primary); }

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  color: var(--text);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-sub);
}
.empty-state svg { width: 64px; height: 64px; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h2 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text); }
.empty-state p { font-size: 0.9rem; }

/* ========== LEGAL PAGES ========== */
.legal-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin: 2rem 0;
  max-width: 800px;
}
.legal-content h1 { font-size: 1.5rem; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--primary); }
.legal-content h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; color: var(--primary); }
.legal-content p, .legal-content li { font-size: 0.92rem; margin-bottom: 0.5rem; }
.legal-content ul { padding-left: 1.5rem; }

/* ========== FOOTER ========== */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 2rem 1rem 1rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-tagline {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}
.footer-links a { color: #ccc; font-size: 0.85rem; }
.footer-links a:hover { color: var(--primary); }
.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: #888;
}

/* ========== CATEGORY PAGE ========== */
.category-hero {
  background: var(--primary-light);
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.category-hero h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.category-hero p { font-size: 0.9rem; color: var(--text-sub); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
  .hero h1 { font-size: 1.4rem; }
  .hero-search { flex-direction: column; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .compare-table th:nth-child(3),
  .compare-table td:nth-child(3) { display: none; }
  .header-inner { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-card-body { padding: 0.5rem; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 0.5rem; }
}

/* ========== UTILITY ========== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-primary { color: var(--primary); }
.text-sub { color: var(--text-sub); }
.text-sm { font-size: 0.85rem; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.w-full { width: 100%; }
