/* ===========================
   BeautyBests — Clean Design
   Google-inspired minimal UI
   =========================== */

:root {
  --primary: #e91e8c;
  --primary-light: #fce4ec;
  --primary-dark: #c2185b;
  --accent: #f06292;
  --gold: #f9a825;

  --bg: #f8f9fa;
  --bg-white: #ffffff;
  --bg-gray: #f1f3f4;

  --text: #202124;
  --text-light: #5f6368;
  --text-muted: #9aa0a6;

  --border: #e8eaed;
  --divider: #dadce0;

  --shadow-sm: 0 1px 3px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.06);
  --shadow: 0 2px 8px rgba(60,64,67,.12), 0 1px 3px rgba(60,64,67,.06);
  --shadow-md: 0 4px 16px rgba(60,64,67,.15), 0 2px 6px rgba(60,64,67,.08);
  --shadow-hover: 0 6px 20px rgba(60,64,67,.18), 0 3px 8px rgba(60,64,67,.1);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Google Sans', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 24px;
}
.site-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo span { color: var(--gold); }

/* Header Search */
.header-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0 16px;
  height: 38px;
  transition: var(--transition);
}
.header-search:focus-within {
  background: var(--bg-white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,.1);
}
.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: var(--text);
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search svg { color: var(--text-muted); flex-shrink: 0; width: 18px; height: 18px; }

.header-nav { display: flex; gap: 4px; list-style: none; }
.header-nav a {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
}
.header-nav a:hover, .header-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
}
.hamburger span { width: 22px; height: 2px; background: var(--text-light); display: block; border-radius: 2px; }

/* ===== Hero ===== */
.hero {
  background: var(--bg-white);
  padding: 56px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: .04em;
}
.hero h1 {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.hero h1 em { color: var(--primary); font-style: normal; }
.hero p { font-size: 15px; color: var(--text-light); margin-bottom: 28px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-outline { background: var(--bg-white); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

/* ===== Category chips ===== */
.category-nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  width: max-content;
}
.cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--bg-gray);
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-chip.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.cat-chip .icon { font-size: 15px; }

/* ===== Main Layout ===== */
.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}
.main-content { min-width: 0; }

/* ===== Section Title ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.section-title .badge {
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: .04em;
}

/* ===== Ranking Cards ===== */
.ranking-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }

