/* =====================================================
   ROOT VARIABLES
   ===================================================== */
:root {
    --primary-blue: #2446a8;
    --light-blue: #eaf1ff;
    --gray-bg: #f4f6f9;
}

/* =====================================================
   BASE
   ===================================================== */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #fff;
    color: #333;
    scroll-behavior: smooth;
    padding-top: 84px;

    /* 🔒 防止切頁位移（scrollbar 問題） */
    overflow-y: scroll;
}

/* =====================================================
   NAVBAR（完全鎖死，不再位移）
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 84px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1030;
}

.navbar > .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-brand img {
    display: block;
    height: 44px;
    width: auto;
}

/* =====================================================
   NAV LINKS
   ===================================================== */
.navbar-nav {
    gap: 12px;
}

.nav-link {
    font-size: 16.5px;
    font-weight: 500;
    color: #333 !important;
    position: relative;
    padding-bottom: 4px;
}

/* underline（桌機 & 手機共用邏輯） */
.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-blue);
    transform: translateX(-50%);
    transition: width .22s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue) !important;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    background: linear-gradient(135deg, #ffffff, var(--light-blue));
    padding: 120px 0 100px;
}

.hero-banner {
    position: relative;
    height: 92vh;
    min-height: 680px;
    background:
        linear-gradient(
            to right,
            rgba(0,0,0,.25),
            rgba(0,0,0,.05)
        ),
        url("img/ChatGPT Image 2026年1月8日 上午10_50_18.png")
        center / cover no-repeat;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-text {
    max-width: 720px;
}

.hero-line-1 {
    font-size: 42px;
    font-weight: 600;
    letter-spacing: .8px;
    margin-bottom: 6px;
    line-height: 1.15;
}

.hero-line-2 {
    font-size: 30px;
    font-weight: 300;
    letter-spacing: .8px;
    line-height: 1.2;
}

/* =====================================================
   SECTION
   ===================================================== */
.section {
    padding: 20px 0;
}

.section-gray {
    background: var(--gray-bg);
}

.section-title {
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 40px;
    text-align: center;
}

.cert-title {
  text-align: left;
}


/* =====================================================
   CARDS
   ===================================================== */
.tech-card,
.product-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    border: 1px solid #e5e5e5;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.company-main-product .main-product-card:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e5e5;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: #1d3890;
    border-color: #1d3890;
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: #fff;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--primary-blue);
    color: #fff;
    padding: 50px 0;
    font-size: 14px;
}

/* =====================================================
   RWD / MOBILE NAV
   ===================================================== */
@media (max-width: 991.98px) {

    /* 漢堡展開區塊 */
    .navbar-collapse {
        background: #fff;
        padding: 24px 0 20px;
        box-shadow: 0 12px 30px rgba(0,0,0,.12);
        text-align: center;
    }

    .navbar-nav {
        margin: 0;
        padding: 0;
        text-align: center;
    }

    .navbar-nav .nav-link {
        padding: 12px 0;
        font-size: 16px;
    }

    /* 🔵 藍線恢復「跟文字同寬」 */
    .navbar-nav .nav-link::after {
        width: auto;
    }

    .navbar-nav .nav-link.active::after,
    .navbar-nav .nav-link:hover::after {
        width: 100%;
    }

    /* ===============================
       MOBILE LANGUAGE SWITCH
       =============================== */
    .lang-mobile {
        display: flex;
        justify-content: space-between;
        width: fit-content;          /* 🔥 關鍵：自然等於 Contact Us 寬 */
        gap: 8px;
        margin: 18px auto 0;
    }

    .lang-mobile button {
        min-width: 48px;
        height: 32px;
        border: 1px solid var(--primary-blue);
        background: transparent;
        color: var(--primary-blue);
        font-size: 13px;
        border-radius: 6px;
        padding: 0 6px;
        white-space: nowrap;
    }

    .lang-mobile button:hover {
        background: var(--primary-blue);
        color: #fff;
    }

    .hero-line-1 {
        font-size: 32px;
    }

    .hero-line-2 {
        font-size: 22px;
    }
}

