/* ============================================================
   zaiko-fukkatsu.com 共通デザインシステム（2026-06-12 デザインB採用）
   - 全ページ共通のCSSはこのファイルに集約する（base.htmlのインラインstyleは廃止）
   - 旧変数名（--bg2, --gray, --border等）は admin等の既存テンプレートが
     インラインstyleで参照しているため、名前を維持したまま値だけ新パレットに更新
   ============================================================ */

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

:root {
  /* 旧変数名（既存テンプレート互換。値はデザインBパレット） */
  --bg: #0b0d12;
  --bg2: #11141b;
  --bg3: #1a1f2a;
  --red: #ff4757;
  --red-dark: #e8323f;
  --white: #eef1f6;
  --gray: #8a93a5;
  --border: #232936;
  /* デザインB追加変数 */
  --surface: rgba(255,255,255,.035);
  --surface-hi: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.09);
  --gold: #f4c430;
  --green: #2ed573;
  --grad: linear-gradient(120deg, #ff4757, #ff6348 60%, #ffa502);
  --mono: 'SFMono-Regular', Consolas, 'Courier New', monospace;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Hiragino Sans', 'Segoe UI', sans-serif;
  line-height: 1.6;
}
/* 背景の赤グロー演出。pointer-events:none なので操作に影響しない */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(800px 400px at 80% -10%, rgba(255,71,87,.13), transparent 60%),
    radial-gradient(600px 300px at 10% 0%, rgba(255,165,2,.07), transparent 60%);
  pointer-events: none; z-index: 0;
}
header, main, footer { position: relative; z-index: 1; }

a { color: var(--red); text-decoration: none; }
a:hover { color: #ff6b6b; }

/* ---- ヘッダー / フッター ---- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,18,.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 1rem; }
.logo { font-size: 1.15rem; font-weight: 800; color: var(--white); letter-spacing: .5px; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav { display: flex; align-items: center; gap: 1.1rem; }
nav a { color: var(--gray); font-size: .85rem; font-weight: 600; transition: color .15s; }
nav a:hover { color: var(--white); }
.nav-x { border: 1px solid var(--line); background: var(--surface-hi); color: var(--white) !important; border-radius: 99px; padding: .32rem .85rem; font-size: .8rem; }

main { max-width: 1140px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }

footer { background: var(--bg2); border-top: 1px solid var(--line); text-align: center; color: var(--gray); font-size: .75rem; padding: 1.5rem; margin-top: 2rem; }

/* ---- ボタン / バッジ / チップ ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1.2rem; border-radius: 8px; font-weight: 700; cursor: pointer; border: none; font-size: .85rem; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(255,71,87,.3); }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-outline:hover { background: rgba(255,71,87,.1); }

.badge { display: inline-block; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; }

.chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .66rem; font-weight: 800; padding: .22rem .6rem; border-radius: 99px; width: fit-content; letter-spacing: .3px; }
.chip-red { background: rgba(255,71,87,.16); color: var(--red); border: 1px solid rgba(255,71,87,.35); }
.chip-gold { background: rgba(244,196,48,.13); color: var(--gold); border: 1px solid rgba(244,196,48,.3); }
.chip-green { background: rgba(46,213,115,.13); color: var(--green); border: 1px solid rgba(46,213,115,.3); }
.chip-pulse { animation: chipPulse 1.8s ease-in-out infinite; }
@keyframes chipPulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ---- 汎用カード（/list・記事一覧等） ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); border-color: rgba(255,71,87,.55); box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,71,87,.2); }
.product-img { width: 100%; height: 200px; object-fit: contain; background: #fff; padding: 1rem; }
.product-info { padding: 1rem; }
.product-name { font-size: .9rem; font-weight: 700; margin-bottom: .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { font-size: .75rem; color: var(--gray); }
.section-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.5rem; padding-bottom: .5rem; border-bottom: 2px solid var(--red); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }

/* ---- トップページ：ヒーロー / 統計 / クイックナビ ---- */
.hero { text-align: center; padding: 2.4rem 0 1.6rem; }
.hero h1 { font-size: 2rem; font-weight: 900; line-height: 1.3; letter-spacing: .5px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--gray); font-size: .9rem; margin-top: .5rem; }
.stats { display: flex; justify-content: center; gap: .6rem; margin: 1.3rem 0 .4rem; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .55rem 1.1rem; text-align: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.stat b { display: block; font-size: 1.15rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .68rem; color: var(--gray); font-weight: 600; }

.quicknav { position: sticky; top: 58px; z-index: 40; display: flex; gap: .5rem; padding: .7rem 0; margin-bottom: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(var(--bg) 70%, transparent); }
.quicknav a { flex-shrink: 0; font-size: .78rem; font-weight: 700; color: var(--gray); border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .35rem .95rem; transition: all .15s; }
.quicknav a:hover { color: var(--white); border-color: var(--red); }

/* ---- トップページ：商品カードグリッド ---- */
section { scroll-margin-top: 120px; }
.sec-head { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1.1rem; }
.sec-head h2 { font-size: 1.2rem; font-weight: 800; }
.sec-head .sub { font-size: .74rem; color: var(--gray); }

.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 768px) { .grid4 { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; } }
@media (min-width: 1024px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }

.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .2s, border-color .2s, box-shadow .2s; color: inherit; }
.pcard:hover { transform: translateY(-4px); border-color: rgba(255,71,87,.55); box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,71,87,.2); color: inherit; }
.pcard-img-wrap { background: #fff; overflow: hidden; }
.pcard-img { width: 100%; aspect-ratio: 1/1; object-fit: contain; padding: .9rem; transition: transform .3s; display: block; }
.pcard:hover .pcard-img { transform: scale(1.05); }
.pcard-img-placeholder { width: 100%; aspect-ratio: 1/1; background: var(--surface-hi); display: flex; align-items: center; justify-content: center; color: var(--gray); font-size: .75rem; }
.pcard-body { padding: .85rem .9rem 1rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.pcard-name { font-size: .84rem; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { font-size: .72rem; color: var(--gray); margin-top: auto; padding-top: .3rem; }

/* ---- トップページ：Amazon招待パネル（グラデーション枠） ---- */
.invite { position: relative; border-radius: 20px; padding: 1.5px; background: var(--grad); margin-bottom: 3rem; }
.invite-inner { background: #11131a; border-radius: 18.5px; padding: 1.4rem 1.2rem 1.6rem; }
.invite-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.invite-head h2 { font-size: 1.25rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.invite-desc { font-size: .78rem; color: var(--gray); margin-bottom: 1.1rem; max-width: 640px; }

/* ---- トップページ：在庫復活待ちリスト（デザインC由来の高密度行レイアウト） ---- */
.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; background: var(--surface); border-bottom: 1px solid var(--line); transition: background .12s; color: inherit; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--surface-hi); color: inherit; }
.row-thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; background: #fff; object-fit: contain; padding: 3px; }
.row-thumb-ph { width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; background: var(--surface-hi); display: flex; align-items: center; justify-content: center; color: var(--gray); font-size: .5rem; }
.row-main { flex: 1; min-width: 0; }
.row-name { font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: .65rem; color: var(--gray); font-family: var(--mono); }
.row-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }

/* ---- 商品詳細ページ ---- */
.product-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.product-hero-img { width: 100%; border-radius: 14px; background: #fff; padding: 1rem; }
.product-hero-ph { width: 100%; height: 280px; background: var(--surface-hi); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--gray); }
.breadcrumb { font-size: .8rem; color: var(--gray); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--white); }

.purchase-links-mobile { display: none; }
.purchase-links-pc { display: flex; flex-wrap: wrap; gap: .6rem; }
.purchase-link-btn { display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1.2rem; border-radius: 8px; font-weight: 700; cursor: pointer; border: none; font-size: .85rem; text-align: center; white-space: normal; word-wrap: break-word; max-width: 160px; transition: transform .12s, background .12s; }
.purchase-link-btn:hover { transform: translateY(-1px); }
.purchase-link-btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(255,71,87,.3); }
.purchase-link-btn-red:hover { background: var(--red-dark); color: #fff; }
.purchase-link-btn-outline { background: transparent; border: 1px solid var(--red); color: var(--red); }
.purchase-link-btn-outline:hover { background: rgba(255,71,87,.1); color: var(--red); }

/* 在庫復活中ハイライト：招待パネルと同じグラデーション枠で最重要視覚要素にする */
.restock-section { position: relative; border-radius: 16px; padding: 1.5px; background: var(--grad); margin-bottom: 1.2rem; }
.restock-section-inner { background: #11131a; border-radius: 14.5px; padding: 1rem; }
.restock-title { font-size: 1rem; font-weight: 900; margin-bottom: .8rem; display: flex; align-items: center; gap: .4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.restock-buttons { display: flex; flex-direction: column; gap: .5rem; }
.restock-buttons .purchase-link-btn { width: 100%; max-width: none; }

.follow-box { background: var(--surface); border: 1px solid rgba(255,71,87,.45); border-radius: 14px; padding: 1rem; margin-top: 1.5rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---- レスポンシブ ---- */
@media (max-width: 768px) {
  .product-layout { grid-template-columns: 40% 1fr; gap: 1rem; align-items: flex-start; }
  .product-hero-img { padding: .5rem; }
  .product-info-col h1 { font-size: 1rem !important; margin-bottom: .5rem !important; }
  .purchase-links-pc { display: none; }
  .purchase-links-mobile { display: flex; flex-direction: column; gap: .4rem; }
  .purchase-link-btn { max-width: 100%; width: 100%; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .header-inner { padding: 0 .8rem; }
  .logo { font-size: 1rem; }
  nav { gap: .8rem; }
  nav a { font-size: .78rem; }
}
