/* components.css */

.auction-card {
  border: 1px solid #d1d5dc;
  background-color: #ffffff;
  transition: box-shadow 0.2s;
  min-width: 0;
}

.auction-card:hover {
  box-shadow: 0 4px 16px rgba(10, 10, 10, 0.1);
}

.auction-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #0a0a0a;
}

.auction-card__image-wrap {
  background-color: #f3f4f6;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.auction-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

/* カードホバー時の画像ズーム演出は「マウスが使える環境（PC）」だけに適用。
   スマホ等のタッチデバイスでは、♡ボタンを押した瞬間に親カードへ :hover が
   乗ってしまい、画像が一瞬ズームしてしまうので、tap経由では発動させない。 */
@media (hover: hover) and (pointer: fine) {
  .auction-card:hover .auction-card__image {
    transform: scale(1.03);
  }
}

.auction-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  flex: 1;
}

.auction-card__title-row {
  display: contents;
}

.auction-card__id-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.auction-card__number {
  font-size: 14px;
  color: #6a7282;
  line-height: 20px;
}

.auction-card__genus {
  font-size: 14px;
  color: #6a7282;
  line-height: 20px;
  white-space: nowrap;
}

.auction-card__title {
  font-size: 20px;
  font-weight: 500;
  color: #0a0a0a;
  line-height: 28px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 種名・品種名の下に表示する商品説明（1行のみ。長い場合は ... で省略） */
.auction-card__description {
  font-size: 14px;
  color: #6a7282;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auction-card__price-row {
  padding-top: 4px;
  border-top: 1px solid #e5e7eb;
  /* 価格を左、入札件数を右に並べる */
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

/* 価格は長くなったら省略、入札件数を確実に右に表示するため */
.auction-card__price-row .auction-card__price {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auction-card__price-row .auction-card__bids {
  flex-shrink: 0;
}

.auction-card__end-inline {
  display: none;
}

.auction-card__price-label {
  font-size: 12px;
  font-weight: 400;
  color: #6a7282;
  vertical-align: middle;
}

.auction-card__price {
  font-size: 20px;
  font-weight: 700;
  color: #008236;
  line-height: 28px;
  letter-spacing: -0.45px;
}

.auction-card__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
}

.auction-card__timer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 500;
  color: #e7000b;
  line-height: 24px;
  white-space: nowrap;
}

.auction-card__bids {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: #4a5565;
  line-height: 24px;
  white-space: nowrap;
}

/* 最高入札者（status の左側に表示）
   名前が長い場合は ... で省略してレイアウト崩れを防ぐ */
.auction-card__top-bidder {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #4a5565;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* アイコンは縮まないように・名前部分だけ省略されるように */
.auction-card__top-bidder .auction-card__status-icon {
  flex-shrink: 0;
}

.auction-card__status-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auction-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auction-card__end-date {
  font-size: 12px;
  color: #6a7282;
  line-height: 16px;
}

.auction-card__ended-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  margin-top: 4px;
}

.auction-card__ended-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #364153;
  line-height: 18px;
}

.auction-card__ended-label {
  color: #6a7282;
  flex-shrink: 0;
  margin-right: 8px;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  line-height: 1.5;
}

.btn--primary {
  background-color: #00a63e;
  color: #ffffff;
}

.btn--primary:hover {
  background-color: #008236;
}

.btn--secondary {
  background-color: #ffffff;
  color: #008236;
  border: 2px solid #00a63e;
}

.btn--secondary:hover {
  background-color: #f0fdf4;
}

.btn--danger {
  background-color: #e7000b;
  color: #ffffff;
}

.btn--full {
  width: 100%;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 18px;
}



.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 2px;
}

.badge--active {
  background-color: #f0fdf4;
  color: #008236;
  border: 1px solid #00a63e;
}

.badge--ended {
  background-color: #f3f4f6;
  color: #4a5565;
  border: 1px solid #d1d5dc;
}

.badge--won {
  background-color: #eff6ff;
  color: #1447e6;
  border: 1px solid #93c5fd;
}

