/* ===================================================
   ProductIntroLayout 共用設計系統
   延續首頁 Apple 風格設計語言
   =================================================== */

/* 深色 body，避免白色 flash */
body {
  background: #0a0a0a !important;
  margin: 0;
}

/* 全寬包裹器（無側邊欄偏移） */
.product-intro-wrapper {
  min-height: 100vh;
  background: #0a0a0a;
}

/* 確保各 section 有明確深色背景 */
.pi-section {
  background: #0a0a0a;
}

.pi-section.pi-section--alt {
  background: #111 !important;
}

/* ===== 全域文字顏色（深色背景上強制白色）===== */
.product-intro-wrapper h1,
.product-intro-wrapper h2,
.product-intro-wrapper h3,
.product-intro-wrapper h4,
.product-intro-wrapper h5,
.product-intro-wrapper h6 {
  color: #fff;
}

.product-intro-wrapper p {
  color: rgba(255, 255, 255, 0.72);
}

.product-intro-wrapper li {
  color: rgba(255, 255, 255, 0.72);
}

.product-intro-wrapper strong {
  color: #fff;
}

/* section 標題結構 */
.product-intro-wrapper .pi-section-eyebrow {
  color: #ff6b8a;
}
.product-intro-wrapper .pi-section-title {
  color: #fff;
}
.product-intro-wrapper .pi-section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

/* Deep Dive 區塊（各代理人可能用不同 class 名稱） */
.product-intro-wrapper .pi-deep-dive__title,
.product-intro-wrapper .pi-deep-dive__subtitle,
.product-intro-wrapper .pi-deep-dive__desc,
.product-intro-wrapper .pi-deep-dive__text {
  color: rgba(255, 255, 255, 0.72);
}
.product-intro-wrapper .pi-deep-dive__heading {
  color: #fff;
}

/* 規格網格 */
.product-intro-wrapper .pi-spec-label {
  color: rgba(255, 255, 255, 0.55);
}
.product-intro-wrapper .pi-spec-value {
  color: #fff;
}

/* 比較表格 */
.product-intro-wrapper .pi-comparison-table th,
.product-intro-wrapper .pi-comparison-table td {
  color: rgba(255, 255, 255, 0.8);
}
.product-intro-wrapper .pi-comparison-table th {
  color: #fff;
}

/* ===== 統計數字區塊 ===== */
.product-intro-wrapper .pi-stat-number,
.product-intro-wrapper .pi-stat-value {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}
.product-intro-wrapper .pi-stat-unit {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-left: 0.25rem;
}
.product-intro-wrapper .pi-stat-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.product-intro-wrapper .pi-stats-row {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.product-intro-wrapper .pi-stat-item {
  display: flex;
  flex-direction: column;
}

/* ===== Feature Card ===== */
.product-intro-wrapper .pi-feature-card__icon {
  color: #af0036;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.product-intro-wrapper .pi-stat-badge {
  display: inline-block;
  background: linear-gradient(135deg, #af0036, #ff3366);
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

/* ===== 應用場景卡片 ===== */
.product-intro-wrapper .pi-app-card__icon {
  color: #af0036;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

/* ===== 供應商區塊 ===== */
.product-intro-wrapper .pi-supplier-block__logo {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* ===== CTA section ===== */
.product-intro-wrapper .pi-section--cta {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a0508 100%);
  text-align: center;
}
.product-intro-wrapper .pi-section__inner--center {
  text-align: center;
}
.product-intro-wrapper .pi-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ===== Visual box ===== */
.product-intro-wrapper .pi-visual-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------------------------------------------------
   Hero 區塊
   --------------------------------------------------- */
.pi-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.pi-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pi-hero__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.45;
  transition: transform 0.5s ease;
}

.pi-hero:hover .pi-hero__image {
  transform: scale(1.02);
}

.pi-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.55) 100%);
}

.pi-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  padding: 5rem 2rem;
  text-align: center;
  animation: pi-fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pi-fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pi-hero__badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(175, 0, 54, 0.2);
  border: 1px solid rgba(175, 0, 54, 0.5);
  border-radius: 980px;
  color: #c8002e;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.pi-hero__title {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Noto Sans TC', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1rem 0;
  line-height: 1.05;
}

.pi-hero__subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  margin: 0 auto 2rem auto;
  max-width: 640px;
  line-height: 1.5;
}

.pi-hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------------------------------------------
   按鈕
   --------------------------------------------------- */
.pi-btn {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.875rem 2rem;
  border-radius: 980px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
}

.pi-btn--primary {
  background: linear-gradient(135deg, #af0036, #cc003f);
  color: #fff;
}

.pi-btn--primary:hover {
  filter: brightness(1.15);
  transform: scale(1.02);
}

.pi-btn--secondary {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}

.pi-btn--secondary:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.4);
}

/* ---------------------------------------------------
   區塊標題系統
   --------------------------------------------------- */
.pi-section {
  padding: 100px 2rem;
}

.pi-section--alt {
  background: #111;
}

.pi-container {
  max-width: 1200px;
  margin: 0 auto;
}

.pi-section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.pi-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c8002e;
  margin-bottom: 0.75rem;
}

.pi-section-title {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Noto Sans TC', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1rem 0;
  line-height: 1.15;
}

