/* product_renewed.css */

/* 基本設定 (既存のCSSから流用・調整) */
html { scroll-behavior: smooth; }
body {
  font-family: "noto-sans-cjk-jp", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #102244;
  background-color: #f2f5f9;
}
.container {
  max-width: 1200px; /* 少し広げる */
  width: 90%;
  margin: 0 auto;
  position: relative;
}

/* メインビジュアル (既存スタイルを流用) */
.product_visual {
  background-image: url('../image/product.jpg');
  background-size: cover;
  background-position: center top;
  position: relative;
}
.product_visual .container {
  height: 300px; /* 高さは元のまま */
}
.product_visual .title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  text-align: center;
}
.product_visual h1 {
  font-size: 40px;
  font-weight: 700;
  color: #102244;
  margin-bottom: 10px;
}
.product_visual p {
  font-size: 20px;
  font-weight: 500;
  color: #102244;
}

/* パンくずリスト*/

.breadcrumb-container {
    max-width: 1080px; /* ヘッダーと同じ最大幅 */
    width: 90%;        /* ヘッダーと同じ幅 */
    margin: 0 auto;
    margin-top: 20px;  /* 適切な余白を設定 */
}

/* 画面幅が1024ピクセル以上の場合の調整 */
@media (min-width: 1024px) {
    .breadcrumb-container {
        max-width: none;   /* ヘッダーと同じ設定 */
        width: 100%;       /* ヘッダーと同じ設定 */
        padding-left: 10%; /* ヘッダーのロゴ位置に揃える */
        padding-right: 10%; /* ヘッダーのナビゲーション位置に揃える */
    }
}

.breadcrumb-005 {
  display: flex;
  gap: 0 20px;
  list-style: none;
  padding: 0;
  font-size: .9em;
}

.breadcrumb-005 li {
  display: flex;
  align-items: center;
}

.breadcrumb-005 li:first-child::before {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 20C20 20.5523 19.5523 21 19 21H5C4.44772 21 4 20.5523 4 20V11L1 11L11.3273 1.6115C11.7087 1.26475 12.2913 1.26475 12.6727 1.6115L23 11L20 11V20ZM11 13V19H13V13H11Z' fill='%23333333'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  content: '';
}

.breadcrumb-005 li:not(:last-child)::after {
  display: inline-block;
  width: .3em;
  height: .6em;
  margin-left: 12px;
  background-color: #102244;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  content: '';
}

.breadcrumb-005 a {
  color: #102244;
  text-decoration: none;
}


/* 商品セクション全体 */
.section-products {
  padding: 60px 0;
}
.section-products .container {
  margin-top: 0; /* 上のセクションとのマージン調整 */
}

/* 見出し (既存スタイルを流用・調整) */
.h2product {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 40px; /* フィルターの前に少しスペース */
  text-align: center; /* 中央寄せにする */
}
.h2product::before {
  content: attr(data-en);
  display: block;
  color: #498ee0;
  font-size: 18px;
  margin-bottom: 5px; /* 少しスペース */
}
.h2product::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background-color: #498ee0;
  margin: 10px auto 0; /* 中央寄せ */
}

