/* ============================================================
   Tianzengtai Crafts — Corporate Website Stylesheet
   Tech-blue theme · Responsive · Pure HTML/CSS/JS
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-deep: #172554;
  --primary-light: #dbeafe;
  --sky: #38bdf8;
  --navy: #0b1220;
  --ink: #0f172a;
  --slate: #64748b;
  --slate-light: #94a3b8;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 10px 30px -12px rgba(30, 64, 175, .18);
  --shadow-lg: 0 24px 50px -20px rgba(30, 64, 175, .28);
  --container: 1180px;
  --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

.lead { font-size: 1.15rem; color: var(--slate); }

.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head .eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--slate); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(37, 99, 235, .7);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-ghost:hover { background: var(--primary-light); transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--sky));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .6);
}
.brand-name { display: block; font-weight: 800; letter-spacing: .08em; font-size: 1.05rem; color: var(--navy); line-height: 1.1; }
.brand-sub { display: block; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--slate); }

.brand-logo { width: 46px; height: 46px; object-fit: contain; display: block; flex: 0 0 auto; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  padding: 8px 15px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary-dark);
  border-radius: 999px;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.lang-toggle:hover { background: var(--primary-light); border-color: var(--primary-light); color: var(--primary-dark); }

.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav a {
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  color: var(--slate);
  transition: color .15s ease, background .15s ease;
}
.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s ease; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(56, 189, 248, .18), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(37, 99, 235, .16), transparent 55%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 110px 0 96px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--primary-dark);
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px 15px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.hero h1 { color: var(--navy); margin-bottom: 20px; }
.hero h1 .accent { color: var(--primary); }
.hero p.lead { margin-bottom: 30px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats { display: flex; gap: 36px; margin-top: 40px; }
.hero-stats .stat b { display: block; font-size: 1.6rem; color: var(--primary-dark); }
.hero-stats .stat span { font-size: .85rem; color: var(--slate); }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-visual .card-stack { width: 100%; max-width: 420px; }
.hero-visual .blob {
  position: absolute;
  inset: 8% 4%;
  background: linear-gradient(135deg, var(--primary), var(--sky));
  border-radius: 32px;
  transform: rotate(5deg);
  opacity: .9;
  z-index: 0;
}
.hero-visual .blob::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background-image: radial-gradient(rgba(255,255,255,.28) 1px, transparent 1px);
  background-size: 16px 16px;
}
.hero-visual .feature-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
.hero-slides { position: relative; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; }
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero-slides img.active { opacity: 1; }
.hero-dots {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.hero-dots button {
  width: 9px; height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  box-shadow: 0 0 5px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.hero-dots button.active { background: #fff; transform: scale(1.35); }
.hero-visual .float-tag {
  position: absolute;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 18px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-visual .float-tag small { display: block; font-weight: 500; color: var(--slate); }
.float-tag.t1 { top: 4%; left: 0; }
.float-tag.t2 { bottom: 8%; right: 0; }

/* ============================================================
   Product category cards (home + products)
   ============================================================ */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.cat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.cat-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #eaf1ff, #dbeafe);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cat-thumb svg { width: 64px; height: 64px; color: var(--primary); opacity: .9; }
.cat-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.cat-body h3 { margin-bottom: 8px; font-size: 1.12rem; }
.cat-body p { color: var(--slate); font-size: .93rem; flex: 1; }
.cat-body .link { margin-top: 16px; font-weight: 600; color: var(--primary); font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.cat-body .link:hover { gap: 10px; }

/* ============================================================
   Feature / why us
   ============================================================ */
.feature { display: flex; gap: 18px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.feature .icon {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
}
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--slate); font-size: .92rem; }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  background: linear-gradient(120deg, var(--primary-deep), var(--primary) 55%, var(--sky));
  color: #fff;
  border-radius: 24px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 520px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--navy); color: #cbd5e1; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-grid h4 { color: #fff; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid p, .footer-grid a { font-size: .92rem; color: #94a3b8; }
.footer-grid a:hover { color: #fff; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #94a3b8; }
.footer-brand p { max-width: 300px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .85rem;
  color: #64748b;
}

/* ============================================================
   Page hero (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(180deg, #f4f8ff, #fff);
  padding: 72px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { color: var(--navy); margin-bottom: 14px; }
.page-hero p { color: var(--slate); max-width: 640px; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: var(--slate-light); margin-bottom: 14px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ============================================================
   About page
   ============================================================ */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-split h2 { margin-bottom: 18px; }
.about-split p + p { margin-top: 14px; color: var(--slate); }
.about-visual {
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--sky));
  min-height: 360px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; display: block; }
.value-list { display: grid; gap: 14px; margin-top: 24px; }
.value-list li { display: flex; gap: 12px; align-items: flex-start; }
.value-list li svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--primary); margin-top: 3px; }
.value-list li span { color: var(--slate); }

/* ============================================================
   Contact page
   ============================================================ */
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 44px; align-items: start; }
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}
.info-card .icon {
  flex: 0 0 auto; width: 48px; height: 48px;
  border-radius: 12px; background: var(--primary-light); color: var(--primary);
  display: grid; place-items: center;
}
.info-card .icon svg { width: 24px; height: 24px; }
.info-card h3 { font-size: 1rem; margin-bottom: 4px; }
.info-card p { color: var(--slate); font-size: .95rem; }
.info-card a { color: var(--primary); }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.contact-form h3 { margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--slate-light); margin-top: 14px; }

/* ============================================================
   Products gallery
   ============================================================ */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.cat-nav a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--slate);
  background: #fff;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cat-nav a:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }

.section[id] { scroll-margin-top: 92px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px 72px;
  background: rgba(6, 12, 24, .93);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  object-fit: contain;
}
.lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  width: 52px; height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background .15s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-counter {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: .9rem;
  letter-spacing: .05em;
  background: rgba(255, 255, 255, .12);
  padding: 6px 16px;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lightbox { padding: 20px 14px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 12px; right: 12px; }
}

/* ============================================================
   Category pages
   ============================================================ */
.page-tools { display: flex; justify-content: flex-start; margin-bottom: 26px; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: .9rem;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.back-btn:hover { background: var(--primary-light); border-color: var(--primary-light); transform: translateX(-3px); }
.back-btn .arrow { font-size: 1.15em; line-height: 1; }
.gallery-footer { display: flex; justify-content: center; margin-top: 44px; }

/* Back to top */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 12px 28px -10px rgba(37, 99, 235, .8);
  display: none;
  place-items: center;
  transition: background .15s ease, transform .15s ease;
}
.to-top.show { display: grid; }
.to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .about-split { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { text-align: center; padding: 13px; }
  .hero { padding: 72px 0; }
  .hero-stats { gap: 22px; flex-wrap: wrap; }
  .cta-band { padding: 34px 26px; }
  .footer-grid { grid-template-columns: 1fr; }
}
