/* ==========================================================================
   法寶實業有限公司 - FAPO ENTERPRISE CO., LTD.
   東方禪韻 · 水墨宣紙與雲霧山水視覺主題 (Xuan Paper & Ink-Wash Zen Theme)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@600;700;900&display=swap');

:root {
  /* 手工熟宣與古絹溫潤底色 */
  --bg-primary: #f6f1e6;
  --bg-secondary: #eee7d7;
  --bg-tertiary: #e4dbc7;
  --bg-card: rgba(253, 250, 243, 0.82);
  --bg-card-hover: rgba(255, 253, 249, 0.96);

  /* 東方傳統色：古銅佛光金 · 朱砂印泥紅 · 青松翠綠 */
  --accent-cyan: #94661f;           /* 溫潤檀金 / 琉璃佛光金 (高對比易讀) */
  --accent-cyan-glow: rgba(180, 130, 45, 0.22);
  --accent-cinnabar: #a62c22;       /* 朱砂印章紅 */
  --accent-cinnabar-glow: rgba(166, 44, 34, 0.25);
  --accent-blue: #3d5a6c;           /* 遠山黛青 */
  --accent-amber: #a85814;          /* 琥珀鎏金 */
  --accent-emerald: #2d6a4f;        /* 禪院青松綠 */

  /* 松煙墨色階 */
  --text-main: #1f1b16;             /* 濃墨黑 */
  --text-dim: #4a4339;              /* 中墨茶褐 */
  --text-muted: #766c5d;            /* 淡墨灰褐 */

  /* 宣紙細框與鎏金邊線 */
  --border-subtle: rgba(92, 75, 48, 0.15);
  --border-highlight: rgba(158, 112, 36, 0.45);
  --border-glow: 0 12px 32px rgba(92, 72, 38, 0.12);

  --glass-blur: blur(12px);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --font-serif: 'Noto Serif TC', 'Songti TC', 'PMingLiU', 'SimSun', serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'PingFang TC', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.7;
  background:
    radial-gradient(circle at 20% 8%, rgba(218, 190, 130, 0.18) 0%, transparent 48%),
    radial-gradient(circle at 82% 22%, rgba(160, 152, 134, 0.15) 0%, transparent 52%),
    linear-gradient(180deg, #faf6ee 0%, #f4eee1 50%, #ede4d2 100%);
}

/* Ink-Wash Mountain Mist & Golden Bodhi Light Canvas */
#latticeCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.98;
}

/* Typography & Layout */
.container {
  width: 90%;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Section Common */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: linear-gradient(180deg, rgba(228, 219, 199, 0.42) 0%, rgba(238, 231, 215, 0.55) 50%, rgba(228, 219, 199, 0.35) 100%);
  border-top: 1px solid rgba(148, 102, 31, 0.1);
  border-bottom: 1px solid rgba(148, 102, 31, 0.1);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 60px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(166, 44, 34, 0.07);
  border: 1px solid rgba(166, 44, 34, 0.32);
  color: var(--accent-cinnabar);
  padding: 5px 16px;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.55rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--text-main);
  margin-bottom: 16px;
  position: relative;
}

.section-desc {
  font-size: 1.08rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* Xuan Paper Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px rgba(60, 48, 28, 0.06);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(180, 130, 45, 0.45), transparent);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: var(--border-glow);
}

.active-tour-section .section-title {
  color: var(--accent-cinnabar);
}

/* ==========================================================================
   Navbar (水墨書卷頂欄 + 朱砂方印)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 100;
  background: rgba(246, 241, 230, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 2px 16px rgba(60, 48, 28, 0.05);
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.navbar .container {
  width: 95%;
  max-width: 1420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-text {
  min-width: 0;
}

/* 法寶實業官方圓形 24K 流金炫亮動態企業標誌 */
.logo-emblem-fx {
  position: relative;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
  filter: drop-shadow(0 0 8px rgba(245, 190, 50, 0.42)) drop-shadow(0 3px 8px rgba(45, 34, 16, 0.18));
  animation: logoAuraPulse 3.6s ease-in-out infinite;
}

.logo-halo-ring {
  position: absolute;
  inset: -2.5px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(245, 190, 50, 0.2) 0deg,
    #fff9c4 72deg,
    #ffd54f 110deg,
    rgba(218, 152, 26, 0.25) 180deg,
    #fff3b0 255deg,
    #f5b82e 295deg,
    rgba(245, 190, 50, 0.2) 360deg
  );
  animation: logoHaloSpin 4.2s linear infinite;
  z-index: 0;
}

.logo-shine-mask {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  z-index: 1;
  background: #14549c;
}

.logo-shine-mask::after {
  content: '';
  position: absolute;
  top: -35%;
  left: -130%;
  width: 85%;
  height: 170%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 15%,
    rgba(255, 248, 200, 0.18) 38%,
    rgba(255, 255, 240, 0.92) 50%,
    rgba(255, 215, 70, 0.45) 62%,
    rgba(255, 255, 255, 0) 85%
  );
  transform: skewX(-22deg);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: logoShineSweep 3.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  display: block;
}

.logo-glint-star {
  position: absolute;
  top: -5px;
  right: -3px;
  font-size: 0.78rem;
  line-height: 1;
  color: #fffbe0;
  text-shadow: 0 0 6px #ffe066, 0 0 12px #f59e0b, 0 0 18px rgba(255, 215, 64, 0.9);
  pointer-events: none;
  z-index: 2;
  animation: logoStarTwinkle 3.4s ease-in-out infinite;
}

.logo-group:hover .logo-emblem-fx {
  transform: scale(1.1) rotate(3deg);
  filter: drop-shadow(0 0 14px rgba(255, 210, 65, 0.85)) drop-shadow(0 4px 12px rgba(45, 34, 16, 0.24));
}

@keyframes logoHaloSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes logoShineSweep {
  0%, 18% { left: -130%; opacity: 0; }
  28% { opacity: 1; }
  62% { left: 155%; opacity: 1; }
  68%, 100% { left: 155%; opacity: 0; }
}

@keyframes logoStarTwinkle {
  0%, 36%, 76%, 100% { transform: scale(0.35) rotate(0deg); opacity: 0.15; }
  52% { transform: scale(1.22) rotate(45deg); opacity: 1; }
  64% { transform: scale(0.8) rotate(90deg); opacity: 0.65; }
}

@keyframes logoAuraPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(245, 190, 50, 0.36)) drop-shadow(0 3px 8px rgba(45, 34, 16, 0.18)); }
  52% { filter: drop-shadow(0 0 13px rgba(255, 212, 72, 0.72)) drop-shadow(0 3px 10px rgba(45, 34, 16, 0.22)); }
}

.logo-text h1 {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--text-main);
}

.logo-text p {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  letter-spacing: 1.4px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 13px;
  list-style: none;
}

.nav-item {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-item:hover, .nav-item.active {
  color: var(--accent-cinnabar);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cinnabar);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

/* Mobile Menu Button & Drawer (Hidden on Desktop) */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(180, 130, 45, 0.12);
  border: 1px solid rgba(148, 102, 31, 0.35);
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(35, 28, 18, 0.38);
  backdrop-filter: blur(4px);
  z-index: 99;
}

.mobile-nav-overlay.open {
  display: block;
}

.mobile-nav-drawer {
  background: rgba(251, 247, 238, 0.98);
  border-bottom: 2px solid var(--border-highlight);
  padding: 18px 16px 20px;
  box-shadow: 0 16px 36px rgba(45, 34, 16, 0.2);
  animation: drawerSlideDown 0.22s ease-out;
}

@keyframes drawerSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 12px;
  background: #fffdf8;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.mobile-nav-link:active,
.mobile-nav-link.active {
  background: rgba(166, 44, 34, 0.09);
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
}

.mobile-nav-admin {
  grid-column: 1 / -1;
  justify-content: center;
  background: linear-gradient(135deg, rgba(43, 84, 126, 0.1), rgba(180, 130, 45, 0.16));
  border: 1.5px solid rgba(158, 112, 36, 0.55);
  color: #4a2f06;
  font-weight: 800;
}
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, #a62c22, #851e16);
  color: #fffaf2;
  box-shadow: 0 6px 18px var(--accent-cinnabar-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #b83328, #94231a);
  box-shadow: 0 8px 24px rgba(166, 44, 34, 0.38);
}

