/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a3a5c;
  --primary-light: #2d5f8a;
  --accent: #e8782a;
  --accent-hover: #c9651e;
  --bg: #f8f9fb;
  --white: #ffffff;
  --text: #2c3e50;
  --text-light: #5a6d80;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --wa-green: #25D366;
  --fb-blue: #1877F2;
  --li-blue: #0A66C2;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
section { padding: 80px 0; }
.section-cta { text-align: center; margin-top: 40px; }

/* ===== Language Overlay ===== */
.lang-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}
.lang-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lang-modal {
  background: var(--white); border-radius: 16px;
  padding: 48px 40px; max-width: 560px; width: 90%;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: slideUp 0.35s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.lang-modal h2 {
  font-size: 1.6rem; color: var(--primary); margin-bottom: 8px; font-weight: 700;
}
.lang-modal > p {
  font-size: 0.95rem; color: var(--text-light); margin-bottom: 32px;
}

.lang-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.lang-option {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 20px 16px;
  border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--white); cursor: pointer;
  transition: all 0.25s;
}
.lang-option:hover {
  border-color: var(--primary-light);
  background: #f0f5fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.lang-flag { font-size: 2rem; }
.lang-name { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.lang-hint { font-size: 0.78rem; color: var(--text-light); }

@media (max-width: 480px) {
  .lang-modal { padding: 32px 24px; }
  .lang-modal h2 { font-size: 1.3rem; }
  .lang-options { grid-template-columns: 1fr; gap: 8px; }
  .lang-option { padding: 14px 12px; flex-direction: row; gap: 12px; }
  .lang-flag { font-size: 1.5rem; }
}

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0; height: 64px;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.4rem; font-weight: 700;
  color: var(--primary); letter-spacing: -0.5px;
}
.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 0.88rem; font-weight: 500; color: var(--text-light);
  transition: color 0.2s; position: relative;
}
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: width 0.3s;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }

/* Lang Switcher */
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--white); cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: var(--text-light); transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.lang-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.mobile-menu-btn {
  display: none; background: none; border: none; font-size: 1.5rem;
  cursor: pointer; color: var(--text);
}

/* ===== Hero / Carousel ===== */
.hero {
  padding: 0; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a3a5c 0%, #2d5f8a 50%, #1a3a5c 100%);
  min-height: 520px;
}
.hero-slider { position: relative; }
.hero-slide {
  display: none; align-items: center; justify-content: center;
  min-height: 520px; text-align: center;
  position: relative; color: var(--white); padding: 160px 24px 80px;
}
.hero-slide.active { display: flex; }
.hero-bg-1 { background: radial-gradient(ellipse at center, rgba(255,255,255,0.06) 0%, transparent 70%); }
.hero-content { position: relative; z-index: 1; max-width: 900px; }
.hero-content h1 {
  font-size: 2.8rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 16px; letter-spacing: -1px;
}
.hero-content p {
  font-size: 1.15rem; opacity: 0.9; margin-bottom: 36px;
}
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-indicators {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 2;
}
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.hero-dot.active, .hero-dot:hover { background: var(--white); transform: scale(1.2); }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 14px 36px; border-radius: 50px;
  font-weight: 600; font-size: 1rem; transition: all 0.3s;
  cursor: pointer; border: 2px solid transparent; text-align: center;
}
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,120,42,0.35); }
.btn-outline {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; transform: translateY(-2px); }
.btn-full { width: 100%; }

/* ===== Section Titles ===== */
.section-title {
  font-size: 2.2rem; font-weight: 700; text-align: center;
  color: var(--primary); margin-bottom: 12px;
}
.section-desc {
  text-align: center; color: var(--text-light); font-size: 1.05rem;
  margin-bottom: 48px; max-width: 650px; margin-left: auto; margin-right: auto;
}

/* ===== Core Advantages ===== */
.advantages { background: var(--white); }
.adv-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.adv-card {
  text-align: center; padding: 36px 20px;
  border-radius: var(--radius); border: 1px solid var(--border);
  transition: all 0.3s; background: var(--white);
}
.adv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.adv-icon { font-size: 2.5rem; margin-bottom: 16px; }
.adv-card h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 8px; }
.adv-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* ===== Hot Products ===== */
.hot-products { background: var(--bg); }

