/* ==========================================================================
   Factory Page Styles (工厂图片列表页面专属样式)
   Header / Footer / 通用布局样式继承自 common.css
   配色沿用全站金色系：深金 #dca32c / #b8860b，亮金 #f5cb66
   ========================================================================== */

:root {
  --fct-gold: #d4952c;
  --fct-gold-deep: #b8860b;
  --fct-gold-bright: #f5cb66;
  --fct-ink: #221d13;
  --fct-gray: #6e6759;
  --fct-cream: #faf6ec;
  --fct-line: #e9dfc8;
}

.factory-page main {
  background: #ffffff;
  color: var(--fct-ink);
}

/* -------------------------------------------------------------
   Shared: Reveal Animation & Capsule Button (与全站一致)
------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1), transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.btn-primary-capsule {
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 32px;
  border: 1.5px solid #dca32c;
  border-radius: 22px;
  background: #ffffff;
  color: #dca32c;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.45s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.btn-primary-capsule::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #dca32c, #f5cb66);
  transform: translateX(-101%);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.btn-primary-capsule:hover::before {
  transform: translateX(0);
}

.btn-primary-capsule:hover {
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(220, 163, 44, 0.35);
}

.btn-primary-capsule span,
.btn-primary-capsule i {
  position: relative;
  z-index: 2;
}

/* 导航右侧 CTA 按钮 (与全站 header 保持一致) */
.nav-cta-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--fct-gold), var(--fct-gold-deep));
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(212, 149, 44, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 149, 44, 0.45);
}

/* -------------------------------------------------------------
   1. Factory Hero Banner (厂区实景背景)
------------------------------------------------------------- */
.factory-hero {
  position: relative;
  min-height: clamp(320px, 36vw, 500px);
  display: flex;
  align-items: center;
  background: url("../images/factory/factory-01.jpg") center center / cover no-repeat, #2a2418;
}

.factory-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 22, 14, 0.82) 0%, rgba(26, 22, 14, 0.52) 52%, rgba(26, 22, 14, 0.2) 100%);
  pointer-events: none;
}

.factory-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: clamp(44px, 5vw, 72px);
  padding-bottom: clamp(44px, 5vw, 72px);
}

.factory-hero__title {
  margin: 0;
  font-size: clamp(40px, 4.8vw, 68px);
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--fct-gold-bright);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.factory-hero__underline {
  width: 84px;
  height: 4px;
  margin-top: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--fct-gold), var(--fct-gold-bright));
}

.factory-hero__sub {
  margin: 20px 0 0;
  max-width: 620px;
  font-size: clamp(14.5px, 1.3vw, 17px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.factory-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 14px;
}

.factory-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.3s ease;
}

.factory-hero__breadcrumb a:hover {
  color: var(--fct-gold-bright);
}

.factory-hero__breadcrumb .breadcrumb-arrow {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.factory-hero__breadcrumb .breadcrumb-current {
  color: #ffffff;
  font-weight: 700;
}

/* -------------------------------------------------------------
   2. 工厂图片网格
------------------------------------------------------------- */
.factory-main {
  padding: clamp(44px, 5vw, 72px) 0 clamp(56px, 6vw, 92px);
}

.factory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2.2vw, 28px);
}

.factory-item {
  margin: 0;
}

.factory-item__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  padding: 0;
  border: 1px solid var(--fct-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--fct-cream);
  cursor: zoom-in;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.factory-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.factory-item__media:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 149, 44, 0.5);
  box-shadow: 0 16px 36px rgba(184, 134, 11, 0.18);
}

.factory-item__media:hover img {
  transform: scale(1.06);
}

/* 悬停放大预览提示 */
.factory-item__media::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
  background: rgba(34, 29, 19, 0.42);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.factory-item__media:hover::after {
  opacity: 1;
}

.factory-item figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px 0;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

.factory-item__zh {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fct-ink);
}

.factory-item__en {
  font-size: 12.5px;
  color: var(--fct-gray);
}

/* -------------------------------------------------------------
   3. 图片放大灯箱 (遮罩层)
------------------------------------------------------------- */
.factory-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 26px);
  padding: clamp(16px, 4vw, 48px);
  background: rgba(18, 14, 8, 0.78);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.factory-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.factory-lightbox__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(760px, 88vw);
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.factory-lightbox.is-open .factory-lightbox__body {
  transform: scale(1);
}

.factory-lightbox__body img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.factory-lightbox__caption {
  text-align: center;
}

.factory-lightbox__caption h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.factory-lightbox__caption p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
}

.factory-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.factory-lightbox__close:hover {
  background: var(--fct-gold);
  transform: rotate(90deg);
}

.factory-lightbox__arrow {
  width: 46px;
  height: 46px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.factory-lightbox__arrow:hover {
  background: var(--fct-gold);
  transform: scale(1.08);
}

/* -------------------------------------------------------------
   Responsive (响应式适配)
------------------------------------------------------------- */
@media (max-width: 1080px) {
  .factory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .factory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .factory-grid {
    grid-template-columns: 1fr;
  }

  .factory-lightbox__arrow {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 1200px) {
  .nav-cta-btn {
    display: none;
  }
}