/* =====================================================
   Feature Products Slider
   ===================================================== */

.fp-slider {
  display: flex;
  align-items: center;
  gap: 24px; /* 卡片與箭頭距離 */
}

/* 改<>箭頭圖片大小在這 */
.fp-arrow {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;   /* 🔒 不被壓縮 */
  border: none;
  background: none;
  cursor: pointer;
}

.fp-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fp-viewport {
  overflow: hidden;
  width: calc(100% - 88px); /* 扣掉左右箭頭 */
}

.fp-track {
  display: flex;
  transition: transform .5s ease;
  gap: 24px;
}


/* 卡片 */
.fp-card {
  flex: 0 0 calc((100% - 96px) / 5); /* 一頁 5 張（桌機預設） */
  background: #fff;
  border-radius: 22px;
  border: 1px solid #e3e6ea;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease;

  display: flex;               /* ✅ 新增 */
  flex-direction: column;      /* ✅ 新增 */
  height: 100%;                /* ✅ 新增：同列同高更穩 */
}



.fp-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(36,70,168,.22);
}

/* 點擊時的按下回饋感（可選但很加分） */
.fp-card:active {
  transform: translateY(-4px) scale(0.98);
}


.fp-card-img {
  height: 200px;               /* ✅ 桌機稍微拉高，避免擠到藍色 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #fff;

  overflow: hidden;            /* ✅ 新增：圖片不會壓到下面藍色 */
}


.fp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;         /* ✅ 不裁切、不變形 */
  display: block;
}


/* 商品名稱區塊：外層負責置中 */
.fp-card-info {
  background: var(--primary-blue);
  color: #fff;

  height: 96px;
  padding: 12px 14px;

  display: flex;              /* ✅ 真正置中在這 */
  align-items: center;        /* 垂直置中 */
  justify-content: center;    /* 水平置中 */
  text-align: center;
}

/* 文字本身：負責兩行省略 */
.fp-card-title {
  font-size: 14px;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  --webkit-line-clamp: 3;
  overflow: hidden;
}




/* ===============================
   Feature Products RWD
   =============================== */

/* 桌機（≥1200px）：5 張 */
@media (min-width: 1200px) {
  .fp-card {
    flex: 0 0 calc((100% - 96px) / 5); /* 4 gaps */
  }
}

/* 平板（768px–1199px）：3 張 */
@media (max-width: 1199.98px) and (min-width: 768px) {
  .fp-card {
    flex: 0 0 calc((100% - 48px) / 3); /* 2 gaps */
  }
}

/* 手機（<768px）：1 張 */
@media (max-width: 767.98px) {
  .fp-slider {
    gap: 12px;
  }

  .fp-card {
    flex: 0 0 100%;
  }

.fp-card-img {
  height: 280px;   /* ✅ 1 欄時給圖片更足空間 */
  padding: 16px;
}

}

/* ===============================
   Certified Section – FIXED
   =============================== */

.certified-section {
  padding: 80px 0 120px;   /* 上下留白變大 */
}

/* 門的外框 */
.cert-door-wrap {
  display: flex;
  gap: 16px;              /* ✅ 門縫就在這，數字越小縫越小 */
  align-items: stretch;   /* ✅ 左右一定等高 */
}

/* 每一扇門 */
.cert-door {
  flex: 1;
  overflow: hidden;
  background: #fff;
}

/* 門裡面內容：等高核心 */
.cert-door-inner {
  height: 520px;
  display: flex;
  align-items: center;
}

/* 左邊圖片 */
.cert-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 右邊內容 */
.cert-content {
  padding: 48px 56px;
  width: 100%;
  max-width: 520px;
}

/* 右下角 logo 不裁切 */
.cert-logos img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

