/* =========================================================
   Affiliate Card Blocks — card.css
   確定デザイン（ダーク/ライト × アクセント可変）
   ========================================================= */
.afc-card{
  --afc-accent:#f5a623;
  --afc-radius:20px;
  position:relative;
  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-btn--shine{ position:relative; overflow:hidden; }
.afc-btn--shine::after{
  content:""; position:absolute; top:0; left:-75%;
  width:50%; height:100%;
  background:linear-gradient(120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.55) 50%,
    rgba(255,255,255,0) 100%);
  transform:skewX(-20deg);
  animation:afc-shine 3.2s ease-in-out infinite;
  pointer-events:none;
}
@keyframes afc-shine{
  0%   { left:-75%; }
  18%  { left:125%; }
  100% { left:125%; }
}
@media(prefers-reduced-motion:reduce){
  .afc-btn--shine::after{ animation:none; opacity:0; }
}

/* ボタンセル（マイクロコピー＋ボタン＋クーポン） */
.afc-buttons{ align-items:stretch; }
.afc-btncell{ display:flex; flex-direction:column; gap:7px; }
/* マイクロコピーの有無でボタン位置がずれないよう、ボタンを下寄せ・マイクロ部を上に押し出す */
.afc-btncell .afc-btn{ margin-top:auto; }

/* マイクロコピー（ボタン上の煽り文）＼おすすめ／ */
.afc-micro{
  display:block; text-align:center;
  font-size:12px; font-weight:700; line-height:1.2;
  margin-bottom:-1px;
}
.afc-micro--amazon{ color:#e08a12; }
.afc-micro--rakuten{ color:#c9252c; }
.afc-micro--yahoo{ color:#2e7df6; }
.afc-micro--custom{ color:#14b8a6; }
.afc-theme-dark .afc-micro--amazon{ color:#f0a02a; }
@keyframes afc-blink{ 0%,100%{opacity:1;} 50%{opacity:.25;} }
.afc-micro--blink{ animation:afc-blink 1.2s ease-in-out infinite; }
@media(prefers-reduced-motion:reduce){ .afc-micro--blink{ animation:none; } }

/* クーポンチップ */
.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__left{
  font-size:10px; font-weight:800; flex-shrink:0;
  padding:2px 7px; border-radius:999px;
  background:var(--afc-accent); color:#fff;
}
.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-coupon-spacer{ display:block; height:37px; }

/* コピー完了トースト */
.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; }
}

/* =========================================================
   バッジ（左上）
   ========================================================= */
.afc-badge{
  position:absolute; top:-10px; left:20px; z-index:2;
  background:var(--afc-accent); color:#fff;
  font-size:12px; font-weight:800; letter-spacing:.02em;
  padding:5px 14px; border-radius:999px;
  box-shadow:0 3px 10px rgba(0,0,0,.25);
}

/* =========================================================
   PR表記
   ========================================================= */
.afc-pr{
  margin:14px 0 0; text-align:right;
  font-size:11px; line-height:1.4;
}
.afc-theme-dark .afc-pr{ color:rgba(255,255,255,.45); }
.afc-theme-light .afc-pr{ color:rgba(20,30,50,.4); }

/* =========================================================
   コンパクトレイアウト（画像＋タイトル＋ボタンのみ）
   ========================================================= */
.afc-layout-compact .afc-card__body{ display:grid; grid-template-columns:140px 1fr; gap:18px; align-items:center; }
.afc-layout-compact .afc-card__media{ max-width:140px; }
.afc-layout-compact .afc-card__imgbox{ aspect-ratio:16/10; }
.afc-layout-compact .afc-compact-side{ display:flex; flex-direction:column; justify-content:center; gap:8px; min-width:0; }
.afc-layout-compact .afc-buttons{ margin-top:18px; }
.afc-card__title--compact{ font-size:18px !important; margin:0 !important; }
/* コンパクト：価格の注記を金額の右横にインライン表示 */
.afc-layout-compact .afc-price{ margin-top:0; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.afc-layout-compact .afc-price__amount{ font-size:22px; }
.afc-layout-compact .afc-price__note{ display:inline; margin-top:0; }
@media(max-width:560px){
  .afc-layout-compact .afc-card__body{ grid-template-columns:96px 1fr; gap:14px; }
  .afc-card__title--compact{ font-size:16px !important; }
}

/* 価格表示 */
.afc-price{ margin-top:14px; }
.afc-price__amount{ font-size:24px; font-weight:800; letter-spacing:.01em; }
.afc-price__note{ display:block; font-size:11px; opacity:.55; margin-top:2px; font-weight:500; }
.afc-theme-dark .afc-price__amount{ color:#fff; }
.afc-theme-light .afc-price__amount{ color:#1f2329; }
.afc-layout-compact .afc-price{ margin-top:0; }
