/* =========================================================
   szc-card Ver3（PC/スマホ × Large/Compact をカード単位で選択）整理版
   - 旧：szc-card--mA / szc-card--mB は廃止（使いません）
   - <aside> に以下の「選択クラス」を付与して切替
     ■ PC側（min-width:561px）
       - szc-pc-lg ＝ Large（スマホLargeと同デザイン ※後で別調整しやすい）
       - szc-pc-sm ＝ Compact（＝現状のPCデフォ）
     ■ スマホ側（max-width:560px）
       - szc-sp-lg ＝ Large（縦積み＋大ボタン＋矢印）
       - szc-sp-sm ＝ Compact（横長コンパクト）

   例）
   - PCはCompact / スマホはLarge：  class="szc-card szc-pc-sm szc-sp-lg"
   - PCはLarge   / スマホはCompact：class="szc-card szc-pc-lg szc-sp-sm"
   ========================================================= */


/* =========================
   共通：カード本体
   ========================= */
.szc-card{
  --radius: 10px;
  --border: rgba(0,0,0,.12);
  --bg: #fff;
  --text: #111;
  --muted: rgba(17,17,17,.68);

  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 10px 0;
}


/* =========================
   共通：レイアウト（Compactのデフォ）
   ========================= */
.szc-card__inner{
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: flex-start;
}

/* 画像枠：必ず正方形（Compactデフォ 120px） */
.szc-card__imglink{
  flex: 0 0 120px;
  width: 120px;
  height: 120px;

  display: block;
  border-radius: 12px;
  overflow: hidden;

  padding: 0;
  line-height: 0;
  background: transparent;
}

/* 画像：枠いっぱいに埋める（Compactはcover） */
.szc-card__img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
}

.szc-card__body{
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
}

/* Diver等でpに付く下paddingが原因の余白を潰す（全デバイス） */
.szc-card__body p{
  padding-bottom: 0 !important;
}

/* kicker：黒ラベル内の文字を上下中央に見せる */
.szc-card__kicker{
  margin: 0 0 6px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 26px;
  padding: 0 10px;

  border-radius: 999px;
  background: rgba(0,0,0,.60);
  color: #fff;

  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
}