/* list */
.cert-list {
  padding-left: 18px;
  margin: 18px 0 24px;
}

.cert-list li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

html[lang="zh-Hant-TW"] .cert-list .cert-code {
  font-weight: 700;
}

/* ===============================
   關門動畫
   =============================== */
.door-left {
  transform: translateX(-120%);
  opacity: 0;
}

.door-right {
  transform: translateX(120%);
  opacity: 0;
}

.cert-animate.active .door-left,
.cert-animate.active .door-right {
  transform: translateX(0);
  opacity: 1;
  transition: transform 1s ease, opacity 1s ease;
}

/* ===============================
   RWD
   =============================== */
@media (max-width: 991.98px) {
  .cert-door-wrap {
    flex-direction: column;
    gap: 0;
  }

  .cert-door-inner {
    height: auto;
  }

  .door-left,
  .door-right {
    transform: none;
    opacity: 1;
  }

  .cert-content {
    padding: 32px 22px;
  }
}

/* 增加 Banner 與 Feature Products 的距離 */
.home-feature-products {
  margin-top: 60px;
}


/* ===============================
   Company Page Only
   =============================== */

/* Hero */
.company-hero{
  position: relative;     /* ⭐ 讓 badge 可以用 absolute 定位 */
  overflow: visible;      /* ⭐ 允許 badge 壓出 banner 外 */
}

.company-hero img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display:block;
}


/* About section spacing */
.company-about {
  padding: 96px 0;
}

.language-version--zh {
  display: none;
}

html[lang="zh-Hant-TW"] .language-version--en {
  display: none;
}

html[lang="zh-Hant-TW"] .language-version--zh {
  display: block;
}

.company-text ul {
  padding-left: 1.25rem;
}

.company-text li {
  margin-bottom: 0.35rem;
}

.company-text p {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 14px;
}

/* 右側示意圖 */
.company-diagram {
  max-width: 100%;
  border-radius: 8px;
}

/* ===============================
   Door Animation Wrapper
   =============================== */

.company-about .row {
  position: relative;
  overflow: hidden; /* 🔴 關鍵：避免爆版 */
}

/* 左門 */
.company-about [data-aos="door-left"] {
  transform: translateX(-120px);
  opacity: 0;
}

.company-about [data-aos="door-left"].aos-animate {
  transform: translateX(0);
  opacity: 1;
  transition: transform 1s ease, opacity 1s ease;
}

/* 右門 */
.company-about [data-aos="door-right"] {
  transform: translateX(120px);
  opacity: 0;
}

.company-about [data-aos="door-right"].aos-animate {
  transform: translateX(0);
  opacity: 1;
  transition: transform 1s ease, opacity 1s ease;
}

/* ===============================
   Main Product Section
   =============================== */

.company-main-product {
  background: var(--primary-blue);
  padding: 96px 0;
}

.main-product-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
}


.main-product-card img {
  width: 120px;
  flex-shrink: 0;
  margin-left: 15px;   /* ✅ 圖片離左邊遠一點（關鍵） */
}

.main-product-card h5 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 4px;
}

.main-product-card p {
  font-size: 14px;
  margin: 0;
  color: #555;
}

/* ===============================
   RWD
   =============================== */

@media (max-width: 991px) {
  .company-hero img {
    height: 260px;
  }

  .company-about {
    padding: 64px 0;
  }

  .company-main-product {
    padding: 64px 0;
  }
}

/* ===============================
   Certified Section Height Fix
   =============================== */

/* 讓左右兩欄等高（Bootstrap row 已是 flex） */
.certified-section .row {
  align-items: stretch;
}

/* 左邊圖片欄 */
.certified-left {
  display: flex;
  align-items: center;
}

/* 左邊圖片本身：不要撐爆 */
.certified-left .cert-img {
  width: 100%;
  max-height: 100%;
  object-fit: cover;
}

