/* Tailwind 之上的共享样式与组件类 */

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
  .hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.15);
  }
  .gradient-text {
    background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 悬浮 WhatsApp 按钮 */
.fab-whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fab-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55);
}
.fab-whatsapp svg {
  width: 2rem;
  height: 2rem;
  fill: #fff;
}

/* 悬浮按钮呼吸光环 */
.fab-whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid #25d366;
  animation: fab-pulse 2s ease-out infinite;
}
@keyframes fab-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* 表单提交反馈 */
.form-feedback {
  display: none;
}
.form-feedback.show {
  display: block;
}

/* 响应式安全网 */
html,
body {
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.product-content img,
.product-content video,
.product-content iframe {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 640px;
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .fab-whatsapp {
    right: 1rem;
    bottom: 1rem;
    width: 3.25rem;
    height: 3.25rem;
  }

  .fab-whatsapp svg {
    width: 1.75rem;
    height: 1.75rem;
  }

  header nav a,
  #mobileMenuToggle,
  #mobileMenu a {
    min-height: 44px;
  }

  #mobileMenu a {
    display: flex;
    align-items: center;
    width: 100%;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .site-mobile-menu {
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .table-scroll table {
    min-width: 560px;
  }
}

@media (max-width: 480px) {
  .fab-whatsapp {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .table-scroll table {
    min-width: 520px;
  }
}