.pi-section-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------------------------------------------------
   Feature Card 網格
   --------------------------------------------------- */
.pi-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.pi-feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.pi-feature-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(175, 0, 54, 0.3);
  transform: translateY(-3px);
}

.pi-feature-card--highlight {
  background: rgba(175, 0, 54, 0.08);
  border-color: rgba(175, 0, 54, 0.25);
}

.pi-feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
}

.pi-feature-stat {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.pi-feature-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.pi-feature-stat-unit {
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
}

.pi-feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.pi-feature-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0;
}

/* ---------------------------------------------------
   Deep Dive 區塊（左文右圖）
   --------------------------------------------------- */
.pi-deep-dive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.pi-deep-dive--reversed {
  direction: rtl;
}

.pi-deep-dive--reversed > * {
  direction: ltr;
}

.pi-deep-dive__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c8002e;
  margin-bottom: 0.75rem;
}

.pi-deep-dive__title {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Noto Sans TC', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1.25rem 0;
  line-height: 1.2;
}

.pi-deep-dive__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
  margin: 0 0 2rem 0;
}

.pi-deep-dive__stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.pi-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pi-stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.pi-stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.pi-stat-suffix {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
}

.pi-stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.03em;
}

.pi-visual-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}

.pi-visual-container img {
  width: 100%;
  height: auto;
  display: block;
}

.pi-visual-glow {
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 50% 50%, rgba(175,0,54,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------------------------------------------------
   產品卡片（總覽頁用）
   --------------------------------------------------- */
.pi-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.pi-product-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.pi-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #af0036, #ff3366);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 2;
}

.pi-product-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(175, 0, 54, 0.3);
  transform: translateY(-4px);
}

.pi-product-card:hover::before {
  transform: scaleX(1);
}

.pi-product-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(175, 0, 54, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pi-product-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.pi-product-card__desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.pi-product-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #c8002e;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
}

/* ---------------------------------------------------
   Photo card — 產品實拍背景卡片
   --------------------------------------------------- */
.pi-product-card--photo {
  padding: 0;
  min-height: 220px;
  background: #0d0d0d;
  border-color: rgba(255,255,255,0.06);
}

.pi-product-card--photo .pi-product-card__bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 72%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pi-product-card--photo:hover .pi-product-card__bg {
  opacity: 0.82;
  transform: scale(1.04) translateX(-6px);
}

.pi-product-card--photo .pi-product-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  padding: 1.75rem;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.55) 50%,
    rgba(0,0,0,0.1) 100%
  );
}

.pi-product-card--photo .pi-product-card__title {
  font-size: 1.2rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

.pi-product-card--photo .pi-product-card__en {
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.pi-product-card--photo .pi-product-card__desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* non-photo card needs body wrapper too */
.pi-product-card:not(.pi-product-card--photo) .pi-product-card__body {
  display: contents;
}

/* ---------------------------------------------------
   Specs 規格區塊
   --------------------------------------------------- */
.pi-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.pi-spec-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.pi-spec-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  display: block;
}

.pi-spec-unit {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.pi-spec-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.35rem;
  display: block;
}

/* ---------------------------------------------------
   供應商區塊
   --------------------------------------------------- */
.pi-supplier-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-wrap: wrap;
}

.pi-supplier-block__logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.pi-supplier-block__content {
  flex: 1;
  min-width: 240px;
}

.pi-supplier-block__title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem 0;
}

.pi-supplier-block__desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin: 0 0 1.25rem 0;
}

/* ---------------------------------------------------
   分類標題帶（Group Section）
   --------------------------------------------------- */
.pi-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pi-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c8002e;
  white-space: nowrap;
}

.pi-group-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* ---------------------------------------------------
   Scroll Reveal 動畫
   --------------------------------------------------- */
.pi-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* JS 啟動後才套用初始隱藏狀態 */
.js-loaded .pi-reveal {
  opacity: 0;
  transform: translateY(24px);
}

.js-loaded .pi-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* delay helpers */
.pi-reveal[data-delay="100"] { transition-delay: 0.1s; }
.pi-reveal[data-delay="200"] { transition-delay: 0.2s; }
.pi-reveal[data-delay="300"] { transition-delay: 0.3s; }
.pi-reveal[data-delay="400"] { transition-delay: 0.4s; }

/* ---------------------------------------------------
   頁尾
   --------------------------------------------------- */
.pi-footer {
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: white;
  padding: 3rem 2rem 1.5rem 2rem;
}

.pi-footer__content {
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.pi-footer__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #f5f5f7;
}

.pi-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pi-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pi-contact-item strong {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86868b;
}

.pi-contact-item span {
  font-size: 0.9rem;
  color: #f5f5f7;
}

.pi-footer__bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.pi-footer__bottom p {
  font-size: 0.85rem;
  color: #86868b;
  margin: 0;
}

/* ---------------------------------------------------
   響應式
   --------------------------------------------------- */
@media (max-width: 768px) {
  .pi-section {
    padding: 64px 1.25rem;
  }

  .pi-deep-dive {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .pi-deep-dive--reversed {
    direction: ltr;
  }

  .pi-features-grid {
    grid-template-columns: 1fr;
  }

  .pi-product-grid {
    grid-template-columns: 1fr;
  }
}