body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", sans-serif;
  color: <?= $data['colors']['text_base'] ?>;
  background:
    linear-gradient(
      <?= $data['page']['bg_overlay'] ?>,
      <?= $data['page']['bg_overlay'] ?>
    ),
    url("<?= $data['page']['background_image'] ?>")
    center / cover no-repeat fixed;
}

/* wrapper */
.wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 14px 40px;
}

/* logo */
.logo {
  text-align: center;
  margin-bottom: 20px;
}
.logo img {
  max-width: 180px;
}

/* grid */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* card */
.part-card {
  background: <?= $data['colors']['card_bg'] ?>;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 8px 20px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,255,255,.05);
  transition: transform .15s ease;
}
.part-card:active {
  transform: scale(.97);
}

.part-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.part-name {
  padding: 10px 8px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: <?= $data['colors']['card_text'] ?>;
}

/* 価格色 */
.price {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* カテゴリーーアンカー */
.category-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.category-nav a {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}


.category-title {
  grid-column: 1 / -1;
  text-align: center;
  margin: 24px 0 12px;
}
 .category-title img {
  width: 200px;        /* 横幅は固定 or max-widthでもOK */
 height: 60px;        /* ← ここで上下を切る */
  object-fit: cover;   /* はみ出た上下をトリミング */
  object-position: center;
  display: block;
  margin: 0 auto;
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.75);
}

.modal-content {
  background: #222;
  margin: 10% auto;
  padding: 20px;
  border-radius: 16px;
  max-width: 90%;
  text-align: center;
  color: #fff;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  margin-bottom: 12px;
  border-radius: 8px;
}

.modal-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  background: #8fff5a;
  color: #222;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
}

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
}

.modal-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.modal-links a {
  flex: 1 1 40%;
  text-align: center;
  padding: 8px;
  background: #8fff5a;
  color: #222;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

.modal-slider {
  position: relative;
  max-width: 100%;
  text-align: center;
}

.modal-slider img {
  width: 100%;
  border-radius: 8px;
}

.modal-slider .prev,
.modal-slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.4);
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
}

.modal-slider .prev { left: 8px; }
.modal-slider .next { right: 8px; }