.btn-outline {
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid rgba(120, 96, 58, 0.32);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(180, 130, 45, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-audio {
  background: rgba(180, 130, 45, 0.1);
  border: 1px solid rgba(148, 102, 31, 0.45);
  color: var(--accent-cyan);
  padding: 8px 15px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
}

.btn-audio:hover {
  background: var(--accent-cyan);
  color: #fffaf2;
  box-shadow: 0 4px 16px var(--accent-cyan-glow);
}

.btn-admin-nav {
  background: linear-gradient(135deg, rgba(43, 84, 126, 0.11), rgba(180, 130, 45, 0.15));
  border: 1px solid rgba(158, 112, 36, 0.55);
  color: #4a2f06;
  padding: 8px 15px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
}

.btn-admin-nav:hover {
  background: linear-gradient(135deg, #2b547e, #1f3f61);
  border-color: #2b547e;
  color: #fffaf2;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(43, 84, 126, 0.28);
}

.nav-cta-btn {
  padding: 8px 18px;
  font-size: 0.88rem;
}

/* ==========================================================================
   Multi-Page SPA Views, Breadcrumb Topbar & Portal Directory
   ========================================================================== */
.page-view:not(.active-page) {
  display: none !important;
}

.page-view.active-page {
  animation: pageFadeIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section.page-view {
  padding: 48px 0 56px 0;
}

.subpage-topbar {
  display: none;
  padding-top: 96px;
  padding-bottom: 14px;
  background: linear-gradient(180deg, rgba(238, 230, 214, 0.78) 0%, rgba(246, 241, 230, 0.32) 100%);
  border-bottom: 1px solid rgba(148, 102, 31, 0.18);
  position: relative;
  z-index: 2;
}

.subpage-topbar.visible {
  display: block;
}

.subpage-crumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.subpage-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.crumb-home {
  color: var(--accent-cyan);
  font-weight: 700;
}

.crumb-home:hover {
  color: var(--accent-cinnabar);
}

.crumb-sep {
  opacity: 0.55;
}

.crumb-current {
  color: var(--text-main);
  font-family: var(--font-serif);
  font-weight: 900;
}

.subpage-quick-rfq {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cinnabar);
  background: rgba(166, 44, 34, 0.08);
  border: 1px solid rgba(166, 44, 34, 0.3);
  padding: 5px 13px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.subpage-quick-rfq:hover {
  background: var(--accent-cinnabar);
  color: #fffaf2;
}

.subpage-pill-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.subpage-pill-strip::-webkit-scrollbar {
  display: none;
}

.subpage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.subpage-pill:hover {
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
}

.subpage-pill.active {
  background: linear-gradient(135deg, #a62c22, #851e16);
  border-color: #a62c22;
  color: #fffaf2;
  box-shadow: 0 3px 10px rgba(166, 44, 34, 0.24);
}

/* Home Quick Portal Directory Cards */
.home-portal-directory {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px dashed rgba(148, 102, 31, 0.3);
}

.portal-dir-head {
  text-align: center;
  margin-bottom: 32px;
}

.portal-dir-head h3 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
}

.portal-dir-head p {
  font-size: 0.96rem;
  color: var(--text-dim);
}

.portal-dir-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.portal-dir-card {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.portal-dir-card.portal-card-highlight {
  border-color: rgba(158, 112, 36, 0.52);
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(246, 237, 218, 0.85));
}

.portal-dir-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.portal-dir-body h4 {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
}

.portal-dir-body p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.portal-dir-arrow {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-cinnabar);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Subpage Sequential Bottom Pager */
.subpage-pager-wrap {
  display: none;
  padding: 0 0 64px 0;
  position: relative;
  z-index: 2;
}

.subpage-pager-wrap.visible {
  display: block;
}

.subpage-pager-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
}

.pager-nav-btn {
  padding: 9px 18px;
  border-radius: var(--radius-full);
  background: #fffdf8;
  border: 1px solid rgba(148, 102, 31, 0.38);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.pager-nav-btn:hover {
  background: var(--accent-cinnabar);
  border-color: var(--accent-cinnabar);
  color: #fffaf2;
}

.pager-home-btn {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.pager-home-btn:hover {
  color: var(--accent-cinnabar);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  min-height: 92vh;
  display: block;
  padding-top: 122px;
  padding-bottom: 72px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  background: rgba(180, 130, 45, 0.12);
  border: 1px solid rgba(148, 102, 31, 0.38);
  color: #7c5112;
  border-radius: var(--radius-full);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.3rem;
  font-weight: 900;
  line-height: 1.26;
  letter-spacing: 1px;
  color: var(--text-main);
  margin-bottom: 24px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #9e2a20 0%, #9a681c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 36px;
  max-width: 650px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item h3 {
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 900;
  color: var(--accent-cinnabar);
}

.stat-item p {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero Showcase Card */
.hero-visual {
  position: relative;
}

.hero-preview-card {
  padding: 24px;
  background: rgba(254, 251, 245, 0.9);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 18px 45px rgba(72, 56, 30, 0.12);
  position: relative;
}

.preview-badge-top {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(166, 44, 34, 0.9);
  border: 1px solid #851e16;
  color: #fffaf2;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
  z-index: 2;
}

.hero-preview-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.preview-info h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.preview-info p {
  font-size: 0.92rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.preview-specs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: rgba(228, 219, 199, 0.55);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* ==========================================================================
   About Us Section (關於我們：成立概要、經營理念、九大營業項目、十一大銷售行業)
   ========================================================================== */
.about-block {
  padding: 36px;
  margin-bottom: 28px;
}

.about-split-grid {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 36px;
  align-items: center;
}

.about-split-grid.reverse {
  grid-template-columns: 1.18fr 1fr;
}

.about-photo-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-main-photo {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-highlight);
  box-shadow: 0 12px 32px rgba(60, 48, 28, 0.14);
}

.about-main-photo img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.about-main-photo:hover img {
  transform: scale(1.03);
}

.about-seal-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(166, 44, 34, 0.92);
  color: #fffaf2;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.about-sub-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.about-sub-banner img {
  width: 96px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.about-sub-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.about-sub-caption strong {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--accent-cinnabar);
}

.about-sub-caption span {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.about-subtitle {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.38;
  margin-bottom: 6px;
}

.about-kicker {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 18px;
}

.about-article-box {
  margin-bottom: 16px;
}

.about-article-box h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-cinnabar);
  margin-bottom: 6px;
}

.about-article-box p,
.about-para {
  font-size: 0.93rem;
  color: var(--text-dim);
  line-height: 1.75;
}

.about-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.about-bullet-list li {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.68;
  padding-left: 16px;
  position: relative;
}

.about-bullet-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.65rem;
  color: var(--accent-cyan);
}

.about-bullet-list li strong {
  color: var(--text-main);
}

.about-promise-quote {
  background: linear-gradient(135deg, rgba(180, 130, 45, 0.12), rgba(166, 44, 34, 0.06));
  border-left: 3px solid var(--accent-cinnabar);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.7;
}

.about-divider {
  border: none;
  border-top: 1px dashed var(--border-subtle);
  margin: 20px 0;
}

.vision-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}

.vision-pillar-item {
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.vision-pillar-item h5 {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--accent-cinnabar);
  margin-bottom: 6px;
}

.vision-pillar-item p {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.about-goal-highlight {
  font-weight: 700;
  font-size: 0.92rem;
  color: #6b3c08;
  margin-top: 8px;
}

.about-photo-single {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-highlight);
  background: #fffdf8;
  box-shadow: 0 12px 32px rgba(60, 48, 28, 0.14);
}

.about-photo-single img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.vision-caption-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 16px;
  background: rgba(235, 227, 210, 0.65);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.about-sub-section {
  margin-top: 34px;
}

.about-sub-heading {
  text-align: center;
  margin-bottom: 22px;
}

.about-sub-heading h3 {
  font-family: var(--font-serif);
  font-size: 1.48rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
}

.about-sub-heading p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.business-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scope-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scope-img-wrap {
  width: 100%;
  height: 185px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.scope-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.scope-card:hover .scope-img-wrap img {
  transform: scale(1.05);
}

.scope-info h4 {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--accent-cinnabar);
  margin-bottom: 6px;
}

.scope-info p {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.industry-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
}

.ind-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.ind-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   Network / Locations Section
   ========================================================================== */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .locations-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.location-card {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 18px;
  background: var(--card-bg, rgba(254, 252, 246, 0.96));
  border: 1px solid var(--border-subtle, rgba(200, 180, 160, 0.35));
  box-shadow: 0 10px 26px rgba(45, 34, 16, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.location-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cinnabar);
  box-shadow: 0 16px 36px rgba(184, 51, 42, 0.12);
}

.location-card.active-tour {
  border-color: var(--accent-cinnabar);
  box-shadow: 0 12px 30px var(--accent-cinnabar-glow);
  transform: translateY(-6px);
}

.loc-header {
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(200, 180, 160, 0.25);
  padding-bottom: 12px;
}

.loc-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(166, 44, 34, 0.1);
  color: var(--accent-cinnabar);
  border: 1px solid rgba(166, 44, 34, 0.25);
  margin-bottom: 8px;
}

.loc-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}

.loc-role {
  font-size: 0.88rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.loc-body {
  margin-bottom: 18px;
}

.loc-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.loc-detail .icon {
  color: var(--accent-cinnabar);
  margin-top: 3px;
  flex-shrink: 0;
}

.loc-highlights {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 14px;
  margin-top: 14px;
}

.loc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
}

.loc-actions a,
.loc-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap !important;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.22s ease;
  min-height: 38px;
}

