:root {
  --blue: #1F4FB0;      /* ZiDi brand blue */
  --blue-dark: #1E4D9C; /* ZiDi deep blue */
  --blue-soft: #EAF1FB; /* ZiDi light blue tint */
  --ink: #1f2933;
  --muted: #5f6b76;
  --line: #e3e8ee;
  --bg-alt: #f4f8fd;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(30, 77, 156, .12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.7;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { width: min(1100px, 92vw); margin: 0 auto; }

/* ===== Welcome splash ===== */
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  transition: opacity .6s ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 108px; height: 108px; margin-bottom: 12px;
  animation: zFadeUp .9s ease .1s both;
}
.splash-title {
  font-size: 30px; font-weight: 700; margin: 0; color: var(--blue-dark); letter-spacing: 1.5px;
  animation: zFadeUp .9s ease .5s both;
}
.splash-sub {
  font-size: 14px; margin: 0; color: var(--muted); letter-spacing: .5px;
  animation: zFadeUp .9s ease .85s both;
}
.splash-hint {
  font-size: 12px; margin: 24px 0 0; color: #9db8dc;
  animation: zFadeUp .9s ease 1.3s both;
}
@keyframes zFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(8px);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .brand-icon { width: 34px; height: 34px; display: block; }
.brand span { font-size: 22px; font-weight: 700; color: var(--blue-dark); letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 14px; position: relative; transition: color .2s ease; }
.nav-links a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--blue); border-radius: 2px; transition: width .25s ease; }
.nav-links a:not(.nav-cta):hover { color: var(--blue); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: 8px 16px; border-radius: 8px;
  position: relative; overflow: hidden;
  will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  transition: transform .15s ease, background .2s ease, filter .2s ease;
}
.nav-cta:hover { background: var(--blue-dark); transform: scale(1.04); }
.nav-cta:active { transform: translateY(0) scale(.97); }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--ink); }

