/* ============================
   製品一覧ページ 共通
============================ */

.products-page .page-title {
  font-size: 28px;
  margin-bottom: 30px;
  text-align: center;
  color: #003366;
}

/* ============================
   カテゴリ説明文
============================ */
.category-desc {
  font-size: 15px;
  color: #444;
  margin: -10px 0 20px;
  line-height: 1.7;
}

/* ============================
   製品カード 3列レイアウト（PC）
============================ */

.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 40px;
}

.product-card {
  width: calc(33.333% - 14px);
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

/* カード内リンク（タイトル側） */
.products-page .product-card > a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* カード画像 */
.product-card img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* カードタイトル */
.product-card h3 {
  font-size: 16px;
  margin: 10px 0;
  line-height: 1.4;
}

/* ============================
   製品リンク（詳細を見る →）
   アウトラインボタン
============================ */

.product-card > a.product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 6px 16px;
  border: 1px solid #1e90ff;
  border-radius: 20px;
  color: #1e90ff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
}

/* 矢印アイコン */
.product-card > a.product-link::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-top: 2px solid #1e90ff;
  border-right: 2px solid #1e90ff;
  transform: rotate(45deg);
  transition: all 0.25s ease;
}

/* ホバー時：背景青＋文字白＋矢印白 */
.product-card > a.product-link:hover {
  background: #1e90ff;
  color: #fff !important;
  transform: translateY(-2px);
}

.product-card > a.product-link:hover::after {
  border-color: #fff;
}

/* ============================
   スマホだけカテゴリタグ
============================ */

.product-tag {
  display: none;
  background: #1e90ff;
  color: #fff;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .product-tag {
    display: inline-block;
  }
}

/* ============================
   スマホ（1列表示）
============================ */

@media (max-width: 768px) {
  .product-card {
    width: 100%;
  }
}

/* ============================
   アコーディオン（スマホ）
============================ */

@media (min-width: 769px) {
  .accordion-content {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .accordion-title {
    cursor: pointer;
    padding: 10px 0;
  }
  .accordion-content {
    display: none;
  }
}

/* ============================
   カテゴリナビ
============================ */

.category-nav {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 20px 0 40px;
}

.category-nav a {
  padding: 8px 14px;
  background: #e8f0ff;
  border-radius: 6px;
  color: #004a99;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.category-nav a:hover {
  background: #d7e7ff;
}

/* ============================
   自動化装置ページ
============================ */

.products-page .main-area {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.products-page .page-lead {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

/* 画像統一 */
.auto-vertical-item img,
.products-page .auto-card img {
  width: 100%;
  max-width: 700px;
  height: 300px;
  object-fit: contain;
  background: #fff;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

/* 下3つ */
.products-page .auto-grid {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.products-page .auto-card {
  background: none;
  border: none;
  padding: 0;
  text-align: center;
  box-shadow: none;
}

.products-page .auto-card img {
  object-fit: cover;
}

/* スマホ */
@media screen and (max-width: 768px) {
  .products-page .auto-grid {
    grid-template-columns: 1fr;
  }
}

/* サブボタン */
.sub-btn {
  display: inline-block;
  margin-left: 12px;
  padding: 4px 10px;
  background: #005bac;
  color: #fff;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
}

.sub-btn:hover {
  background: #003f80;
}

.faq-btn {
  background: #777;
}

.faq-btn:hover {
  background: #555;
}
/* =========================================
   製品一覧ページ専用のレイアウト修正
   （base.css の上書き）
========================================= */

/* 一番上の画像を中央寄せ */
.products-page .auto-main-image img {
  display: block !important;
  margin: 0 auto !important;
}

/* キャプションを中央寄せ */
.products-page .auto-caption {
  text-align: center !important;
}

/* 縦4つの画像の下の文字を中央寄せ */
.products-page .auto-vertical-item p {
  text-align: center !important;
}

/* 下3つの画像を枠内に収める（切れないようにする） */
.products-page .auto-card img {
  object-fit: contain !important;
  height: 300px !important;
  background: #fff;
}

/* 下3つの文字も中央寄せ */
.products-page .auto-card p {
  text-align: center !important;
}

/* 念のため、画像全体の中央寄せを強化 */
.products-page img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}