/* =========================================
   共通レイアウト
========================================= */
.item-list-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
}

.main-title {
  font-size: var(--res-h1);
  font-weight: 400;
  margin-bottom: 30px;
  color: var(--themegray);
  position: relative;
  display: inline-block;
}
.main-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--themegray);
  border-radius: 2px;
}

/* =========================================
   サブカテゴリタブ
========================================= */
.subcat-tabs {
  margin: 0 auto 40px auto;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 20px;
  background: #fff;
  color: #839ba5;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn:hover,
.tab-btn.active {
  background: #839ba5;
  color: #fff;
}

.tab-content {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 25px;
  background: #fafafa;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

/* =========================================
   サブカテゴリ画像
========================================= */
.subcat-img {
  display: block;
  margin: 0 auto 20px auto;
  width: 100%;
  max-width: 320px;          /* 横幅の上限を少し拡大 */
  height: 200px;             /* 枠の縦高さを固定 */
  object-fit: contain;       /* 縦を収めて全体を見せる */
  background-color: #fff;    /* 白背景で統一 */
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;             /* 背景白を確保して余白感を出す */
}

/* =========================================
   商品テーブル
========================================= */
.product-table {
  width: 90%;
  margin: 0 auto;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-table thead {
  background: #839ba5;
  color: #fff;
}

.product-table th,
.product-table td {
  padding: 12px 18px;
  font-size: 0.95rem;
  vertical-align: middle;
  border-bottom: 1px solid #ddd; /* ← ここで行線追加 */
}

.product-table th:first-child,
.product-table td:first-child {
  text-align: left;
}



.product-table th {
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* =========================================
   レスポンシブ対応
========================================= */
@media screen and (max-width: 900px) {
  .product-table th,
  .product-table td {
    font-size: 0.9em;
    padding: 8px 10px;
  }
  .tab-btn {
    padding: 8px 14px;
    font-size: 0.9em;
  }
  .subcat-img {
    max-width: 180px;
    height: 140px;
  }
  .other-items ul {
    justify-content: flex-start;
    gap: 8px 20px;
  }
  .other-items li {
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}

/* =========================================
   その他アイテム
========================================= */
/* その他の取扱商品セクション */
.other-items {
  margin-top: 50px;
  text-align: center;
}

.other-items .sub-heading {
  font-size: 1.4em;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
  border-bottom: 2px solid #0073aa;
  display: inline-block;
  padding-bottom: 5px;
}

/* 商品リストを2列グリッドで整列 */
.other-items ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px 30px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 800px;
}

/* 各リストアイテムのデザイン */
.other-items li {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 10px 15px;
  text-align: center;
  font-size: 1em;
  color: #333;
  white-space: nowrap;       /* 改行させない */
  overflow: hidden;          /* はみ出しを隠す */
  text-overflow: ellipsis;   /* 長すぎる文字を…で省略 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* クリックで展開時のアニメーションとスタイル */
.other-items li.is-expanded {
  white-space: normal;      /* 折り返しを許可して全文表示 */
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  cursor: pointer;
  z-index: 2;
  position: relative;
  background: #fffef5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transform: scale(1.02);
}

/* 展開できる要素にカーソルを表示 */
.other-items li.is-truncated {
  cursor: pointer;
}


/* レスポンシブ対応：スマホでは1列に */
@media (max-width: 600px) {
  .other-items ul {
    grid-template-columns: 1fr;
  }
}


/* =========================================
   レスポンシブ対応
========================================= */
@media screen and (max-width: 900px) {
  .other-items ul {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px 12px;
  }
  .other-items li {
    font-size: 0.85rem;
    padding: 8px 6px;
  }
}
