/* ============================================================
   1. CSS変数・リセット
   ============================================================ */
:root {
  --color-primary:       #e84d8a;
  --color-primary-light: #fde8f2;
  --color-primary-dark:  #c2356e;
  --color-accent:        #ff6eb4;
  --color-bg:            #fff8fb;
  --color-white:         #ffffff;
  --color-text:          #333333;
  --color-text-muted:    #888888;
  --color-border:        #f0c0d8;
  --color-card-bg:       #ffffff;
  --font-base:           'Noto Sans JP', sans-serif;
  --max-width:           1100px;
  --sidebar-width:       280px;
  --gap:                 24px;
  --radius:              8px;
  --radius-lg:           16px;
  --shadow:              0 2px 10px rgba(232, 77, 138, 0.12);
  --shadow-hover:        0 6px 20px rgba(232, 77, 138, 0.22);
  --transition:          0.2s ease;
}

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

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

body {
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

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

a:hover {
  color: var(--color-primary-dark);
}

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

ul, ol {
  list-style: none;
}

/* ============================================================
   2. レイアウト基盤
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px var(--gap) 48px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--gap);
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* ============================================================
   3. ヘッダー
   ============================================================ */
.site-header {
  background: var(--color-white);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(232, 77, 138, 0.10);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.site-logo .logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.site-logo .logo-subtitle {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  display: block;
}

/* ============================================================
   4. ナビゲーション
   ============================================================ */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   5. ヒーローバナー
   ============================================================ */
.hero-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-white);
  padding: 64px var(--gap);
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='20' cy='20' r='10'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-banner .hero-inner {
  position: relative;
  z-index: 1;
}

.hero-banner .hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-banner h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero-banner p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 480px;
  margin: 0 auto 24px;
}

.hero-banner .hero-cta {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-banner .hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ============================================================
   6. セクション共通
   ============================================================ */
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.section-heading .heading-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--color-border), transparent);
}

.section-heading .heading-icon {
  width: 6px;
  height: 28px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
  border-radius: 3px;
  flex-shrink: 0;
}

/* カテゴリタブ */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.category-tab {
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
}

.category-tab:hover,
.category-tab.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ============================================================
   7. 商品カード（グリッド）
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: 32px;
}

.product-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

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

.card-image-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--color-primary-light);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-image-wrap img {
  transform: scale(1.04);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.card-badge.new { background: #ff6eb4; }
.card-badge.sale { background: #e84d4d; }
.card-badge.rank { background: #f5a623; }

.card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-maker {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: auto;
}

.card-price .original-price {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 6px;
}

.card-btn {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px;
  border-radius: 6px;
  transition: opacity var(--transition);
  margin-top: 10px;
}

.card-btn:hover {
  opacity: 0.88;
  color: #fff;
}

/* 続きを見るボタン */
.load-more-wrap {
  text-align: center;
  margin-bottom: 40px;
}

.btn-load-more {
  display: inline-block;
  padding: 12px 48px;
  border-radius: 30px;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.95rem;
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-load-more:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ============================================================
   8. サイドバー・ウィジェット
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.widget-title {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
}

.widget-body {
  padding: 16px;
}

/* プロフィールウィジェット */
.widget-profile .profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary-light);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}

.widget-profile .profile-name {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.widget-profile .profile-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.6;
}

.widget-profile .profile-sns {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.widget-profile .sns-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
}

.widget-profile .sns-link:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ランキングウィジェット */
.ranking-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.ranking-list li:last-child {
  border-bottom: none;
}

.ranking-num {
  min-width: 24px;
  height: 24px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ranking-num.top-1 { background: #f5a623; color: #fff; }
.ranking-num.top-2 { background: #aaaaaa; color: #fff; }
.ranking-num.top-3 { background: #cd7f32; color: #fff; }

.ranking-thumb {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--color-primary-light);
  flex-shrink: 0;
}

.ranking-info {
  flex: 1;
  min-width: 0;
}

.ranking-info .r-title {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text);
}

.ranking-info .r-price {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-top: 2px;
}

/* カテゴリウィジェット */
.category-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--color-text);
  border-bottom: 1px dotted var(--color-border);
  transition: color var(--transition), padding-left var(--transition);
}

.category-list li a:hover {
  color: var(--color-primary);
  padding-left: 6px;
}

.category-list li a .cat-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-primary-light);
  border-radius: 10px;
  padding: 1px 8px;
}

/* バナーウィジェット */
.widget-banner .banner-placeholder {
  aspect-ratio: 300/250;
  background: var(--color-primary-light);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.widget-banner .banner-placeholder .b-icon {
  font-size: 2rem;
}

/* ============================================================
   9. 商品詳細ページ
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  color: var(--color-border);
}

.product-detail {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.product-detail .detail-image-wrap {
  position: relative;
}

.product-detail .detail-image-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-primary-light);
}

.product-detail .detail-info h1 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.875rem;
}

.detail-meta .meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.detail-meta .meta-label {
  min-width: 64px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.detail-meta .meta-value {
  color: var(--color-text);
}

.detail-price-box {
  background: var(--color-primary-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.detail-price-box .price-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.detail-price-box .price-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.detail-price-box .price-tax {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* アフィリエイトCTAボタン */
.btn-affiliate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 14px rgba(232, 77, 138, 0.35);
  margin-bottom: 10px;
}

.btn-affiliate:hover {
  opacity: 0.9;
  color: #fff;
  transform: translateY(-1px);
}

.btn-affiliate-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* 商品説明 */
.product-description {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.product-description .entry-content {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--color-text);
}

.product-description .entry-content p {
  margin-bottom: 16px;
}

.product-description .entry-content .placeholder-text {
  color: var(--color-text-muted);
  font-style: italic;
}

/* 関連商品 */
.related-section {
  margin-bottom: 40px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================================
   10. フッター
   ============================================================ */
.site-footer {
  background: #2d1a25;
  color: rgba(255,255,255,0.7);
  padding: 40px var(--gap) 20px;
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.footer-brand .brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 0.8rem;
  line-height: 1.8;
}

.footer-nav-col h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.footer-nav-col ul li {
  margin-bottom: 8px;
}

.footer-nav-col ul li a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-nav-col ul li a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 20px;
  line-height: 1.6;
}

/* ============================================================
   11. ユーティリティ
   ============================================================ */
.placeholder-img {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #ffe4f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-border);
  font-size: 3rem;
}

/* ============================================================
   12. レスポンシブ
   ============================================================ */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .hero-banner h1 {
    font-size: 1.5rem;
  }
  .hamburger {
    display: flex;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px var(--gap);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-top: 1px solid var(--color-border);
    gap: 2px;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    border-radius: 6px;
    padding: 10px 14px;
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .product-detail .detail-image-wrap img {
    max-width: 240px;
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
