.fv.vps-sale-hero {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1920 / 800;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0;
  background: #050505;
  color: #fff;
}

.fv.vps-sale-hero::before {
  display: none;
}

.vps-sale-hero__swiper,
.vps-sale-hero__swiper .swiper-wrapper,
.vps-sale-hero__slide {
  width: 100%;
  height: 100%;
}

.vps-sale-hero__swiper:not(.swiper-initialized) .vps-sale-hero__slide:not(:first-child) {
  display: none;
}

.vps-sale-hero:not(.is-ready) .vps-sale-hero__nav,
.vps-sale-hero:not(.is-ready) .vps-sale-hero__mobile-pagination {
  display: none;
}

.vps-sale-hero__slide {
  position: relative;
  overflow: hidden;
}

.vps-sale-hero__media,
.vps-sale-hero__media img,
.vps-sale-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vps-sale-hero__media {
  display: block;
}

.vps-sale-hero__media img {
  display: block;
  object-fit: cover;
  transform: scale(1.015);
  transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.vps-sale-hero__slide.swiper-slide-active .vps-sale-hero__media img {
  transform: scale(1);
}

.vps-sale-hero.is-single-slide .vps-sale-hero__media img {
  transform: scale(1);
}

.vps-sale-hero__slide--pc-top-left .vps-sale-hero__media img { object-position: left top; }
.vps-sale-hero__slide--pc-top-center .vps-sale-hero__media img { object-position: center top; }
.vps-sale-hero__slide--pc-top-right .vps-sale-hero__media img { object-position: right top; }
.vps-sale-hero__slide--pc-center-left .vps-sale-hero__media img { object-position: left center; }
.vps-sale-hero__slide--pc-center-center .vps-sale-hero__media img { object-position: center; }
.vps-sale-hero__slide--pc-center-right .vps-sale-hero__media img { object-position: right center; }
.vps-sale-hero__slide--pc-bottom-left .vps-sale-hero__media img { object-position: left bottom; }
.vps-sale-hero__slide--pc-bottom-center .vps-sale-hero__media img { object-position: center bottom; }
.vps-sale-hero__slide--pc-bottom-right .vps-sale-hero__media img { object-position: right bottom; }

/* スマホではスライドごとに高さが変わる（Swiper の autoHeight）。PC・タブレットは今までどおり枠いっぱい */
@media screen and (min-width: 768px) {
  .vps-sale-hero__swiper.swiper-autoheight,
  .vps-sale-hero__swiper.swiper-autoheight .vps-sale-hero__slide {
    height: 100%;
  }
  /* autoHeight が付ける px の高さで固定されると、幅を変えたときに素材が枠に追従しないため */
  .vps-sale-hero__swiper.swiper-autoheight .swiper-wrapper {
    height: 100% !important;
  }
}

/* 動画（mu-plugins/vps-hero-video.php）。その画面幅の動画があるスライドは、画像を出さずに動画へ切り替える。
   流せないときは JS が .is-off を付ける（または <video> を外す）ので、画像に戻る */
.vps-sale-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050505;
  pointer-events: none;
}

.vps-sale-hero__video.is-off {
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
  .vps-sale-hero__slide:has(> .vps-sale-hero__video[data-has-pc]:not(.is-off)) .vps-sale-hero__media {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  .vps-sale-hero__slide:has(> .vps-sale-hero__video[data-has-sp]:not(.is-off)) .vps-sale-hero__media {
    visibility: hidden;
  }
}

/* 動画のスライドはマウスを乗せても止めないので、進捗バーも止めない */
.vps-sale-hero.is-video-slide.is-paused .vps-sale-hero__progress span,
.vps-sale-hero.is-video-slide.is-paused .vps-sale-hero__mobile-bars button::after {
  animation-play-state: running;
}

.vps-sale-hero__shade {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.44) 35%, rgba(0, 0, 0, 0.04) 70%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.45) 0%, transparent 35%);
}

.vps-sale-hero__content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(40px, calc((100vw - 1280px) / 2));
  width: min(560px, 44vw);
  transform: translateY(-50%);
}

.vps-sale-hero__eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.vps-sale-hero__title {
  max-width: 15ch;
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4.4vw, 68px);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.vps-sale-hero__description {
  max-width: 48ch;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.65;
}

.vps-sale-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.vps-sale-hero__button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid #fff;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.vps-sale-hero__button:hover,
.vps-sale-hero__button:focus-visible {
  transform: translateY(-2px);
}

.vps-sale-hero__button--primary {
  background: #fff;
  color: #0a0a0a !important;
}

.vps-sale-hero__button--secondary {
  background: rgba(0, 0, 0, 0.18);
  color: #fff !important;
}

