/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* WPC Variation Table */
.wpcvt-variation-actions {
  width: initial !important;
  flex: initial !important;
}
.wpcvt-variations {
  max-height: initial !important;
  overflow-y: initial !important;
}
.wpcvt-add-to-cart .single_add_to_cart_button {
  /*margin-left: 10px;*/
}
.wpcvt-add-to-cart .quantity {
  display: none;
}
.wpcvt-variation-info {
  flex: 1 !important;
}
@media only screen and (max-width: 767px) {
  .wpcvt-variations .wpcvt-variation {
    flex-direction: row !important;
    text-align: left !important;
  }
}

/* 
テーブル全般のスタイル
*/
table { 
  border-collapse: collapse; 
  width: 100%; 
  font-family: sans-serif; 
  border: none; 
}

/* テキスト強調 */
.strong { 
  font-weight: bold; 
}

/* 割引テキスト */
.discount-text { 
  color: #6987ab; 
}

/* 価格表テーブル */
.price-table { 
  border-collapse: collapse; 
  width: 100%; 
  font-family: sans-serif; 
  border: 1.5px solid #000; 
}

.price-table td, .price-table th { 
  padding: 15px; 
  text-align: center; 
  vertical-align: middle; 
  border: 1px solid #c4c4c4; 
}

/* 背景色スタイル */
.normal { 
  background-color: #ffffff; 
}

.affordable { 
  background-color: #e6f7ff; 
}

/* 価格表示スタイル */
.price-expensive { 
  font-size: 24px; 
  font-weight: bold; 
  color: #000000; 
  position: relative; 
}

.price-affordable { 
  font-size: 32px; 
  font-weight: bold; 
  color: #ff3333; 
}

/* 割引バッジ */
.savings-badge { 
  display: inline-block; 
  background-color: #ff3333; 
  color: white; 
  font-weight: bold; 
  padding: 8px 15px; 
  border-radius: 20px; 
  margin-top: 10px; 
  font-size: 20px; 
  transform: rotate(-5deg); 
  box-shadow: 0 3px 5px rgba(0,0,0,0.2); 
}

/* 商品タイトル */
.product-title { 
  font-weight: bold; 
  font-size: 18px; 
  margin-bottom: 5px; 
}

/* 注意書き */
.note { 
  font-size: 12px; 
  color: #666; 
  margin-top: 5px; 
}

/* 価格比較 */
.price-comparison { 
  margin-top: 10px; 
  font-size: 16px; 
  font-weight: bold; 
  color: #ff3333; 
}

/* ハイライトボックス */
.highlight-box {
  border: 3px dashed #ff3333;
  border-radius: 10px;
  padding: 10px;
  margin: 10px 0px;
  background-color: #ffeaea;
}
.highlight-box p {
  margin: 0;
}

/* 下向き矢印 */
.arrow-down { 
  color: #ff3333; 
  font-size: 36px; 
  font-weight: bold; 
  margin: 5px 0; 
}

/* 比較テーブル */
.comparison-table { 
  width: 100%; 
  border-collapse: collapse; 
  border-spacing: 0; 
  border: 1.5px solid #000; 
}

.comparison-table th { 
  background-color: #f1f5f9; 
  font-weight: 600; 
  text-align: center; 
  padding: 16px 12px; 
  border-bottom: 2px solid #e2e8f0; 
  position: sticky; 
  top: 0; 
}

.comparison-table td { 
  padding: 16px 12px; 
  text-align: center; 
  border-bottom: 1px solid #e2e8f0; 
  vertical-align: middle; 
}

.comparison-table tr:hover { 
  background-color: #f8fafc; 
}

.header-row th { 
  position: sticky; 
  top: 0; 
  z-index: 10; 
}

/* 製品名 */
.product-name { 
  font-weight: 600; 
  color: #1e40af; 
}

/* 製品コンポーネント */
.product-component { 
  font-size: 13px; 
  color: #64748b; 
  margin-top: 4px; 
}

/* 強度インジケーター */
.strength-indicator { 
  display: flex; 
  justify-content: center; 
  margin-bottom: 4px; 
}

.strength-dot { 
  width: 12px; 
  height: 12px; 
  border-radius: 50%; 
  margin: 0 2px; 
  background-color: #e2e8f0; 
  display: inline-block; 
}

.strength-active { 
  background-color: #3b82f6; 
}