/* Hero: welcome text + promo video */
.hero { background: linear-gradient(180deg, #EAF1FB 0%, #ffffff 72%); padding: 76px 0 60px; }
.hero-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 60px; align-items: center; }
.eyebrow { color: var(--blue); font-weight: 600; font-size: 14px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(26px, 3.8vw, 40px); line-height: 1.15; margin: 0 0 16px; color: var(--blue-dark); }
.lead { font-size: 16px; color: var(--muted); margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 10px; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; position: relative; overflow: hidden; will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: transform .15s ease, filter .2s ease, background .2s ease; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: scale(1.04); }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: #EDF3FC; transform: scale(1.04); }
.btn:active { transform: translateY(0) scale(.97); }
.hero-stats { display: flex; gap: 36px; list-style: none; padding: 0; margin: 36px 0 0; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 26px; color: var(--blue-dark); }
.hero-stats span { font-size: 13px; color: var(--muted); }

.hero-video { }
.hero-video video {
  width: 100%; height: auto; display: block;
  border-radius: 14px; background: transparent;
  object-fit: contain;
  box-shadow: 0 12px 32px rgba(13, 47, 122, .18);
  transition: transform .3s ease, box-shadow .3s ease;
}
.hero-video:hover video { transform: translateY(-4px); }
.video-caption { font-size: 12px; color: var(--muted); margin: 12px 0 0; text-align: center; letter-spacing: .3px; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(24px, 3vw, 32px); color: var(--blue-dark); margin: 0 0 8px; position: relative; padding-bottom: 14px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 52px; height: 4px; border-radius: 4px; background: var(--blue); }
.section-sub { color: var(--muted); margin: 14px 0 32px; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.about-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-alt .about-card { background: #fff; }
.about-card h3 { margin-top: 0; color: var(--blue-dark); }
.about-logo { display: block; width: 72px; height: 72px; margin-bottom: 8px; }
.check-list { list-style: none; padding: 0; margin: 16px 0 0; }
.check-list li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

/* ===== Product carousel (one product per page) ===== */
.slider-wrap { position: relative; }
.slider {
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.slider::-webkit-scrollbar { display: none; }
.product-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 36px; align-items: center;
  padding: 8px 2px;
}
.slide-media {
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.slide-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
/* Tall products (e.g. knee-high boot) must show fully — fit whole image, white margins */
.slide-media img.slide-img-fit {
  object-fit: contain;
  object-position: center center;
}
.slide-info h3 { margin: 0 0 6px; font-size: 26px; color: var(--blue-dark); }
.slide-desc { color: var(--muted); margin: 0 0 18px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th {
  text-align: left; vertical-align: top;
  color: var(--muted); font-weight: 500;
  padding: 9px 0; width: 42%;
}
.spec-table td { padding: 9px 0; color: var(--ink); }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: 1px solid var(--line); }
.slide-cta { margin-top: 20px; }

.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--blue-dark);
  font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: transform .15s ease, background .2s ease, color .2s ease, filter .2s ease;
}
.slider-btn:hover { background: var(--blue); color: #fff; transform: translateY(-50%) scale(1.12); }
.slider-btn:active { transform: translateY(-50%) scale(.92); }
.slider-btn:disabled { opacity: .35; cursor: default; transform: translateY(-50%); }
.slider-btn.prev { left: -12px; }
.slider-btn.next { right: -12px; }

.slider-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 18px;
}
#slideCounter { font-size: 13px; color: var(--muted); }
.slider-dots { display: flex; gap: 8px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 0; padding: 0; background: #c9d8ee; cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.dot:hover { transform: scale(1.3); }
.dot.active { background: var(--blue); transform: scale(1.15); }

/* ===== Products section: brand-blue background (experimental) ===== */
#products { background: #1E4D9C; }
#products .section-title { color: #fff; }
#products .section-title::after { background: rgba(255,255,255,.9); }
#products .section-sub { color: #cfe0f1; }
#products .strip-title { color: #fff; }
#products #slideCounter { color: #cfe0f1; }
#products .dot.active { background: #fff; }
#products .slider {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
}

/* ===== Product thumbnail strip (auto-scroll loop + click to enlarge) ===== */
.product-strip-wrap { margin-top: 52px; }
.strip-title { font-size: 18px; font-weight: 700; color: var(--blue-dark); margin: 0 0 18px; text-align: center; }
.product-strip {
  display: block; overflow: hidden; padding: 6px 0 16px;
}
.product-track {
  display: flex; gap: 14px; width: max-content;
  animation: thumbsScroll 42s linear infinite;
  will-change: transform;
}
.product-strip:hover .product-track,
.product-strip:focus-within .product-track { animation-play-state: paused; }
@keyframes thumbsScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.thumb {
  flex: 0 0 auto; width: 156px; min-width: 0; min-height: 0; height: auto; padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer;
  transition: transform .15s ease, border-color .2s ease;
  position: relative;
}
.thumb img { width: 100%; height: auto; display: block; }
.thumb:hover { transform: translateY(-3px); border-color: var(--blue); }
.thumb:active { transform: scale(.97); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; background: rgba(8,18,40,.86);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.lightbox.open { display: flex; animation: zFadeUp .25s ease both; }
.lightbox img {
  max-width: 90vw; max-height: 82vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff;
}
.lb-close {
  position: absolute; top: 18px; right: 24px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.lb-close:hover { background: rgba(255,255,255,.3); transform: scale(1.08); }
.lb-close:active { transform: scale(.94); }
.lb-cap {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 15px; margin: 0; letter-spacing: .5px;
}

/* Certifications */
.badge-row { display: flex; flex-wrap: wrap; gap: 16px; }
.badge { border: 1px solid var(--blue); color: var(--blue); border-radius: 10px; padding: 14px 22px; font-weight: 600; background: #fff; }

/* Factory photo gallery */
.factory-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.factory-photo {
  aspect-ratio: 4 / 3; background: #E9F0FA; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; overflow: hidden;
  box-shadow: var(--shadow);
}
.factory-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info { list-style: none; padding: 0; margin: 16px 0 0; }
.contact-info li { margin-bottom: 10px; }
.contact-info a { color: var(--blue); text-decoration: none; }
.rfq-form { display: flex; flex-direction: column; gap: 14px; }
.rfq-form label { font-size: 14px; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.rfq-form input, .rfq-form textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: #fff;
}
.rfq-form input:focus, .rfq-form textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form-note { color: #2e7d32; font-size: 14px; margin: 0; }

/* Footer */
.site-footer { background: var(--blue-dark); color: #cfe0f1; padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-inner p { margin: 0; font-size: 14px; }
.footer-links a { color: #cfe0f1; text-decoration: none; font-size: 14px; margin-left: 16px; position: relative; transition: color .2s ease; }
.footer-links a::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 0; background: #fff; transition: width .25s ease; }
.footer-links a:hover { color: #fff; }
.footer-links a:hover::after { width: 100%; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: #fff; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  transition: transform .2s ease, filter .2s ease;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,.45);
  animation: waPulse 2.2s ease-out infinite; pointer-events: none;
}
@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.45); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Mobile */
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: flex-start;
    gap: 0; padding: 8px 0; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 6vw; width: 100%; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .splash-title { font-size: 22px; }
  .product-slide { grid-template-columns: 1fr; gap: 20px; }
  .slide-info h3 { font-size: 22px; }
  .slider-btn { width: 38px; height: 38px; font-size: 20px; }
  .slider-btn.prev { left: -6px; }
  .slider-btn.next { right: -6px; }
  .factory-gallery { grid-template-columns: 1fr; }
}

/* ===== Large screens (16:9 desktops, 1600px+): widen layout to reduce empty side space ===== */
@media (min-width: 1600px) {
  .container { width: min(1400px, 94vw); }
  .hero { padding: 92px 0 76px; }
  .section { padding: 80px 0; }
  .hero-split { gap: 80px; }
  .hero h1 { font-size: 44px; }
  .lead { font-size: 17px; }
  .thumb { width: 176px; }
  .about-grid { gap: 48px; }
  .contact-grid { gap: 64px; }
  .factory-gallery { gap: 24px; }
}

/* Reduced motion: skip splash animation */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .splash { transition: none; }
}

/* Brand logo hover */
.brand { transition: transform .2s ease; }
.brand:hover { transform: scale(1.04); }
.brand-icon { transition: transform .25s ease; }
.brand:hover .brand-icon { transform: rotate(-6deg); }

/* Nav toggle hover */
.nav-toggle { transition: transform .3s ease; }
.nav-toggle:hover { transform: rotate(90deg); }

/* Reduced motion: disable decorative interaction animations */
@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; }
  .product-track { animation: none; }
  .product-strip { overflow-x: auto; }
  .btn, .nav-cta, .slider-btn, .dot, .brand, .nav-toggle, .thumb,
  .nav-links a, .footer-links a, .rfq-form input, .rfq-form textarea { transition: none !important; }
}
