.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 24px;
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.product-card {
  display: block;
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 0.15s;
}

.product-card:hover { box-shadow: 0 4px 16px rgb(0 0 0 / 0.08); }

.product-card__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-card__body { padding: 12px; }
.product-card__name { margin: 0; font-size: 0.95rem; }
.product-card__price { margin: 4px 0 0; font-weight: 600; }

.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #f1ebe4;
}

.placeholder__logo {
  width: 40%;
  height: auto;
  color: #d8cfc6;
}

.swatches {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
}

.swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid rgb(0 0 0 / 0.15);
  flex-shrink: 0;
}

.swatches--small .swatch { width: 14px; height: 14px; }

/* 2色の組み合わせのカラーは、色丸を斜めに塗り分ける（左上が1色目、右下が2色目）。
   border-box を指定しないと、半透明の枠線の下で背景が繰り返され、反対側の色がはみ出して丸が歪んで見える。
   境目は 1px だけぼかしてギザギザを防ぐ */
.swatch--split {
  background: linear-gradient(135deg, var(--swatch) calc(50% - 0.5px), var(--swatch2) calc(50% + 0.5px)) border-box;
}

.badge {
  display: inline-block;
  margin: 8px 0 0;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.badge--soldout { background: #eee; color: var(--color-muted); }

/* 商品詳細 */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

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

.product__main-image {
  width: 100%;
  border-radius: var(--radius);
  background: var(--color-surface);
}

.product__thumbs {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.product__thumbs img, .product__thumbs .placeholder {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.product__category { margin: 0; font-size: 0.85rem; color: var(--color-muted); }
.product__name { font-family: var(--font-serif); font-size: 1.6rem; margin: 4px 0 8px; }
.product__price { font-size: 1.4rem; font-weight: 600; margin: 0 0 4px; }
.product__shipping-fee { margin: 0 0 24px; font-size: 0.85rem; color: var(--color-muted); }
.product__description { margin-top: 32px; }
.product__note { margin-top: 24px; font-size: 0.85rem; color: var(--color-muted); }

.color-picker {
  border: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-picker legend { font-weight: 600; margin-bottom: 8px; }

.color-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}

.color-picker__option:has(input:checked) { border-color: var(--color-accent); }
.color-picker__option.is-soldout { opacity: 0.5; cursor: not-allowed; }
.color-picker__note { margin-left: auto; font-size: 0.8rem; color: var(--color-muted); }

.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.price__original { color: var(--color-muted); font-weight: 400; font-size: 0.85em; }
.price--sale .price__current { color: var(--color-accent); }
.sale-badge { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--color-accent); color: #fff; font-size: 0.7rem; font-weight: 600; line-height: 1.6; }
.price__campaign { display: block; margin-top: 4px; font-size: 0.85rem; font-weight: 400; color: var(--color-accent); }
.campaign-banners { margin: 8px 0 32px; display: flex; flex-direction: column; gap: 8px; }
.campaign-banner { margin: 0; padding: 12px 16px; border-radius: var(--radius); background: #fbecec; text-align: center; font-weight: 600; }
.campaign-banner a { color: var(--color-accent); text-decoration: none; }