.loc-actions a.btn-primary {
  grid-column: 1 / 2;
  background: linear-gradient(135deg, #8b261d 0%, #b63b2e 100%);
  color: #ffffff !important;
  border: 1px solid rgba(139, 38, 29, 0.4);
  box-shadow: 0 4px 10px rgba(184, 51, 42, 0.2);
}

.loc-actions a.btn-primary:hover {
  background: linear-gradient(135deg, #741f17 0%, #9e3024 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(184, 51, 42, 0.32);
}

.loc-actions a.btn-outline {
  grid-column: 2 / 3;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid rgba(200, 180, 160, 0.6);
}

.loc-actions a.btn-outline:hover {
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
  transform: translateY(-2px);
  background: #fffdfa;
}

.loc-actions button.btn-outline {
  grid-column: 1 / -1;
  background: rgba(245, 240, 230, 0.45);
  color: var(--text-muted);
  border: 1px solid rgba(200, 180, 160, 0.45);
}

.loc-actions button.btn-outline:hover {
  background: #ffffff;
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .loc-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .loc-actions a,
  .loc-actions button {
    padding: 7px 8px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Product Showcase Section
   ========================================================================== */
.product-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 20px;
  background: rgba(255, 252, 245, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-cinnabar);
  color: #fffaf2;
  border-color: var(--accent-cinnabar);
  box-shadow: 0 4px 14px var(--accent-cinnabar-glow);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 30px;
}

.product-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.product-thumb {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.product-card:hover .product-thumb img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(252, 249, 242, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-cinnabar);
  color: var(--accent-cinnabar);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.product-series {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(45, 106, 79, 0.92);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.product-subtitle {
  font-size: 0.86rem;
  color: var(--accent-cyan);
  margin-bottom: 14px;
  font-weight: 600;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  flex: 1;
  line-height: 1.65;
}

.product-specs-list {
  list-style: none;
  background: rgba(235, 227, 210, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 20px;
}

.product-specs-list li {
  font-size: 0.83rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-specs-list li::before {
  content: '◆';
  font-size: 0.65rem;
  color: var(--accent-cyan);
}

.product-actions {
  display: flex;
  gap: 12px;
}

.btn-read-tts {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(180, 130, 45, 0.12);
  border: 1px solid rgba(148, 102, 31, 0.4);
  color: #7c5112;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-read-tts:hover {
  background: var(--accent-cyan);
  color: #fffaf2;
}

.btn-quote-item {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 252, 245, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-quote-item:hover {
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
}

/* ==========================================================================
   Stock Specs Explorer (現貨規格即時查詢系統)
   ========================================================================== */
.specs-explorer-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
}

.specs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: #fffdf8;
  border: 1px solid rgba(120, 96, 58, 0.3);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.search-box .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.category-select select {
  padding: 12px 20px;
  background: #fffdf8;
  border: 1px solid rgba(120, 96, 58, 0.3);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.category-select select:focus {
  border-color: var(--accent-cyan);
}

.specs-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 253, 248, 0.72);
  margin-bottom: 24px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.specs-table th {
  background: rgba(226, 215, 193, 0.65);
  color: #5c3d0e;
  padding: 14px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-highlight);
  white-space: nowrap;
}

.specs-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.specs-table tr:hover td {
  background: rgba(180, 130, 45, 0.08);
  color: var(--text-main);
}

.badge-stock {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(45, 106, 79, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(45, 106, 79, 0.32);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.specs-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.page-controls {
  display: flex;
  gap: 8px;
}

.page-btn {
  padding: 6px 14px;
  background: #fffdf8;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.page-btn:hover:not(:disabled) {
  background: var(--accent-cyan);
  color: #fffaf2;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   Machining Capabilities & Cases
   ========================================================================== */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.capability-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.cap-image {
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--border-subtle);
}

.cap-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.capability-card:hover .cap-image img {
  transform: scale(1.05);
}

.cap-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cap-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}

/* Cases Grid */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.case-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.case-photo-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.case-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.case-card:hover .case-photo-wrap img {
  transform: scale(1.05);
}

.case-photo-wrap .case-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  margin-bottom: 0;
  background: rgba(251, 247, 238, 0.94);
  backdrop-filter: blur(6px);
}

.case-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(166, 44, 34, 0.1);
  border: 1px solid rgba(166, 44, 34, 0.32);
  color: var(--accent-cinnabar);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
  align-self: flex-start;
}

.case-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 10px;
}

.case-client {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.case-box {
  background: rgba(235, 227, 210, 0.5);
  border-left: 3px solid var(--accent-cyan);
  padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
}

.case-box h5 {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
}

.case-box p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ==========================================================================
   Technical Tools Hub (Hardness Converter & Temper Matrix)
   ========================================================================== */
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.calculator-card {
  padding: 32px;
}

.calc-input-group {
  margin-bottom: 24px;
}

.calc-input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-cyan);
}

.calc-input-group input {
  width: 100%;
  padding: 14px 18px;
  background: #fffdf8;
  border: 1px solid rgba(120, 96, 58, 0.32);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 800;
  outline: none;
}

.calc-input-group input:focus {
  border-color: var(--accent-cyan);
}

.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.calc-metric-box {
  background: rgba(235, 227, 210, 0.48);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.metric-value {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent-cinnabar);
}

.temper-card {
  padding: 32px;
}

.temper-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.temper-item {
  background: rgba(235, 227, 210, 0.42);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-fast);
}

.temper-item:hover {
  border-color: var(--border-highlight);
  background: rgba(255, 253, 248, 0.9);
}

.temper-code {
  display: inline-block;
  background: var(--accent-cinnabar);
  color: #fffaf2;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 2px 9px;
  border-radius: 4px;
  margin-right: 8px;
}

.temper-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.temper-desc {
  font-size: 0.86rem;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.65;
}

/* ==========================================================================
   Contact & Quote Form
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.contact-info-card {
  padding: 36px;
}

.info-branch-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.info-branch-item {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.info-branch-item:last-child {
  border-bottom: none;
}

.info-branch-item h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--accent-cinnabar);
  margin-bottom: 6px;
}

.info-branch-item p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.admin-portal-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed rgba(158, 112, 36, 0.35);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.admin-portal-hint {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.btn-admin-portal {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(43, 84, 126, 0.1), rgba(180, 130, 45, 0.16));
  border: 1px solid rgba(158, 112, 36, 0.55);
  color: #4a2f06;
  font-weight: 700;
  font-size: 0.92rem;
}

.btn-admin-portal:hover {
  background: linear-gradient(135deg, #2b547e, #1f3f61);
  border-color: #2b547e;
  color: #fffaf2;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(43, 84, 126, 0.25);
}

.quote-form-card {
  padding: 36px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: #fffdf8;
  border: 1px solid rgba(120, 96, 58, 0.32);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

/* ==========================================================================
   Footer (古樸淡墨茶席頁尾)
   ========================================================================== */
.footer {
  background: #e6ddca;
  border-top: 1px solid rgba(120, 96, 58, 0.25);
  padding: 60px 0 95px 0;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 480px;
  margin-top: 14px;
  line-height: 1.75;
}

.footer-col h5 {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-cinnabar);
}

.footer-col a.footer-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 252, 245, 0.88);
  border: 1px solid rgba(158, 112, 36, 0.52);
  color: #4a2f06;
  font-weight: 700;
  font-size: 0.84rem;
  transition: all var(--transition-fast);
}

.footer-col a.footer-admin-btn:hover {
  background: #2b547e;
  border-color: #2b547e;
  color: #fffaf2;
}

.footer-bottom {
  border-top: 1px solid rgba(120, 96, 58, 0.18);
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-standards-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 14px;
}

.std-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5c472d;
  background: rgba(254, 252, 246, 0.88);
  border: 1px solid rgba(168, 138, 98, 0.38);
  border-radius: 4px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  user-select: none;
}

.std-chip:hover {
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
  background: #ffffff;
  transform: translateY(-1px);
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-standards-strip {
    gap: 6px;
    margin-bottom: 12px;
  }
  .std-chip {
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .footer {
    padding-bottom: 120px !important;
  }
}

/* ==========================================================================
   Floating Audio Tour Player Dock (溫潤玉帛 · 沉香禪韻浮動琴台)
   ========================================================================== */
.audio-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1160px;
  background: rgba(251, 247, 238, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(158, 112, 36, 0.45);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  box-shadow: 0 12px 36px rgba(62, 48, 24, 0.18), 0 0 20px rgba(180, 130, 45, 0.15);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  transition: all var(--transition-smooth);
}

/* Desktop: flatten wrappers onto single sleek bar */
.dock-main-bar,
.dock-quick-actions,
.dock-expandable,
.dock-step-btns {
  display: contents;
}

.btn-dock-more {
  display: none;
}

.dock-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.btn-play-dock {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a62c22, #851e16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fffaf2;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px var(--accent-cinnabar-glow);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-play-dock:hover {
  transform: scale(1.08);
}

.dock-track-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-badge {
  font-size: 0.7rem;
  color: var(--accent-cinnabar);
  font-weight: 700;
  letter-spacing: 1px;
}

.track-title {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

/* Audio Visualizer */
.dock-visualizer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 90px;
  position: relative;
}

#audioWaveCanvas {
  width: 100%;
  max-width: 180px;
  height: 30px;
}