.strength-text { 
  font-weight: 600; 
  color: #1e40af; 
}

.time-value { 
  font-weight: 600; 
}

.highlight-row { 
  background-color: #eff6ff; 
}


/*
==========================================================================
記事ページ用の追加スタイル
==========================================================================
*/

/* 記事全体のレイアウト調整 */
.comparison-article {
  font-family: sans-serif;
  line-height: 1.8;
  color: #333;
}

.article-section {
  margin-bottom: 60px; /* 各セクションの間に余白を持たせる */
  border-bottom: 1px solid #e2e8f0; /* セクションの区切り線 */
  padding-bottom: 30px;
}
.article-section:last-child {
  border-bottom: none;
}
.article-section h2 {
  font-size: 28px;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 3px solid #4f739e;
}
.article-section h3 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 5px solid #4f739e;
}

/* イントロのリード文 */
.lead-text {
  font-size: 1.1em;
  font-weight: bold;
  color: #2c3e50;
}

/* 目次 */
.table-of-contents {
  background-color: #f8fafc;
  padding: 20px 30px;
  border-radius: 8px;
  margin: 30px 0;
  border: 1px solid #e2e8f0;
}
.table-of-contents ol {
  list-style-position: inside;
  padding-left: 0;
}
.table-of-contents li {
  margin-bottom: 10px;
}
.table-of-contents a {
  text-decoration: none;
  color: #4f739e;
}
.table-of-contents a:hover {
  text-decoration: underline;
}

/* 基本情報リスト */
.info-list {
  list-style: none;
  padding-left: 0;
}
.info-list li {
  padding: 8px 12px;
  border-bottom: 1px dotted #ccc;
}
.info-list li:first-child {
  border-top: 1px dotted #ccc;
}

/* 口コミ・体験談 */
.testimonials {
  margin-bottom: 30px;
}
.testimonial-item {
  background-color: #f8fafc;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 0 5px 5px 0;
}
.testimonial-item .user-info {
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}
.testimonial-item blockquote {
  margin: 0;
  padding: 0;
  font-style: italic;
  color: #555;
  border-left: none;
}

/* 警告・注意ボックス */
.warning-box, .caution-box {
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}
.warning-box {
  background-color: #fff1f2; /* 赤系 */
  border: 2px solid #ff7582;
}
.warning-box h3, .warning-box p {
  color: #c51a2c;
  border-left: none;
  padding-left: 0px;
  margin-top: 20px;
}
.caution-box {
  background-color: #fffbeb; /* 黄色系 */
  border: 2px solid #facc15;
}
.caution-box h3, .warning-box p{
  border-left: none;
  padding-left: 0px;
  margin-top: 20px;
}

/* FAQセクション */
.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow: hidden;
}
.faq-question {
  background-color: #f1f5f9;
  padding: 15px;
  font-weight: bold;
  margin: 0 !important;
  cursor: pointer;
}
.faq-answer {
  padding: 15px;
  margin: 0 !important;
  background-color: #fff;
}

/* まとめ：おすすめ */
.final-recommendation {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}
.recommendation-box {
  flex: 1;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  background-color: #f8fafc;
}
.recommendation-box h4 {
  margin-top: 0;
  text-align: center;
  color: #1e40af;
}
.recommendation-box ul {
  list-style-type: '✅ '; /* チェックマークを行頭文字にする */
  padding-left: 20px;
}
@media (max-width: 767px) {
  .final-recommendation {
    flex-direction: column;
  }
}

/* 免責事項 */
.disclaimer {
  background-color: #f1f1f1;
  border-radius: 5px;
  padding: 20px;
  font-size: 0.9em;
  color: #666;
  text-align: center;
  margin-top: 40px;
}

/* 空のpタグを非表示にする */
p:empty {
  display: none;
}

@media (min-width: 768px) {
  .wd-post-image {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
  }
}

.wd-post-title a {
  font-weight: bold;
}

/* ==============================================
   商品おすすめボックス内の追加スタイル
   ============================================== */

/* 画像を中央に配置し、上下に余白を追加 */
.recommendation-image {
  text-align: center;
  margin: 15px 0;
}

/* ボタンを中央に配置 */
.recommendation-button-wrap {
  text-align: center;
  margin-top: auto; /* ボタンをボックスの最下部に配置 */
  padding-top: 15px; /* 上の要素との余白 */
}

