/* 1) 親をグリッド化＋左詰め。疑似要素を無効化して1マス目の空きを防ぐ */
.su-custom-gallery {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));  /* PC: 5列（任意） */
  gap: 12px;
  justify-content: start;
}
.su-custom-gallery::before,
.su-custom-gallery::after {
  content: none !important;
  display: none !important;
}

/* 2) 子は通常ブロックのまま（タイトルが消えないように） */
.su-custom-gallery > .su-custom-gallery-slide {
  display: block !important;
  float: none !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* 画像・リンクは全幅 */
.su-custom-gallery .su-custom-gallery-slide a,
.su-custom-gallery .su-custom-gallery-slide img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
}

/* 3) 中身の無いスライドをCSSで非表示（:has対応ブラウザ向け） */
.su-custom-gallery > .su-custom-gallery-slide:not(:has(img, a)) {
  display: none !important;
}

/* レスポンシブ */
@media (max-width: 1024px) { .su-custom-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .su-custom-gallery { grid-template-columns: repeat(2, 1fr); } }

/* 各製品イメージ */

/* PC時は4列 */
.product-columns {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; /* カード間の余白 */
}

/* 各カラムをカード化 */
.product-columns > * {
  border: 1px solid #ddd;   /* グレーの枠線 */
  border-radius: 6px;       /* 角丸 */
  background: #fff;         /* 白背景（任意） */
  padding: 12px;            /* 内側の余白 */
  box-sizing: border-box;   /* 余白込みで幅を計算 */
}

/* スマホ時は2列 */
@media (max-width: 768px) {
  .product-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* メディアとテキスト */
@media (max-width: 768px) {
.wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
    padding-left: 0px;
    padding-right: 0px;
padding-top: 16px;
padding-bottom: 16px;
}
}

