.factory-gallery .factory-tour-header {
  max-width: 100% !important;
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}
@media (min-width: 769px) {
  .factory-gallery .factory-tour-header {
    max-width: 100% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .factory-gallery .factory-tour-header > div:first-child {
    flex: 1 1 auto !important;
    max-width: 860px !important;
  }
  .factory-gallery .factory-carousel-nav {
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}
@media (max-width: 768px) {
  .factory-gallery { padding: 2.25rem 0 !important; }
  .factory-gallery .factory-tour-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
  .factory-gallery .factory-tour-header > div:first-child {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
  }
  .factory-gallery-intro {
    margin-top: 0.4rem !important;
  }
  .factory-gallery .factory-carousel-nav {
    width: auto !important;
    justify-content: flex-end !important;
    align-self: center !important;
  }
  .factory-gallery .factory-tour-carousel-wrapper {
    margin-top: 0.5rem !important;
  }
}
.factory-gallery-intro { max-width: 68ch; margin: .75rem 0 0; color: #475569; font-size: .95rem; line-height: 1.65; }
.factory-gallery .factory-tour-img-wrap { aspect-ratio: 4 / 3; }
.factory-gallery .factory-photo-landscape .factory-tour-img-wrap { aspect-ratio: 4 / 3; }
.factory-gallery .factory-photo-landscape .factory-tour-img { object-fit: cover; }
.factory-gallery .factory-tour-img-wrap picture { display: block; width: 100%; height: 100%; }
.factory-gallery .factory-photo-portrait .factory-tour-img { object-fit: contain; background: #edf0f2; }
/* Rotate the packing photo within the 4:3 frame without changing the camera file. */
.factory-gallery .factory-photo-rotate-cw .factory-tour-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 75%;
  height: 133.333333%;
  max-width: none;
  transform: translate(-50%, -50%) rotate(90deg);
}
.factory-gallery .factory-tour-body { padding: 1.25rem; }
.factory-gallery .factory-tour-title { font-size: 1.05rem; line-height: 1.4; }
.factory-gallery .factory-tour-desc { color: #475569; line-height: 1.65; }
.factory-gallery .tour-nav-btn { min-width: 44px; min-height: 44px; }
.factory-gallery button:focus-visible { outline: 3px solid #0284c7; outline-offset: 4px; }
.factory-gallery .tour-counter { direction: ltr; }
@media (prefers-reduced-motion: reduce) {
  .factory-gallery .factory-tour-img, .factory-gallery .factory-tour-card,
  .factory-album-img, .factory-album-card { transition: none; }
}

/* ==========================================================================
   MULTI-BASE FACTORY FACILITIES ALBUM CAROUSEL (Quzhou, Guangxi, Anhui)
   ========================================================================== */
.factory-album-section {
  padding: 4.5rem 0;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}
.factory-album-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.factory-album-header .album-carousel-nav {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex-shrink: 0 !important;
}
.factory-album-header .album-carousel-nav .tour-nav-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
  transition: all 0.2s ease !important;
}
.factory-album-header .album-carousel-nav .tour-nav-btn:hover {
  background: #F1F5F9 !important;
  border-color: #94A3B8 !important;
  transform: scale(1.05) !important;
}
.factory-album-header .album-carousel-nav .tour-counter {
  font-family: var(--font-heading) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  min-width: 60px !important;
  text-align: center !important;
  direction: ltr !important;
}
#factory-album-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 1.75rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.factory-base-block {
  position: relative;
  width: 100%;
}
.factory-base-block + .factory-base-block {
  margin-top: 3.5rem;
  padding-top: 2.75rem;
  border-top: 1px solid #E2E8F0;
}
.factory-base-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.3;
}
.factory-album-tabs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.5rem 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.factory-album-tabs::-webkit-scrollbar {
  display: none;
}
.factory-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.factory-tab-btn:hover {
  color: #0F172A;
  border-color: #94A3B8;
  background: #F1F5F9;
  transform: translateY(-1px);
}
.factory-tab-btn.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}
.factory-album-carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0.25rem 0.15rem 1rem 0.15rem;
}
.factory-album-grid {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.factory-album-card {
  flex: 0 0 calc((100% - 3rem) / 3);
  min-width: 300px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  user-select: none;
}
.factory-album-card:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.12);
}
.factory-album-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #E2E8F0 linear-gradient(90deg, #E2E8F0 0%, #F1F5F9 50%, #E2E8F0 100%);
  background-size: 200% 100%;
  animation: albumSkeletonShimmer 1.8s ease-in-out infinite;
}
@keyframes albumSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.factory-album-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  display: block;
}
.factory-album-card:hover .factory-album-img {
  transform: scale(1.04);
}
@media (max-width: 1024px) {
  .factory-album-card {
    flex: 0 0 calc((100% - 1.5rem) / 2);
    min-width: 280px;
  }
}
@media (max-width: 768px) {
  .factory-album-section {
    padding: 2.25rem 0 !important;
  }
  .factory-album-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .factory-album-header > div:first-child {
    width: 100% !important;
  }
  #factory-album-title {
    font-size: 1.6rem !important;
    line-height: 1.25 !important;
    margin-bottom: 1.25rem !important;
  }
  .factory-base-block + .factory-base-block {
    margin-top: 2.25rem !important;
    padding-top: 1.75rem !important;
  }
  .factory-base-title {
    font-size: 1.15rem !important;
  }
  .factory-album-header .album-carousel-nav {
    display: none !important;
  }
  .factory-album-tabs {
    margin-bottom: 1rem !important;
    gap: 0.5rem !important;
    padding-bottom: 0.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .factory-tab-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
  }
  .factory-album-carousel-wrapper {
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .factory-album-card {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .factory-album-grid {
    gap: 0 !important;
  }
}



/* Preserve the source photos' 4:3 frame in the Hangzhou racket gallery. */

.factory-base-block[data-base="hangzhou-racket"] .factory-album-img-wrap {

  aspect-ratio: 4 / 3;

}



/* Scroll Margin Offsets for In-Page Anchors */
#about-overview,
#shuttlecock-facility,
#racket-facility,
#production-processes-section,
#oem-customization-section,
#global-logistics-section {
  scroll-margin-top: calc(var(--header-height, 136px) + 65px) !important;
}
@media (max-width: 768px) {
  #about-overview,
  #shuttlecock-facility,
  #racket-facility,
  #production-processes-section,
  #oem-customization-section,
  #global-logistics-section {
    scroll-margin-top: calc(var(--header-height, 64px) + 55px) !important;
  }
}

/* ==========================================================================
   DEDICATED FACILITY SHOWCASE CARDS (SHUTTLECOCK & RACKET UNIFIED BLOCKS)
   ========================================================================== */
.dedicated-facility-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 20px !important;
  padding: 2.75rem 2.25rem 2.5rem 2.25rem !important;
  margin-top: 3.25rem !important;
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.04) !important;
  position: relative !important;
}
.dedicated-facility-card.dedicated-shuttlecock-facility {
  margin-top: 0 !important;
}
.dedicated-facility-card .factory-album-title {
  margin: 0 0 2rem 0 !important;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem) !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  letter-spacing: -0.02em !important;
}

@media (max-width: 768px) {
  .dedicated-facility-card {
    padding: 1.5rem 1rem 1.75rem 1rem !important;
    border-radius: 14px !important;
    margin-top: 2rem !important;
  }
  .dedicated-facility-card.dedicated-shuttlecock-facility {
    margin-top: 0 !important;
  }
  .dedicated-facility-card .factory-album-title {
    margin-bottom: 1.25rem !important;
  }
}
