/* ============================================================
   HongFox — Shared Stylesheet (all languages, all pages)
   Extracted from index.html / products.html / pdcpd-ev-battery-enclosures.html
   ============================================================ */

/* ---------- Reset & Base ---------- */
:root {
  --blue: #005fae;
  --blue-dark: #003f7a;
  --dark: #111827;
  --gray: #6b7280;
  --bg: #f9fafb;
  --accent: #ffb300;
  --light-blue: #eff6ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--dark); line-height: 1.6; font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: auto; padding: 0 20px; }
section { padding: 50px 0; }

/* ---------- Header / Nav (shared) ---------- */
header { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 99; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.nav { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { font-size: 24px; font-weight: 800; color: var(--blue); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo img { height: 36px; width: auto; }

/* Desktop nav links */
header nav a { margin-left: 18px; text-decoration: none; color: var(--dark); font-weight: 500; font-size: 14px; }
header nav a:hover { color: var(--blue); }

/* Lang switch (inline flag list) */
.lang-switch { margin-left: 18px; padding-left: 18px; border-left: 2px solid #e5e7eb; display: flex; align-items: center; gap: 6px; }
.lang-switch a { margin: 0; font-size: 13px; padding: 2px 4px; color: var(--gray); text-decoration: none; }
.lang-switch a.active { color: var(--blue); font-weight: 700; }

/* Lang dropdown (products.html style) */
.lang-dropdown { position: relative; display: inline-block; margin-left: 10px; }
.lang-toggle { display: flex; align-items: center; gap: 5px; padding: 7px 14px; color: var(--dark); text-decoration: none; font-size: 13px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; background: #fff; transition: all .2s; }
.lang-toggle:hover { background: #f5f5f5; border-color: #999; }
.lang-toggle .caret { font-size: 10px; color: var(--gray); }
.lang-menu { display: none; position: absolute; top: 100%; right: 0; background: #fff; min-width: 200px; box-shadow: 0 4px 16px rgba(0,0,0,.12); border-radius: 6px; padding: 8px 0; z-index: 1000; max-height: 80vh; overflow-y: auto; }
.lang-dropdown:hover .lang-menu { display: block; }
.lang-menu a { display: block; padding: 8px 18px; color: #333; text-decoration: none; font-size: 13px; transition: background .2s; }
.lang-menu a:hover { background: #f8f9fa; }
.lang-menu a.current { background: #e8f4ff; color: #0066cc; font-weight: 600; }

/* Mobile lang select (index / ev pages) */
.lang-select { display: none; padding: 5px 8px; border-radius: 6px; border: 1px solid #ddd; font-size: 13px; margin-left: 18px; cursor: pointer; }

/* Mobile lang bar (products.html) */
.mobile-lang-bar { display: none; background: var(--blue); padding: 8px 12px; position: fixed; bottom: 52px; left: 0; right: 0; z-index: 998; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mobile-lang-bar::-webkit-scrollbar { display: none; }
.mobile-lang-bar a { display: inline-block; color: rgba(255,255,255,.7); text-decoration: none; font-size: 12px; padding: 4px 10px; border-radius: 4px; margin-right: 4px; transition: all .2s; }
.mobile-lang-bar a.active { background: rgba(255,255,255,.2); color: #fff; font-weight: 700; }
.mobile-lang-bar a:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Hamburger button */
.menu-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--blue); }

/* Mobile slide-down menu */
.mobile-menu { display: none; position: fixed; top: 68px; left: 0; right: 0; background: #fff; padding: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 98; }
.mobile-menu a { display: block; padding: 10px; border-bottom: 1px solid #f3f4f6; text-decoration: none; color: #111827; font-size: 14px; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { font-weight: 600; color: var(--blue); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; padding: 80px 20px; overflow: hidden; position: relative; }
.hero::after { content: ''; position: absolute; top: -50%; right: -10%; width: 400px; height: 400px; background: rgba(255,255,255,.03); border-radius: 50%; }
.hero-content { display: flex; align-items: center; gap: 50px; max-width: 1200px; margin: auto; position: relative; z-index: 1; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 36px; margin-bottom: 16px; line-height: 1.25; font-weight: 800; }
.hero-text p { font-size: 16px; opacity: .95; margin-bottom: 24px; max-width: 540px; }
.hero-image { flex: 1; text-align: right; }
.hero-image img { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--accent); color: #000; padding: 14px 30px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 15px; transition: all .25s; border: none; cursor: pointer; }
.btn:hover { background: #ffa000; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,179,0,.4); }
.btn-outline { display: inline-block; background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); padding: 12px 26px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; margin-left: 10px; transition: all .2s; }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* Small buttons (products.html) */
.btn-sm { display: inline-block; background: var(--blue); color: #fff; padding: 9px 20px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: 13px; transition: all .2s; }
.btn-sm:hover { background: var(--blue-dark); }
.btn-sm-outline { display: inline-block; background: transparent; color: var(--blue); border: 1.5px solid var(--blue); padding: 7px 18px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: 13px; transition: all .2s; }
.btn-sm-outline:hover { background: var(--blue); color: #fff; }

/* ---------- Trust Bar ---------- */
.trustbar { background: #fff; text-align: center; padding: 18px 20px; font-size: 13px; color: var(--gray); border-bottom: 1px solid #eee; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.trustbar span { display: inline-flex; align-items: center; gap: 6px; }
.trustbar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

/* ---------- Section Titles ---------- */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 28px; color: var(--dark); margin-bottom: 8px; font-weight: 800; }
.section-title p { color: var(--gray); font-size: 15px; }

/* ---------- Grid & Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.05); transition: transform .25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,.08); }
.card h3 { margin-bottom: 10px; color: var(--blue); font-size: 17px; }
.card p { color: var(--gray); font-size: 14px; }
.card img { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; margin-bottom: 14px; display: block; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.gallery-grid img { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.06); }

/* ---------- Table ---------- */
.table-wrap { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 4px 12px rgba(0,0,0,.05); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border: 1px solid #e5e7eb; padding: 11px 13px; text-align: left; }
th { background: #f3f4f6; font-weight: 700; }
tr:nth-child(even) td { background: #fafbfc; }

/* ---------- FAQ ---------- */
.faq-item { background: #fff; border-radius: 10px; margin-bottom: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.04); overflow: hidden; }
.faq-question { width: 100%; text-align: left; padding: 16px 20px; background: none; border: none; font-size: 15px; font-weight: 600; color: var(--dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: "+"; font-size: 20px; color: var(--blue); transition: transform .3s; }
.faq-question.active::after { content: "−"; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; padding: 0 20px; }
.faq-answer.open { padding: 0 20px 16px; max-height: 400px; }
.faq-answer p { font-size: 14px; color: var(--gray); line-height: 1.7; }

/* ---------- CTA Banner ---------- */
.cta-banner { background: linear-gradient(135deg, var(--blue), #0073d6); color: #fff; text-align: center; padding: 50px 20px; border-radius: 14px; margin: 30px 0; }
.cta-banner h2 { font-size: 24px; margin-bottom: 10px; font-weight: 800; }
.cta-banner p { font-size: 15px; opacity: .9; margin-bottom: 20px; }

/* ---------- Footer ---------- */
footer { background: var(--dark); color: #d1d5db; padding: 40px 20px 24px; margin-top: 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 30px; margin-bottom: 24px; max-width: 1200px; margin-left: auto; margin-right: auto; }
.footer-grid h4 { color: #fff; margin-bottom: 12px; font-size: 14px; }
.footer-grid a { display: block; color: #9ca3af; text-decoration: none; margin-bottom: 6px; font-size: 13px; }
.footer-grid a:hover { color: #93c5fd; }
.footer-bottom { text-align: center; margin-top: 30px; padding-top: 16px; border-top: 1px solid #374151; font-size: 12px; color: #6b7280; max-width: 1200px; margin-left: auto; margin-right: auto; }

/* ---------- Mobile Bottom CTA Bar ---------- */
.mobile-cta { position: fixed; bottom: 0; left: 0; right: 0; background: var(--blue); display: none; justify-content: space-around; padding: 10px; z-index: 999; }
.mobile-cta a { color: #fff; text-decoration: none; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 6px; background: rgba(255,255,255,.15); }
.mobile-cta a:hover { background: rgba(255,255,255,.25); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: #fff; padding: 14px 0; font-size: 13px; color: var(--gray); border-bottom: 1px solid #f3f4f6; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Form Styles ---------- */
.contact-inline { background: #fff; padding: 30px; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.06); max-width: 600px; margin: 0 auto; }
.contact-inline label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; }
.contact-inline input,
.contact-inline textarea,
.contact-inline select { width: 100%; padding: 11px 14px; margin-bottom: 12px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.contact-inline input:focus,
.contact-inline textarea:focus,
.contact-inline select:focus { outline: none; border-color: var(--blue); }
.contact-inline textarea { resize: vertical; min-height: 80px; }
.form-success { display: none; background: #ecfdf5; color: #059669; padding: 12px 16px; border-radius: 8px; margin-bottom: 12px; font-weight: 600; font-size: 14px; }

/* Inline form styles (index & ev pages) */
.inline-form input[type="text"],
.inline-form input[type="email"] { padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; width: 100%; }
.inline-form textarea { padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; width: 100%; min-height: 120px; resize: vertical; }

/* ---------- Products Page Specific ---------- */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; color: var(--dark); margin-bottom: 8px; font-weight: 800; }
.section-header p { color: var(--gray); font-size: 15px; max-width: 560px; margin: auto; }
.section-header .tag { display: inline-block; background: var(--light-blue); color: var(--blue); font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 20px; margin-bottom: 10px; letter-spacing: .5px; text-transform: uppercase; }

.product-category { margin-bottom: 20px; }
.product-category-inner { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.05); transition: box-shadow .3s; }
.product-category-inner:hover { box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.cat-header { display: flex; align-items: center; gap: 16px; padding: 20px 28px; cursor: pointer; user-select: none; border-bottom: 1px solid #f3f4f6; transition: background .2s; }
.cat-header:hover { background: #fafbfc; }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.cat-icon-blue { background: #eff6ff; color: #2563eb; }
.cat-icon-green { background: #ecfdf5; color: #059669; }
.cat-icon-purple { background: #f5f3ff; color: #7c3aed; }
.cat-icon-orange { background: #fff7ed; color: #ea580c; }
.cat-icon-gray { background: #f3f4f6; color: #4b5563; }
.cat-title { flex: 1; }
.cat-title h3 { font-size: 20px; color: var(--dark); margin-bottom: 2px; font-weight: 700; }
.cat-title p { font-size: 13px; color: var(--gray); }
.cat-arrow { font-size: 20px; color: var(--gray); transition: transform .3s; }
.cat-arrow.open { transform: rotate(180deg); }
.cat-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.cat-body.open { max-height: 3000px; }
.cat-body-inner { padding: 28px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 20px; }
.product-card { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; }
.product-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.product-card:hover img { transform: scale(1.05); }
.product-card .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 50%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; }
.product-card .overlay h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.product-card .overlay span { color: rgba(255,255,255,.85); font-size: 12px; }
.product-card .badge { position: absolute; top: 10px; right: 10px; background: rgba(255,179,0,.95); color: #000; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }

.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #f3f4f6; }
.feature-tag { background: var(--light-blue); color: var(--blue); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.feature-tag.green { background: #ecfdf5; color: #059669; }
.feature-tag.purple { background: #f5f3ff; color: #7c3aed; }
.feature-tag.orange { background: #fff7ed; color: #ea580c; }

.cat-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; }

/* Spec strip */
.spec-strip { background: var(--dark); color: #fff; padding: 40px 0; border-radius: 14px; margin: 30px 0; }
.spec-strip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; text-align: center; }
.spec-item .num { font-size: 32px; font-weight: 800; color: #60a5fa; display: block; margin-bottom: 4px; }
.spec-item .label { font-size: 13px; color: #9ca3af; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .close { position: absolute; top: 20px; right: 30px; font-size: 36px; color: #fff; cursor: pointer; background: none; border: none; }

/* ---------- Responsive: Tablet & Below ---------- */
@media (max-width: 900px) {
  .hero-content { flex-direction: column; text-align: center; gap: 30px; }
  .hero-text h1 { font-size: 26px; }
  .hero-text p { margin: 0 auto 20px; }
  .hero-image { text-align: center; }
  header nav { display: none; }
  .lang-switch { display: none; }
  .lang-select { display: block; }
  .lang-dropdown { display: none; }
  .menu-toggle { display: block; }
  .mobile-lang-bar { display: block; }
  .mobile-cta { display: flex; }
  section { padding: 35px 0; }
}

/* ---------- Responsive: Phone ---------- */
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .spec-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-text h1 { font-size: 24px; }
  .cta-banner h2 { font-size: 20px; }
  .cat-header { padding: 16px 18px; }
  .cat-body-inner { padding: 18px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ---------- Hide floating contact on mobile (handled by mobile-cta bar) ---------- */
@media (max-width: 768px) {
  .floating-contact { display: none !important; }
}

/* ---------- RTL Support (Arabic) ---------- */
html[dir="rtl"] .lang-switch { border-left: none; border-right: 2px solid #e5e7eb; margin-left: 0; margin-right: 18px; padding-left: 0; padding-right: 18px; }
html[dir="rtl"] .mobile-lang-bar { left: 0; right: 0; }
html[dir="rtl"] .mobile-menu a { text-align: right; }