/* カテゴリフィルター */
.product-filter {
  text-align: center;
  margin-bottom: 50px;
}
.filter-btn {
  background-color: #fff;
  border: 1px solid #498ee0;
  color: #498ee0;
  padding: 8px 18px;
  margin: 5px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.filter-btn:hover {
  background-color: #e0eaf6;
}
.filter-btn.active {
  background-color: #498ee0;
  color: #fff;
}

/* 商品グリッド */
.product-grid {
  display: grid;
  /* 画面幅に合わせて列数を調整 (最小280px, 最大1fr) */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px; /* カード間の余白 */
}

/* 商品カード */
.product-card {
  background-color: #fff;
  border: 1px solid #e0eaf6;
  border-radius: 8px;
  overflow: hidden; /* 角丸のため */
  display: flex;
  flex-direction: column; /* 要素を縦に並べる */
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: relative; /* カテゴリラベルの位置基準 */
  padding-bottom: 20px; /* ボタンとの間に少し余白 */
}
.product-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

/* （ふわっと非表示用） */
.product-card.hidden {
  opacity: 0;
  transform: scale(0.1);
  pointer-events: none;
  position: absolute;
}


/* カード内リンクエリア */
.product-card > a {
    text-decoration: none;
    color: inherit;
    flex-grow: 1; /* カードの高さを揃えるため、リンクエリアが伸びるようにする */
    display: flex;
    flex-direction: column;
}

/* カード内画像 */
.product-card img {
  width: 100%;
  height: auto; /* 高さを固定（必要に応じて調整） */
 /* object-fit: cover; /* アスペクト比を維持してトリミング */
  display: block;
}

/* カード内コンテンツ */
.card-content {
  padding: 20px;
  flex-grow: 1; /* テキスト量に関わらず高さを揃える */
}
.card-content h3 { /* キャッチコピー */
  font-size: 14px;
  font-weight: 500;
  color: #498ee0;
  margin-bottom: 5px;
}
.card-content h2 { /* 商品名 */
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.card-content p { /* 説明文 */
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

/* カテゴリラベル */
.category-label {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1; /* 画像より手前 */
}
/* ラベルが複数ある場合の調整 */
.category-label + .category-label {
  top: 32px; /* 2つ目のラベルの位置をずらす */
}

/* カテゴリごとの色分け */
.category-label.jisha { background-color: #102244; } /* 例: オレンジ系 */
.category-label.remograph { background-color: #f19149; } /* 例: 青系 */
.category-label.pace { background-color: #4caf50; } /* 例: 緑系 */
.category-label.presagis { background-color: #9e9e9e; } /* 例: グレー系 */
.category-label.kyouzai { background-color: #84a2d4; } /* 例: 黄色系 */
.category-label.support { background-color: #607d8b; } /* 例: 青灰色系 */



/* 詳細を見るボタンの改良スタイル */
.button018 {
    margin-top: auto;
    padding: 0 20px;
    text-align: center;
}

.button018 a {
    position: relative;
    display: inline-block;
    padding: 10px 24px;
    color: #498ee0;
    background-color: #f5f9ff;
    border: 1px solid #498ee0;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.button018 a:hover {
    background-color: #498ee0;
    color: #fff;
    box-shadow: 0 3px 6px rgba(73, 142, 224, 0.2);
}

.button018 a span {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.button018 a span::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    margin-left: 8px;
    transform: rotate(45deg);
}

/* フィーチャード商品のボタン特別スタイル */
.product-card.featured .button018 a {
    color: #f39c12;
    border-color: #f39c12;
    background-color: #fffaf0;
}

.product-card.featured .button018 a:hover {
    background-color: #f39c12;
    color: #fff;
}
/* メリハリ用スタイル (注目商品) */
.product-card.featured {
  /* 例: グリッドの2列分を占有（画面幅が広い場合） */
  grid-column: span 1; /* デフォルトは1列 */
  background-color: #fefae0; /* 例: 背景色を少し変える */
  border-color: #fca311; /* 例: 枠線の色を変える */
}
/* =========================================
   フィルター用 非表示クラス
========================================= */
.product-card.hide {
  display: none;
}

/* =========================================
   レスポンシブ設定（整理済）
========================================= */

/* --- 992px以上：featured は2列分（デスクトップ） --- */
@media (min-width: 992px) {
  .product-card.featured {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* --- 1201px ～ 1920px：縮小表示＆調整 --- */
@media (min-width: 1201px) and (max-width: 1920px) {
  .product-grid {
    transform: scale(0.9);
    transform-origin: top center;
    gap: 24px;
  }

  .product_visual .container { height: 260px; }
  .h2product { font-size: 24px; margin-bottom: 30px; }
  .h2product::before { font-size: 17px; margin-bottom: 4px; }
  .h2product::after { margin-top: 8px; }

  .product-filter { margin-bottom: 40px; }
  .filter-btn { padding: 7px 16px; font-size: 13.5px; }

  .product-card .card-content { padding: 18px; }
  .product-card .card-content h2 { font-size: 19px; margin-bottom: 9px; }
  .product-card .card-content p { font-size: 14.5px; line-height: 1.55; }

  .button018 a { padding: 9px 22px; font-size: 13.5px; }

  /* 必要なら画像サイズも制限できる */
  /*
  .product-card img {
    height: 180px;
    min-height: 180px;
  }
  */
}

/* --- 600px ～ 991px（タブレット） --- */
@media (min-width: 600px) and (max-width: 991px) {
  .product-card.featured {
    grid-column: span 1;
  }
}

/* --- 768px以下（スマホ） --- */
@media (max-width: 768px) {
  .product_visual h1 { font-size: 32px; }
  .product_visual p { font-size: 18px; }
  .h2product { font-size: 22px; }
  .h2product::before { font-size: 16px; }
  .product-grid { gap: 20px; }

  .product-card .card-content h2 { font-size: 18px; }
  .product-card .card-content p { font-size: 14px; }

  .filter-btn { padding: 6px 14px; font-size: 13px; }
  .button018 a { padding: 8px 20px; font-size: 13px; }
}

/* --- 480px以下（スマホ） --- */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card.featured {
    grid-column: span 1;
  }

  .card-content { padding: 15px; }
  .product_visual .container { height: 240px; }
  .h2product { margin-bottom: 25px; }
  .product-filter { margin-bottom: 30px; }
}