.badge--lost {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}



.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 700;
  color: #364153;
}

.form-label__required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}

.form-label--required::after {
  content: ' *';
  color: #e7000b;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5dc;
  background-color: #ffffff;
  font-size: 16px;
  color: #0a0a0a;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  transition: border-color 0.2s, outline 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 2px solid #00a63e;
  outline-offset: -2px;
  border-color: #00a63e;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 12px;
  color: #6a7282;
}



.page-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 32px;
}

.section-heading {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid #00a63e;
  margin-bottom: 24px;
}



.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6a7282;
  margin-bottom: 24px;
}

.breadcrumb__item {
  color: #008236;
}

.breadcrumb__item:hover {
  text-decoration: underline;
}

.breadcrumb__sep {
  color: #d1d5dc;
}


.notice {
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  border: 2px solid;
  margin-bottom: 16px;
}

.notice--success {
  background-color: #f0fdf4;
  border-color: #00a63e;
  color: #008236;
}

.notice--error {
  background-color: #fef2f2;
  border-color: #e7000b;
  color: #e7000b;
}

@media (max-width: 768px) {
  .page-content {
    padding: 16px 12px 32px;
  }

  .page-title {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .auction-card__body {
    padding: 12px;
  }

  .auction-card__price {
    font-size: 16px;
  }
}

/* ── ページネーション（商品一覧・マイページ共通） ── */
.auction-pagination {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  flex-wrap: wrap;
}

/* グリッド下部のページネーション（=smでない方）は、グリッドとの間に余白を空け、中央揃えにする */
.auction-pagination:not(.auction-pagination--sm) {
  margin-top: 16px;
  justify-content: center;
}

/* グリッド上部のページネーション（--sm）。
   margin-top は 0 にして、直前の要素（ツールバー/メニュー）と詰めて表示する。 */
.auction-pagination--sm {
  margin-top: 0px;
  margin-bottom: 16px;
}

.auction-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d1d5dc;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #364153;
  text-decoration: none;
  background: #fff;
  transition: all 0.2s;
}

.auction-pagination .page-numbers:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.auction-pagination .page-numbers.current {
  background: #00a63e;
  color: #fff;
  border-color: #00a63e;
}

.auction-pagination .page-numbers.prev,
.auction-pagination .page-numbers.next {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #008236;
  border-color: #00a63e;
  /* 「‹」「›」の文字は Noto Sans JP の字形特性で em-box の中央より下寄りに描かれ、
     ボタンの上下中央から1pxほど下にずれて見える。box-sizing:border-box なので、
     padding-bottom を 2px だけ増やしてフレックス中央寄せの内容領域を上にずらし、
     視覚的に矢印を真ん中に揃える。 */
  padding: 0 10px 2px;
}

.auction-pagination .page-numbers.prev:hover,
.auction-pagination .page-numbers.next:hover {
  background: #f0fdf4;
}

.auction-pagination .page-numbers.dots {
  border: none;
  background: none;
  min-width: auto;
  padding: 0 4px;
  color: #9ca3af;
}

/* ── 小さめバリアント（リスト上部に置く用） ── */
.auction-pagination--sm {
  gap: 3px;
  padding: 4px 0;
}

.auction-pagination--sm .page-numbers {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 4px;
}

.auction-pagination--sm .page-numbers.prev,
.auction-pagination--sm .page-numbers.next {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  /* 通常サイズ版と同じ理由（「‹」「›」が下寄りに描画される）で、
     padding-bottom を 2px 増やして矢印を上下中央に揃える */
  padding: 0 8px 2px;
}

/* ============================================================
   ヘッダーのカートリンク（ショップの買い物かご）
   ・グローバルに読み込まれる components.css で管理（全ページのヘッダーで使うため）
   ・個数バッジ（.site-nav__cart-count）は shop-cart.js が data 属性経由で更新
   ============================================================ */
.site-nav__item--cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.site-nav__cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e7000b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.site-nav__cart-count[hidden] { display: none; }