.vps-sale-hero__nav {
  position: absolute;
  z-index: 3;
  right: max(40px, calc((100vw - 1280px) / 2));
  bottom: clamp(14px, 2vw, 28px);
  left: max(40px, calc((100vw - 1280px) / 2));
  display: grid;
  grid-template-columns: repeat(var(--vps-sale-slide-count, 1), minmax(0, 1fr));
  gap: 22px;
}

.vps-sale-hero__nav-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  text-align: left;
  cursor: pointer;
}

.vps-sale-hero__nav-label {
  display: block;
  margin-bottom: 9px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vps-sale-hero__progress {
  display: block;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
}

.vps-sale-hero__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

.vps-sale-hero__nav-button[aria-current="true"] {
  color: #fff;
}

.vps-sale-hero.is-playing .vps-sale-hero__nav-button[aria-current="true"] .vps-sale-hero__progress span {
  animation: vps-sale-progress var(--vps-sale-autoplay-delay, 6000ms) linear forwards;
}

.vps-sale-hero:not(.is-playing) .vps-sale-hero__nav-button[aria-current="true"] .vps-sale-hero__progress span {
  transform: scaleX(1);
}

.vps-sale-hero.is-paused .vps-sale-hero__progress span {
  animation-play-state: paused;
}

.vps-sale-hero__mobile-pagination {
  display: none;
}

@keyframes vps-sale-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media screen and (max-width: 959px) {
  .vps-sale-hero__content {
    left: 28px;
    width: min(560px, calc(100vw - 56px));
  }

  .vps-sale-hero__nav {
    right: 28px;
    left: 28px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .vps-sale-hero__content {
    top: 44%;
  }

  .vps-sale-hero__description {
    display: none;
  }

  .vps-sale-hero__actions {
    margin-top: 16px;
  }

  .vps-sale-hero__button {
    min-height: 42px;
    padding: 0 18px;
    font-size: 14px;
  }
}

@media screen and (max-width: 767px) {
  .fv.vps-sale-hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 2340 / 3600;
    padding: 0;
    border-radius: 0;
  }

  .vps-sale-hero__slide--sp-top-left .vps-sale-hero__media img { object-position: left top; }
  .vps-sale-hero__slide--sp-top-center .vps-sale-hero__media img { object-position: center top; }
  .vps-sale-hero__slide--sp-top-right .vps-sale-hero__media img { object-position: right top; }
  .vps-sale-hero__slide--sp-center-left .vps-sale-hero__media img { object-position: left center; }
  .vps-sale-hero__slide--sp-center-center .vps-sale-hero__media img { object-position: center; }
  .vps-sale-hero__slide--sp-center-right .vps-sale-hero__media img { object-position: right center; }
  .vps-sale-hero__slide--sp-bottom-left .vps-sale-hero__media img { object-position: left bottom; }
  .vps-sale-hero__slide--sp-bottom-center .vps-sale-hero__media img { object-position: center bottom; }
  .vps-sale-hero__slide--sp-bottom-right .vps-sale-hero__media img { object-position: right bottom; }


  .vps-sale-hero__shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.54) 38%, rgba(0, 0, 0, 0.02) 72%);
  }

  .vps-sale-hero__content {
    top: auto;
    right: max(20px, env(safe-area-inset-right));
    /* hero は画面の下端に接していないので、下の安全領域（iOS Safari ではツールバーの出入りで値が変わる）は足さない */
    bottom: 64px;
    left: max(20px, env(safe-area-inset-left));
    width: auto;
    text-align: center;
    transform: none;
  }

  .vps-sale-hero.is-single-slide .vps-sale-hero__content {
    bottom: 24px;
  }

  .vps-sale-hero__eyebrow {
    margin-bottom: 9px;
    font-size: 11px;
  }

  .vps-sale-hero__title {
    display: -webkit-box;
    max-width: 18ch;
    margin-inline: auto;
    overflow: hidden;
    font-size: clamp(34px, 10.4vw, 48px);
    line-height: 1.02;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .vps-sale-hero__description {
    display: -webkit-box;
    margin-top: 12px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .vps-sale-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
    text-align: left;
  }

  .vps-sale-hero__button {
    min-height: 48px;
    padding: 0 19px;
    font-size: 14px;
  }

  .vps-sale-hero__nav {
    display: none;
  }

  .vps-sale-hero__mobile-pagination {
    position: absolute;
    z-index: 3;
    right: 18px;
    bottom: 22px; /* 下の安全領域は足さない（スクロールで位置が動くため） */
    left: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .vps-sale-hero__mobile-bars {
    display: flex;
    flex: 1;
    gap: 5px;
  }

  .vps-sale-hero__mobile-bars button {
    position: relative;
    width: auto;
    height: 18px;
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .vps-sale-hero__mobile-bars button::before,
  .vps-sale-hero__mobile-bars button::after {
    position: absolute;
    top: 8px;
    right: 0;
    left: 0;
    height: 2px;
    content: "";
  }

  .vps-sale-hero__mobile-bars button::before {
    background: rgba(255, 255, 255, 0.34);
  }

  .vps-sale-hero__mobile-bars button::after {
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
  }

  .vps-sale-hero.is-playing .vps-sale-hero__mobile-bars button[aria-current="true"]::after {
    animation: vps-sale-progress var(--vps-sale-autoplay-delay, 6000ms) linear forwards;
  }

  .vps-sale-hero:not(.is-playing) .vps-sale-hero__mobile-bars button[aria-current="true"]::after {
    transform: scaleX(1);
  }

  .vps-sale-hero.is-paused .vps-sale-hero__mobile-bars button::after {
    animation-play-state: paused;
  }

  .vps-sale-hero__counter {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }

  .vps-sale-hero__counter b {
    color: #fff;
    font-weight: 700;
  }
}

@media screen and (max-width: 359px) {
  .vps-sale-hero__actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vps-sale-hero__media img,
  .vps-sale-hero__button,
  .vps-sale-hero__progress span,
  .vps-sale-hero__mobile-bars button::after {
    animation: none !important;
    transition: none !important;
  }

  .vps-sale-hero__nav-button[aria-current="true"] .vps-sale-hero__progress span,
  .vps-sale-hero__mobile-bars button[aria-current="true"]::after {
    transform: scaleX(1);
  }
}

/* ===== 画像に文字が焼き込まれている前提のレイアウト（2026-09-29） =====
 * 見出し・説明は画像内にあるため大きくは出さない（読み上げ・SEO用にHTMLは残す）。
 * スライドナビのすぐ上に「商品名（セール名）＋CTA」を1行で置く。PCはナビの左端に揃える。 */
.vps-sale-hero__eyebrow,
.vps-sale-hero__description {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.vps-sale-hero__shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 22%, transparent 40%);
}

.vps-sale-hero__content {
  top: auto;
  bottom: calc(clamp(14px, 2vw, 28px) + 44px);
  display: flex;
  align-items: center;
  gap: 20px;
  width: auto;
  transform: none;
}

.vps-sale-hero__title {
  max-width: 28ch;
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.vps-sale-hero__actions {
  flex: 0 0 auto;
  margin-top: 0;
}

.vps-sale-hero.is-single-slide .vps-sale-hero__content {
  bottom: clamp(20px, 3vw, 40px);
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .vps-sale-hero__content {
    top: auto;
  }
}

@media screen and (max-width: 767px) {
  .vps-sale-hero__shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 18%, transparent 34%);
  }

  .vps-sale-hero__content {
    bottom: 52px;
  }

  .vps-sale-hero__content {
    justify-content: space-between;
    gap: 14px;
    text-align: left;
  }

  .vps-sale-hero__title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    font-size: 16px;
    -webkit-line-clamp: unset;
  }

  .vps-sale-hero__actions {
    display: flex;
    gap: 8px;
  }

  .vps-sale-hero__actions .vps-sale-hero__button {
    min-width: 120px;
  }
}