/* 右邊內容欄：限制高度來源 */
.certified-right {
  display: flex;
  align-items: center; /* 讓內容垂直置中 */
}

/* 右邊內容包一層，避免自己撐太高 */
.cert-content {
  width: 100%;
  max-width: 540px;   /* 🔴 控制右邊整塊寬度 */
}

/* ===============================
   Company – About SKYLINE FIX
   =============================== */

/* 讓左右兩欄真的等高 */
.company-about .row {
  display: flex;
  align-items: stretch;
}

/* 左邊文字：自然撐高 */
.company-text {
  height: 100%;
}

/* 右邊圖片欄：用同一個高度 */
.company-image-wrap {
  height: 100%;
  display: flex;
  align-items: center;      /* 垂直置中 */
  justify-content: center;  /* 水平置中 */
}

/* 🔴 核心：圖片「縮在文字高度裡」 */
.company-diagram {
  max-height: 420px;        /* ✅ 實際控制大小（重點） */
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* ===============================
   Site Footer (Global)
   =============================== */

.site-footer {
  background: var(--primary-blue);
  color: #ffffff;
  padding: 70px 0 60px;
  font-size: 16px;
}

.site-footer .footer-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.site-footer .footer-line {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.6);
  margin-bottom: 18px;
}

.site-footer p,
.site-footer a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  line-height: 1.5;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* 底部版權 */
.site-footer .footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 14px;
  text-align: center;
  color: rgba(255,255,255,0.8);
}

/* RWD */
@media (max-width: 991px) {
  .site-footer {
    text-align: center;
  }

  .site-footer .footer-line {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===============================
   Floating Cart Button
   =============================== */

.floating-cart {
  position: fixed;
  right: 30px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #fff;

  /* ✅ 加這兩行（重點） */
  border: 2px solid #ffffff;
  box-shadow: 0 4px 28px rgba(0,0,0,0.25);

  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1050;
  transition: transform .2s ease, box-shadow .2s ease;
}


.floating-cart:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* Cart icon image */
.floating-cart .cart-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none; /* 點擊還是點到整顆按鈕 */
}


/* 商品數量 badge */
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff3b3b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===============================
   Factory Page (Clean Version)
   =============================== */

.factory-title-bar {
  background: var(--primary-blue);
  padding:28px;
  text-align: center;
}

.factory-title-bar .section-title {
  color: #fff;
  margin: 0;
}

/* Factory hero subtitle */
.factory-title-bar .hero-subtitle {
  color: #ffffff;                 /* ✅ 白色 */
  font-size: 18px;                /* ✅ 比內文大 */
  margin-top: 14px;               /* ✅ 跟主標拉開距離 */
  text-align: center;             /* ✅ 置中 */
  opacity: 0.9;                   /* 微透明，質感會比較好 */
}


/* Factory image common size */
.factory-img {
  max-width: 85%;
  aspect-ratio: 15 / 9;   /* 👈 比例，數字越扁越橫 */
  object-fit: cover;     /* 👈 不變形，裁上下 */
  display: block;
  height: auto; /* ✅ 補這行，避免被其他規則干擾 */
}


/* 第一組圖片（左邊那張）→ 靠左 */
.factory-img.left {
  margin-top: 50px;
  margin-left: 0;
  margin-right: auto;
  margin-bottom: 10px;
}

/* 第二組圖片（右邊那張）→ 靠右 */
.factory-img.right {
  margin-left: auto;
  margin-right: 0;
  margin-bottom: 50px;
  margin-top: 10px;
}

.factory-title {
  color: var(--primary-blue);
  font-weight: 700;
}


/* =====================================================
   STORE PAGE (Products) - sidebar + grid
   ===================================================== */

.store-wrap{
  background: #fff;
}

/* Sidebar card */
.store-sidebar{
  border: 1px solid #e3e6ea;
  border-radius: 16px;
  padding: 18px 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,.05);
  position: sticky;
  top: 110px; /* 避開 navbar */
}