.szc-card__title{
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.szc-card__title a{
  color: inherit;
  text-decoration: none;
}
.szc-card__title a:hover{
  text-decoration: underline;
}

.szc-card__desc{
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}


/* =========================
   共通：ボタン（Compactデフォ 横並び）
   ========================= */
.szc-card__buttons{
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

/* WordPress/テーマの自動整形対策（ボタン間の空行を潰す） */
.szc-card__buttons br{ display: none !important; }
.szc-card__buttons p{
  margin: 0 !important;
  padding: 0 !important;
  display: contents;
}
.szc-card__buttons a{ margin: 0 !important; }

.szc-card .szc-btn{
  flex: 1 1 0;
  min-height: 32px;

  padding: 0 10px;
  border-radius: 10px;

  font-size: 12px;
  font-weight: 800;
  text-decoration: none;

  border: 1px solid rgba(0,0,0,.10);
  user-select: none;
  white-space: nowrap;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: transform .06s ease, filter .15s ease;
}

.szc-card .szc-btn:hover{
  filter: brightness(0.98);
  transform: translateY(-1px);
}
.szc-card .szc-btn:active{
  transform: translateY(0);
}


/* =========================
   ボタン色（ショップ別）
   ========================= */
.szc-btn--rakuten{
  background:#bf0000;
  color:#fff;
  border-color: rgba(191,0,0,.35);
}
.szc-btn--amazon{
  background:#f3b23a;
  color:#fff;
  border-color: rgba(243,178,58,.35);
}
.szc-btn--hmv{
  background:#ff3b30;
  color:#fff;
  border-color: rgba(255,59,48,.35);
}
.szc-btn--mercari{
  background:#2a6cff;
  color:#fff;
  border-color: rgba(42,108,255,.35);
}
.szc-btn--other{
  background:#6b7280;
  color:#fff;
  border-color: rgba(107,114,128,.35);
}


/* =========================
   カード直後に挟まる“空のp”だけ消す
   ========================= */
.szc-card + p:empty{
  display: none !important;
}


/* =========================================================
   PC（561px以上）
   ========================================================= */
@media (min-width: 561px){

  /* -------------------------
     PC Compact（szc-pc-sm）
     - 画像を上下中央
     - ボタン5〜6個は3列折り返し（2行目は伸びて埋まる）
     ------------------------- */
  .szc-pc-sm .szc-card__inner{
    align-items: center;
  }

  .szc-pc-sm .szc-card__buttons{
    flex-wrap: nowrap;
  }

  .szc-pc-sm .szc-card__buttons.szc-btns-3col{
    flex-wrap: wrap;
  }

  .szc-pc-sm .szc-card__buttons.szc-btns-3col .szc-btn{
    flex: 1 1 calc((100% - 12px * 2) / 3); /* 3列“基準” */
  }


  /* -------------------------
     PC Large（szc-pc-lg）
     - Largeの最大幅を決めて中央寄せ
     - レイアウトは縦積み（スマホLargeと同系）
     ------------------------- */
  .szc-pc-lg{
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;

    --kicker-space: 34px;

    /* Large画像の上限（比率維持用） */
    --lg-img-max-w: 260px;
    --lg-img-max-h: 340px;
  }

  .szc-pc-lg .szc-card__inner{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    position: relative;
  }

  /* Large：200×200固定を解除 → MAX制限＋比率維持（contain） */
  .szc-pc-lg .szc-card__imglink{
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;

    max-width: var(--lg-img-max-w);
    max-height: var(--lg-img-max-h);

    margin-top: var(--kicker-space);
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .szc-pc-lg .szc-card__img{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center;
  }

  .szc-pc-lg .szc-card__kicker{
    position: absolute;
    left: 12px;
    top: 8px;
    z-index: 3;
    margin: 0;
    pointer-events: none;
  }

  .szc-pc-lg .szc-card__body{
    width: 100%;
    text-align: left;
  }
  .szc-pc-lg .szc-card__title,
  .szc-pc-lg .szc-card__desc{
    text-align: left;
  }

  .szc-pc-lg .szc-card__buttons{
    width: 100%;
    max-width: 520px;
    margin: 0 auto;

    flex-direction: column;
    gap: 10px;
  }

  .szc-pc-lg .szc-btn{
    width: 100%;
    min-height: 46px;
    border-radius: 6px;
    font-size: 16px;
    position: relative;
    box-shadow: 0 6px 14px rgba(0,0,0,.10);
  }

  .szc-pc-lg .szc-btn::after{
    content: "›";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    line-height: 1;
    opacity: .9;
  }
}


/* =========================================================
   スマホ（560px以下）
   ========================================================= */
@media (max-width: 560px){

  /* -------------------------
     スマホ Large（szc-sp-lg）
     ------------------------- */
  .szc-sp-lg{
    --kicker-space: 34px;

    /* Large画像の上限（比率維持用） */
    --lg-img-max-w: 220px;
    --lg-img-max-h: 300px;
  }

  .szc-sp-lg .szc-card__inner{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    position: relative;
  }

  /* Large：200×200固定を解除 → MAX制限＋比率維持（contain） */
  .szc-sp-lg .szc-card__imglink{
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;

    max-width: var(--lg-img-max-w);
    max-height: var(--lg-img-max-h);

    margin-top: var(--kicker-space);
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .szc-sp-lg .szc-card__img{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center;
  }

  .szc-sp-lg .szc-card__kicker{
    position: absolute;
    left: 12px;
    top: 8px;
    z-index: 3;
    margin: 0;
    pointer-events: none;
  }

  .szc-sp-lg .szc-card__body{
    width: 100%;
    text-align: left;
  }
  .szc-sp-lg .szc-card__title,
  .szc-sp-lg .szc-card__desc{
    text-align: left;
  }

  .szc-sp-lg .szc-card__buttons{
    width: 100%;
    max-width: 520px;
    margin: 0 auto;

    flex-direction: column;
    gap: 10px;
  }

  .szc-sp-lg .szc-btn{
    width: 100%;
    min-height: 46px;
    border-radius: 6px;
    font-size: 16px;
    position: relative;
    box-shadow: 0 6px 14px rgba(0,0,0,.10);
  }

  .szc-sp-lg .szc-btn::after{
    content: "›";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    line-height: 1;
    opacity: .9;
  }


  /* -------------------------
     スマホ Compact（szc-sp-sm）
     ------------------------- */
  .szc-sp-sm .szc-card__inner{
    flex-direction: row;
    align-items: center; /* ボタンが2行以上になっても画像が上寄りにならない */
    text-align: left;

    gap: 4px;
    padding: 10px 12px;
    padding-top: 38px;
    padding-bottom: 6px !important;

    position: relative;
  }

  .szc-sp-sm .szc-card__imglink{
    flex: 0 0 86px;
    width: 86px;
    height: 86px;

    margin-top: 0;
  }

  .szc-sp-sm .szc-card__kicker{
    position: absolute;
    left: 12px;
    top: 6px;
    z-index: 3;
    margin: 0;
    pointer-events: none;
  }

  .szc-sp-sm .szc-card__body{
    width: auto;
    text-align: left;
  }

  .szc-sp-sm .szc-card__desc{
    margin-bottom: 4px;
    font-size: 12px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .szc-sp-sm .szc-card__buttons{
    flex-wrap: wrap;
    gap: 8px;
  }

  .szc-sp-sm .szc-btn{
    flex: 1 1 calc(50% - 4px);
    min-height: 34px;

    border-radius: 10px;
    font-size: 12px;

    box-shadow: none;
  }

  .szc-sp-sm .szc-btn::after{
    content: none;
  }
}