/* ========================================
   スマホ用の画像も動画も無いスライド（.vps-sale-hero__slide--sp-fit。includes/sale-hero.php）
   PC 用の画像・動画を切り抜かず画面幅（1920:800）で出し、文字とボタンはその下に置く。
   Hero の高さはスライドごとに変わり、空きを作らない（Swiper の autoHeight で切り替え時に高さが動く）
   ======================================== */
@media screen and (max-width: 767px) {
  .fv.vps-sale-hero {
    aspect-ratio: auto;
  }

  .vps-sale-hero__swiper,
  .vps-sale-hero__swiper .swiper-wrapper {
    height: auto;
  }

  .vps-sale-hero__slide {
    height: auto;
    aspect-ratio: 2340 / 3600;
  }

  .vps-sale-hero__slide--sp-fit {
    aspect-ratio: auto;
    /* 画像の分の高さ */
    padding-top: calc(100% * 800 / 1920);
  }

  .vps-sale-hero__slide--sp-fit .vps-sale-hero__media,
  .vps-sale-hero__slide--sp-fit .vps-sale-hero__media img,
  .vps-sale-hero__slide--sp-fit .vps-sale-hero__video {
    bottom: auto;
    height: auto;
    aspect-ratio: 1920 / 800;
  }

  .vps-sale-hero__slide--sp-fit .vps-sale-hero__shade {
    display: none;
  }

  .vps-sale-hero__slide--sp-fit .vps-sale-hero__content {
    position: relative;
    inset: auto;
    padding: 14px max(20px, env(safe-area-inset-right)) 52px max(20px, env(safe-area-inset-left));
  }

  .vps-sale-hero.is-single-slide .vps-sale-hero__slide--sp-fit .vps-sale-hero__content {
    padding-bottom: 16px;
  }
}