.btn-dock-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(180, 130, 45, 0.12);
  border: 1px solid rgba(148, 102, 31, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 0.88rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.btn-dock-icon:hover {
  background: var(--accent-cyan);
  color: #fffaf2;
}

.btn-zen-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 102, 31, 0.35);
  background: rgba(255, 252, 245, 0.85);
  color: var(--text-dim);
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.btn-zen-pill.active {
  background: linear-gradient(135deg, rgba(180, 130, 45, 0.22), rgba(166, 44, 34, 0.12));
  border-color: #9e6d20;
  color: #6e4508;
  box-shadow: 0 2px 10px rgba(180, 130, 45, 0.22);
}

.btn-zen-pill:hover {
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
}

.btn-bowl-chime {
  border: 1px solid rgba(158, 112, 36, 0.4);
  background: rgba(245, 190, 80, 0.16);
  color: #8a560c;
}

.btn-bowl-chime:hover {
  background: #b07923;
  color: #fffaf2;
  box-shadow: 0 4px 12px rgba(180, 130, 45, 0.35);
}

.dock-chapter-select select, .dock-bgm-select select, .dock-voice-select select, .dock-speed-select select {
  background: #fffdf8;
  border: 1px solid rgba(120, 96, 58, 0.3);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  max-width: 172px;
}

.dock-chapter-select select:focus, .dock-bgm-select select:focus, .dock-voice-select select:focus, .dock-speed-select select:focus {
  border-color: var(--accent-cinnabar);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(253, 249, 240, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cinnabar);
  border-left: 4px solid var(--accent-cinnabar);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(60, 45, 20, 0.16);
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 28, 18, 0.48);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: #fbf7ee;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(45, 34, 16, 0.25);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
}

/* ==========================================================================
   Comprehensive Tablet & Mobile Responsive Optimization
   ========================================================================== */
@media (max-width: 1280px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: inline-flex; }
}

@media (max-width: 992px) {
  html, body { overflow-x: clip; }

  .nav-links { display: none; }
  .mobile-menu-btn { display: inline-flex; }

  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-title { font-size: 2.5rem; }
  .portal-dir-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .about-split-grid,
  .about-split-grid.reverse { grid-template-columns: 1fr; gap: 24px; }
  .business-scope-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Compact Collapsible Mobile Audio Dock */
  .audio-dock {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: 94%;
    max-width: 560px;
    border-radius: 18px;
    padding: 9px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .dock-visualizer { display: none; }

  .dock-main-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .dock-left {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }

  .btn-play-dock {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .track-title {
    max-width: 100%;
    font-size: 0.88rem;
  }

  .dock-quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .btn-dock-more {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: rgba(166, 44, 34, 0.09);
    border: 1px solid rgba(166, 44, 34, 0.3);
    color: var(--accent-cinnabar);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .dock-expandable {
    display: none;
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding-top: 10px;
    margin-top: 9px;
    border-top: 1px dashed var(--border-subtle);
    align-items: center;
  }

  .audio-dock.expanded .dock-expandable {
    display: grid;
  }

  .dock-step-btns {
    display: flex;
    gap: 6px;
  }

  .dock-chapter-select,
  .dock-bgm-select,
  .dock-voice-select,
  .dock-speed-select {
    width: 100%;
  }

  .dock-bgm-select,
  .dock-voice-select,
  .dock-speed-select {
    grid-column: 1 / -1;
  }

  .dock-chapter-select select,
  .dock-bgm-select select,
  .dock-voice-select select,
  .dock-speed-select select {
    width: 100%;
    max-width: none;
    padding: 8px 12px;
    font-size: 0.84rem;
    border-radius: 10px;
  }
}

@media (max-width: 768px) {
  .container { width: 92%; }

  /* Crisp Mobile Navbar (Large-Font Android Safe, Never Clips or Wraps Vertically) */
  .navbar { height: auto; min-height: 58px; padding: 8px 0; }
  .mobile-nav-overlay { top: 58px; }
  .logo-group { gap: 8px; flex: 1; min-width: 0; }
  .logo-emblem-fx { width: 38px; height: 38px; }
  .logo-glint-star { font-size: 0.64rem; top: -4px; right: -2px; }
  .logo-text h1 {
    font-size: clamp(0.92rem, 4.2vw, 1.05rem);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .navbar .logo-text p { display: none; }
  .nav-share-desktop,
  .nav-admin-desktop { display: none; }
  .nav-actions { gap: 6px; flex-shrink: 0; }
  .nav-cta-btn { padding: 6px 12px; font-size: 0.8rem; }
  .mobile-menu-btn { width: 36px; height: 36px; flex-shrink: 0; }

  /* Balanced Mobile Sections & Typography (Fits 11 CJK chars on 1 line even w/ 130% system font) */
  .section { padding: 52px 0; }
  .section.page-view { padding: 28px 0 36px 0; }
  .subpage-topbar { padding-top: 68px; padding-bottom: 10px; }
  .subpage-crumb-row { margin-bottom: 9px; gap: 8px; }
  .subpage-crumbs { font-size: 0.78rem; }
  .subpage-quick-rfq { display: none; }
  .subpage-pill { padding: 5px 12px; font-size: 0.78rem; }
  .home-portal-directory { margin-top: 38px; padding-top: 32px; }
  .portal-dir-head { margin-bottom: 20px; }
  .portal-dir-head h3 { font-size: 1.32rem; }
  .portal-dir-grid { grid-template-columns: 1fr; gap: 12px; }
  .portal-dir-card { padding: 16px; gap: 8px; }
  .subpage-pager-wrap { padding: 0 0 40px 0; }
  .subpage-pager-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 14px 16px;
    gap: 10px;
  }
  .pager-nav-btn { text-align: center; }
  .section-header { margin-bottom: 28px; }
  .section-tag { font-size: 0.74rem; padding: 4px 12px; letter-spacing: 1px; margin-bottom: 10px; }
  .section-title {
    font-size: clamp(1.28rem, 5.8vw, 1.62rem);
    line-height: 1.35;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    text-wrap: balance;
  }
  .section-desc { font-size: 0.92rem; line-height: 1.68; }

  /* Mobile Hero */
  .hero-section {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 44px;
  }
  .hero-badge {
    font-size: clamp(0.68rem, 3.1vw, 0.78rem);
    padding: 5px 12px;
    margin-bottom: 16px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero-title {
    font-size: clamp(1.3rem, 6.3vw, 1.68rem);
    line-height: 1.35;
    letter-spacing: 0;
    margin-bottom: 16px;
  }
  .hero-lead {
    font-size: 0.96rem;
    line-height: 1.72;
    margin-bottom: 24px;
  }
  .hero-actions {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 0.94rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 20px;
  }
  .stat-item {
    background: rgba(255, 253, 248, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px;
  }
  .stat-item h3 { font-size: 1.6rem; }
  .stat-item p { font-size: 0.8rem; }

  .hero-preview-card { padding: 16px; }
  .hero-preview-card img { height: 195px; margin-bottom: 14px; }
  .preview-info h4 { font-size: 1.12rem; }

  /* Swipeable Horizontal Filter Pill Strip */
  .product-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .product-filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 7px 16px;
    font-size: 0.85rem;
  }

  /* Single-Column Grids without Overflow */
  .locations-grid,
  .products-grid,
  .capabilities-grid,
  .cases-grid,
  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Comfortable Mobile Card Paddings */
  .about-block,
  .location-card,
  .product-card,
  .capability-card,
  .case-card,
  .calculator-card,
  .temper-card,
  .contact-info-card,
  .quote-form-card {
    padding: 20px 16px;
  }

  /* About Us Mobile Layout */
  .about-split-grid,
  .about-split-grid.reverse {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .about-main-photo img,
  .about-photo-single img {
    height: 205px;
  }
  .about-subtitle {
    font-size: 1.24rem;
  }
  .vision-pillars {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .about-sub-heading h3 {
    font-size: 1.28rem;
  }
  .business-scope-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .scope-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 14px;
    gap: 12px;
  }
  .scope-img-wrap {
    width: 84px;
    height: 84px;
    border-radius: 8px;
  }
  .scope-info {
    min-width: 0;
    flex: 1;
  }
  .scope-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
  }
  .scope-info p {
    font-size: 0.83rem;
    line-height: 1.58;
  }
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .industry-pill {
    padding: 11px 12px;
    gap: 8px;
  }
  .industry-pill:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .ind-icon { font-size: 1.15rem; }
  .ind-name { font-size: 0.84rem; }

  .product-thumb { height: 190px; margin-bottom: 14px; }
  .case-photo-wrap { height: 180px; }
  .case-title { font-size: 1.25rem; }
  .calc-results-grid { gap: 10px; }
  .metric-value { font-size: 1.2rem; }

  /* Specs Explorer Mobile Toolbar */
  .specs-explorer-card { padding: 18px 14px; }
  .specs-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }
  .search-box { min-width: 0; width: 100%; }
  .search-box input { font-size: 16px; padding: 11px 14px 11px 38px; }
  .category-select, .category-select select { width: 100%; font-size: 16px; }

  /* Prevent iOS Safari auto-zoom on form focus */
  .form-group input,
  .form-group textarea,
  .form-group select,
  .dock-chapter-select select,
  .dock-voice-select select,
  .dock-speed-select select {
    font-size: 16px;
  }

  /* Toast & Modal Mobile Fit */
  .toast-container {
    top: 72px;
    left: 14px;
    right: 14px;
  }
  .toast { width: 100%; font-size: 0.85rem; padding: 11px 14px; }
  .modal-content { padding: 22px 18px; }
  .footer { padding: 44px 0 105px 0; }
}

/* Mobile Inventory Spec Cards (No Sideways Table Scrolling on Phones!) */
@media (max-width: 680px) {
  .zen-label-txt { display: none; }
  .audio-dock { padding: 7px 11px; border-radius: 16px; }
  .btn-play-dock { width: 36px; height: 36px; font-size: 0.92rem; }
  .btn-dock-icon { width: 32px; height: 32px; font-size: 0.82rem; }
  .btn-zen-pill { padding: 6px 9px; }
  .btn-dock-more { padding: 6px 9px; font-size: 0.74rem; }
  .specs-table-container {
    background: transparent;
    border: none;
    overflow-x: visible;
  }
  .specs-table thead {
    display: none;
  }
  .specs-table,
  .specs-table tbody {
    display: block;
    width: 100%;
  }
  .specs-table tr.spec-row-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    background: #fffdf8;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 13px 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(60, 48, 28, 0.04);
  }
  .specs-table tr.spec-row-item td {
    padding: 2px 0;
    border: none;
    font-size: 0.85rem;
  }
  .specs-table tr.spec-row-item td[data-label]::before {
    content: attr(data-label) "：";
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 500;
  }
  .specs-table tr.spec-row-item td[data-label="類別"] {
    text-align: right;
  }
  .specs-table tr.spec-row-item td[data-label="類別"]::before {
    content: "";
  }
  .specs-table tr.spec-row-item td.spec-action-cell {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed var(--border-subtle);
  }
  .specs-table tr.spec-row-item td.spec-action-cell::before {
    content: "";
  }
  .specs-pagination {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .logo-text p { display: none; }
  .zen-label-txt { display: none; }
  .mobile-nav-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Official Sample Atlases, Extrusion Cross-Section Strip & Image Lightbox
   ========================================================================== */
.zoomable-img {
  cursor: zoom-in;
}

.product-thumb.thumb-contain {
  background: #fffdf8;
  padding: 8px;
}

.product-thumb.thumb-contain img {
  object-fit: contain;
}

.showcase-subpanel {
  margin-top: 36px;
  padding: 28px 26px;
}

.showcase-subhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-subtle);
}

.showcase-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cinnabar);
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.showcase-subhead h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
}

