/* KEYPOP Mobile - Design width: 750px, breakpoint: 768px */

.kp-canvas--mobile {
  display: none;
  width: 750px;
  position: relative;
}

@media (max-width: 767px) {
  .kp-canvas--desktop {
    display: none !important;
  }

  .kp-canvas--mobile {
    display: block;
    /* 同上：首帧就按视口宽度缩好，避免闪一帧 750px 的大图 */
    zoom: var(--kp-zoom-mobile, 1);
  }
}

/* ===== Mobile Base ===== */
.kp-m-section {
  position: relative;
  width: 750px;
  height: 1333px;
  overflow: hidden;
}

.kp-m-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* ===== Typography ===== */
.kp-m-label {
  font-size: 40px;
  font-weight: 700;
  color: #1ee7e0;
  text-transform: uppercase;
  line-height: normal;
}

.kp-m-heading {
  font-size: 72px;
  font-weight: 900;
  color: #000;
  text-transform: uppercase;
  line-height: 60px;
}

.kp-m-body {
  font-size: 20px;
  font-weight: 400;
  color: #000;
  line-height: 28px;
  text-align: center;
}

.kp-m-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.kp-m-text-block {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 114px;
  width: 652px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  z-index: 2;
}

/* ===== M1: Hero ===== */
.kp-m-hero {
  background: #000;
}

.kp-m-hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.kp-m-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kp-m-hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.kp-m-hero-logo,
.kp-m-hero-title {
  opacity: 0;
}

.kp-m-hero-logo {
  position: absolute;
  left: 50%;
  top: 120px;
  transform: translateX(-50%);
  width: 364px;
  height: 145px;
  object-fit: cover;
}

.kp-m-hero-title {
  position: absolute;
  left: 50%;
  top: 305px;
  transform: translateX(-50%);
  width: 668px;
  height: 205px;
  object-fit: cover;
}

/* ===== M2: Features ===== */
.kp-m-features {
  background: #f5f5f5;
}