/* ボタン自体のデザイン */
.product-link-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #1e40af;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.product-link-button:hover {
  background-color: #1c388a;
}


/* --- ED治療薬セット商品レイアウト（最終FIX版） --- */

/* --- PC表示のスタイル (769px以上の画面幅) --- */
@media (min-width: 769px) {
  .product-set-item {
    display: grid;
    grid-template-columns: 20% 1fr;
    grid-template-rows: auto auto auto;
    gap: 0 30px;
    align-items: center;
    margin-bottom: 40px;
  }
  .product-info-desktop {
    grid-column: 1;
    grid-row: 1 / 4;
  }
  .product-info-mobile { display: none; }

  .product-title { grid-column: 2; grid-row: 1; }
  .product-description { grid-column: 2; grid-row: 2; margin: 0; }
  .product-set-button { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 1em;}
}


/* --- スマホ表示のスタイル (768px以下の画面幅) --- */
@media (max-width: 768px) {
  .product-set-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
  }
  .product-info-desktop { display: none; }

  /* --- WordPressの自動整形を考慮した順番指定 --- */
  .product-set-item > .product-title { order: 1; }
  .product-set-item > .product-info-mobile { order: 2; }
  .product-set-item > .product-description { order: 3; }
  /* ★WordPressが生成するpタグごとボタンを4番目に配置 */
  .product-set-item > p:has(.product-set-button) { order: 4; }


  /* --- 各要素の幅とテキスト揃えを調整 --- */
  .product-title,
  .product-description {
    width: 100%;
    margin: 0;
  }
  .product-info-mobile img {
    width: 100%;
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
  }
}

/* --- ボタンの共通スタイル --- */
.product-set-button {
  display: inline-block;
  background-color: var(--btn-default-bgcolor, rgb(105, 135, 171));
  color: #ffffff;
  padding: 12px 25px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  border-radius: 50px;
  transition: background-color 0.3s ease;
  box-sizing: border-box;
}
.product-set-button:hover {
  background-color: var(--btn-default-bgcolor-hover, rgb(129, 166, 211));
  color: #ffffff;
}


/* --- 商品ページの縦型比較テーブル --- */
.vertical-comparison-container {
    overflow-x: auto;
}

.vertical-comparison-container .vertical-comparison-table {
    width: 100%;
    border-collapse: collapse;
    border: 1.5px solid #000;
    min-width: 600px;
}

.vertical-comparison-container .vertical-comparison-table th,
.vertical-comparison-container .vertical-comparison-table td {
    padding: 16px 12px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.vertical-comparison-container .vertical-comparison-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    width: 15%;
    border-right: 1px solid #e2e8f0;
}

.vertical-comparison-container .vertical-comparison-table td {
    width: 28.33%;
}

.vertical-comparison-container .vertical-comparison-table tr:last-child th,
.vertical-comparison-container .vertical-comparison-table tr:last-child td {
    border-bottom: none;
}

.vertical-comparison-container .vertical-comparison-table tr:nth-child(odd) {
    background-color: #f8fafc;
}

/* tr:hover のスタイル指定を削除 */

/* ★ハイライト用セルの背景色 */
.vertical-comparison-container .highlight-cell {
    background-color: #fff0f5; /* 薄いピンク */
}

/* ★アイコンの共通スタイルと色分け */
.vertical-comparison-container .table-icon {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}
.vertical-comparison-container .icon-good {
    color: #d9534f; /* ◎: 赤 */
}
.vertical-comparison-container .icon-ok {
    color: #3b82f6; /* ◯: 青 */
}
.vertical-comparison-container .icon-caution {
    color: #f59e0b; /* △: 黄色 */
}

/* ★追加：表内のリンクのスタイルを調整 */
.vertical-comparison-container .vertical-comparison-table a {
    color: inherit; /* 親要素の色を継承 */
    text-decoration: none; /* 下線を削除 */
    display: block;
}

/* 縦型比較表内のpタグの余白をなくす */
.vertical-comparison-container .vertical-comparison-table p {
    margin-bottom: 0;
}

/* 比較表の中で自動生成される、不要なbrタグを非表示にする */
.vertical-comparison-container br {
    display: none;
}

/* 
 * 商品検索の結果ページだけページタイトル枠を消す 
 * */
body.search .wd-page-title { 
  display: none !important;
}
