/* ==========================================================================
   Floating price banner (SP: bottom-center / PC: bottom-right)
   Appears after the FV has scrolled away, hides while the order form is on
   screen.
   Layout: [縦書き表示 + パッケージ] | [価格バッジ + 価格] / [申し込みボタン]
   Sizes follow the reference design (322px wide) multiplied by --s,
   so the balance stays the same at every size.
   ========================================================================== */
.pfloat {
  --s: .78;                 /* SP: 参考デザイン(322px)の78% */
  --pf-pink: #e0457b;
  --pf-pink-dk: #c42c66;
  --pf-ink: #3a2a30;
  --pf-sub: #6b5a60;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  z-index: 900;
  width: fit-content;        /* 中身に合わせて幅を決める（フォント差で文字がはみ出さない） */
  max-width: calc(100vw - 24px);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color: var(--pf-ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(.96);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1.15), visibility 0s .45s;
  pointer-events: none;
}

.pfloat.is-show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1.15), visibility 0s;
  pointer-events: auto;
}

.pfloat__link {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  column-gap: calc(11px * var(--s));
  row-gap: calc(11px * var(--s));
  padding: calc(11px * var(--s)) calc(20px * var(--s)) calc(11px * var(--s)) calc(10px * var(--s));
  border: 2px solid var(--pf-pink);
  border-radius: calc(16px * var(--s));
  background: linear-gradient(160deg, #ffffff 0%, #fff4f8 100%);
  box-shadow: 0 8px 22px rgba(196, 44, 102, .28), 0 2px 6px rgba(0, 0, 0, .08);
  color: inherit;
  text-decoration: none;
}

/* ---- left column: 縦書きラベル（パッケージ下寄せ）+ パッケージ ---- */
.pfloat__visual {
  grid-row: 1 / 3;
  grid-column: 1;
  display: flex;
  align-items: flex-end;
  gap: calc(4px * var(--s));
}

.pfloat__tag {
  writing-mode: vertical-rl;
  text-orientation: upright;
  margin-bottom: calc(1px * var(--s));
  font-size: max(8px, calc(9.5px * var(--s)));
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  color: var(--pf-sub);
  white-space: nowrap;
}

.pfloat__pack {
  display: block;
  width: calc(66px * var(--s));
  height: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .15));
}

/* ---- right column: 価格 ---- */
.pfloat__info {
  grid-row: 1;
  grid-column: 2;
  align-self: end;
  min-width: 0;
  line-height: 1.2;
}

.pfloat__was {
  display: block;
  margin-bottom: calc(5px * var(--s));
  font-size: max(8.5px, calc(11px * var(--s)));
  font-weight: 700;
  color: var(--pf-sub);
  white-space: nowrap;
}

.pfloat__was s {
  text-decoration-thickness: 1.5px;
}

.pfloat__off {
  display: inline-block;
  margin-left: 2px;
  padding: 0 calc(7px * var(--s));
  border-radius: 99px;
  background: var(--pf-pink);
  color: #fff;
  font-size: max(8px, calc(10.5px * var(--s)));
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 1px;
}

.pfloat__row {
  display: flex;
  align-items: flex-end;
  gap: calc(6px * var(--s));
}

.pfloat__badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(32px * var(--s));
  height: calc(32px * var(--s));
  margin-bottom: calc(-2px * var(--s));
  border-radius: calc(3px * var(--s));
  background: var(--pf-ink);
  color: #fff;
  font-size: max(8.5px, calc(11.5px * var(--s)));
  font-weight: 700;
  line-height: 1.12;
  text-align: center;
  letter-spacing: .04em;
}

.pfloat__price {
  display: flex;
  align-items: flex-end;
  color: var(--pf-pink-dk);
  font-family: Arial, "Helvetica Neue", Roboto, sans-serif;
  font-size: calc(50px * var(--s));
  font-weight: 700;          /* 800だとWindowsでArial Black（幅広）が選ばれるため */
  line-height: .75;
  letter-spacing: -.03em;
  white-space: nowrap;
  text-shadow: 0 0 1px #fff, 0 1px 0 #fff, 0 2px 5px rgba(196, 44, 102, .2);
}

.pfloat__yen {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-left: calc(3px * var(--s));
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: calc(24px * var(--s));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.pfloat__yen small {
  margin-bottom: calc(5px * var(--s));
  font-size: max(7.5px, calc(9px * var(--s)));
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ---- right column: ボタン ---- */
.pfloat__cta {
  grid-row: 2;
  grid-column: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10px * var(--s));
  height: calc(42px * var(--s));
  padding: 0 calc(28px * var(--s)) 0 calc(14px * var(--s));
  border-radius: 99px;
  background: linear-gradient(180deg, #f2689a 0%, var(--pf-pink) 45%, var(--pf-pink-dk) 100%);
  box-shadow: 0 calc(3px * var(--s)) 0 #a31f52;
  color: #fff;
  font-size: calc(16.5px * var(--s));
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.pfloat__cart {
  flex: 0 0 auto;
  width: calc(21px * var(--s));
  height: calc(21px * var(--s));
}

.pfloat__chev {
  position: absolute;
  right: calc(16px * var(--s));
  top: 50%;
  width: calc(9px * var(--s));
  height: calc(9px * var(--s));
  border-top: 1.5px solid #fff;
  border-right: 1.5px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}

.pfloat__cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  transform: skewX(-20deg);
  animation: pfloatShine 3.2s 1s ease-in-out infinite;
}

@keyframes pfloatShine {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

.pfloat.is-show .pfloat__link {
  animation: pfloatBob 4s 1.2s ease-in-out infinite;
}

@keyframes pfloatBob {
  0%, 80%, 100% { transform: none; }
  86% { transform: translateY(-4px); }
  92% { transform: translateY(0); }
  96% { transform: translateY(-2px); }
}

.pfloat__link:hover { filter: brightness(1.03); }
.pfloat__link:active .pfloat__cta { transform: translateY(2px); box-shadow: 0 1px 0 #a31f52; }

@media screen and (min-width: 768px) {
  .pfloat {
    --s: .96;               /* PC: 参考デザイン(322px)の96% */
    left: auto;
    right: 24px;
    bottom: 24px;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pfloat, .pfloat.is-show { transition: opacity .2s linear, visibility 0s; transform: none; }
  .pfloat.is-show .pfloat__link,
  .pfloat__cta::after { animation: none; }
}