.kp-m-features-grid {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 670px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kp-m-features-row {
  display: flex;
  gap: 20px;
}

.kp-m-card {
  position: relative;
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  flex-shrink: 0;
}

.kp-m-card-sm {
  width: 325px;
  height: 400px;
}

.kp-m-card-wide {
  width: 670px;
  height: 325px;
}

.kp-m-card-label {
  position: absolute;
  z-index: 2;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 900;
  color: #000;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: normal;
  pointer-events: none;
}

/* 复用桌面端悬停放大 */
.kp-canvas--mobile .kp-card-hover-zoom .kp-card-inner {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.kp-canvas--mobile .kp-card-hover-zoom:hover .kp-card-inner,
.kp-canvas--mobile .kp-card-hover-zoom:active .kp-card-inner {
  transform: scale(1.08);
}

/* 电池卡片：触摸/悬停时 实 → 透 切换，逻辑同桌面端 */
.kp-canvas--mobile .kp-battery-animate-card .kp-m-card-label {
  z-index: 3;
}

.kp-canvas--mobile .kp-battery-animate-card:hover .kp-battery-solid,
.kp-canvas--mobile .kp-battery-animate-card:active .kp-battery-solid {
  animation: kp-battery-solid-fade 4s ease-in-out infinite;
  will-change: opacity;
}

.kp-canvas--mobile .kp-battery-animate-card:hover .kp-battery-transparent,
.kp-canvas--mobile .kp-battery-animate-card:active .kp-battery-transparent {
  animation: kp-battery-transparent-fade 4s ease-in-out infinite;
  will-change: opacity;
}

/* ===== M3: 360 ===== */
.kp-m-360 {
  background: #f5f5f5;
}

.kp-m-360-header {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 122px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 25px;
}

.kp-m-360-icon {
  width: 43px;
  height: 50px;
  object-fit: cover;
}

.kp-m-360-title {
  font-size: 40px;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
}

.kp-m-360-product {
  position: absolute;
  z-index: 2;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 742px;
  height: 742px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.kp-m-360-product.is-dragging {
  cursor: grabbing;
}

.kp-m-360-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kp-m-360-controls {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 1111px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: 53px;
}

.kp-m-control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.kp-m-control-item span {
  font-size: 26px;
  font-weight: 300;
  color: #000;
  text-align: center;
}

.kp-m-control-btn {
  width: 65px;
  height: 65px;
  border-radius: 32.5px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease;
}

.kp-m-control-btn--active {
  background: #000;
}

.kp-m-control-btn img {
  width: 48px;
  height: 32px;
  object-fit: contain;
  transition: filter 0.25s ease;
  filter: brightness(0);
}

.kp-m-control-btn--active img {
  filter: brightness(0) invert(1);
}

.kp-m-control-item[data-action="mode"][data-mode="vertical"] .kp-m-control-btn img {
  width: 40px;
  height: 47px;
}

.kp-m-control-item[data-action="reset"] .kp-m-control-btn img {
  width: 40px;
  height: 38px;
}

.kp-m-control-item[data-action="reset"]:hover .kp-m-control-btn,
.kp-m-control-item[data-action="reset"]:active .kp-m-control-btn {
  background: #000;
}

.kp-m-control-item[data-action="reset"]:hover .kp-m-control-btn img,
.kp-m-control-item[data-action="reset"]:active .kp-m-control-btn img {
  filter: brightness(0) invert(1);
}

/* ===== M4-M5: Media Card Sections ===== */
.kp-m-puffs,
.kp-m-compact {
  background: #fff;
}

.kp-m-media-card {
  position: absolute;
  left: 50%;
  top: 405px;
  transform: translateX(-50%);
  width: 670px;
  height: 870px;
  border-radius: 30px;
  overflow: hidden;
}

.kp-m-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== M6: Visible Tank ===== */
.kp-m-visible-tank {
  background: #fff;
}

.kp-m-visible-tank .kp-m-text-block {
  width: 750px;
}

.kp-m-visible-tank .kp-m-body {
  width: 708px;
}

.kp-m-tank-product {
  position: absolute;
  left: 50%;
  top: 466px;
  transform: translateX(-50%);
  width: 668px;
  height: 747px;
}

.kp-m-tank-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== M7: Mesh ===== */
.kp-m-mesh .kp-m-text-block {
  width: 750px;
  top: 114px;
}

.kp-m-mesh .kp-m-body {
  width: 708px;
}

.kp-m-mesh-product {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 485px;
  height: 881px;
}

.kp-m-mesh-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== M8: Battery ===== */
.kp-m-battery {
  background: #fff;
}

.kp-m-battery .kp-m-text-block {
  width: 750px;
  top: 114px;
}

.kp-m-battery .kp-m-body {
  width: 708px;
}

.kp-m-battery-scene {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 750px;
  height: 1104px;
  object-fit: cover;
  pointer-events: none;
}

/* ===== M9: Flavors Carousel ===== */
.kp-m-flavors {
  background: #fff;
}

.kp-m-flavors-header {
  position: absolute;
  left: 50%;
  top: 120px;
  transform: translateX(-50%);
  width: 750px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  z-index: 2;
}

.kp-m-flavors-title {
  font-size: 72px;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
  line-height: 60px;
  text-align: center;
  width: 670px;
}

.kp-m-flavors-header .kp-m-body {
  width: 708px;
}

.kp-m-carousel {
  position: absolute;
  left: 50%;
  top: calc(50% + 143.5px);
  transform: translate(-50%, -50%);
  width: 750px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kp-m-carousel-viewport {
  width: 580px;
  height: 780px;
  border-radius: 30px;
  overflow: hidden;
  flex-shrink: 0;
}

.kp-m-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.kp-m-carousel-slide {
  width: 580px;
  height: 780px;
  flex-shrink: 0;
}

.kp-m-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kp-m-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 21px;
  height: 37px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.kp-m-carousel-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kp-m-carousel-btn--prev {
  left: 40px;
}

.kp-m-carousel-btn--next {
  right: 40px;
}

.kp-m-carousel-btn--next img {
  transform: rotate(180deg);
}

.kp-m-carousel-dots {
  position: absolute;
  left: 50%;
  top: 1250px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.kp-m-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9d9d9;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.kp-m-carousel-dot--active {
  background: #000;
  transform: scale(1.25);
}

/* ===== M10: Parameters ===== */
.kp-m-parameters {
  background: #fff;
}

.kp-m-parameters-title {
  position: absolute;
  left: 50%;
  top: 124px;
  transform: translateX(-50%);
  font-size: 72px;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
  text-align: center;
  line-height: 60px;
  width: 670px;
}

.kp-m-parameters-box {
  position: absolute;
  left: 50%;
  top: calc(50% - 32.5px);
  transform: translate(-50%, -50%);
  width: 580px;
  height: 720px;
  border-radius: 30px;
  overflow: hidden;
}

.kp-m-parameters-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kp-m-parameters-tags {
  position: absolute;
  left: 50%;
  top: 1055px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 31px;
}

.kp-m-tag {
  width: 400px;
  height: 45px;
  border: 2px solid #000;
  border-radius: 22.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
  padding: 9px 60px 8px;
}

.kp-m-tag--narrow {
  width: 350px;
  padding-left: 0;
  padding-right: 0;
}

/* ===== Mobile Reveal ===== */
.kp-m-reveal {
  opacity: 0;
  transform: translate3d(0, 60px, 0);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--kp-m-reveal-delay, 0s);
  will-change: transform, opacity;
}

.kp-m-reveal.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.kp-m-parameters-title.kp-m-reveal {
  transform: translate3d(-50%, 60px, 0);
}

.kp-m-parameters-title.kp-m-reveal.is-revealed {
  transform: translate3d(-50%, 0, 0);
}

.kp-m-hero-logo.kp-m-reveal,
.kp-m-hero-title.kp-m-reveal {
  transform: translate3d(-50%, 120px, 0);
  transition:
    opacity 1.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.kp-m-hero-logo.kp-m-reveal.is-revealed,
.kp-m-hero-title.kp-m-reveal.is-revealed {
  transform: translate3d(-50%, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .kp-canvas--mobile .kp-card-hover-zoom .kp-card-inner {
    transition: none;
  }

  .kp-canvas--mobile .kp-card-hover-zoom:hover .kp-card-inner,
  .kp-canvas--mobile .kp-card-hover-zoom:active .kp-card-inner {
    transform: none;
  }

  .kp-m-carousel-track {
    transition: none;
  }

  .kp-m-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .kp-m-parameters-title.kp-m-reveal {
    transform: translate3d(-50%, 0, 0);
  }

  .kp-m-hero-logo.kp-m-reveal,
  .kp-m-hero-title.kp-m-reveal {
    transform: translate3d(-50%, 0, 0);
  }
}
