.sansui-home-section-covers {
  --tile-scale: 1; /* ← 全体スケール（0.9〜1.3などで調整） */
  --section-radius: 16px;
  --section-min-h: calc(560px * var(--tile-scale));
  --section-pad-y: calc(16px * var(--tile-scale));
  --section-pad-x: calc(20px * var(--tile-scale));
  --tiles-gap-x: calc(16px * var(--tile-scale));
  --tiles-gap-y: calc(0px * var(--tile-scale));
  --news-btn-pad-y: calc(12px * var(--tile-scale));
  --news-btn-pad-x: calc(20px * var(--tile-scale));
}
.sansui-home-section-covers .section-cover {
  border-radius: var(--section-radius);
  min-height: var(--section-min-h);
  position: relative;
  overflow: hidden;
  padding: var(--section-pad-y) var(--section-pad-x);
}
.sansui-home-section-covers .section-cover .wp-block-cover__background.is-white-overlay {
  background-color: #fff;
}
.sansui-home-section-covers .section-cover .wp-block-cover__background.has-background-dim-60 {
  opacity: 0.6;
}
.sansui-home-section-covers .section-cover .wp-block-cover__image-background {
  width: 100%;
  height: 100%;
  object-fit: cover; /* default: crop to fill */
}
/* Show entire image without cropping when modifier is present */
.sansui-home-section-covers .section-cover.show-full-image .wp-block-cover__image-background {
  object-fit: contain;
  object-position: center;
  background-color: #fff;
}
.sansui-home-section-covers .section-title {
  font-size: calc( var(--tile-scale) * clamp(18px, 2.4vw, 24px) );
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.sansui-home-section-covers .section-cta {
  font-size: calc(16px * var(--tile-scale));
  margin: 0;
}
/* Responsive tweaks */
@media (max-width: 782px) {
  .sansui-home-section-covers {
    --section-min-h: calc(360px * var(--tile-scale));
    --section-pad-y: calc(20px * var(--tile-scale));
    --section-pad-x: calc(20px * var(--tile-scale));
  }
  .sansui-home-section-covers .section-title {
    font-size: calc( var(--tile-scale) * clamp(16px, 4vw, 20px) );
  }
  .sansui-home-section-covers .section-cta {
    font-size: calc(14px * var(--tile-scale));
  }
}

/* Inline style removals -> classes */
.sansui-home-section-covers .section-cover .tile-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  display: block;
}
.sansui-home-section-covers .wp-block-columns .wp-block-column.col-60 { flex-basis: 60%; }
.sansui-home-section-covers .wp-block-columns .wp-block-column.col-40 { flex-basis: 40%; }
@media (max-width: 782px) {
  .sansui-home-section-covers .wp-block-columns .wp-block-column.col-60,
  .sansui-home-section-covers .wp-block-columns .wp-block-column.col-40 {
    flex-basis: 100%;
  }
}

/* Full-bleed width for the home section when alignfull is used */
.wp-block-group.alignfull.sansui-home-section-covers {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* --- Whitewash overlay helpers (for individual tiles) --- */
.sansui-home-section-covers .section-cover .wp-block-cover__background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sansui-home-section-covers .section-cover .wp-block-cover__background.is-white-overlay {
  background-color: #fff;
}
.sansui-home-section-covers .section-cover .wp-block-cover__background.has-background-dim-30 {
  opacity: 0.3;
}
.sansui-home-section-covers .section-cover .wp-block-cover__background.has-background-dim-40 {
  opacity: 0.4;
}
/* (has-background-dim-60 already exists; use that for stronger wash) */

/* --- Product tile label & stacking --- */
.sansui-home-section-covers .section-cover .wp-block-cover__inner-container {
  position: relative;
  z-index: 6;            /* above .tile-link(z-index:5) */
  pointer-events: none;  /* let the whole tile remain clickable */
}
.sansui-home-section-covers .section-label {
  color: #111;
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.2;
}

/* --- Layout: 3-up grid + News button --- */
.sansui-home-section-covers .tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--tiles-gap-x); /* 横の間隔を少し詰める */
  row-gap: var(--tiles-gap-y);       /* 1行で並べる想定なので縦の間隔は0 */
  align-items: stretch;
}

/* Match hero width: center the tiles to the theme's wide size */
.wp-block-group.alignfull.sansui-home-section-covers .tiles {
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1280px);
  margin-left: auto;
  margin-right: auto;
}

/* 画面幅が狭い場合は2列/1列に落とす */
@media (max-width: 1100px) {
  .sansui-home-section-covers .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px; /* 2段・1段になる場合は縦の間隔を戻す */
  }
}
@media (max-width: 700px) {
  .sansui-home-section-covers .tiles {
    grid-template-columns: 1fr;
  }
}

.sansui-home-section-covers .news-cta {
  margin-top: 8px; /* space under the tiles */
}
.sansui-home-section-covers .news-cta .wp-block-button__link {
  font-weight: 700;
  padding: var(--news-btn-pad-y) var(--news-btn-pad-x);
  border-radius: 9999px;
}

/* --- Scale utilities (簡単に全体スケールを変更) --- */
.sansui-home-section-covers.scale-90  { --tile-scale: .90; }
.sansui-home-section-covers.scale-95  { --tile-scale: .95; }
.sansui-home-section-covers.scale-100 { --tile-scale: 1; }
.sansui-home-section-covers.scale-105 { --tile-scale: 1.05; }
.sansui-home-section-covers.scale-110 { --tile-scale: 1.10; }
.sansui-home-section-covers.scale-115 { --tile-scale: 1.15; }
.sansui-home-section-covers.scale-120 { --tile-scale: 1.20; }
.sansui-home-section-covers.scale-130 { --tile-scale: 1.30; }