/* 楽アマツール 部品共通CSS v0.1.20 */

/* ---- 単品ボックス・商品カード共通 ---- */
.rakuama-cards,
.rakuama-cards * { box-sizing: border-box; }
.rakuama-cards { width: 100%; max-width: none; margin: 1.75em 0; }
.rakuama-card { min-width: 0; color: #222; background: #fff; border: 1px solid #dedede;
  border-radius: 8px; padding: 20px; }
.rakuama-card p { margin: 0 !important; }
.rakuama-card__label { display: block; color: #222; font-size: 14px; font-weight: 700;
  line-height: 1.55; border-bottom: 1px solid #e7e7e7; padding: 0 0 9px; margin: 0 0 13px; }
.rakuama-card .rakuama-card__brand { color: #777; font-size: 12px; line-height: 1.45; margin: 0 0 3px !important; }
.rakuama-card .rakuama-card__pname { color: #1f1f1f; font-size: 18px; font-weight: 700; line-height: 1.45;
  margin: 0 0 8px !important; }
.rakuama-card .rakuama-card__rating { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px;
  margin: 0 !important; font-size: 0; line-height: 1.4; }
.rakuama-card__stars { color: #d98200; font-size: 14px; font-weight: 700; line-height: 1.4; }
.rakuama-card__rc { color: #777; font-size: 11px; line-height: 1.4; }
.rakuama-card__imglink { display: block; width: 100%; aspect-ratio: 1 / 1; }
.rakuama-card__imglink img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rakuama-card .rakuama-card__price { color: #333; font-size: 13px; line-height: 1.5; margin: 10px 0 12px !important; }
.rakuama-card__price-label { color: #777; font-size: 11px; margin-right: 7px; }
.rakuama-card__price strong { color: #d3381c; font-size: 20px; }
.rakuama-card__price .rakuama-price__note { display: block; color: #888; font-size: 10px;
  font-weight: 400; margin-top: 2px; }
.rakuama-card__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rakuama-btn { min-height: 48px; color: #fff !important; text-decoration: none !important;
  text-align: center; border: 1px solid transparent; border-radius: 6px; padding: 9px 8px; display: flex; align-items: center;
  justify-content: center; line-height: 1.35; }
.rakuama-btn:hover { filter: brightness(.96); color: #fff !important; }
.rakuama-btn--rakuten { background: #d3381c; }
.rakuama-btn--amazon { background: #fff; border-color: #8a8a8a; color: #333 !important; }
.rakuama-btn--amazon:hover { background: #f7f7f7; color: #333 !important; }
.rakuama-btn__mall,
.rakuama-btn__mall--only { font-size: 13px; font-weight: 700; }
.rakuama-cards-note { width: 100%; margin: 10px 0 0 !important; color: #777; font-size: 11px;
  line-height: 1.6; text-align: left; }

/* 単品カード：本文幅を使い、画像と購入情報を左右に分ける */
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card { width: 100%; display: grid;
  grid-template-columns: minmax(180px, 32%) minmax(0, 1fr);
  grid-template-areas: "image label" "image brand" "image name" "image rating" "image price" "image buttons";
  column-gap: 26px; align-items: start; align-content: start; }
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card__label { grid-area: label; }
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card__brand { grid-area: brand; }
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card__pname { grid-area: name; font-size: 20px; }
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card__rating { grid-area: rating; }
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card__imglink { grid-area: image; max-width: 220px;
  align-self: center; justify-self: center; }
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card__price { grid-area: price; }
.rakuama-cards:not(.rakuama-cards--3) .rakuama-card__btns { grid-area: buttons; }

/* 用途別3商品比較：PCは3列、スマホは2列。3枚目は左寄せ */
.rakuama-cards--3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rakuama-cards--3 .rakuama-card { display: flex; flex-direction: column; padding: 14px; }
.rakuama-cards--3 .rakuama-card__label { min-height: 0; color: #222; font-size: 1em;
  background: #f4f5f6; border-bottom: 1px solid #dfe2e5; border-radius: 7px 7px 0 0;
  margin: -14px -14px 10px; padding: 10px 12px; }
.rakuama-cards--3 .rakuama-card__pname { min-height: 0; font-size: 15px; }
.rakuama-cards--3 .rakuama-card__imglink { margin: 10px 0 8px; }
.rakuama-cards--3 .rakuama-card__price { margin-top: 4px !important; }
.rakuama-cards--3 .rakuama-card__price strong { font-size: 17px; }
.rakuama-cards--3 .rakuama-card__btns { grid-template-columns: 1fr; margin-top: auto; }

@media (max-width: 600px) {
  .rakuama-card { padding: 16px; }
  .rakuama-cards:not(.rakuama-cards--3) .rakuama-card { display: block; }
  .rakuama-cards:not(.rakuama-cards--3) .rakuama-card__pname { font-size: 18px; }
  .rakuama-cards:not(.rakuama-cards--3) .rakuama-card__imglink { width: min(100%, 260px);
    margin: 8px auto 12px; }
  .rakuama-cards:not(.rakuama-cards--3) .rakuama-card__btns { grid-template-columns: 1fr; }
  .rakuama-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
    margin-left: 0; margin-right: 0; }
  .rakuama-cards--3 .rakuama-card { padding: 10px; }
  .rakuama-cards--3 .rakuama-card__label { font-size: 1em; margin: -10px -10px 8px;
    padding: 8px 9px; }
  .rakuama-cards--3 .rakuama-card__pname { font-size: 14px; }
  .rakuama-cards--3 .rakuama-card__price strong { font-size: 16px; }
  .rakuama-cards--3 .rakuama-btn { min-height: 44px; padding: 7px 4px; }
  .rakuama-cards--3 .rakuama-btn__mall,
  .rakuama-cards--3 .rakuama-btn__mall--only { font-size: 11px; }
}

/* ---- スペック比較表 ---- */
.rakuama-spec { width: 100%; border-collapse: collapse; font-size: 14px; margin: 1em 0 1.5em; }
.rakuama-spec th, .rakuama-spec td { border: 1px solid #e5e5e5; padding: 8px 10px; text-align: left; }
.rakuama-spec th { background: #f7f7f7; font-weight: bold; white-space: nowrap; }
.rakuama-spec .rakuama-win { color: #c00; font-weight: bold; }

/* ---- お得な購入方法 ---- */
.rakuama-saving-guide { max-width: 640px; margin: 1.5em auto; }
.rakuama-saving-guide * { box-sizing: border-box; }
.rakuama-saving-guide__mall { margin: 0 0 14px; padding: 16px 18px; background: #fff;
  border: 1px solid #e2e2e2; border-left: 4px solid #bf0000; border-radius: 8px; }
.rakuama-saving-guide__mall--amazon { margin-top: 28px; border-left-color: #ff9900; }
.rakuama-saving-guide .rakuama-saving-guide__title { color: #222; font-size: 17px; font-weight: 700;
  line-height: 1.5; margin: 0 0 7px !important; }
.rakuama-saving-guide .rakuama-saving-guide__text { color: #444; font-size: 14px; line-height: 1.75;
  margin: 0 !important; }
.rakuama-saving-guide__pointday { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 13px 0 0; padding: 12px 14px; color: #222 !important; background: #fff8f5;
  border: 1px solid #edc7bd; border-radius: 7px; text-decoration: none !important; }
.rakuama-saving-guide__pointday:hover { background: #fff2ed; color: #222 !important; }
.rakuama-saving-guide__pointday-copy { min-width: 0; }
.rakuama-saving-guide__pointday-date { display: block; color: #a52a16; font-size: 12px; font-weight: 700;
  line-height: 1.45; margin-bottom: 2px; }
.rakuama-saving-guide__pointday-name { display: block; font-size: 15px; font-weight: 700; line-height: 1.45; }
.rakuama-saving-guide__pointday-cta { flex-shrink: 0; color: #a52a16; font-size: 12px; font-weight: 700; }
.rakuama-saving-guide .rakuama-sale { margin: 0 auto; }
.rakuama-saving-guide .rakuama-saving-guide__notice { color: #777; font-size: 11px; line-height: 1.65;
  margin: 12px 0 0 !important; }

@media (max-width: 600px) {
  .rakuama-saving-guide__mall { padding: 14px; }
  .rakuama-saving-guide__pointday { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* ---- セールバナー ---- */
.rakuama-sale { max-width: 640px; margin: 1.5em auto; display: block; text-decoration: none;
  border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.12); background: #fff; }
.rakuama-sale__head { text-align: center; font-size: 17px; font-weight: bold; line-height: 1.4; padding: 7px 0 5px; }
.rakuama-sale__main { text-align: center; padding: 14px 12px 12px; }
.rakuama-sale .rakuama-sale__sub { color: #fff; font-size: 12px; line-height: 1.45; letter-spacing: .08em; margin: 0 0 4px !important; }
.rakuama-sale .rakuama-sale__title { font-size: 26px; line-height: 1.25; font-weight: 900; margin: 0 0 8px !important; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.rakuama-sale__off { display: inline-block; font-weight: 900; font-size: 15px; line-height: 1.4; border-radius: 6px; padding: 4px 14px; }
.rakuama-sale__foot { text-align: center; padding: 8px 12px; }
.rakuama-sale .rakuama-sale__period { color: #fff; font-size: 13px; line-height: 1.5; margin: 0 !important; }
.rakuama-sale__period strong { font-size: 16px; }
.rakuama-sale .rakuama-sale__cta { font-size: 11px; line-height: 1.5; margin: 4px 0 0 !important; }
.rakuama-sale--rakuten .rakuama-sale__head { color: #bf0000; }
.rakuama-sale--rakuten .rakuama-sale__main { background: linear-gradient(135deg, #c00000, #e5241f); }
.rakuama-sale--rakuten .rakuama-sale__title { color: #ffe100; }
.rakuama-sale--rakuten .rakuama-sale__off { background: #fff; color: #c00000; }
.rakuama-sale--rakuten .rakuama-sale__foot { background: #8e0e0e; }
.rakuama-sale--rakuten .rakuama-sale__cta { color: #ffd7d7; }
.rakuama-sale--amazon .rakuama-sale__head { color: #232f3e; }
.rakuama-sale--amazon .rakuama-sale__main { background: linear-gradient(135deg, #232f3e, #37475a); }
.rakuama-sale--amazon .rakuama-sale__title { color: #ff9900; }
.rakuama-sale--amazon .rakuama-sale__off { background: #ff9900; color: #232f3e; }
.rakuama-sale--amazon .rakuama-sale__foot { background: #131a22; }
.rakuama-sale--amazon .rakuama-sale__cta { color: #ffd699; }

/* ---- 楽天ランキング ---- */
.rakuama-rk { max-width: 640px; margin: 1.5em auto; background: #fff; border: 1px solid #eee;
  border-radius: 12px; padding: 20px 22px; }
.rakuama-rk__title { font-size: 16px; font-weight: bold; margin: 0 0 4px; }
.rakuama-rk__sub { font-size: 11px; color: #999; margin: 0 0 14px; }
.rakuama-rk ol { list-style: none; margin: 0; padding: 0; }
.rakuama-rk__row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f0f0f0; }
.rakuama-rk__row:last-child { border-bottom: none; }
.rakuama-rk__rank { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: #eef0f2;
  color: #555; font-weight: bold; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.rakuama-rank--gold { background: linear-gradient(135deg,#e6b422,#c1900a); color: #fff; }
.rakuama-rank--silver { background: linear-gradient(135deg,#a8b2bd,#7d8894); color: #fff; }
.rakuama-rank--bronze { background: linear-gradient(135deg,#c08a5c,#96633a); color: #fff; }
.rakuama-rk__row--na .rakuama-rk__rank { opacity: .45; }
.rakuama-rk__na { font-size: 13px; color: #aaa; }
.rakuama-rk__body { min-width: 0; }
.rakuama-rk__name { font-size: 13px; font-weight: bold; color: #1a6bb8; text-decoration: none; display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rakuama-rk__name:hover { text-decoration: underline; }
.rakuama-rk__meta { font-size: 12px; color: #c00; }
.rakuama-rk__more summary { list-style: none; cursor: pointer; text-align: center; font-size: 13px;
  font-weight: bold; color: #1a6bb8; background: #f4f7fa; border-radius: 8px; padding: 9px; margin-top: 10px; }
.rakuama-rk__more summary::-webkit-details-marker { display: none; }
.rakuama-rk__more summary::after { content: " ▼"; font-size: 10px; }
.rakuama-rk__more[open] summary::after { content: " ▲"; }

/* ---- 価格の自動表示 ---- */
.rakuama-price__note { font-size: 11px; color: #999; }