.store-side-title{
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--primary-blue);
  font-size: 18px;
}

.store-side-line{
  height: 1px;
  background: #e8ecf4;
  margin: 12px 0 10px;
}

.store-side-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-cat{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color:#1f2937;
  border: 1px solid transparent;
  transition: .2s ease;
  background: #f6f8fd;
}

.store-cat:hover{
  border-color: rgba(36,70,168,.25);
  box-shadow: 0 10px 20px rgba(36,70,168,.12);
  transform: translateY(-1px);
}

.store-cat.active{
  background: rgba(36,70,168,.08);
  border-color: rgba(36,70,168,.35);
  color: var(--primary-blue);
  font-weight: 700;
}

.store-cat-count{
  font-size: 12px;
  color:#6b7280;
}

/* Topbar */
.store-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 0 6px;
  border-bottom: 1px solid #eef2f7;
}

.store-breadcrumb{
  font-size: 18px;
}

.store-count{
  font-size: 15px;
}

/* Product card */
.p-card{
  display:block;
  text-decoration:none;
  color:inherit;
  border:1px solid #e3e6ea;
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
  transition: transform .22s ease, box-shadow .22s ease;
  will-change: transform;
  height:100%;
}

.p-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16, 24, 40, .12);
}

.p-thumb{
  aspect-ratio: 4 / 3;
  background:#fff;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;  /* ✅ 關鍵：讓圖片縮小，離邊界更安全 */
}


.p-thumb img{
  width:100%;
  height:100%;
  max-width: 100%;
  max-height: 100%;
  object-fit:contain;     /* ✅ 不裁切 */
  display:block;
  background:#fff;
  padding: 2px; /* 很小的內縮，避免看起來貼邊 */
  transform: scale(1);
  transition: transform .35s ease;
}

.p-card:hover .p-thumb img{
  transform: scale(1.03);
}


.p-body{
  padding:14px 16px;
}

.p-name{
  font-weight:700;
  color: var(--primary-blue);
  line-height:1.35;
  min-height: 44px;
}

.p-more{
  margin-top:8px;
  color:#6b7280;
  font-size:13px;
}