.showcase-subhead p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Mirror & Embossed Aluminum Sample Atlas (附圖一 ~ 附圖七) */
.sample-atlas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}

.sample-atlas-card {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sample-atlas-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-amber);
  box-shadow: 0 10px 24px rgba(72, 56, 30, 0.12);
}

.sample-atlas-img {
  position: relative;
  height: 148px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.sample-atlas-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.sample-atlas-card:hover .sample-atlas-img img {
  transform: scale(1.06);
}

.sample-fig-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(166, 44, 34, 0.92);
  color: #fffaf2;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.sample-atlas-info {
  padding: 12px 14px;
}

.sample-atlas-info h4 {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.sample-spec {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 5px;
}

.sample-atlas-info p {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* 7 Extrusion Mold Cross-Section Diagrams */
.extrusion-diagram-strip {
  padding: 20px 22px;
  margin-bottom: 22px;
}

.diagram-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 14px;
}

.diagram-strip-head strong {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-main);
}

.diagram-strip-head span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.extrusion-diagram-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.diagram-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fffdf9;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.diagram-item-btn:hover {
  border-color: var(--accent-cinnabar);
  box-shadow: 0 6px 16px rgba(166, 44, 34, 0.1);
  transform: translateY(-2px);
}

.diagram-img-box {
  position: relative;
  width: 100%;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
}

.diagram-zoom-chip {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(246, 241, 230, 0.92);
  border: 1px solid var(--border-subtle);
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  transition: transform 0.18s ease, background 0.18s ease;
}

.diagram-zoom-chip:hover {
  transform: scale(1.12);
  background: #fff;
}

.specs-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-subtle);
}

.specs-group-tabs .filter-btn {
  padding: 7px 16px;
  font-size: 0.85rem;
}

.diagram-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.diagram-name {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.diagram-dim {
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* CNC Machining Real Parts Gallery (pro_1 ~ pro_16) */
.machining-group-block + .machining-group-block {
  margin-top: 24px;
}

.machining-group-title {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--accent-cinnabar);
  margin-bottom: 12px;
}

.machining-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.machining-part-card {
  background: #fffdf8;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.machining-part-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 20px rgba(45, 106, 79, 0.12);
}

.machining-part-card img {
  width: 100%;
  height: 138px;
  object-fit: cover;
  display: block;
}

.machining-part-card span {
  display: block;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

/* Fullscreen Lightbox Modal */
.lightbox-modal-box {
  max-width: min(92vw, 860px);
  padding: 20px;
  text-align: center;
}

.lightbox-modal-box img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fffdf9;
  border: 1px solid var(--border-subtle);
}

.lightbox-caption {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 960px) {
  .extrusion-diagram-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .showcase-subpanel {
    padding: 18px 14px;
    margin-top: 24px;
  }
  .sample-atlas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .sample-atlas-img {
    height: 120px;
  }
  .extrusion-diagram-strip {
    padding: 14px 12px;
  }
  .extrusion-diagram-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .diagram-item-btn:last-child {
    grid-column: 1 / -1;
  }
  .machining-parts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .machining-part-card img {
    height: 120px;
  }
}

/* ==========================================================================
   Aluminum Engineering Knowledge Base & Tolerance Matrix (Peer-Enhanced)
   ========================================================================== */

.tech-tabs {
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-block {
  margin-bottom: 32px;
  padding: 28px;
  border-radius: 14px;
}

.tech-subhead {
  margin-bottom: 22px;
}

.tech-subhead h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent-cinnabar);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-subhead p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* 15 Characteristics Grid */
.chars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.char-card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.char-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
}

.char-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.char-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-bright);
}

.char-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(200, 160, 90, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(200, 160, 90, 0.3);
}

.char-desc {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.65;
  flex-grow: 1;
}

/* 1000~7000 Series Cards */
.series-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.series-card {
  padding: 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.series-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
}

.series-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.series-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--accent-cinnabar);
}

.series-system {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.series-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.series-badge.heat-yes {
  background: rgba(220, 80, 50, 0.15);
  color: #ff7755;
  border: 1px solid rgba(220, 80, 50, 0.3);
}

.series-badge.heat-no {
  background: rgba(80, 180, 240, 0.15);
  color: #66ccff;
  border: 1px solid rgba(80, 180, 240, 0.3);
}

.series-typical {
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--text-bright);
}

.series-typical strong {
  color: var(--accent-gold);
}

.series-features {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 10px;
}

.series-apps {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
}

/* Chemical & Mechanical Table */
.chem-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 14px;
}

.chem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: center;
  white-space: nowrap;
}

.chem-table th {
  background: rgba(226, 215, 193, 0.7);
  color: #5c3d0e;
  font-weight: 700;
  padding: 12px 10px;
  border: 1px solid rgba(180, 160, 120, 0.35);
  font-family: var(--font-sans);
  letter-spacing: 0.3px;
}

.chem-table td {
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  background: #ffffff;
}

.chem-table tr:hover td {
  background: rgba(180, 130, 45, 0.08);
  color: var(--text-primary);
}

.chem-table .td-alloy {
  font-weight: 800;
  color: var(--accent-cinnabar);
  text-align: left;
}

.chem-table .td-hl {
  font-weight: 700;
  color: #0284c7;
}

.chem-table .rating-good {
  color: #15803d;
  font-weight: 700;
}

/* International Standards Cross-Reference */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.standard-card {
  padding: 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.standard-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.standard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.standard-code {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--accent-cinnabar);
}

