/* ===================================================
 🎨 RakuAma Search デザイン統一CSS（Lite版）
=================================================== */
.rakuama-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.rakuama-card {
    width: 240px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}
.rakuama-card:hover { transform: translateY(-3px); }

.rakuama-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.rakuama-title {
    font-weight: bold;
    margin: 10px 0 5px;
    font-size: 15px;
    line-height: 1.4;
}

.rakuama-btns {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.rakuama-btn {
    display: inline-block;
    color: #fff;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
}
.rakuama-btn:hover { opacity: 0.8; }

.rakuama-btn.rakuten {
    background: var(--rakuama-rakuten-color, #bf0000);
}
.rakuama-btn.amazon {
    background: var(--rakuama-amazon-color, #232f3e);
}

/* ===========================
   💡 共通ボタンデザイン
   =========================== */
.rakuama-btns {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.rakuama-btn {
  display: inline-block;
  width: auto;
  min-width: 120px;
  padding: 6px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.3px;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

.rakuama-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/*
.rakuama-btn.rakuten { background: #bf0000; }
.rakuama-btn.amazon  { background: #232f3e; }
*/

/* ===========================
   💰 価格比較ボックス
   =========================== */
.rakuama-compare {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14px;
}

.rakuama-compare div {
  flex: 1;
  text-align: center;
  padding: 6px;
  border-radius: 4px;
  background: #f9f9f9;
  margin: 2px;
}

.rakuama-compare a {
  text-decoration: none;
  color: #333;
}

.rakuama-compare .lowest {
  background: #ffe9b3;
  font-weight: bold;
}

.rakuama-note {
  margin-top: 4px;
  font-size: 13px;
  text-align: center;
  color: #444;
}

/* ===============================
   デザインテーマ切替
   =============================== */

/* 🧱 カード型（標準） */
.theme-card .rakuama-card {
  border: 1px solid #ddd;
  background: #fff;
}

/* 📋 リスト型 */
.theme-list .rakuama-card {
  display: block;
  width: 100%;
  max-width: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  margin-bottom: 15px;
  background: #fff;
  overflow: hidden;
}

.theme-list .rakuama-card img {
  width: 140px;
  float: left;
  margin-right: 15px;
  border-radius: 6px;
}

.theme-list .rakuama-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.5;
}

.theme-list .rakuama-btns {
  clear: both;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.theme-list .rakuama-btn {
  min-width: 120px;
  padding: 6px 14px;
  font-size: 13px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
/*
.theme-list .rakuama-btn.rakuten { background: #bf0000; }
.theme-list .rakuama-btn.amazon  { background: #232f3e; }
*/
/* 🧩 スマホ最適化（リスト型） */
@media screen and (max-width: 768px) {
  .theme-list .rakuama-card {
    text-align: center;
    padding: 10px;
  }

  .theme-list .rakuama-card img {
    float: none;
    display: block;
    margin: 0 auto 10px;
    width: 60%;
    max-width: 200px;
  }

  .theme-list .rakuama-btns {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .theme-list .rakuama-btn {
    width: 80%;
    font-size: 14px;
  }
}

/* 💡 ミニマル型 */
.theme-mini .rakuama-card {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 5px;
}

.theme-mini .rakuama-card img {
  border-radius: 4px;
  width: 100px;
}

.theme-mini .rakuama-title {
  font-size: 13px;
  color: #333;
}

.theme-mini .rakuama-btns {
  display: none; /* シンプル表示 */
}

/* ==========================
   🧩 管理画面UI微調整
   ========================== */
.wrap .button {
  font-weight: bold;
  border-radius: 4px;
}

.wrap textarea {
  font-size: 12px;
  font-family: monospace;
}

/* ==========================
📋 リスト型（タイトル下にボタン配置） 
   ========================== */

.theme-list .rakuama-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  margin-bottom: 15px;
}

.theme-list .rakuama-card img {
  width: 140px;
  border-radius: 6px;
  flex-shrink: 0;
}

.theme-list .rakuama-info {
  flex: 1;
  text-align: left;
}

.theme-list .rakuama-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ✅ ボタンはタイトルの直下に配置 */
.theme-list .rakuama-btns {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.theme-list .rakuama-btn {
  display: inline-block;
  min-width: 120px;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: all 0.2s ease-in-out;
}

.theme-list .rakuama-btn.rakuten { background: var(--rakuama-rakuten-color, #bf0000); }
.theme-list .rakuama-btn.amazon  { background: var(--rakuama-amazon-color, #232f3e); }
.theme-list .rakuama-btn:hover   { opacity: 0.85; transform: translateY(-1px); }

/* 🧩 スマホ対応 */
@media screen and (max-width: 768px) {
  .theme-list .rakuama-card {
    flex-direction: column;
    text-align: center;
  }
  .theme-list .rakuama-card img {
    width: 70%;
    max-width: 200px;
    margin: 0 auto;
  }
  .theme-list .rakuama-info {
    text-align: center;
  }
  .theme-list .rakuama-btns {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .theme-list .rakuama-btn {
    width: 80%;
  }
}
