/* =========================================================
   Affiliate Card Blocks — card.css
   確定デザイン（ダーク/ライト × アクセント可変）
   ========================================================= */
.afc-card{
  --afc-accent:#f5a623;
  --afc-radius:20px;
  box-sizing:border-box;
  border-radius:var(--afc-radius);
  padding:26px 32px 30px;
  max-width:720px;
  margin:1.6em auto;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Noto Sans JP",Meiryo,sans-serif;
  font-size:15px;
  line-height:1.7;
}
.afc-card *{ box-sizing:border-box; }

.afc-card__title{
  /* テーマ依存を排除：見出しスタイルを一旦リセットしてから独自指定 */
  all:unset;
  display:block;
  box-sizing:border-box;
  font-family:inherit;
  font-size:23px !important;
  font-weight:800 !important;
  letter-spacing:.01em;
  line-height:1.3 !important;
  margin:0 0 16px !important;
  padding:0 !important;
  border:0 !important;
  background:none !important;
  text-align:left !important;
  font-style:normal !important;
  text-transform:none !important;
  text-shadow:none !important;
  white-space:normal !important;
}
.afc-card__title::before,
.afc-card__title::after{ content:none !important; display:none !important; }
.afc-card__divider{ height:1px; border:0; margin:0 0 24px; }

.afc-card__body{
  display:grid;
  grid-template-columns:240px 1fr;
  gap:30px;
  align-items:start;
}

/* 左:画像＋★ */
.afc-card__imgbox{
  border-radius:14px; overflow:hidden; aspect-ratio:1/1;
  display:flex; align-items:center; justify-content:center;
}
.afc-card__imgbox img{ width:100%; height:100%; object-fit:cover; display:block; }
.afc-card__rating{ display:flex; align-items:center; gap:10px; margin-top:16px; }
.afc-stars{ position:relative; display:inline-block; font-size:26px; letter-spacing:3px; line-height:1; }
.afc-stars__bg{ color:rgba(150,150,150,.35); }
.afc-stars__fill{
  position:absolute; top:0; left:0; overflow:hidden; white-space:nowrap;
  color:var(--afc-accent);
}
.afc-rating__num{ font-size:18px; font-weight:800; }
.afc-rating__max{ font-size:13px; opacity:.55; font-weight:600; }

/* 右:スペック表 */
.afc-specs{ width:100%; }
.afc-spec-row{
  display:flex; justify-content:space-between; align-items:baseline; gap:16px;
  padding:13px 2px;
}
.afc-spec-row + .afc-spec-row{ border-top:1px solid; }
.afc-spec__key{ font-size:14px; font-weight:700; flex-shrink:0; }
.afc-spec__val{ font-size:14px; text-align:right; font-weight:600; }
.afc-spec__val--accent{ color:var(--afc-accent); font-weight:700; }
.afc-spec__val--muted{ opacity:.6; font-weight:500; }