.standard-country {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(200, 160, 90, 0.15);
  color: var(--accent-gold);
}

.standard-full {
  font-size: 0.84rem;
  color: var(--text-bright);
  margin-bottom: 6px;
  line-height: 1.4;
}

.standard-ex {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Machining Tolerance Matrix */
.tolerance-matrix-block {
  margin-top: 36px;
  padding: 28px;
  border-radius: 14px;
}

.tolerance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.tolerance-card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.tolerance-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}

.tolerance-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-cinnabar);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.tolerance-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
}

.spec-label {
  color: var(--text-muted);
}

.spec-val {
  font-weight: 700;
  color: var(--accent-gold);
}

.spec-val.hl {
  color: #66ccff;
}

.tolerance-desc {
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-top: auto;
}

@media (max-width: 1024px) {
  .chars-grid { grid-template-columns: repeat(2, 1fr); }
  .standards-grid { grid-template-columns: repeat(2, 1fr); }
  .tolerance-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .chars-grid { grid-template-columns: 1fr; }
  .series-grid { grid-template-columns: 1fr; }
  .standards-grid { grid-template-columns: 1fr; }
  .tolerance-grid { grid-template-columns: 1fr; }
  .tech-block { padding: 18px; }
  .tolerance-matrix-block { padding: 18px; }
}

/* ==========================================================================
   FAPO AI Customer Service & Google OR-Tools CP-SAT Widget
   ========================================================================== */

.ai-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(182, 59, 46, 0.45);
  background: linear-gradient(135deg, #8b261d 0%, #b63b2e 55%, #c88a32 100%);
  color: #fffdf9;
  box-shadow: 0 10px 28px rgba(139, 38, 29, 0.35), 0 0 0 3px rgba(255, 253, 248, 0.7);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
}

.ai-chat-launcher:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 34px rgba(139, 38, 29, 0.48), 0 0 0 4px rgba(255, 253, 248, 0.9);
}

.ai-launcher-icon {
  font-size: 1.45rem;
  line-height: 1;
}

.ai-launcher-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.ai-launcher-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ai-launcher-text small {
  font-size: 0.7rem;
  opacity: 0.92;
  color: #ffefc2;
}

.ai-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.3);
}

.ai-chat-widget {
  position: fixed !important;
  right: 24px !important;
  left: auto !important;
  bottom: 148px !important;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 590px;
  max-height: calc(100vh - 180px);
  z-index: 9999 !important;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(184, 51, 42, 0.4);
  background: rgba(254, 252, 246, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(45, 34, 16, 0.32), 0 2px 8px rgba(201, 155, 59, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s;
}

.ai-chat-widget.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #7c221a 0%, #a83327 65%, #b87b28 100%);
  color: #fffdf9;
}

.ai-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-avatar {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.16);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-header-title h4 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.ai-header-title p {
  font-size: 0.72rem;
  margin: 2px 0 0 0;
  color: rgba(255, 245, 225, 0.9);
}

.ai-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ai-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #efe8d8;
  padding: 5px;
  gap: 5px;
  border-bottom: 1px solid var(--border-subtle);
}

.ai-mode-btn {
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-mode-btn.active {
  background: #fffdf9;
  color: var(--accent-cinnabar);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ai-panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 92%;
}

.ai-msg-bot {
  align-self: flex-start;
}

.ai-msg-user {
  align-self: flex-end;
}

.ai-msg-bubble {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.58;
  word-break: break-word;
}

.ai-msg-bot .ai-msg-bubble {
  background: #f3ede0;
  color: var(--text-main);
  border: 1px solid rgba(180, 160, 120, 0.3);
  border-top-left-radius: 4px;
}

.ai-msg-user .ai-msg-bubble {
  background: var(--accent-cinnabar);
  color: #fffdf9;
  border-top-right-radius: 4px;
}

.ai-spec-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.ai-spec-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fffdf9;
  border: 1px solid rgba(180, 160, 120, 0.4);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.ai-spec-mini-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-spec-mini-info strong {
  color: var(--accent-cinnabar);
}

.ai-spec-mini-btn {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--accent-cinnabar);
  background: rgba(182, 59, 46, 0.08);
  color: var(--accent-cinnabar);
  font-weight: 700;
  font-size: 0.74rem;
  cursor: pointer;
  white-space: nowrap;
}

.ai-spec-mini-btn:hover {
  background: var(--accent-cinnabar);
  color: #fff;
}

.ai-quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 12px;
  border-top: 1px solid rgba(180, 160, 120, 0.22);
  background: #f8f3e8;
}

.ai-quick-chips button {
  border: 1px solid rgba(180, 160, 120, 0.45);
  background: #fffdf9;
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.ai-quick-chips button:hover {
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
}

.ai-chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fffdf9;
  border-top: 1px solid var(--border-subtle);
}

.ai-chat-input-bar input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(180, 160, 120, 0.5);
  background: #fdfaf3;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

.ai-chat-input-bar input:focus {
  border-color: var(--accent-cinnabar);
}

.ai-chat-input-bar button {
  padding: 8px 16px;
  font-size: 0.84rem;
}

/* CP-SAT Interactive Panel */
.cpsat-form-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.cpsat-intro-banner {
  background: rgba(182, 59, 46, 0.08);
  border: 1px solid rgba(182, 59, 46, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cpsat-intro-banner strong {
  font-size: 0.84rem;
  color: var(--accent-cinnabar);
}

.cpsat-intro-banner span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.cpsat-config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.cpsat-field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.cpsat-field input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(180, 160, 120, 0.5);
  background: #fffdf9;
  color: var(--text-main);
  font-weight: 700;
}

.cpsat-demands-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.cpsat-add-btn {
  border: 1px solid var(--accent-cinnabar);
  background: transparent;
  color: var(--accent-cinnabar);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.cpsat-demand-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cpsat-demand-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cpsat-demand-row input {
  flex: 1;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid rgba(180, 160, 120, 0.5);
  background: #fffdf9;
  font-size: 0.82rem;
}

.cpsat-del-btn {
  border: none;
  background: rgba(220, 60, 50, 0.12);
  color: #b91c1c;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
}

.cpsat-result-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #f4eee1;
  border: 1px solid rgba(180, 160, 120, 0.4);
  font-size: 0.8rem;
}

.cpsat-bar-visual {
  display: flex;
  height: 20px;
  border-radius: 5px;
  overflow: hidden;
  background: #e2d9c5;
  margin: 5px 0 10px 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.cpsat-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-cinnabar);
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  overflow: hidden;
}

.cpsat-seg-rem {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  color: var(--text-dim);
  background: rgba(180, 160, 120, 0.25);
}

@media (max-width: 768px) {
  .ai-chat-launcher {
    right: 14px !important;
    bottom: 78px !important;
    padding: 8px 14px;
  }
  .ai-chat-widget {
    right: 10px !important;
    left: auto !important;
    bottom: 135px !important;
    width: calc(100vw - 20px) !important;
    height: 72vh !important;
  }
}


