/* ==================================================
   Gangsu — style.css (ENTRY POINT)
   - Single source of truth (NO inline <style>)
   - Order matters — do not change lightly
   ================================================== */

/* =========================
   1) CORE (基础层)
   ========================= */
   @import "./core/reset.css";
   @import "./core/tokens.css";
   @import "./core/layout.css";
   
   /* =========================
      2) LAYOUT (结构层)
      ========================= */
   @import "./layout/header.css";
   @import "./layout/footer.css";
   
   /* =========================
      3) COMPONENTS (组件层)
      ========================= */
   @import "./components/buttons.css";
   @import "./components/cards.css";
   @import "./components/cta.css";
   @import "./components/portfolio.css";
   @import "./components/modal.css";
   @import "./components/mobile-cta.css";
   
   /* =========================
      4) PAGES (页面层)
      ========================= */
   @import "./pages/home.css";
   @import "./pages/content.css";

/* =========================================================
   Unified WhatsApp Floating Widget (PC only, mobile hidden)
   - Circular icon button + hover-expand panel
   - White card, soft shadow, WhatsApp green icon
   ========================================================= */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
}

.wa-float__btn {
  pointer-events: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .35);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  flex-shrink: 0;
}

.wa-float__btn:hover,
.wa-float:focus-within .wa-float__btn {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 211, 102, .4);
}

.wa-float__icon {
  display: block;
  color: #fff;
}

.wa-float__icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.wa-float__panel {
  position: absolute;
  right: 0;
  bottom: calc(56px + 10px);
  width: 280px;
  padding: 18px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12), 0 2px 12px rgba(0, 0, 0, .06);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.wa-float:hover .wa-float__panel,
.wa-float:focus-within .wa-float__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.wa-float__title {
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.3;
}

.wa-float__sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.4;
}

.wa-float__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 14px;
}

.wa-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
  animation: waPing 1.6s infinite;
}

@keyframes waPing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.wa-float__cta {
  display: block;
  text-align: center;
  padding: 12px 16px;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .2s ease;
}

.wa-float__cta:hover {
  background: #128C7E;
}

/* Mobile: hide completely */
@media (max-width: 768px) {
  .wa-float {
    display: none !important;
  }
}

/* =========================================================
   PET Product Page - Mobile Conversion Optimization
   ========================================================= */

/* Mobile Value Proposition */
.pet-page .pd-value-prop {
  display: none;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #0a84ff;
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 10px;
}

.pet-page .pd-value-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.3;
}

.pet-page .pd-value-sub {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

/* Description Line Clamp for Mobile */
.pet-page .pd-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.pet-page .pd-desc.expanded {
  -webkit-line-clamp: unset;
}

/* Read More Button (Mobile Only) */
.pet-page .pd-read-more {
  display: none;
  background: transparent;
  border: none;
  color: #0a84ff;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 0;
  cursor: pointer;
  margin-top: 8px;
  text-decoration: underline;
}

.pet-page .pd-read-more:hover {
  color: #0558a6;
}

/* Desktop Tags - Hide on Mobile */
.pet-page .pd-tags-desktop {
  display: flex;
}

/* Mobile KPI List */
.pet-page .pet-kpi {
  display: none;
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  gap: 12px;
  flex-direction: column;
}

.pet-page .pet-kpi li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.pet-page .pet-kpi svg {
  width: 20px;
  height: 20px;
  color: #0a84ff;
  flex-shrink: 0;
}

.pet-page .pet-kpi span {
  font-size: 14px;
  color: #334155;
  line-height: 1.4;
}

.pet-page .pet-kpi strong {
  color: #0f172a;
  font-weight: 700;
}

/* Mobile Sticky CTA Bar */
.pet-page .m-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  display: none;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 10px 16px;
  gap: 10px;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pet-page .m-cta-bar.visible {
  opacity: 1;
  transform: translateY(0);
}

.pet-page .m-cta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pet-page .m-cta.primary {
  background: #0a84ff;
  color: #fff;
  border: 2px solid #0a84ff;
}

.pet-page .m-cta.primary:hover {
  background: #0558a6;
  border-color: #0558a6;
}

.pet-page .m-cta.ghost {
  background: #fff;
  color: #25d366;
  border: 2px solid #25d366;
}

.pet-page .m-cta.ghost:hover {
  background: #f0fdf4;
}

/* Mobile Responsive Rules */
@media (max-width: 768px) {
  /* Show mobile value prop */
  .pet-page .pd-value-prop {
    display: block;
  }
  
  /* Show read more button */
  .pet-page .pd-read-more {
    display: inline-block;
  }
  
  /* Hide desktop tags, show mobile KPI */
  .pet-page .pd-tags-desktop {
    display: none;
  }
  
  .pet-page .pet-kpi {
    display: flex;
  }
  
  /* MOBILE: Hide hero CTA buttons (use bottom sticky bar instead) */
  .pet-page #hero-cta {
    display: none !important;
  }
  
  /* MOBILE: Bottom padding so sticky bar doesn't cover content + iOS safe-area */
  body.pet-page {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }
  
  /* Hero image min-height to prevent layout shift */
  .pet-page .pd-hero-main {
    min-height: 240px;
  }
}

/* DESKTOP: Hide mobile sticky CTA bar */
@media (min-width: 769px) {
  #mobile-sticky-cta {
    display: none !important;
  }
  
  /* Reset body padding on desktop */
  body.pet-page {
    padding-bottom: 0;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .pet-page .pd-value-title {
    font-size: 14px;
  }
  
  .pet-page .pd-value-sub {
    font-size: 12px;
  }
  
  .pet-page .m-cta {
    font-size: 14px;
    padding: 12px 16px;
  }
}

/* ===== Hero video link + modal (PET page) ===== */
.vx-hero-video{ margin-top: 10px; }
.vx-video-link{
  appearance:none; border:0; background:transparent;
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 0; cursor:pointer;
  color:#2563eb; font-weight:600; font-size:14px;
}
.vx-video-link:hover{ text-decoration:underline; }
.vx-video-link:focus-visible{ outline:2px solid rgba(37,99,235,.35); outline-offset:4px; border-radius:10px; }

.vx-play{ font-size:14px; transform:translateY(-.5px); }
.vx-video-meta{ color:#64748b; font-weight:600; }

/* Video modal overlay */
.vx-modal{position:fixed;inset:0;z-index:9999;display:none;align-items:flex-start;justify-content:center;overflow-y:auto;padding:20px;box-sizing:border-box}
.vx-modal.is-open{display:flex}
.vx-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(4px);cursor:pointer}
.vx-modal__panel{position:relative;width:100%;max-width:min(980px,92vw);margin:8vh auto 0;background:#fff;border-radius:16px;box-shadow:0 20px 70px rgba(0,0,0,.35);overflow:hidden}
.vx-modal__close{position:absolute;top:10px;right:10px;width:40px;height:40px;border:0;border-radius:999px;background:rgba(15,23,42,.08);font-size:26px;line-height:40px;cursor:pointer;color:#0f172a}
.vx-modal__close:hover{background:rgba(15,23,42,.14)}
.vx-modal__frame{position:relative;width:100%;aspect-ratio:16/9;background:#000}
.vx-modal__frame iframe{position:absolute;inset:0;width:100%;height:100%}
@media (max-width:768px){
  .vx-modal__panel{margin:16vh auto 0;border-radius:14px}
}
