@charset "utf-8";
/* CSS Document */

/* === 上部画像付きテキストリンク === */
html {
  scroll-behavior: smooth; /* スムーズスクロール */
}

a {
  text-decoration: none !important;
  color: inherit;
}


.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* PC・タブレットは3列固定 */
  gap: 20px;
}

/* カードのデザイン */
.link-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #afafaf;
  border-radius: 6px;
  background: #fbfdf8;
  text-decoration: none;
  color: #333;
  overflow: hidden;
  transition: background 0.2s ease;
}

.link-card:hover {
  background: #fff;
}

/* 画像は長方形キープ */
.card-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* テキスト部分 */
.link-card p {
  padding: 20px 30px;
  margin: 0;
  text-align: left;
  line-height: 1.6;
}
.anchor-section {
  padding: 60px 0;
 /* border-bottom: 1px dotted #afafaf;　←これあると間にいい感じの線が入る*/
}
.anchor-section h3 {
  font-size: 1.3em;
  margin-bottom: 10px;
}
.anchor-section p {
  color: #555;
  margin: 0;
}

/* === 上部テキストリンク === */
.textlink-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* PCでは常に3列固定 */
  gap: 20px;
}
.texth3yohaku {
  padding: 10px 0 0;
}

/* ===== 各リンクカード ===== */
.textlink-card {
  display: flex;
  align-items: center;
  justify-content: left;
  text-align: left;
  border: 1px solid #afafaf;
  border-radius: 6px;
  background: #fbfdf8;
  padding: 30px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: normal;
}
.textlink-card:hover {
  background: #009a61;
  color: #fff;
}

/* === 比較表 === */
.compare-table-wrapper {
  background-color: #fbfdf8;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
  border-radius: 6px;
}

/* テーブル全体 */
.compare-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px;
  font-size: 14px;
  text-align: center;
  color: #333;
  border: none !important;
}

/* 各セルの初期化：FSのデフォルト線を上書き */
.compare-table th,
.compare-table td {
  border: none !important;
  padding: 12px 10px;
  vertical-align: middle;
}

/* 行の下だけ線を引く */
.compare-table tr {
  border-bottom: 1px solid #afafaf;
}

/* 最後の行の線は非表示 */
.compare-table tr:last-child {
  border-bottom: none;
}

/* 見出し列 */
.compare-table th {
  text-align: left;
  font-weight: bold;
  white-space: nowrap;
}

/* 商品画像 */
.compare-table img {
  width: 100px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* リンク */
.compare-table a {
  text-decoration: none;
  color: inherit;
}


.container {
  max-width: 960px;
  margin: 0 auto;
}


/* === ランキング・商品共通 === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-items: stretch;
}

.product-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
    box-shadow: 0 0 6px rgba(0,0,0,0.05);
}

.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #009a61;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  border-radius: 999px;
  padding: 4px 12px;
}

.product-image {
  width: 100%;
 /* aspect-ratio: 1 / 1;*/ /*←これつけると正方形を維持*/
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12px;
}

.product-name {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
  text-align: left;
}

.product-price {
  font-size: 18px;
  font-weight: bold;
}

.tax {
  font-size: 12px;
}

/* === 緑のボタン === */
.btn-area {
  text-align: center;
  margin-top: 40px;
}

.link-btn {
  display: inline-block;
  background-color: #009a61;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 999px;
  text-decoration: none;
  transition: 0.3s;
}

.link-btn:hover {
  background-color: #007b4f;
}


.yohaku-m {
  height: 80px;
}
.yohaku-s {
  height: 40px;
}
.br-sp {
  display: none;
}
/* === スマホ対応（2列） === */
@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .product-card {
    padding: 12px;
  }
  .product-name {
    font-size: 12px;
  }
  .product-price {
    font-size: 16px;
  }
 .link-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .link-card p {
    padding: 16px 16px;
    font-size: 14px;
  }
  .textlink-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .textlink-card {
    padding: 15px;
    font-size: 14px;
  }
  .link-btn {
    font-size: 14px;
    padding: 14px 28px;
  }
  .yohaku-m {
    height: 60px;
  }
  .yohaku-s {
    height: 30px;
  }
  .br-sp {
    display: block;
  }
}