/* ══════════════════════════════════════════════════════════
   Star Tarp Theme — Main Stylesheet
   Color: Deep Sea Blue + Gold Orange
   ══════════════════════════════════════════════════════════ */

/* ─── Reset & Variables ──────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1E3A5F;
  --primary-light: #2B7A9E;
  --primary-lighter: #3A8FB7;
  --accent: #E8A838;
  --accent-hover: #D4922A;
  --bg: #FFFFFF;
  --bg-alt: #F5F7FA;
  --bg-dark: #0F1C2E;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --text-white: #FFFFFF;
  --border: #E5E7EB;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --transition: 0.3s ease;
  --font-en: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-zh: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font: var(--font-en), var(--font-zh);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Top Bar ────────────────────────────────────────────── */
.top-bar {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-left {
  display: flex;
  gap: 24px;
}
.top-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
.top-bar-item:hover { color: var(--accent); }
.top-bar-item svg { flex-shrink: 0; }

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font);
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1000;
  min-width: 120px;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-size: 13px;
  transition: background var(--transition);
}
.lang-option:hover { background: var(--bg-alt); }
.lang-option.active { color: var(--primary); font-weight: 600; }

/* ─── Main Header ────────────────────────────────────────── */
.main-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: box-shadow var(--transition);
}
.main-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  height: 80px;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
}
.logo img {
  display: block;
  max-height: 72px;
  width: auto;
}
.footer-logo img {
  max-height: 60px;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 20px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--primary); background: var(--bg-alt); }
.nav-cta {
  margin-left: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Hero Section ───────────────────────────────────────── */
.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: rgba(255,255,255,0.15);
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s;
}
.hero-dot.active { background: #fff; }
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.hero-content {
  text-align: left;
  color: #fff;
  max-width: 560px;
  padding: 0 24px 0 8%;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.4);
}
.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.6;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.hero-btn:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ─── Section Layout ─────────────────────────────────────── */
.section {
  padding: 80px 0;
}
.section-alt { background: var(--bg-alt); }
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ─── Company Intro ──────────────────────────────────────── */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.intro-text h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  line-height: 1.3;
}
.intro-text p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}
.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.intro-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Product Cards ──────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.product-card .card-img {
  width: 100%;
  height: 240px;
  background: var(--bg-alt);
  overflow: hidden;
  position: relative;
}
.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .card-img img { transform: scale(1.08); }
.product-card .card-img .no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 48px;
  color: var(--text-light);
}
.product-card .card-body {
  padding: 24px;
}
.product-card .card-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.product-card .card-body .category {
  display: inline-block;
  background: rgba(43,122,158,0.08);
  color: var(--primary-light);
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-weight: 500;
}
.product-card .card-body .summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.product-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-light);
  transition: all var(--transition);
}
.product-card .card-link:hover { color: var(--accent); gap: 10px; }

/* ─── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-tag {
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
}
.filter-tag:hover, .filter-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Industry Applications ──────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.app-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 260px;
  cursor: pointer;
}
.app-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.app-card:hover img { transform: scale(1.1); }
.app-card .app-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px;
  background: linear-gradient(transparent, rgba(15,28,46,0.85));
  color: #fff;
}
.app-card .app-overlay h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.app-card .app-overlay p {
  font-size: 13px;
  opacity: 0.8;
}

/* ─── Product Detail Page ────────────────────────────────── */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  transition: all var(--transition);
}
.detail-back:hover { color: var(--primary); gap: 10px; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Gallery */
.gallery { position: sticky; top: 96px; }
.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
  margin-bottom: 12px;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary-light); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Detail Info */
.detail-info h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.detail-info .category-tag {
  display: inline-block;
  background: rgba(43,122,158,0.08);
  color: var(--primary-light);
  font-size: 13px;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  font-weight: 500;
}
.detail-info .description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
  white-space: pre-line;
}

/* Specs Table */
.specs-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary-light);
  display: inline-block;
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}
.specs-table tr:nth-child(even) { background: var(--bg-alt); }
.specs-table td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.specs-table td:first-child {
  font-weight: 600;
  color: var(--text);
  width: 40%;
  white-space: nowrap;
}
.specs-table td:last-child { color: var(--text-secondary); }

/* ─── Contact Page ───────────────────────────────────────── */
.contact-hero {
  background: var(--primary);
  padding: 60px 0;
  text-align: center;
  color: #fff;
}
.contact-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.contact-hero p { font-size: 16px; opacity: 0.85; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.contact-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.contact-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(43,122,158,0.08);
  color: var(--primary-light);
}
.contact-card .card-icon.whatsapp { background: #E8F5E9; color: #25D366; }
.contact-card .card-icon.email { background: #FFF3E0; color: #EA4335; }
.contact-card .card-icon.facebook { background: #E3F2FD; color: #1877F2; }
.contact-card .card-icon.linkedin { background: #E8EAF6; color: #0A66C2; }
.contact-card .card-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-card .card-content p {
  font-size: 14px;
  color: var(--text-secondary);
}
.contact-card .card-content a {
  color: var(--primary-light);
  font-weight: 500;
}
.contact-card .card-content a:hover { color: var(--accent); }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo { font-size: 24px; font-weight: 700; color: #fff; }
.footer-tagline {
  font-size: 14px;
  opacity: 0.6;
  margin-top: 12px;
  line-height: 1.6;
}
.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}
.footer-col a,
.footer-col p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.social-links { display: flex; gap: 12px; }
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
}
.social-icon:hover { background: var(--accent); color: #fff; }

/* ─── Floating Contact Bar ──────────────────────────────── */
.float-contact {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.float-contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #fff;
  text-decoration: none;
  position: relative;
  transition: width 0.3s ease, border-radius 0.3s ease;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
}
.float-contact-item .float-label {
  position: absolute;
  right: 56px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateX(8px);
}
.float-contact-item:hover .float-label {
  opacity: 1;
  transform: translateX(0);
}
.float-contact-item:hover {
  width: 56px;
}
.float-contact-item.whatsapp { background: #25D366; }
.float-contact-item.email { background: var(--primary); }
.float-contact-item.facebook { background: #1877F2; }
.float-contact-item.linkedin { background: #0A66C2; }
.float-contact-item.contact { background: var(--accent); }
.float-contact-item:hover { filter: brightness(1.15); }

@media (max-width: 768px) {
  .float-contact {
    flex-direction: row;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    transform: none;
    justify-content: center;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 6px 0;
    gap: 0;
  }
  .float-contact-item {
    flex: 1;
    border-radius: 0;
    width: auto;
    height: 44px;
  }
  .float-contact-item .float-label {
    display: none;
  }
  .float-contact-item:hover {
    width: auto;
  }
}
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.5;
}

/* ─── Empty / Loading State ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-state .icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h2 { font-size: 24px; color: var(--text); margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 16px; }
.loading {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}
.loading::after {
  content: '';
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px 16px; }
  .nav-cta { margin-left: 0; text-align: center; }

  .hero { height: 450px; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 15px; }

  .intro-grid,
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-grid { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .intro-stats { grid-template-columns: repeat(3, 1fr); }
  .gallery { position: static; }

  .section { padding: 48px 0; }
  .section-header h2 { font-size: 28px; }
  .top-bar-left { gap: 12px; }
}

@media (max-width: 480px) {
  .hero { height: 380px; }
  .hero-content h1 { font-size: 26px; }
  .intro-stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