/* ===== Category Filter ===== */
.cat-filter {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 36px;
}
.cat-btn {
  padding: 10px 22px; border-radius: 50px;
  border: 1px solid var(--border); background: var(--white);
  font-size: 0.88rem; font-weight: 500; color: var(--text-light);
  cursor: pointer; transition: all 0.2s;
}
.cat-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.cat-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===== Products Grid ===== */
.products { background: var(--bg); }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img {
  width: 100%; height: 360px; object-fit: contain;
  background: #f5f6f8;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  padding: 12px;
}
.product-img[src] { cursor: pointer; }
.product-placeholder {
  flex-direction: column; gap: 6px; color: #b0bec5; user-select: none;
}
.product-placeholder span { font-size: 3.5rem; }
.product-placeholder small { font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; color: #90a4ae; }
.mat-label { font-weight: 600; color: var(--text); }
.mat-tag {
  display: inline-block; padding: 2px 10px; background: #f0f4f8;
  border-radius: 14px; font-size: 0.75rem; color: var(--text-light);
  margin: 2px 0;
}
.product-body { padding: 20px; }
.product-body h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: 6px; }
.product-body p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 10px; line-height: 1.5; }
.product-body .product-features {
  list-style: none; margin-bottom: 10px;
}
.product-body .product-features li {
  font-size: 0.8rem; color: var(--text-light); padding: 2px 0;
  padding-left: 16px; position: relative;
}
.product-body .product-features li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.product-tag {
  display: inline-block; padding: 4px 12px; background: #e8f0fe;
  color: var(--primary-light); border-radius: 20px; font-size: 0.75rem;
  font-weight: 500;
}
.product-materials {
  font-size: 0.78rem; color: var(--text-light); margin-top: 8px;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.product-moq {
  margin-top: 8px; font-size: 0.85rem; color: var(--accent); font-weight: 600;
}

/* ===== OEM Notice ===== */
.oem-notice {
  background: linear-gradient(135deg, #fef9f4 0%, #fff7ed 100%);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 32px;
  margin-bottom: 32px;
  text-align: center;
}
.oem-notice .oem-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 8px;
}
.oem-notice strong {
  display: block;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 6px;
}
.oem-notice p {
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== Company Intro ===== */
.company-intro { background: var(--white); }
.company-intro-text {
  max-width: 900px; margin: 0 auto; text-align: center;
  font-size: 1rem; color: var(--text-light); line-height: 1.8;
}

/* ===== Technology ===== */
.technology { background: var(--white); }
.tech-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.tech-card {
  padding: 32px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--white);
  transition: all 0.3s; position: relative;
}
.tech-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tech-num {
  font-size: 2.5rem; font-weight: 800; color: rgba(26,58,92,0.08);
  position: absolute; top: 20px; right: 28px; line-height: 1;
}
.tech-card h3 { font-size: 1.15rem; color: var(--primary); margin-bottom: 10px; padding-right: 50px; }
.tech-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; }

/* ===== Tips ===== */
.tips { background: var(--bg); }
.tips-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.tip-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 28px; border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
}
.tip-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tip-number {
  font-size: 2.8rem; font-weight: 800; color: #e8eef4;
  position: absolute; top: 20px; right: 24px;
  line-height: 1;
}
.tip-card h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 12px; padding-right: 50px; }
.tip-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; }

html[dir="rtl"] .tip-number { right: auto; left: 24px; }
html[dir="rtl"] .tip-card h3 { padding-right: 0; padding-left: 50px; }

/* ===== About ===== */
.about { background: var(--bg); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.about-text p { color: var(--text-light); margin-bottom: 14px; font-size: 0.95rem; line-height: 1.7; }
.stats { display: flex; gap: 40px; margin-top: 28px; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.82rem; color: var(--text-light); }
.about-features { padding-top: 4px; }
.factory-list { list-style: none; }
.factory-list li {
  padding: 12px 0 12px 28px; border-bottom: 1px solid var(--border);
  font-size: 0.92rem; color: var(--text); position: relative;
}
.factory-list li::before {
  content: '✓'; position: absolute; left: 0; top: 12px;
  color: var(--accent); font-weight: 700; font-size: 0.9rem;
}
.factory-list li:last-child { border-bottom: none; }

/* ===== Cases ===== */
.cases { background: var(--white); }
.case-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}
.case-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  transition: all 0.3s;
  border-top: 3px solid var(--primary);
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.case-img { display: none; }
.case-body { padding: 28px 24px; }
.case-tag {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  background: #fef4ec; color: var(--accent); font-size: 0.75rem;
  font-weight: 600; margin-bottom: 10px;
}
.case-body h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 8px; }
.case-body p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* ===== Contact Layout ===== */
.contact { background: var(--bg); }
.contact-layout {
  display: grid; grid-template-columns: 1fr 380px; gap: 40px;
  align-items: start;
}
.contact-form-wrap {
  background: var(--white); padding: 36px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-info-side {
  background: var(--white); padding: 36px; border-radius: var(--radius);
  box-shadow: var(--shadow); position: sticky; top: 84px;
}
.form-heading { font-size: 1.3rem; color: var(--primary); margin-bottom: 24px; font-weight: 700; }
.inquiry-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border);
  font-size: 0.92rem; font-family: inherit; color: var(--text);
  background: var(--bg); transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45,95,138,0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-success {
  text-align: center; padding: 16px; background: #ecfdf5;
  color: #065f46; border-radius: 8px; font-weight: 500; font-size: 0.9rem;
}