/* モール別ボタン */
.afc-buttons{ margin-top:26px; display:grid; gap:12px; }
.afc-btn{
  display:flex; align-items:center; justify-content:center; gap:6px;
  padding:14px 12px; border-radius:11px;
  font-size:14px; font-weight:800;
  text-decoration:none; color:#fff !important;
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
  box-shadow:0 2px 6px rgba(0,0,0,.12);
}
.afc-btn:hover{ transform:translateY(-2px); filter:brightness(1.06); box-shadow:0 6px 16px rgba(0,0,0,.18); }
.afc-btn__arrow{ font-size:13px; opacity:.85; }
.afc-btn--amazon{ background:#f0a02a; }
.afc-btn--rakuten{ background:#c9252c; }
.afc-btn--yahoo{ background:#2e7df6; }
.afc-btn--custom{ background:#14b8a6; }

/* ボタンセル（ボタン＋クーポン） */
.afc-btncell{ display:flex; flex-direction:column; gap:7px; }

/* クーポンチップ */
.afc-coupon{
  display:flex; align-items:center; gap:7px;
  width:100%; padding:8px 10px;
  border:1px dashed currentColor; border-radius:9px;
  background:transparent; cursor:pointer;
  font-family:inherit; font-size:12px; font-weight:700;
  transition:background .12s ease, transform .12s ease;
}
.afc-coupon:hover{ transform:translateY(-1px); }
.afc-coupon:active{ transform:translateY(0); }
.afc-coupon__tag{
  font-size:10px; font-weight:800; letter-spacing:.04em;
  padding:2px 6px; border-radius:4px; color:#fff; flex-shrink:0;
}
.afc-coupon__code{
  flex:1; text-align:left; font-family:"SFMono-Regular",Consolas,Menlo,monospace;
  font-size:13px; letter-spacing:.02em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.afc-coupon__action{ font-size:11px; opacity:.7; flex-shrink:0; }
.afc-coupon.is-copied .afc-coupon__action{ opacity:1; }

/* チップのモール別アクセント（タグ背景） */
.afc-coupon--amazon{ color:#c77b16; } .afc-coupon--amazon .afc-coupon__tag{ background:#f0a02a; }
.afc-coupon--rakuten{ color:#c9252c; } .afc-coupon--rakuten .afc-coupon__tag{ background:#c9252c; }
.afc-coupon--yahoo{ color:#2e7df6; } .afc-coupon--yahoo .afc-coupon__tag{ background:#2e7df6; }
.afc-coupon--custom{ color:#14b8a6; } .afc-coupon--custom .afc-coupon__tag{ background:#14b8a6; }

/* ダーク/ライトでのチップ可読性 */
.afc-theme-dark .afc-coupon{ background:rgba(255,255,255,.04); }
.afc-theme-dark .afc-coupon__code{ color:#f2f2f3; }
.afc-theme-light .afc-coupon{ background:rgba(20,30,50,.02); }
.afc-theme-light .afc-coupon__code{ color:#1f2329; }

/* コピー完了トースト */
.afc-toast{
  position:fixed; left:50%; bottom:32px; transform:translateX(-50%) translateY(20px);
  background:#1c1c1e; color:#fff; padding:11px 20px; border-radius:10px;
  font-size:14px; font-weight:600; z-index:99999; opacity:0; pointer-events:none;
  box-shadow:0 8px 30px rgba(0,0,0,.3); transition:opacity .2s ease, transform .2s ease;
}
.afc-toast.is-show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* テーマ:ダーク */
.afc-theme-dark{
  background:#1c1c1e; color:#f2f2f3;
  box-shadow:0 14px 40px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.06);
}
.afc-theme-dark .afc-card__title{ color:#f2f2f3 !important; }
.afc-theme-dark .afc-card__divider{ background:linear-gradient(90deg,rgba(255,255,255,.18),rgba(255,255,255,.04)); }
.afc-theme-dark .afc-card__imgbox{ background:#cfcfcf; }
.afc-theme-dark .afc-spec-row + .afc-spec-row{ border-color:rgba(255,255,255,.10); }
.afc-theme-dark .afc-spec__key{ color:#f2f2f3; }
.afc-theme-dark .afc-spec__val{ color:#e7e7e9; }
.afc-theme-dark .afc-spec__val--accent{ color:var(--afc-accent); }
.afc-theme-dark .afc-spec__val--muted{ color:#e7e7e9; opacity:.55; }

/* テーマ:ライト */
.afc-theme-light{
  background:#ffffff; color:#1f2329;
  box-shadow:0 10px 32px rgba(20,30,50,.10), inset 0 0 0 1px rgba(20,30,50,.06);
}
.afc-theme-light .afc-card__title{ color:#1f2329 !important; }
.afc-theme-light .afc-card__divider{ background:linear-gradient(90deg,rgba(20,30,50,.16),rgba(20,30,50,.03)); }
.afc-theme-light .afc-card__imgbox{ background:#f1f2f4; }
.afc-theme-light .afc-spec-row + .afc-spec-row{ border-color:rgba(20,30,50,.08); }
.afc-theme-light .afc-spec__key{ color:#1f2329; }
.afc-theme-light .afc-spec__val{ color:#3a4049; }
.afc-theme-light .afc-spec__val--accent{ color:var(--afc-accent); }
.afc-theme-light .afc-spec__val--muted{ color:#3a4049; opacity:.55; }

/* レスポンシブ */
@media(max-width:560px){
  .afc-card{ padding:24px 20px; }
  .afc-card__body{ grid-template-columns:1fr; gap:22px; }
  .afc-card__media{ max-width:280px; margin:0 auto; }
  .afc-buttons{ grid-template-columns:1fr !important; }
}

@media(prefers-reduced-motion:reduce){
  .afc-btn{ transition:none; }
  .afc-btn:hover{ transform:none; }
}
