/* ===== CSS Variables ===== */
:root {
  --color-primary: #1a3a5c;
  --color-primary-dark: #0f2840;
  --color-accent: #c8a45c;
  --color-accent-hover: #b8943c;
  --color-text: #2c2c2c;
  --color-text-light: #666;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-dark: #1a1a2e;
  --color-border: #e2e8f0;
  --color-success: #28a745;
  --color-whatsapp: #25d366;
  --font-sans: 'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --container-max: 1180px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-accent); }

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

/* ===== RTL Support ===== */
.rtl { direction: rtl; text-align: right; }
.rtl .breadcrumb { direction: ltr; text-align: right; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-bg);
}
/* Top bar is inside .site-header but outside .header-inner container */
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0; max-width: var(--container-max); margin: 0 auto;
  height: 60px;
}
.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  color: var(--color-primary);
  letter-spacing: 2px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0;
  line-height: 1;
  font-weight: 600;
  flex-shrink: 0;
}
.logo-bunyan {
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 2px;
}
.logo-dot {
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 4px;
  font-size: 1.6rem;
}
.logo-home {
  font-weight: 300;
  color: var(--color-secondary);
  letter-spacing: 2px;
}

.main-nav { display: flex; align-items: center; height: 60px; }
.nav-link {
  font-size: 16px; font-weight: 400; color: #4d4d4d;
  padding: 0 30px; line-height: 60px; position: relative;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: #78899a; }
.nav-link .nav-arrow {
  font-size: 10px; opacity: 0.5; margin-left: 2px;
  transition: transform 0.2s;
}
.nav-link:hover .nav-arrow { opacity: 0.8; }

/* nav separator (helenbo-style base64 background) */
.nav-separator {
  position: relative; width: 10px; height: 100%;
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAIAQMAAAAC1AcCAAAAA1BMVEWZmZl86KQWAAAACklEQVQI12NAAwAAEAABtKqAHwAAAABJRU5ErkJggg==);
  background-position: center center; background-repeat: no-repeat;
  flex-shrink: 0;
}

.header-actions { display: flex; align-items: center; gap: 16px; height: 60px; }