/* Contact Info Cards */
.info-cards { display: flex; flex-direction: column; gap: 12px; }
.info-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 10px; border: 1px solid var(--border);
  transition: all 0.2s;
}
a.info-card:hover { border-color: var(--primary-light); background: #f8f9fb; }
.info-icon { font-size: 1.4rem; flex-shrink: 0; }
.info-label { display: block; font-size: 0.78rem; color: var(--text-light); }
.info-value { display: block; font-size: 0.9rem; font-weight: 600; color: var(--primary); }

/* ===== Footer ===== */
.footer {
  background: var(--primary); color: rgba(255,255,255,0.7);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 36px;
}
.footer h3 { color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: rgba(255,255,255,0.7); font-size: 0.88rem; transition: color 0.2s; }
.footer-nav a:hover { color: #fff; }
.footer-info p { font-size: 0.88rem; }
.copyright {
  text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem; color: rgba(255,255,255,0.45);
}

/* ===== WhatsApp Float ===== */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa-green); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.55); }

/* ===== Inquiry Sticky ===== */
.inquiry-sticky {
  position: fixed; bottom: 100px; right: 28px; z-index: 199;
  padding: 10px 20px; border-radius: 50px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(232,120,42,0.35);
  transition: all 0.3s; white-space: nowrap;
}
.inquiry-sticky:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(232,120,42,0.5); color: #fff; }

/* ===== RTL (Arabic) ===== */
html[dir="rtl"] .nav a::after { left: auto; right: 0; }
html[dir="rtl"] .wa-float { right: auto; left: 28px; }
html[dir="rtl"] .inquiry-sticky { right: auto; left: 28px; }
html[dir="rtl"] .hero-btns { direction: ltr; }
html[dir="rtl"] .factory-list li { padding: 12px 28px 12px 0; }
html[dir="rtl"] .factory-list li::before { left: auto; right: 0; }
html[dir="rtl"] .product-body .product-features li { padding-left: 0; padding-right: 16px; }
html[dir="rtl"] .product-body .product-features li::before { left: auto; right: 0; }
html[dir="rtl"] .tech-num { right: auto; left: 28px; }
html[dir="rtl"] .tech-card h3 { padding-right: 0; padding-left: 50px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-info-side { position: static; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--white);
    padding: 20px; gap: 16px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .mobile-menu-btn { display: block; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content p { font-size: 1rem; }
  .hero-slide { min-height: 440px; padding: 130px 20px 60px; }
  .section-title { font-size: 1.5rem; }
  .adv-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats { gap: 20px; }
  .case-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .contact-form-wrap, .contact-info-side { padding: 24px; }
  .inquiry-sticky { bottom: 86px; right: 16px; bottom: 96px; }
  .wa-float { bottom: 20px; right: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content h1 { font-size: 1.5rem; }
  .hero-slide { min-height: 380px; padding: 110px 16px 50px; }
  .btn { padding: 12px 28px; font-size: 0.9rem; }
  .stats { flex-direction: column; gap: 12px; }
  .product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cat-filter { gap: 6px; }
  .cat-btn { padding: 8px 16px; font-size: 0.8rem; }
  .nav { gap: 6px; }
  .nav a { font-size: 0.82rem; }
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.88); z-index: 9999;
  align-items: center; justify-content: center;
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain; border-radius: 6px;
  cursor: default;
}
.lightbox-close {
  position: absolute; top: 20px; right: 32px;
  font-size: 42px; color: #fff; cursor: pointer;
  font-weight: 300; line-height: 1;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 0.7; }