/* Engineering Drawing Dropzone */
.drawing-dropzone {
  border: 2px dashed rgba(168, 51, 39, 0.4);
  background: rgba(255, 253, 249, 0.8);
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.25s ease;
  cursor: pointer;
}
.drawing-dropzone:hover, .drawing-dropzone.dragover {
  border-color: var(--accent-cinnabar);
  background: rgba(182, 59, 46, 0.06);
}
.dropzone-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dropzone-icon {
  font-size: 1.8rem;
  background: rgba(182, 59, 46, 0.1);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.dropzone-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dropzone-text strong {
  font-size: 0.88rem;
  color: var(--text-main);
}
.dropzone-text span {
  font-size: 0.76rem;
  color: var(--text-dim);
}
.file-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
}
.file-badge .file-name {
  font-weight: 700;
  color: #1e3a8a;
  word-break: break-all;
  flex: 1;
}
.file-badge .file-size {
  color: #64748b;
  font-size: 0.76rem;
  font-family: monospace;
}
.file-badge .file-remove-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG Cutting Layout Styles */
.cpsat-svg-wrap {
  width: 100%;
  margin: 6px 0 12px 0;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(180, 160, 120, 0.45);
  padding: 8px 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.cpsat-svg-bar {
  width: 100%;
  height: 44px;
  display: block;
}


/* AI Voice Recognition & Bubble Speech Controls */
.ai-voice-input-btn {
  border: none;
  background: transparent;
  font-size: 1.15rem;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-voice-input-btn:hover {
  background: rgba(168, 51, 39, 0.12);
}
.ai-voice-input-btn.listening {
  background: #ef4444 !important;
  color: #ffffff;
  border-radius: 50%;
  animation: pulse-mic 1.2s infinite;
}
@keyframes pulse-mic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.ai-bubble-audio-btn {
  border: 1px solid rgba(180, 160, 120, 0.35);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  cursor: pointer;
  margin-top: 8px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.ai-bubble-audio-btn:hover {
  background: #a83327;
  color: #ffffff;
  border-color: #a83327;
}

/* ==========================================================================
   精美動態風格 (Dynamic Aesthetics, Micro-Interactions & Motion Design)
   ========================================================================== */

/* 1. Dynamic Top Reading & Scroll Progress Indicator */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3.5px;
  background: linear-gradient(90deg, #c99b3b 0%, #b8332a 50%, #f59e0b 100%);
  box-shadow: 0 0 12px rgba(201, 155, 59, 0.75), 0 0 4px rgba(184, 51, 42, 0.55);
  z-index: 10001;
  pointer-events: none;
  transition: width 0.1s cubic-bezier(0.1, 0.8, 0.25, 1);
}

/* 2. Scroll-Reveal Viewport Entrance Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger reveal delays for child grids */
.reveal-stagger > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.34s; }

/* 3. Metallic Light Shimmer Sweep (金屬質感高光掠影) */
.glass-card:not(.ai-chat-widget):not(.modal-content):not(.modal-overlay),
.product-card,
.hero-preview-card,
.case-card,
.network-card {
  position: relative;
  overflow: hidden;
}

.glass-card::after,
.product-card::after,
.hero-preview-card::after,
.case-card::after,
.network-card::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -70%;
  width: 50%;
  height: 220%;
  background: linear-gradient(
    70deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(201, 155, 59, 0.24) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(26deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.glass-card:hover::after,
.product-card:hover::after,
.hero-preview-card:hover::after,
.case-card:hover::after,
.network-card:hover::after {
  opacity: 1;
  animation: metallicLightSweep 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes metallicLightSweep {
  0% {
    left: -70%;
  }
  100% {
    left: 155%;
  }
}

/* 4. Animated Equalizer Wave Bars (互動語音音頻波形) */
.audio-equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 15px;
  vertical-align: middle;
  margin-left: 6px;
  padding-bottom: 1px;
}

.audio-equalizer-bars span {
  display: block;
  width: 3px;
  background: currentColor;
  border-radius: 2px;
  height: 4px;
  min-height: 3px;
  transition: height 0.15s ease, background-color 0.2s ease;
}

.audio-equalizer-bars.playing span {
  animation: audioEqBounce 1s ease-in-out infinite alternate;
}

.audio-equalizer-bars.playing span:nth-child(1) {
  animation-duration: 0.72s;
  animation-delay: 0.08s;
}

.audio-equalizer-bars.playing span:nth-child(2) {
  animation-duration: 1.05s;
  animation-delay: 0.24s;
}

.audio-equalizer-bars.playing span:nth-child(3) {
  animation-duration: 0.65s;
  animation-delay: 0.12s;
}

.audio-equalizer-bars.playing span:nth-child(4) {
  animation-duration: 0.88s;
  animation-delay: 0.32s;
}

@keyframes audioEqBounce {
  0% {
    height: 3px;
    opacity: 0.65;
  }
  50% {
    height: 14px;
    opacity: 1;
  }
  100% {
    height: 6px;
    opacity: 0.85;
  }
}

/* 5. Material Wave Ripple on Interactive Buttons */
.btn,
.btn-primary,
.btn-outline,
.btn-read-tts,
.chip,
.subpage-pill {
  position: relative;
  overflow: hidden;
}

.btn-ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  transform: scale(0);
  animation: rippleSpreadOut 0.65s cubic-bezier(0.12, 0.8, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes rippleSpreadOut {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 6. Floating Back-to-Top Button with Scroll Progress Dial */
.back-to-top-btn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(254, 252, 246, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cinnabar);
  box-shadow: 0 6px 20px rgba(45, 34, 16, 0.14), 0 2px 6px rgba(201, 155, 59, 0.12);
  cursor: pointer;
  z-index: 890;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.85);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s,
              background-color 0.2s,
              box-shadow 0.2s;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: #ffffff;
  color: var(--accent-cinnabar);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 28px rgba(184, 51, 42, 0.26), 0 0 14px rgba(201, 155, 59, 0.35);
}

.back-to-top-btn .progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
  pointer-events: none;
}

.back-to-top-btn .progress-ring-bg {
  stroke: rgba(201, 155, 59, 0.16);
}

.back-to-top-btn .progress-ring-fill {
  stroke: var(--accent-cinnabar);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

.back-to-top-btn .back-to-top-arrow {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top-btn:hover .back-to-top-arrow {
  transform: translateY(-3.5px);
}

/* 7. Subtle 3D Depth Card Perspective for Industrial High-Tech feel */
.hero-preview-card,
.product-card,
.calc-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Reduced motion preference fallback */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scroll-progress-bar {
    display: none;
  }
  .audio-equalizer-bars.playing span {
    animation: none;
  }
}

/* ==========================================================================
   Industry Benchmark: Alloy Matrix & Technical Standards Display
   ========================================================================== */
.alloy-matrix-wrapper {
  margin: 32px 0 44px;
  padding: 28px 32px;
  border-radius: 18px;
  background: var(--card-bg, rgba(255, 255, 255, 0.9));
  border: 1px solid var(--border-color, rgba(184, 51, 42, 0.15));
  box-shadow: 0 10px 30px rgba(45, 34, 16, 0.05);
}

.alloy-matrix-header {
  margin-bottom: 24px;
}

.alloy-matrix-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cinnabar);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.alloy-matrix-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.alloy-matrix-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.alloy-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.alloy-series-card {
  background: rgba(254, 252, 246, 0.9);
  border: 1px solid rgba(200, 180, 160, 0.35);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.alloy-series-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cinnabar);
  box-shadow: 0 12px 24px rgba(184, 51, 42, 0.12);
}

.alloy-series-card.featured::before {
  content: "HOT";
  position: absolute;
  top: 10px;
  right: -24px;
  background: var(--accent-cinnabar);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 26px;
  transform: rotate(45deg);
}

.series-card-top {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.series-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent-cinnabar);
  line-height: 1.2;
}

.series-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.series-ratings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  font-size: 0.85rem;
}

.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
}

.rating-row .stars {
  color: #eab308;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.series-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 14px;
  flex-grow: 1;
}

.series-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8rem;
  padding-top: 12px;
  border-top: 1px dashed rgba(200, 180, 160, 0.4);
  margin-top: auto;
}

.badge-stock {
  font-weight: 600;
  color: var(--text-primary);
}

.btn-matrix-action {
  font-weight: 700;
  color: var(--accent-cinnabar);
}

.series-footer .badge-stock {
  display: block;
  width: 100%;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.04);
  color: #1e293b;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  box-sizing: border-box;
  text-align: left;
}

.series-footer .btn-matrix-action {
  align-self: flex-end;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-cinnabar);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s ease, color 0.2s ease;
  letter-spacing: 0.2px;
}

.alloy-series-card:hover .series-footer .btn-matrix-action {
  transform: translateX(4px);
  color: #991b1b;
}

/* ==========================================================================
   WCAG 2.1 AA / 台灣無障礙網頁檢測規範 (Accessibility Compliance)
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -120px;
  left: 20px;
  background: #8b261d;
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  z-index: 999999;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 20px;
  outline: 3px solid #f59e0b !important;
}

/* Clear visible keyboard focus indicator */
:focus-visible {
  outline: 3px solid rgba(184, 51, 42, 0.9) !important;
  outline-offset: 2px !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b8332a !important;
  outline-offset: 2px !important;
}

/* Screen reader only utility class */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Reduced motion preference fallback */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Multi-Language (i18n) Selector Styles
   ========================================================================== */
.lang-selector-wrap {
  position: relative;
  display: inline-block;
}

.lang-current-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: rgba(254, 252, 246, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.lang-current-btn:hover {
  border-color: var(--accent-cinnabar);
  color: var(--accent-cinnabar);
  background: #ffffff;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 130px;
  background: rgba(255, 253, 249, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(184, 51, 42, 0.35);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(45, 34, 16, 0.18);
  list-style: none;
  padding: 6px;
  margin: 0;
  display: none;
  z-index: 10000;
}

.lang-selector-wrap.open .lang-dropdown-menu {
  display: block;
  animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-opt {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.lang-opt:hover {
  background: rgba(184, 51, 42, 0.08);
  color: var(--accent-cinnabar);
}

.lang-opt.active {
  background: var(--accent-cinnabar);
  color: #ffffff;
  font-weight: 700;
}

/* Mobile Language Strip */
.mobile-lang-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 14px;
  background: rgba(235, 227, 210, 0.45);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.mobile-lang-btn {
  padding: 7px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  border-radius: 6px;
  border: 1px solid rgba(200, 180, 160, 0.4);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
}

.mobile-lang-btn.active {
  background: var(--accent-cinnabar);
  border-color: var(--accent-cinnabar);
  color: #ffffff;
}



/* ==========================================================================
   現貨斷面圖鑑 · 視覺化快速選料專區 (Visual Profile Catalog & Selector)
   ========================================================================== */
.visual-finder-section {
  margin: 45px 0 35px 0;
  padding: 36px 32px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05);
  position: relative;
}

.vf-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #f8fafc;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.vf-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin: 12px 0 6px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.vf-subtitle {
  font-size: 0.96rem;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.visual-shape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 26px;
}

.visual-shape-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.visual-shape-card:hover {
  transform: translateY(-4px);
  border-color: #94a3b8;
  box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.08);
}

.vs-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
}

