/* ========================================
   商品ページ共通スタイル（カテゴリ全体）
   - ヒーロー / パンくず
   - レイアウト / カード
   - 画像まわり
   - テキスト / 注文パネル
======================================== */

/* ------------------------------
   ヒーロー / パンくず（一覧・詳細共通）
   ※ 共通の .hero-section をベースに、一覧・詳細用の
      .hero-section--list で見た目を切り替える
------------------------------ */
.hero-section.hero-section--list {
  padding: 32px 4%;
  min-height: 16vh;
  background: none;
}

.section--breadcrumbs {
  padding-top: 24px;
  padding-bottom: 1px;
}

.section--breadcrumbs .small-note {
  margin-top: 4px;
  margin-bottom: 24px;
}

/* ------------------------------
   レイアウト / カード
------------------------------ */
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 24px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.product-card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 1.5em 2em;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ------------------------------
   画像まわり
------------------------------ */
.product-card .product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-image {
  border-radius: 10px;
  width: 100%;
  display: block;
  object-fit: cover;
}

.product-list .product-image {
  overflow: hidden;
}

.product-list .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image.placeholder {
  border-radius: 10px;
  background: repeating-linear-gradient(
    135deg,
    #f0f0f0,
    #f0f0f0 4px,
    #e4e4e4 4px,
    #e4e4e4 8px
  );
  width: 100%;
  aspect-ratio: 1 / 1;
}

.variation-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.variation-thumb {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 8px;
  background: repeating-linear-gradient(
      135deg,
      #f0f0f0,
      #f0f0f0 4px,
      #e4e4e4 4px,
      #e4e4e4 8px
    );
  border: 2px solid transparent;
  cursor: pointer;
}

.product-detail-page .variation-thumb {
  border-color: #d0d0d0;
}

.variation-thumb.is-active {
  border-color: #222;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ------------------------------
   テキスト / 注文エリア共通
------------------------------ */
.product-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.product-desc {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: #555;
}

.order-panel {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 16px 14px 18px;
}

.order-panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 30px;
}

/* ========================================
   商品一覧ページ（products-course.html）
   - フィルター / ソート
   - ページネーション
======================================== */

/* ------------------------------
   フィルター / ソート
------------------------------ */
/* コース切り替えナビ */
.course-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.course-nav .chip-button--course {
  text-decoration: none;
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: #666;
}

/* 管理画面リンク（ログイン時） */
.admin-badge {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.admin-badge a {
  font-size: 13px;
  color: #bbb;
}

.admin-badge a:hover {
  color: #fff;
}

.header-inner {
  position: relative;
}

.filter-bar {
  border-radius: 2em;
  padding: 2em;
  background-color: #f7f7f7;
  margin-bottom: 40px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-row + .filter-row {
  margin-top: 8px;
}

.chip-button {
  border-radius: 999px;
  border: 1px solid #d0d0d0;
  padding: 4px 12px;
  background-color: #fff;
  color: #222;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.chip-button:hover {
  border-color: #aaa;
  background-color: #f5f5f5;
}

.chip-button--filled {
  background-color: #222;
  color: #fff;
  border-color: #222;
}

.chip-button--filled:hover {
  background-color: #333;
  border-color: #333;
}

.list-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.list-count {
  color: #666;
}

.list-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.list-sort-label {
  font-size: 14px;
  color: #555;
  margin-right: 2px;
}

/* ------------------------------
   ページネーション
------------------------------ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  font-size: 14px;
}

.page-btn {
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d0d0d0;
  background-color: #fff;
  color: #222;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.page-btn:hover {
  border-color: #aaa;
  background-color: #f5f5f5;
}

.page-btn.is-active {
  background-color: #222;
  color: #fff;
  border-color: #222;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: default;
}

/* ========================================
   商品詳細ページ（product-detail.html）
   - メイン商品エリア
   - セクションブロック
======================================== */

/* ------------------------------
   メイン商品エリア
------------------------------ */
/* 商品詳細ページではカードのシャドウを消す */
.product-detail-page .product-card {
  box-shadow: none;
}

/* 「一緒に検討されている商品」のカードにはシャドウを付ける */
.product-detail-page .product-list.related-list .product-card {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 商品詳細ページのメイン画像を正方形にする */
.product-detail-page .product-card > .product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-detail-page .product-title {
  font-size: 24px;
  letter-spacing: 0.06em;
  margin: 8px 0 10px;
}

.product-detail-page .product-desc.product-desc--lead {
  margin-top: 16px;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.9;
  color: #444;
}

.product-detail-page .product-meta {
  margin: 0 0 6px;
}

.product-detail-page .product-meta--code {
  margin-bottom: 12px;
  display: inline-block;
  padding: 4px 14px 3px;
  border: 1px solid #222;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #222;
  background-color: #fff;
}

.product-detail-page .product-meta--qty {
  margin-bottom: 12px;
}

.product-detail-page .btn--wide {
  min-width: 220px;
}

/* 商品詳細ページのバリエーション画像 */
.product-detail-page .variation-thumb--main {
  background-image: url('../images/item01.jpg');
  background-size: cover;
  background-position: center;
}

.product-detail-page .variation-thumb--alt1 {
  background-image: url('../images/item01_02.jpg');
  background-size: cover;
  background-position: center;
}

.product-detail-page .variation-thumb--alt2 {
  background-image: url('../images/item01_03.jpg');
  background-size: cover;
  background-position: center;
}

.product-detail-page .variation-thumb--alt3 {
  background-image: url('../images/item01_04.jpg');
  background-size: cover;
  background-position: center;
}

/* ------------------------------
   セクションブロック
------------------------------ */
.product-detail-page .section-block {
  margin-top: 32px;
}

.product-detail-page .section-block--compact {
  margin-top: 8px;
}

.product-detail-page .section-block--center {
  text-align: center;
}

.product-detail-page .course-features--compact {
  margin-top: 4px;
  margin-bottom: 30px;
}

.product-detail-page .section-heading {
  margin-top: 0;
}

.product-detail-page .section-heading.section-heading--spaced {
  margin-top: 12px;
}

.product-detail-page .product-list.related-list {
  margin-top: 12px;
}

/* ========================================
   レスポンシブ（共通）
======================================== */
@media (max-width: 960px) {
  .product-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 640〜960px の間は商品一覧を2カラム表示にする */
  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .product-list {
    grid-template-columns: minmax(0, 1fr);
  }

  /* スマホ閲覧時はフィルターバーの余白・マージンを詰める */
  .filter-bar {
    padding: 20px 24px;
    margin-top: -30px;
    margin-bottom: 20px;
  }

  .filter-row {
    gap: 6px;
  }

  .filter-row + .filter-row {
    margin-top: 6px;
  }

  /* スマホ閲覧時は商品詳細ページのメイン商品カードだけ余白を解除 */
  .product-detail-page .product-layout > .product-card {
    padding: 0;
  }
}
