/* ============================================
   Affiliate Card Pro - Frontend Styles v1.1.0
   ============================================ */

.acp-card *, .acp-card *::before, .acp-card *::after { box-sizing: border-box; }
.acp-card p, .acp-card span, .acp-card li,
.acp-card a, .acp-card div:not(.acp-title):not(.acp-btn) {
  font-size: inherit !important;
}

.acp-card {
  /* デフォルト変数 */
  --acp-accent:      #ff6b35;
  --acp-radius:      16px;
  --acp-badge-color: #ff6b35;
  /* カスタム色: JS側でsetProperty時のみ有効 */
  --acp-transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif !important;
  font-size: 16px !important;
  line-height: 1.7;
  margin: 1.5em auto;
  overflow: visible;
}

/* カスタム色は各スタイルクラス内の var() フォールバックで制御 */

/* ============================================
   CARD STYLES — 各スタイルのデフォルト色
   カスタム色が設定されていると上書きされる
   ============================================ */

/* --- Modern --- */
.acp-style-modern.acp-theme-light {
  background: var(--acp-custom-bg, #fff);
  color:      var(--acp-custom-text, #333);
  border: 1px solid var(--acp-custom-border, #e8ecf0);
  border-radius: var(--acp-radius); padding: 28px;
}
.acp-style-modern.acp-theme-dark {
  background: var(--acp-custom-bg, #1a1d24);
  color:      var(--acp-custom-text, #e8ecf0);
  border: 1px solid var(--acp-custom-border, #2d3240);
  border-radius: var(--acp-radius); padding: 28px;
}

/* --- Minimal --- */
.acp-style-minimal.acp-theme-light {
  background: var(--acp-custom-bg, #fafafa);
  color:      var(--acp-custom-text, #333);
  border-left: 4px solid var(--acp-accent);
  padding: 24px 28px;
  border-radius: 0 var(--acp-radius) var(--acp-radius) 0;
}
.acp-style-minimal.acp-theme-dark {
  background: var(--acp-custom-bg, #111);
  color:      var(--acp-custom-text, #e8ecf0);
  border-left: 4px solid var(--acp-accent);
  padding: 24px 28px;
  border-radius: 0 var(--acp-radius) var(--acp-radius) 0;
}

/* --- Luxury --- */
.acp-style-luxury.acp-theme-light {
  background: var(--acp-custom-bg, linear-gradient(135deg,#fff 0%,#f9f6f0 100%));
  color:       var(--acp-custom-text, #3a2e1f);
  border: 1px solid var(--acp-custom-border, #d4b896);
  border-radius: var(--acp-radius); padding: 32px; position: relative;
}
.acp-style-luxury.acp-theme-light::before {
  content:''; position:absolute; inset:0;
  border-radius: var(--acp-radius);
  background: linear-gradient(135deg,rgba(212,184,150,0.12) 0%,transparent 60%);
  pointer-events:none;
}
.acp-style-luxury.acp-theme-dark {
  background: var(--acp-custom-bg, linear-gradient(135deg,#1c1812 0%,#251f17 100%));
  color:      var(--acp-custom-text, #f0e6d3);
  border: 1px solid var(--acp-custom-border, #6b5a3e);
  border-radius: var(--acp-radius); padding: 32px;
}

/* --- Pop --- */
.acp-style-pop.acp-theme-light {
  background: var(--acp-custom-bg, #fff);
  color:      var(--acp-custom-text, #111);
  border: 3px solid var(--acp-custom-border, #111);
  box-shadow: 6px 6px 0 var(--acp-custom-border, #111);
  border-radius: var(--acp-radius); padding: 28px;
}
.acp-style-pop.acp-theme-dark {
  background: var(--acp-custom-bg, #1a1d24);
  color:      var(--acp-custom-text, #e8ecf0);
  border: 3px solid var(--acp-custom-border, var(--acp-accent));
  box-shadow: 6px 6px 0 var(--acp-custom-border, var(--acp-accent));
  border-radius: var(--acp-radius); padding: 28px;
}

/* --- Gradient（アクセントカラー連動） --- */
.acp-style-gradient.acp-theme-light {
  background: var(--acp-custom-bg,
    linear-gradient(135deg,
      color-mix(in srgb, var(--acp-accent) 8%, #fff) 0%,
      color-mix(in srgb, var(--acp-accent) 16%, #fff) 100%));
  color:  var(--acp-custom-text, #333);
  border: 1px solid var(--acp-custom-border, color-mix(in srgb, var(--acp-accent) 20%, #ddd));
  border-radius: var(--acp-radius); padding: 28px;
}
.acp-style-gradient.acp-theme-dark {
  background: var(--acp-custom-bg,
    linear-gradient(135deg,
      color-mix(in srgb, var(--acp-accent) 12%, #111) 0%,
      color-mix(in srgb, var(--acp-accent) 20%, #111) 100%));
  color:  var(--acp-custom-text, #e8ecf0);
  border: 1px solid var(--acp-custom-border, color-mix(in srgb, var(--acp-accent) 30%, #333));
  border-radius: var(--acp-radius); padding: 28px;
}

/* --- Glass --- */
.acp-style-glass {
  position: relative; border-radius: var(--acp-radius); padding: 28px; overflow: hidden;
}
.acp-style-glass.acp-theme-light {
  background: var(--acp-custom-bg, rgba(255,255,255,0.55));
  color:      var(--acp-custom-text, #1a1a2e);
  border: 1px solid var(--acp-custom-border, rgba(255,255,255,0.7));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
}
.acp-style-glass.acp-theme-dark {
  background: var(--acp-custom-bg, rgba(15,15,30,0.55));
  color:      var(--acp-custom-text, #e8ecf0);
  border: 1px solid var(--acp-custom-border, rgba(255,255,255,0.12));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
.acp-style-glass::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(135deg,rgba(255,255,255,0.15) 0%,transparent 50%);
  pointer-events:none; border-radius: var(--acp-radius);
}

/* --- Flat --- */
.acp-style-flat.acp-theme-light {
  background: var(--acp-custom-bg, #eef2f7);
  color:      var(--acp-custom-text, #1e293b);
  border-radius: var(--acp-radius); padding: 28px; border: none;
}
.acp-style-flat.acp-theme-dark {
  background: var(--acp-custom-bg, #0f172a);
  color:      var(--acp-custom-text, #cbd5e1);
  border-radius: var(--acp-radius); padding: 28px; border: none;
}

/* ============================================
   SHADOW
   ============================================ */
.acp-shadow-soft   { box-shadow: 0 4px 24px rgba(0,0,0,0.07) !important; }
.acp-shadow-medium { box-shadow: 0 8px 40px rgba(0,0,0,0.12) !important; }
.acp-shadow-strong { box-shadow: 0 16px 60px rgba(0,0,0,0.20) !important; }
.acp-shadow-colored {
  box-shadow: 0 12px 40px color-mix(in srgb, var(--acp-accent) 35%, transparent) !important;
}
/* Popは自前のオフセット影を維持 */
.acp-style-pop.acp-shadow-soft,
.acp-style-pop.acp-shadow-medium,
.acp-style-pop.acp-shadow-strong,
.acp-style-pop.acp-shadow-colored { box-shadow: 6px 6px 0 var(--acp-custom-border, #111) !important; }
.acp-style-pop.acp-theme-dark.acp-shadow-soft,
.acp-style-pop.acp-theme-dark.acp-shadow-medium,
.acp-style-pop.acp-theme-dark.acp-shadow-strong,
.acp-style-pop.acp-theme-dark.acp-shadow-colored {
  box-shadow: 6px 6px 0 var(--acp-custom-border, var(--acp-accent)) !important;
}

/* ============================================
   BADGE
   ============================================ */
.acp-badge {
  display: inline-block; position: absolute;
  top: -12px; left: 20px;
  background: var(--acp-badge-color); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  padding: 4px 14px; border-radius: 20px; z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ============================================
   IMAGE
   ============================================ */
.acp-image-wrap {
  overflow: hidden;
  border-radius: calc(var(--acp-radius) - 4px);
  margin-bottom: 20px;
}
.acp-image-wrap img.acp-product-image {
  width: 100%; height: auto; display: block;
  transition: transform 0.4s ease;
}
.acp-card:hover .acp-product-image { transform: scale(1.03); }

.acp-image-left {
  display: flex !important; flex-direction: row !important;
  gap: 24px; align-items: flex-start;
}
.acp-image-left .acp-image-wrap { flex: 0 0 180px; margin-bottom: 0; }
.acp-image-left .acp-content { flex: 1; }

.acp-image-bottom { display: flex !important; flex-direction: column !important; }
.acp-image-bottom .acp-content { order: 1; }
.acp-image-bottom .acp-image-wrap { order: 2; margin-bottom: 0; margin-top: 20px; }

/* ============================================
   CONTENT
   ============================================ */
.acp-card .acp-title {
  all: unset; display: block;
  font-size: 18px !important; font-weight: 700 !important;
  margin: 0 0 12px !important; padding: 0 !important;
  line-height: 1.5 !important;
  color: inherit !important;
  background: none !important; border: none !important; box-shadow: none !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif !important;
}
.acp-card.acp-style-luxury .acp-title { font-size: 19px !important; letter-spacing: 0.02em !important; }

.acp-card .acp-description {
  all: unset; display: block;
  font-size: 15px !important; opacity: 0.82;
  margin: 0 0 16px !important; padding: 0 !important;
  line-height: 1.8 !important; color: inherit !important;
  background: none !important; border: none !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif !important;
}
.acp-align-center .acp-title,
.acp-align-center .acp-description { text-align: center; }

.acp-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.acp-stars { display: flex; gap: 2px; }
.acp-star { font-size: 20px; color: #ddd; }
.acp-star.filled { color: #fbbf24; }
.acp-star.half {
  background: linear-gradient(90deg,#fbbf24 50%,#ddd 50%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.acp-rating-num { font-weight: 700; font-size: 15px; color: #fbbf24; }
.acp-review-count { font-size: 14px; opacity: 0.65; }

.acp-highlights {
  list-style: none !important; margin: 0 0 16px !important; padding: 0 !important;
  display: flex; flex-direction: column; gap: 7px;
}
.acp-highlight-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.acp-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; min-width: 19px;
  background: var(--acp-accent); color: #fff; border-radius: 50%;
  font-size: 11px; font-weight: 700;
}

.acp-price-wrap {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.acp-price-current { font-size: 28px; font-weight: 800; color: var(--acp-accent); line-height: 1; }
.acp-price-original { font-size: 15px; text-decoration: line-through; opacity: 0.5; }
.acp-price-badge {
  background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
.acp-align-center .acp-price-wrap { justify-content: center; }

/* ============================================
   BUTTONS
   ============================================ */
.acp-buttons {
  display: flex; gap: 10px; flex-wrap: nowrap;
  margin-top: 6px; width: 100%;
}
.acp-btn-layout-stack   { flex-direction: column; }
.acp-btn-layout-row     { flex-direction: row; align-items: stretch; }
.acp-btn-layout-compare { flex-direction: row; align-items: stretch; }

.acp-btn-layout-compare .acp-btn-wrap,
.acp-btn-layout-row .acp-btn-wrap { flex: 1 1 0; min-width: 0; }
.acp-btn-layout-compare .acp-btn,
.acp-btn-layout-row .acp-btn { width: 100%; justify-content: center; }

.acp-align-center .acp-buttons { justify-content: center; }

.acp-btn-wrap {
  display: flex; flex-direction: column; align-items: stretch; gap: 5px;
}
.acp-micro-copy {
  display: block; font-size: 12px !important; opacity: 0.65;
  text-align: center; line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif !important;
}

.acp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none !important; font-weight: 700; border-radius: 8px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: all var(--acp-transition); white-space: normal;
  border: none; font-family: inherit; letter-spacing: 0.03em; width: 100%;
  text-align: center; word-break: break-word; line-height: 1.4;
}
.acp-btn-small  { font-size: 13px; padding: 10px 20px; }
.acp-btn-medium { font-size: 15px; padding: 13px 26px; }
.acp-btn-large  { font-size: 16px; padding: 15px 30px; }
.acp-btn-xlarge { font-size: 18px; padding: 17px 38px; border-radius: 10px; }
.acp-btn-icon svg { width: 17px; height: 17px; flex-shrink: 0; display: block; }
.acp-btn-large .acp-btn-icon svg, .acp-btn-xlarge .acp-btn-icon svg { width: 20px; height: 20px; }
.acp-btn-fill:hover { filter: brightness(1.08); transform: translateY(-1px); }
.acp-btn-outline { border: 2px solid transparent; }
.acp-btn-outline:hover { opacity: 0.85; transform: translateY(-1px); }
.acp-btn-ghost:hover { background: rgba(0,0,0,0.06) !important; }

/* Animations */
.acp-btn-anim-pulse.acp-btn-primary { animation: acpPulseColor 2.5s ease-in-out infinite; }
@keyframes acpPulseColor {
  0%,100%{ box-shadow:0 4px 20px rgba(255,107,53,0.3),0 0 0 0 rgba(255,107,53,0.4); }
  50%    { box-shadow:0 4px 20px rgba(255,107,53,0.5),0 0 0 12px rgba(255,107,53,0); }
}
.acp-btn-anim-pulse { animation: acpPulse 2.5s ease-in-out infinite; }
@keyframes acpPulse {
  0%,100%{ box-shadow:0 0 0 0 rgba(0,0,0,0.2); }
  50%    { box-shadow:0 0 0 10px rgba(0,0,0,0); }
}
.acp-btn-anim-shine::before {
  content:''; position:absolute; top:0; left:-80%; width:60%; height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.35),transparent);
  transform:skewX(-20deg); animation:acpShine 2.8s ease-in-out infinite;
}
@keyframes acpShine {
  0%{left:-80%;opacity:0} 20%{opacity:1} 60%{left:130%;opacity:1} 61%,100%{opacity:0}
}
.acp-btn-anim-shake:hover  { animation: acpShake 0.4s ease-in-out; }
@keyframes acpShake {
  0%,100%{transform:translateX(0)} 20%{transform:translateX(-4px)}
  40%{transform:translateX(4px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(3px)}
}
.acp-btn-anim-bounce:hover { animation: acpBounce 0.5s cubic-bezier(0.36,0.07,0.19,0.97); }
@keyframes acpBounce {
  0%{transform:scale(1)} 30%{transform:scale(1.08)} 60%{transform:scale(0.96)}
  80%{transform:scale(1.03)} 100%{transform:scale(1)}
}
.acp-btn-anim-ripple::after {
  content:''; position:absolute; width:0; height:0;
  top:50%; left:50%; background:rgba(255,255,255,0.25);
  border-radius:50%; transform:translate(-50%,-50%) scale(0);
}
.acp-btn-anim-ripple:active::after {
  width:300px; height:300px; transform:translate(-50%,-50%) scale(1); opacity:0;
  transition:width .5s ease,height .5s ease,opacity .5s ease;
}
.acp-btn-anim-float { animation: acpFloat 3s ease-in-out infinite; }
@keyframes acpFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
.acp-btn-anim-slide-icon .acp-btn-icon-right { transition: transform 0.25s ease; }
.acp-btn-anim-slide-icon:hover .acp-btn-icon-right { transform: translateX(5px); }
.acp-btn-anim-fill-reveal::before {
  content:''; position:absolute; inset:0;
  background:rgba(255,255,255,0.15); transform:scaleX(0);
  transform-origin:left; transition:transform 0.3s ease;
}
.acp-btn-anim-fill-reveal:hover::before { transform:scaleX(1); }
.acp-btn-anim-glow:hover { box-shadow:0 0 20px 4px rgba(255,255,255,0.2),0 6px 25px rgba(0,0,0,0.2); }
.acp-btn-anim-none:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,0.15); }

/* Responsive */
@media (max-width:600px) {
  .acp-image-left { flex-direction: column !important; }
  .acp-image-left .acp-image-wrap { flex: auto; width: 100%; }
  /* 横並び: テキスト量次第で折り返す */
  .acp-btn-layout-row { flex-wrap: wrap !important; }
  .acp-btn-layout-row .acp-btn-wrap { flex: 1 1 calc(50% - 5px); min-width: 120px; }
  /* 比較型: 480px以下で縦積みに */
  .acp-btn-layout-compare { flex-direction: column !important; }
  .acp-btn-layout-compare .acp-btn-wrap { flex: none; width: 100%; }
  .acp-card { font-size: 15px !important; }
}
/* 比較型: さらに狭い幅でも確実に縦積み */
@media (max-width:480px) {
  .acp-btn-layout-row { flex-direction: column !important; }
  .acp-btn-layout-row .acp-btn-wrap { flex: none; width: 100%; }
}

/* Entry animation */
.acp-card { animation: acpFadeUp 0.4s ease both; }
@keyframes acpFadeUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