/* Mobile tweaks */
@media (max-width: 991.98px){
  .store-topbar{
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* product頁面卡片進場動畫 */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}

/* 進場後 */
.reveal.is-in{
  opacity: 1;
  transform: translateY(0);
}

#productGrid{ transition: opacity .18s ease; }
#productGrid.is-fading{ opacity: 0; }


/* ===============================
   Certifications Page
   =============================== */

.cert-page { background: #fff; }

/* banner：跟 products 共用同尺寸（這裡高度請改成你 products 的高度） */
.page-banner{
  position: relative;
  height: 320px;
  margin-top: 84px; /* navbar 高度 */
  background-size: cover;
  background-position: center;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  overflow: hidden;
}

.page-banner--cert{
  background-image: url("../images/products-banner.png"); /* ← 換成你的 cert banner */
}

/* banner 左下角藍色塊 */
.banner-badge{
  --badge-h: 380px;
  --badge-pull: 280px;
  position: absolute;
  left: 180px;
  bottom: calc(-1 * var(--badge-pull));
  width: 320px;
  height: var(--badge-h);
  background: var(--primary-blue);
  color: #fff;
  border-radius: 0;       /* ⭐ 拿掉圓角 */
  padding: 22px 22px 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
  z-index: 2;             /* ⭐ 確保在 banner 上層 */
}



.banner-badge__title{
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}
.banner-badge__sub{
  position: absolute;
  left: 22px;
  bottom: 22px;
  font-size: 18px;
  opacity: .9;
}
.banner-badge__arrow{
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 22px;
  height: 22px;
  border-right: 2px solid rgba(255,255,255,.9);
  border-bottom: 2px solid rgba(255,255,255,.9);
  transform: rotate(-45deg);
}

.product-detail {
  min-height: 62vh;
}

.product-detail__topbar {
  justify-content: flex-start;
  margin-bottom: 22px;
}

.product-detail__category {
  color: var(--primary-blue);
  font-weight: 700;
}

.product-detail__content {
  padding: 4px 0 20px;
}

.product-detail__title {
  margin: 0 0 18px;
  color: #3d342f;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.25;
}

.product-detail__overview {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.2fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: start;
}

.product-detail__image-wrap {
  display: grid;
  min-height: 300px;
  place-items: center;
  border: 1px solid #e3e0dc;
  background: #fff;
}

.product-detail__image-gallery {
  display: grid;
  gap: 10px;
  align-content: start;
}

.product-detail__image {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  padding: 20px;
}

.product-detail__thumbnails {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.product-detail__thumbnail {
  display: flex;
  width: 46px;
  height: 46px;
  padding: 3px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #d5d9e0;
  background: #fff;
  cursor: pointer;
}

.product-detail__thumbnail:hover,
.product-detail__thumbnail.is-active {
  border-color: var(--primary-blue);
}

.product-detail__thumbnail img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-detail__meta {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
  margin: 0;
  color: #5b5049;
  font-size: 15px;
}

.product-detail__meta dt,
.product-detail__meta dd {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #e8e4df;
  line-height: 1.45;
}

.product-detail__meta dt {
  font-weight: 700;
}

.product-detail__meta dd {
  color: #6b625c;
}

.product-detail__specifications {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 28px;
  color: #5b5049;
}

.product-detail__specifications ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-detail__specifications li {
  position: relative;
  padding-left: 12px;
  line-height: 1.5;
}

.product-detail__specifications li::before {
  position: absolute;
  left: 0;
  content: "-";
}

.product-detail__gallery-section {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #e8e4df;
}

.product-detail__gallery-section h2 {
  margin: 0 0 22px;
  color: #5b5049;
  font-size: 18px;
  font-weight: 700;
}

.product-detail__specifications h2 {
  margin: 0;
  color: #5b5049;
  font-size: 18px;
  font-weight: 700;
}

.product-detail__gallery {
  display: grid;
  justify-items: center;
  gap: 28px;
}

.product-detail__gallery img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  object-fit: contain;
}

.product-detail__description {
  margin: 20px 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.7;
}

.product-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.product-detail__not-found {
  max-width: 620px;
  margin: 64px auto;
  text-align: center;
}

.product-detail__not-found h1 {
  color: #202c3b;
  font-size: 30px;
}

.product-detail__not-found p {
  margin: 16px 0 24px;
  color: #4b5563;
}

.product-detail__not-found .btn {
  text-decoration: none;
}

.product-detail__not-found a {
  color: var(--primary-blue);
  text-decoration: none;
}

@media (max-width: 767.98px) {
  .product-detail__overview,
  .product-detail__specifications {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-detail__image-wrap {
    min-height: 240px;
  }

  .product-detail__image {
    height: 240px;
  }

  .product-detail__meta {
    grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
  }

  .product-detail__specifications {
    gap: 10px;
  }
}

/* 左側藍色區塊 */
.cert-page .cert-side{
  background: var(--primary-blue);
  color: #fff;
  border-radius: 18px;
  padding: 26px;
  min-height: 210px;
  position: relative;
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
}
.cert-page .cert-side__title{
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
}
.cert-page .cert-side__desc{
  position: absolute;
  left: 26px;
  bottom: 22px;
  font-size: 13px;
  opacity: .9;
}
.cert-page .cert-side__arrow{
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 22px;
  height: 22px;
  border-right: 2px solid rgba(255,255,255,.9);
  border-bottom: 2px solid rgba(255,255,255,.9);
  transform: rotate(-45deg);
}

/* 卡片共用 */
.cert-page .cert-card{
  display: block;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(20, 35, 70, .08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(16,24,40,.06);
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 350px;   /* ✅ 卡片整體更高（你可再加到 560） */
}
.cert-page .cert-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(16,24,40,.10);
}

/* 圖片區（一般卡片） */
.cert-page .cert-thumb{
  height: 260px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.cert-page .cert-thumb img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ⭐ 特例卡：圖片高度更短 */
.cert-page .cert-thumb--short{
  height: 220px;    /* ✅ 特例卡也更大（仍比一般略短） */
  padding: 16px;    /* ✅ 同樣不貼邊 */
  background: #fff;
}


/* 文字區 */
.cert-page .cert-body{
  padding: 16px 18px 18px;
}

/* ⭐ 特例卡：文字區更高（用 padding + 行距呈現） */
.cert-page .cert-body--tall{
  padding-top: 18px;
  padding-bottom: 22px;
}

.cert-page .cert-title{
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 8px;
  word-break: break-word; /* 標題兩行也不爆 */
}
.cert-page .cert-text,
.cert-page .cert-desc{
  color: #6c778a;
  font-size: 15px;
  line-height: 1.6;
}
.cert-page .cert-desc{
  margin: 0;
  padding-left: 18px;
}

.cert-page .cert-grid{
  --bs-gutter-y: 0.75rem;
}

/* Certifications：只在桌機寬螢幕才做「左欄右推」，避免 RWD 中段互相擠壓 */
@media (min-width: 1200px){
  .cert-grid .cert-shift{
    transform: translateX(28px);
  }
}

/* 1200px 以下一律不要位移（避免兩欄互撞/重疊） */
@media (max-width: 1199.98px){
  .cert-grid .cert-shift{
    transform: none;
  }
}

/* ===============================
   Certifications – RWD FIX（藍色塊會縮小，避免壓到白卡）
   =============================== */

/* 1200 以下：藍色塊變短、往下壓變少 */
@media (max-width: 1199.98px){
  .banner-badge{
    --badge-h: 320px;
    --badge-pull: 210px;
    left: 16px;
    width: min(92vw, 340px);
    height: 150px;
    top: 135px;
  }

  .cert-page > .container.py-5{
    padding-top: calc(3rem + var(--badge-pull));
  }
}

/* 992 以下（平板直式常見）：再短一點 */
@media (max-width: 991.98px){
  .banner-badge{
    --badge-h: 260px;
    --badge-pull: 150px;
  }

  .cert-page > .container.py-5{
    padding-top: calc(3rem + var(--badge-pull));
  }
}

/* 576 以下（手機）：最短，避免整塊蓋住卡片 */
@media (max-width: 575.98px){
  .banner-badge{
    --badge-h: 190px;
    --badge-pull: 80px;
  }

  .cert-page > .container.py-5{
    padding-top: calc(3rem + var(--badge-pull));
  }

  /* ✅ 手機：再把「卡片區」往下推，避免仍被藍色塊壓到 */
  .cert-grid{ margin-top: 28px; }
}

/* ===============================
   Events Page 
   =============================== */

.events-feature{
  background: #fff;
}

.events-kicker{
  font-weight: 800;
  letter-spacing: .6px;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.events-title{
  font-weight: 800;
  color: var(--primary-blue);
  font-size: 34px;
  line-height: 1.12;
}

.events-desc{
  color: #4b5563;
  line-height: 1.8;
  font-size: 15px;
  max-width: 520px;
}

/* 右側圖：圓角 + 陰影 + 橫式扁一點 */
.events-feature__media{
  /* border-radius: 18px; */
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
  /* border: 1px solid #e8ecf4; */
}

.events-feature__media img{
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

/* 6 cards */
.event-card{
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e8ecf4;
  box-shadow: 0 14px 34px rgba(16,24,40,.06);
  height: 100%;
}

.event-thumb{
  aspect-ratio: 16 / 9;   /* ✅ 橫式比較扁 */
  overflow: hidden;
  background: #fff;
}

.event-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-body{
  padding: 14px 16px 16px;
  text-align: center;
}

.event-title{
  color: var(--primary-blue);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.event-desc2{
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

/* RWD tweaks */
@media (max-width: 991.98px){
  .events-title{
    font-size: 30px;
  }
  .events-feature__media img{
    height: 260px;
  }
}

/* ===============================
   Events – Hero Strip (Blue area + centered white card)
   =============================== */

/* 整頁淺灰背景（凸顯白卡） */
body.events-page{
  background: var(--gray-bg);
}

/* 藍色大底：高度固定，不要被白卡撐高 */
.events-hero-strip{
  background: var(--primary-blue);
  padding: 56px 0 0px;      /* 藍底高度：變矮 */
  position: relative;
  overflow: visible;         /* 允許白卡「破出」 */
}

/* *** NHTSA *** 標題：白色、置中、放大、往下 */
.events-hero-title{
  color: #fff;
  text-align: center;
  font-weight: 500;
  letter-spacing: 2px;
  font-size: 60px;
  margin: 8px 0 8px;           /* 往下（不要用 padding 去撐藍底） */
}

/* 白色主卡：限制寬度，不要滿版；用 transform 往下破出藍底 */
.events-hero-card{
  background: #fff;
  border-radius: 0;          /* 你要「不要圓角」 */
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
  transform: translateY(60px); /* ✅ 破出藍底（不影響藍底高度） */
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

/* 左側文字區塊：白底內縮 */
.events-hero-text{
  padding: 26px 26px 24px;
  height: 100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

/* 左側標題 */
.events-hero-kicker{
  font-weight: 800;
  color: var(--primary-blue);
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 10px;
}

html[lang="zh-Hant-TW"] .events-hero-kicker-secondary{
  display: none;
}

/* 左側小字 */
.events-hero-meta{
  color: #6b7280;
  font-size: 16px;
  line-height: 1.55;
}

/* 右側圖：去白邊的穩定解法 */
.events-hero-card .events-feature__media{
  display:block;
  overflow: hidden;          /* ✅ 關鍵：把溢出的 1~2% 吃掉 */
  line-height: 0;
  background: #fff;
}

.events-hero-card .events-feature__media img{
  display: block;
  height: 100%;
  min-height: 220px;
  object-fit: cover;

  /* ✅ 吃掉右側 1px 白線（子像素縫） */
  width: calc(100% + 2px);
  margin-left: -1px;
}


/* ✅ 6 張卡片區：用 margin-top 讓「整段」往下，避開上面 transform 的白卡 */
.events-cards{
  margin-top: 120px;
  margin-bottom: 100px;
}

/* RWD：跟著縮 */
@media (max-width: 991.98px){
  .events-cards{
    margin-top: 120px;
  }
}

@media (max-width: 575.98px){
  .events-cards{
    margin-top: 110px;
  }
}
/* -----------------
把圖片白邊去掉
----------------- */
.flex-1 {
  flex: 1;
}

/* ===============================
   events頁面動畫加的 Reveal Animations (Events)
   =============================== */
.reveal{
  opacity: 0;
  transform: translateY(34px) scale(.985);  /* ✅ 位移更明顯 + 微縮放更高級 */
  transition: opacity .75s ease, transform .75s ease;
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.reveal.is-in{
  opacity: 1;
  transform: translateY(0) scale(1);
}


/* 左側文字：從左飛進來 */
.reveal-left{
  transform: translateX(-48px);
}

.reveal-left.is-in{
  transform: translateX(0);
}

/* 讓卡片 hover 更精緻（可留可不留） */
.event-card{
  transition: transform .25s ease, box-shadow .25s ease;
}
.event-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(16,24,40,.16);
}

/* read more按鈕的圓角 */
.events-hero-text .btn{
  border-radius: 6px; /* 你要多圓就改數字，例如 999px */
}