/* ===== Header Search (helenbo-style) ===== */
.header-search {
  display: flex; align-items: center; position: relative;
}
.search-input {
  width: 160px; height: 34px; padding: 0 36px 0 14px;
  border: 1px solid #ddd; border-radius: 17px;
  font-size: 0.82rem; color: #4d4d4d; outline: none;
  background: #f9f9f9; transition: all 0.25s ease;
}
.search-input:focus { border-color: #78899a; background: #fff; width: 200px; }
.search-input::placeholder { color: #999; }
.search-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 0.95rem;
  padding: 4px 8px; color: #999; line-height: 1;
}
.search-btn:hover { color: #78899a; }

/* ===== Language Switcher (helenbo-style) ===== */
.lang-switcher { position: relative; }
.lang-toggle {
  display: flex; align-items: center; gap: 6px;
  background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 6px;
  padding: 7px 12px; cursor: pointer; font-size: 0.85rem;
  color: var(--color-text); transition: all 0.2s ease;
  white-space: nowrap;
}
.lang-toggle:hover, .lang-switcher.open .lang-toggle { background: #e8e8e8; border-color: #ccc; }
.lang-flag-img { width: 16px; height: 12px; object-fit: cover; border-radius: 1px; flex-shrink: 0; }
.lang-name { font-weight: 400; }
.lang-chevron { opacity: 0.4; transition: transform 0.2s ease; margin-left: 2px; }
.lang-switcher.open .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  margin-top: 8px; background: #fff; border: 1px solid #e0e0e0;
  border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  padding: 12px 0; min-width: 360px; z-index: 200;
}
.lang-switcher.open .lang-dropdown { display: block; }
.lang-dropdown-cols { display: flex; }
.lang-dropdown-col {
  display: flex; flex-direction: column; gap: 0;
  flex: 1; padding: 0 6px;
}
.lang-dropdown-col:first-child { border-right: 1px solid #eee; padding: 0 8px 0 12px; }
.lang-dropdown-col:last-child { padding: 0 12px 0 8px; }
.lang-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 0.88rem; color: #333;
  text-decoration: none; transition: background 0.15s ease;
  border-radius: 6px;
}
.lang-item:hover { background: #f0f4ff; }
.lang-item.active { background: #e8edf5; font-weight: 600; color: var(--color-primary); }
.lang-item .lang-flag-img { flex-shrink: 0; }

/* ===== Top Bar (helenbo-style: Email | Phone | Flags) ===== */
.top-bar {
  background: #333;
  color: #ccc;
  font-size: 0.82rem;
  height: 36px;
  line-height: 36px;
}
.top-bar .container {
  height: 36px;
}
.top-bar-inner {
  display: flex; align-items: center;
  height: 36px;
  gap: 28px;
}
.top-bar-left {
  display: flex; align-items: center; gap: 28px;
}
.top-bar-item {
  color: #ccc; text-decoration: none; white-space: nowrap;
  transition: color 0.2s;
  font-size: 0.82rem;
}
.top-bar-item:hover { color: #fff; }
.top-bar-flags {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
}
.top-bar-flags a {
  opacity: 0.55; transition: all 0.2s ease;
  text-decoration: none; line-height: 1;
  display: flex; align-items: center;
}
.top-bar-flags a:hover { opacity: 1; transform: scale(1.2); }
.top-bar-flags a.active { opacity: 1; }
.top-bar-flags a img {
  display: block; width: 16px; height: 12px;
  border-radius: 1px;
}

.mobile-menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 10px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; border: 2px solid transparent;
  transition: var(--transition); text-align: center;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-outline { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-whatsapp { background: var(--color-whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff; padding: 80px 0; text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; font-weight: 700; }
.hero-subtitle { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 24px; }
.hero-actions .btn-outline { border-color: #fff; color: #fff; }
.hero-actions .btn-outline:hover { background: #fff; color: var(--color-primary); }
.hero-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; opacity: 0.8; font-size: 0.9rem; }
.hero-badges span { padding: 4px 12px; border: 1px solid rgba(255,255,255,0.3); border-radius: 20px; }

/* ===== Trust Bar ===== */
.trust-bar { background: var(--color-bg-light); padding: 40px 0; border-bottom: 1px solid var(--color-border); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.trust-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.trust-item strong { display: block; margin-bottom: 4px; color: var(--color-primary); }
.trust-item p { font-size: 0.85rem; color: var(--color-text-light); }

/* ===== Section Titles ===== */
.section-title { font-size: 1.8rem; text-align: center; margin-bottom: 8px; color: var(--color-primary); }
.section-desc { text-align: center; color: var(--color-text-light); margin-bottom: 40px; }

/* ===== Categories Grid ===== */
.categories-section { padding: 60px 0; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.category-card {
  display: block; padding: 32px 24px; border: 1px solid var(--color-border);
  border-radius: var(--radius); text-align: center; transition: var(--transition);
  background: var(--color-bg);
}
.category-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-accent); transform: translateY(-2px); }
.category-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.category-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--color-primary); }
.category-card p { font-size: 0.9rem; color: var(--color-text-light); margin-bottom: 12px; }
.category-link { font-size: 0.85rem; font-weight: 600; color: var(--color-accent); }

/* ===== Product Detail ===== */
.product-detail { padding: 40px 0; }
.breadcrumb { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 24px; }
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product-images { border-radius: var(--radius); overflow: hidden; }
.product-images img { width: 100%; border-radius: var(--radius); }
.product-info h1 { font-size: 1.8rem; margin-bottom: 8px; }
.sku { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 12px; }

.cert-tags { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.cert-tag { padding: 4px 10px; background: var(--color-bg-light); border: 1px solid var(--color-border); border-radius: 4px; font-size: 0.8rem; font-weight: 600; }

.product-desc { margin-bottom: 24px; line-height: 1.8; }

.specs-table { margin-bottom: 24px; }
.specs-table h3 { font-size: 1.1rem; margin-bottom: 12px; }
.specs-table table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.specs-table td:first-child { font-weight: 600; color: var(--color-text-light); width: 40%; }

.tiered-pricing { margin-bottom: 24px; }
.tiered-pricing h3 { font-size: 1.1rem; margin-bottom: 12px; }
.tiered-pricing table { width: 100%; border-collapse: collapse; }
.tiered-pricing th, .tiered-pricing td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); text-align: left; font-size: 0.9rem; }
.tiered-pricing th { background: var(--color-bg-light); font-weight: 600; }
.pricing-note { font-size: 0.8rem; color: var(--color-text-light); margin-top: 8px; }

.product-actions { display: flex; gap: 12px; margin-bottom: 24px; }
.product-meta { background: var(--color-bg-light); padding: 16px; border-radius: var(--radius); font-size: 0.9rem; }
.product-meta p { margin-bottom: 4px; }

/* ===== Products List Page ===== */
.category-page { padding: 40px 0; }
.category-page h1 { font-size: 1.8rem; margin-bottom: 24px; color: var(--color-primary); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.product-card {
  display: block; border: 1px solid var(--color-border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition); background: var(--color-bg);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-image { height: 200px; overflow: hidden; background: var(--color-bg-light); }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px; }
.product-card-body h3 { font-size: 1rem; margin-bottom: 8px; }
.product-card-body p { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 12px; }
.product-card-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.sku { font-size: 0.8rem; color: var(--color-text-light); background: var(--color-bg-light); padding: 2px 8px; border-radius: 4px; }
.cert-mini { display: flex; gap: 4px; }
.cert-mini span { font-size: 0.7rem; padding: 2px 6px; background: #e8f4fd; border-radius: 3px; color: var(--color-primary); }

/* ===== About Page ===== */
.about-page { padding: 60px 0; }
.about-content { max-width: 800px; margin: 0 auto; }
.about-content h1 { font-size: 2rem; margin-bottom: 24px; color: var(--color-primary); }
.about-content h2 { font-size: 1.4rem; margin: 32px 0 16px; color: var(--color-primary); }
.about-content p { margin-bottom: 16px; line-height: 1.8; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; }
.stat-item { text-align: center; padding: 24px; background: var(--color-bg-light); border-radius: var(--radius); }
.stat-item strong { display: block; font-size: 2rem; color: var(--color-accent); margin-bottom: 4px; }
.stat-item span { font-size: 0.9rem; color: var(--color-text-light); }

/* ===== OEM/ODM Page ===== */
.oem-page { padding: 60px 0; }
.oem-content { max-width: 800px; margin: 0 auto; }
.oem-content h1 { font-size: 2rem; margin-bottom: 24px; color: var(--color-primary); }
.oem-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; margin: 32px 0; }
.oem-step { padding: 24px; background: var(--color-bg-light); border-radius: var(--radius); border-left: 3px solid var(--color-accent); }
.oem-step h3 { font-size: 1rem; margin-bottom: 8px; color: var(--color-primary); }
.oem-step p { font-size: 0.9rem; color: var(--color-text-light); }

/* ===== Contact / Inquiry Form ===== */
.contact-page { padding: 60px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h2 { font-size: 1.4rem; margin-bottom: 16px; color: var(--color-primary); }
.contact-info p { margin-bottom: 12px; line-height: 1.8; }
.contact-info ul { list-style: none; }
.contact-info li { padding: 8px 0; border-bottom: 1px solid var(--color-border); }

.inquiry-section { margin-top: 48px; }
.inquiry-section h2 { font-size: 1.4rem; margin-bottom: 24px; color: var(--color-primary); }

.quote-form { background: var(--color-bg-light); padding: 32px; border-radius: var(--radius); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.form-group input, .form-group textarea, .form-group select {
  padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font-sans); transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(26,58,92,0.1); }
.form-note { font-size: 0.8rem; color: var(--color-text-light); margin-top: 12px; }

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff; padding: 60px 0; text-align: center;
}
.cta-section h2 { font-size: 1.8rem; margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 24px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; }
.cta-section .btn-outline { border-color: #fff; color: #fff; }
.cta-section .btn-outline:hover { background: #fff; color: var(--color-primary); }

/* ===== Footer ===== */
.site-footer { background: var(--color-bg-dark); color: #ccc; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-col p { font-size: 0.85rem; line-height: 1.6; margin-bottom: 8px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #ccc; font-size: 0.85rem; }
.footer-col a:hover { color: var(--color-accent); }
.cert-badges { display: flex; gap: 8px; margin-top: 12px; }
.cert-badge { padding: 4px 8px; border: 1px solid #555; border-radius: 4px; font-size: 0.75rem; color: #aaa; }
.footer-bottom { border-top: 1px solid #333; padding-top: 24px; text-align: center; font-size: 0.8rem; color: #888; }
.footer-legal-links { margin-top: 12px; }
.footer-legal-links a { color: #7eb8da; text-decoration: none; transition: color 0.2s; }
.footer-legal-links a:hover { color: #a8d4ea; text-decoration: underline; }
.footer-sep { margin: 0 8px; color: #555; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: block; }
  .top-bar-item { display: none; }
  .top-bar-inner { justify-content: center; }
  .top-bar-flags { margin-left: 0; gap: 8px; }
  .top-bar-flags a { font-size: 1.1rem; }
  .lang-toggle .lang-name { display: none; }
  .lang-dropdown { min-width: 260px; right: -40px; }
  .lang-toggle { padding: 5px 8px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