.ranking-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 52px 88px 1fr;
  gap: 16px;
  align-items: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.ranking-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--divider);
  transform: translateY(-2px);
}
.rank-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #f9a825); color: #5d4037; }
.rank-2 { background: linear-gradient(135deg, #e0e0e0, #9e9e9e); color: #424242; }
.rank-3 { background: linear-gradient(135deg, #ffcc80, #ff9800); color: #4e342e; }
.rank-other { background: var(--bg-gray); color: var(--text-muted); font-size: 16px; }

.product-img-wrap {
  width: 80px; height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-gray);
  flex-shrink: 0;
}
.product-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--primary-light);
}
.product-info { min-width: 0; }
.product-category { font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.product-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-brand { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.product-stars { color: #f9a825; font-size: 13px; margin-bottom: 5px; }
.product-stars span { color: var(--text-muted); font-size: 11px; }
.product-price { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.product-price small { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.point-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.point-list li { font-size: 12px; color: var(--text-light); padding-left: 14px; position: relative; }
.point-list li::before { content: '✓'; color: var(--primary); position: absolute; left: 0; font-weight: 700; }

.product-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-rakuten { background: #bf0000; color: #fff; }
.btn-rakuten:hover { background: #a00000; color: #fff; transform: translateY(-1px); }
.btn-amazon { background: #ff9900; color: #111; }
.btn-amazon:hover { background: #e68900; color: #111; transform: translateY(-1px); }
.btn-yahoo { background: #ff0033; color: #fff; }
.btn-yahoo:hover { background: #cc0029; color: #fff; transform: translateY(-1px); }
.btn-detail { background: var(--bg-gray); color: var(--text-light); font-size: 11px; padding: 5px 12px; border-radius: 100px; }
.btn-detail:hover { background: var(--primary-light); color: var(--primary); }

/* ===== Article Cards ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: block;
}
.article-card:hover { box-shadow: var(--shadow-hover); border-color: var(--divider); transform: translateY(-2px); }
.article-thumb {
  width: 100%;
  height: 140px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.article-body { padding: 14px 16px; }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--bg-gray);
  color: var(--text-muted);
  font-weight: 600;
}
.tag-primary { background: var(--primary-light); color: var(--primary); }
.article-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  background: var(--bg-gray);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.widget-body { padding: 14px 16px; }

/* Search Widget */
.search-box {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  transition: var(--transition);
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(233,30,140,.08); }
.search-box input { flex: 1; border: none; padding: 9px 14px; font-size: 13px; outline: none; background: transparent; }
.search-box button { background: var(--primary); border: none; padding: 9px 14px; color: #fff; cursor: pointer; font-size: 15px; transition: var(--transition); }
.search-box button:hover { background: var(--primary-dark); }

/* Sidebar Ranking */
.sidebar-rank-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.sidebar-rank-item { display: flex; align-items: center; gap: 10px; }
.sr-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.sr-1 { background: #ffd700; color: #5d4037; }
.sr-2 { background: #e0e0e0; color: #424242; }
.sr-3 { background: #ffcc80; color: #4e342e; }
.sr-other { background: var(--bg-gray); color: var(--text-muted); }
.sr-thumb { width: 40px; height: 40px; background: var(--primary-light); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sr-info { min-width: 0; }
.sr-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-price { font-size: 11px; color: var(--primary); font-weight: 700; }

/* Profile Widget */
.profile-widget { text-align: center; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-light); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.profile-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.profile-bio { font-size: 12px; color: var(--text-light); line-height: 1.6; }

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== Banner ===== */
.banner-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px 24px;
  text-align: center;
  color: #fff;
  margin: 32px 0;
}
.banner-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.banner-section p { font-size: 13px; opacity: .9; margin-bottom: 20px; }

/* ===== Footer ===== */
.site-footer {
  background: #202124;
  color: #9aa0a6;
  padding: 40px 24px 20px;
  margin-top: 48px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-logo { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: var(--gold); }
.footer-desc { font-size: 12px; line-height: 1.8; color: #9aa0a6; margin-bottom: 14px; }
.footer-heading { color: #e8eaed; font-size: 13px; font-weight: 700; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid #3c4043; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #9aa0a6; font-size: 12px; transition: var(--transition); }
.footer-links a:hover { color: #e8eaed; }
.footer-bottom { border-top: 1px solid #3c4043; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; flex-wrap: wrap; gap: 8px; }
.affiliate-notice { background: #2d2e30; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 11px; color: #9aa0a6; margin-bottom: 20px; border-left: 3px solid var(--primary); }

/* ===== Ranking Page ===== */
.ranking-page-hero { background: var(--bg-white); padding: 36px 24px; text-align: center; border-bottom: 1px solid var(--border); }
.ranking-page-hero h1 { font-size: clamp(20px,4vw,30px); font-weight: 700; color: var(--text); margin-bottom: 6px; }
.update-info { max-width: 1200px; margin: 0 auto 16px; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.ranking-tabs { max-width: 1200px; margin: 0 auto 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.ranking-tab { padding: 7px 18px; border-radius: 100px; background: var(--bg-gray); color: var(--text-light); font-weight: 600; font-size: 13px; cursor: pointer; border: 1.5px solid transparent; transition: var(--transition); }
.ranking-tab.active, .ranking-tab:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ===== Mobile Nav ===== */
.mobile-nav { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 200; }
.mobile-nav.open { display: flex; }
.mobile-nav-panel { background: var(--bg-white); width: 260px; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-md); }
.mobile-nav-panel a { color: var(--text); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; transition: var(--transition); }
.mobile-nav-panel a:hover { background: var(--bg-gray); color: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .main-wrapper { grid-template-columns: 1fr; }
  .sidebar { order: -1; display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
}
@media (max-width: 720px) {
  .header-search { display: none; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .ranking-card { grid-template-columns: 44px 72px 1fr; gap: 10px; padding: 12px 14px; }
  .product-img-wrap { width: 72px; height: 72px; }
  .article-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .sidebar { display: flex; }
}
.product-list { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0; }
.product-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 16px; display: flex; gap: 16px; align-items: flex-start; background: #fff; flex: 1 1 280px; }
.product-card img { width: 100px; height: 100px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.product-card .product-info { display: flex; flex-direction: column; gap: 8px; }
.product-card .product-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.5; }
.product-card .product-price { font-size: 15px; font-weight: 800; color: var(--primary-dark); }

@media (max-width: 480px) {
  .ranking-card { grid-template-columns: 36px 1fr; }
  .product-img-wrap { display: none; }
  .header-inner { padding: 0 16px; }
  .main-wrapper { padding: 20px 16px; }
  .category-nav { padding: 10px 16px; }
  .product-card { flex-direction: column; }
}

/* ===== フィルターバー ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-btn {
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 記事インライン検索バー ===== */
.article-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.article-search-bar input {
  flex: 1;
  max-width: 360px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.article-search-bar input:focus { border-color: var(--primary); }
.search-result-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===== ページネーション ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.page-btn:hover:not(.disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.disabled { opacity: .4; cursor: default; }
.page-ellipsis { color: var(--text-muted); padding: 0 4px; line-height: 40px; }