.vs-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.visual-shape-card:hover .vs-img-wrap img {
  transform: scale(1.05);
}

.vs-badge-shape {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.vs-zoom-tip {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #f1f5f9;
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vs-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vs-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.vs-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.vs-spec-tag {
  font-size: 0.74rem;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.vs-features {
  list-style: none;
  padding: 0;
  margin: 14px 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vs-features li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0;
}

.vf-prop-label {
  flex-shrink: 0;
  width: auto;
  min-width: 74px;
  color: #64748b;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
  display: inline-flex;
}

.spec-cat-chip {
  transition: all 0.2s ease;
}
.spec-cat-chip:hover {
  border-color: var(--accent-cinnabar, #b8332a) !important;
  color: var(--accent-cinnabar, #b8332a) !important;
  background: rgba(184, 51, 42, 0.08) !important;
}
.spec-cat-chip.active {
  background: var(--accent-cinnabar, #b8332a) !important;
  color: #ffffff !important;
  border-color: var(--accent-cinnabar, #b8332a) !important;
}

.vf-prop-label::after {
  content: "：";
  margin-left: 1px;
  margin-right: 2px;
}

[lang="en"] .vf-prop-label::after,
body.lang-en .vf-prop-label::after {
  content: ":";
}

.vf-prop-val {
  flex: 1;
  color: #1e293b;
  font-size: 0.86rem;
  word-break: break-word;
}

.vf-prop-val b {
  color: #0f172a;
  font-weight: 700;
}

.vs-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.btn-vs-pick {
  flex: 1.4;
  background: var(--accent-cinnabar, #b8332a);
  color: #ffffff;
  border: 1px solid #9f2a22;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(184, 51, 42, 0.22);
}

.btn-vs-pick:hover {
  background: #991b1b;
  border-color: #831818;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(184, 51, 42, 0.35);
}

.btn-vs-pick.is-in-cart {
  background: #15803d;
  border-color: #166534;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
}

.btn-vs-pick.is-in-cart:hover {
  background: #166534;
  border-color: #14532d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(21, 128, 61, 0.35);
}

.btn-vs-zoom {
  flex: 1;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-vs-zoom:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* 規格快捷帶入列 */
.chip-shape-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.chip-shape-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

/* ==========================================================================
   多選詢價車機制 (Inquiry Cart System & Floating Dock)
   ========================================================================== */
.floating-inquiry-cart {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 9999;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(184, 51, 42, 0.35);
  border-radius: 50px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.2), 0 4px 14px rgba(184, 51, 42, 0.18);
  padding: 6px 10px 6px 14px;
  gap: 10px;
  animation: ficSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(10px);
}

@keyframes ficSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fic-main-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  text-align: left;
}

.fic-cart-badge {
  position: relative;
  width: 42px;
  height: 42px;
  background: var(--accent-cinnabar, #b8332a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(184, 51, 42, 0.35);
}

.fic-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ffffff;
  color: var(--accent-cinnabar, #b8332a);
  font-size: 0.72rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-cinnabar, #b8332a);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.fic-text-wrap {
  display: flex;
  flex-direction: column;
}

.fic-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.fic-hint {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-cinnabar, #b8332a);
}

.fic-clear-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.18s ease;
}

.fic-clear-btn:hover {
  background: #fee2e2;
  color: #b8332a;
  border-color: #fca5a5;
}

/* 詢價單內部購物車預覽區塊 */
.inquiry-cart-form-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.icfb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

.icfb-clear {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.icfb-clear:hover {
  color: var(--accent-cinnabar, #b8332a);
}

.icfb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icfb-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.icfb-chip-remove {
  cursor: pointer;
  color: #94a3b8;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
}

.icfb-chip-remove:hover {
  color: #ef4444;
}

/* Navbar Cart Button */
.nav-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(184, 51, 42, 0.08);
  border: 1px solid rgba(184, 51, 42, 0.25);
  color: var(--accent-cinnabar, #b8332a);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-cart-btn:hover {
  background: var(--accent-cinnabar, #b8332a);
  color: #ffffff;
  border-color: var(--accent-cinnabar, #b8332a);
}

.nav-cart-btn:hover .nav-cart-badge {
  background: #ffffff;
  color: var(--accent-cinnabar, #b8332a);
}

.nav-cart-badge {
  background: var(--accent-cinnabar, #b8332a);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
}

/* 斷面圖鑑內專屬詢價底欄 (vf-cart-dock) */
.vf-cart-dock {
  margin-top: 24px;
  background: #f8fafc;
  border: 1.5px dashed rgba(184, 51, 42, 0.35);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.vf-cart-dock-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vf-cart-icon-bubble {
  width: 44px;
  height: 44px;
  background: rgba(184, 51, 42, 0.1);
  color: var(--accent-cinnabar, #b8332a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.vf-cart-dock-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.vf-cart-dock-title b {
  color: var(--accent-cinnabar, #b8332a);
  font-size: 1.2rem;
}

.vf-cart-dock-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 2px;
}

.vf-cart-dock-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-vf-checkout {
  background: var(--accent-cinnabar, #b8332a);
  color: #ffffff;
  border: 1px solid #9f2a22;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(184, 51, 42, 0.22);
}

.btn-vf-checkout:hover {
  background: #991b1b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(184, 51, 42, 0.35);
}

.btn-vf-clear {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-vf-clear:hover {
  background: #fee2e2;
  color: #b8332a;
  border-color: #fca5a5;
}

/* 調整懸浮詢價車位置 (避免與 AI 助手或置頂按鈕衝突) */
.floating-inquiry-cart {
  position: fixed;
  bottom: 148px;
  right: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--accent-cinnabar, #b8332a);
  border-radius: 50px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.22), 0 4px 14px rgba(184, 51, 42, 0.2);
  padding: 6px 12px 6px 14px;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.floating-inquiry-cart:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26), 0 6px 18px rgba(184, 51, 42, 0.25);
}

@media (max-width: 768px) {
  .visual-shape-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .floating-inquiry-cart {
    bottom: 136px;
    right: 14px;
    left: 14px;
    border-radius: 12px;
    justify-content: space-between;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  }
}

/* ==========================================================================
   Mobile Horizontal Overflow Prevention & Visual Polish Fixes
   ========================================================================== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

main {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

.hero-hub-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  width: 100%;
}

.hero-hub-btn {
  justify-content: center;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}

.hero-hub-btn:first-child {
  flex: 1.2;
}

.hero-hub-btn:last-child {
  flex: 1;
}

.vs-spec-tag {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

@media (max-width: 768px) {
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
  }

  /* Logo text: never truncate or show ellipsis on mobile */
  .logo-group {
    gap: 6px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 110px) !important;
  }

  .logo-emblem-fx {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }

  .logo-text {
    min-width: 0 !important;
    flex: 1 !important;
  }

  .logo-text h1 {
    font-size: clamp(0.82rem, 3.8vw, 0.96rem) !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.2 !important;
  }

  .navbar .logo-text p {
    display: none !important;
  }

  .nav-actions {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .nav-cta-btn {
    display: none !important;
  }

  .lang-current-btn {
    padding: 5px 7px !important;
    gap: 2px !important;
  }

  .navbar #langCurrentLabel {
    display: none !important;
  }

  .nav-cart-btn {
    padding: 5px 8px !important;
    gap: 3px !important;
  }

  .nav-cart-btn .nav-cart-text {
    display: none !important;
  }

  .mobile-menu-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
  }

  .hero-hub-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .hero-hub-btn {
    width: 100% !important;
    flex: none !important;
  }

  .vf-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .vf-header-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .preview-badge-top {
    font-size: 0.72rem !important;
    padding: 3px 10px !important;
    right: 12px !important;
    top: 12px !important;
  }
}

/* Floating Audio Tour Dock - Hidden by default until activated */
.audio-dock {
  transform: translateX(-50%) translateY(160%) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s !important;
}

.audio-dock.active {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.btn-dock-close {
  background: transparent;
  border: 1px solid rgba(158, 112, 36, 0.28);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #766c5d);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
  margin-left: 6px;
  flex-shrink: 0;
  line-height: 1;
}

.btn-dock-close:hover {
  background: rgba(166, 44, 34, 0.12);
  color: var(--accent-cinnabar, #a62c22);
  border-color: var(--accent-cinnabar, #a62c22);
  transform: scale(1.08);
}
