/**
 * 商品一覧・商品詳細ページ用スタイル
 *
 * 参照元: static_html/02_pronto_商品一覧.html, 03_pronto_商品詳細.html（転記ベース）
 * - フィルター用チェックボックス・セレクト
 * - 商品詳細のバリエーション選択・アコーディオン
 * - モバイル固定購入バー
 */

/* --------------------------------------
   フィルター用カスタムチェックボックス
-------------------------------------- */
.filter-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--c-border);
  border-radius: 0;
  outline: none;
  cursor: pointer;
  position: relative;
  background-color: transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}
.filter-checkbox:checked {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
}
.filter-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}

/* --------------------------------------
   ソート用カスタムセレクトボックス
-------------------------------------- */
.sort-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%231A1A1A%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 14px;
}

/* --------------------------------------
   フィルターアコーディオン（モバイル用）
-------------------------------------- */
.filter-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.filter-content.open {
  max-height: 1000px;
}
@media (min-width: 1024px) {
  .filter-content {
    max-height: none;
  }
}

/* --------------------------------------
   商品詳細：バリエーション選択ラジオボタン
-------------------------------------- */
.variant-radio {
  appearance: none;
  display: none;
}
.variant-label {
  display: block;
  padding: 1rem;
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background: #fff;
}
.variant-radio:checked + .variant-label {
  border-color: var(--c-dark);
  background: var(--c-bg-alt);
}
.variant-radio:checked + .variant-label::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: var(--c-dark);
  border-radius: 50%;
}
.variant-label::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 1px solid var(--c-border);
  border-radius: 50%;
}

/* --------------------------------------
   商品詳細：汎用アコーディオン
-------------------------------------- */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.4s ease,
              padding 0.4s ease;
}
.accordion-content.is-open {
  max-height: 800px;
  opacity: 1;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* --------------------------------------
   商品詳細：モバイル固定購入バー
-------------------------------------- */
#mobile-sticky-cart {
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#mobile-sticky-cart.visible {
  transform: translateY(0);
}

/* --------------------------------------
   商品詳細：画像ギャラリー サムネイル
-------------------------------------- */
.gallery-thumb {
  cursor: pointer;
  opacity: 0.6;
  border-color: #e5e0d8;
}
.gallery-thumb:hover {
  opacity: 1;
}
.gallery-thumb-active,
.gallery-thumb-active:hover {
  border-color: #1a1a1a !important;
  opacity: 1 !important;
}

/* --------------------------------------
   カスタムスクロールバー（フィルター用）
-------------------------------------- */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--c-bg-alt);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 2px;
}
