/* =====================================================
   Monex Battery — Global Styles
   ===================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #eff6ff;
  --accent:        #10b981;
  --dark:          #0f172a;
  --dark-2:        #1e293b;
  --mid:           #334155;
  --text:          #475569;
  --text-light:    #94a3b8;
  --border:        #e2e8f0;
  --bg:            #ffffff;
  --bg-light:      #f8fafc;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:     0 12px 40px rgba(0,0,0,.14);
  --transition:    0.25s ease;
  --max-width:     1200px;
}

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

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;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  color: var(--dark);
  line-height: 1.25;
  font-weight: 700;
}

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

.section { padding: 96px 0; }
.section-dark  { background: var(--dark-2); }
.section-light { background: var(--bg-light); }

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.section-dark .section-tag {
  background: rgba(37,99,235,.2);
  color: #93c5fd;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}

.section-dark .section-title { color: #f1f5f9; }

.section-sub {
  font-size: 1.05rem;
  color: var(--text-light);
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: var(--bg-light);
  color: var(--primary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; }
.logo-text  {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -.02em;
}
.logo-text span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mid);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark);
  padding: 6px;
  margin-left: auto;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
  display: flex;
  align-items: center;
  padding-top: 68px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-export-map-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(.94) saturate(1.02);
  opacity: .78;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(15,23,42,.82) 0%, rgba(15,23,42,.62) 34%, rgba(15,23,42,.28) 70%),
    linear-gradient(180deg, rgba(15,23,42,.24), rgba(15,23,42,.58));
  z-index: 1;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.07) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
}

.hero-bg-grid::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  background:
    radial-gradient(circle at 73% 35%, rgba(96,165,250,.18), transparent 16%),
    linear-gradient(105deg, transparent 0 42%, rgba(56,189,248,.13) 48%, transparent 55%);
  mix-blend-mode: screen;
  opacity: .38;
  pointer-events: none;
  animation: hero-route-sheen 9s ease-in-out infinite;
}

.hero-route-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  pointer-events: none;
}

.hero-route-layer svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-route-path {
  fill: none;
  stroke: rgba(96,165,250,.66);
  stroke-width: .42;
  stroke-linecap: round;
  filter: url("#routeGlow");
  opacity: .82;
  animation: route-breathe 7s ease-in-out infinite;
}

.hero-route-west-africa { animation-delay: -1.6s; }
.hero-route-congo { animation-delay: -3.2s; }

.hero-route-head {
  fill: rgba(147,197,253,.9);
  filter: url("#routeGlow");
  opacity: .86;
}

@keyframes hero-route-sheen {
  0%, 100% { transform: translate3d(-1.2%, 0, 0); opacity: .28; }
  50% { transform: translate3d(1.2%, -.4%, 0); opacity: .44; }
}

@keyframes route-breathe {
  0%, 100% { opacity: .58; }
  50% { opacity: .82; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-grid::before { animation: none; opacity: .3; }
  .hero-route-path { animation: none; }
}

.hero-inner {
  position: relative;
  z-index: 3;
  padding: 80px 24px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,.15);
  border: 1px solid rgba(16,185,129,.3);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.hero-badge::before { content: '●'; font-size: 0.5rem; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: #f8fafc;
  letter-spacing: -.03em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

/* Stats Bar */
.stats-bar {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 24px 40px;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 0 32px;
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.1;
}
.stat-unit { color: var(--primary); font-size: 1.4rem; font-weight: 800; }
.stat-label { font-size: 0.78rem; color: #64748b; margin-top: 4px; }
.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.12);
  flex-shrink: 0;
}

/* ---------- Products ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: all var(--transition);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.product-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,.08), var(--shadow-md);
}

.featured-badge {
  position: absolute;
  top: -1px; right: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.product-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #fff;
}
.product-icon svg { width: 26px; height: 26px; }

.product-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.product-card p {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.65;
}

.product-specs {
  margin-bottom: 24px;
}
.product-specs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--mid);
  padding: 5px 0;
  border-bottom: 1px solid var(--bg-light);
}
.product-specs li:last-child { border-bottom: none; }
.product-specs svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

/* ---------- Advantages Grid ---------- */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.advantage-item {
  padding: 28px 24px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  transition: background var(--transition);
}
.advantage-item:hover { background: rgba(37,99,235,.08); }

.adv-icon {
  width: 48px; height: 48px;
  background: rgba(37,99,235,.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  margin-bottom: 16px;
}
.adv-icon svg { width: 22px; height: 22px; }

.advantage-item h4 {
  color: #f1f5f9;
  font-size: 1rem;
  margin-bottom: 8px;
}
.advantage-item p {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- About ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-content p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

.factory-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
}
.factory-stat {
  padding: 36px 28px;
  text-align: center;
  background: var(--bg);
  transition: background var(--transition);
}
.factory-stat:hover { background: var(--primary-light); }
.factory-stat span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.factory-stat small {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ---------- Factory Showcase ---------- */
.factory-showcase {
  width: 100%;
  background: #0f172a;
  overflow: hidden;
}

.factory-showcase-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.factory-showcase-viewport::-webkit-scrollbar { display: none; }

.factory-showcase-track {
  display: flex;
  width: max-content;
  min-width: max-content;
}

.factory-showcase-slide {
  flex: 0 0 auto;
  height: clamp(300px, 42vw, 520px);
  margin: 0;
  overflow: hidden;
  background: #0f172a;
  line-height: 0;
}

.factory-showcase-slide img {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* ---------- Certifications ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.cert-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}
.cert-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 0.85rem;
  margin: 0 auto 14px;
  background: var(--primary);
  color: #fff;
  letter-spacing: .02em;
}
.cert-badge.ce   { background: #1d4ed8; }
.cert-badge.rohs { background: #059669; }
.cert-badge.un   { background: #0369a1; }
.cert-badge.iec  { background: #7c3aed; }
.cert-badge.msds { background: #b45309; }

.cert-card h4 { font-size: 0.95rem; margin-bottom: 6px; }
.cert-card p  { font-size: 0.8rem; color: var(--text-light); }

.cert-download {
  text-align: center;
}
.cert-download p {
  margin-bottom: 16px;
  color: var(--text);
}

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.contact-info p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 32px;
}

.contact-items { display: flex; flex-direction: column; gap: 20px; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.contact-item svg {
  width: 20px; height: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--dark);
  margin-bottom: 2px;
}
.contact-item span {
  font-size: 0.9rem;
  color: var(--text);
}

/* Contact Form */
.contact-form {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-group textarea { resize: vertical; }

.form-note {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 12px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: #94a3b8;
  padding-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand .logo-text { color: #f1f5f9; }
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 240px;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #94a3b8;
  transition: all var(--transition);
}
.social-links a:hover { background: var(--primary); color: #fff; }
.social-links svg { width: 16px; height: 16px; }

.footer-col h5 {
  color: #f1f5f9;
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  padding: 5px 0;
  color: #64748b;
  transition: color var(--transition);
}
.footer-col a:hover { color: #93c5fd; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.8rem;
  color: #475569;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Product Detail Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  max-width: 680px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(.97);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-light);
  color: var(--mid);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--border); }

.modal-hero-image {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  padding: 18px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-hero-image img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.modal-thumb {
  width: 64px;
  height: 64px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-light);
  padding: 4px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.modal-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.modal-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.modal-icon svg { width: 26px; height: 26px; }

.modal-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.modal-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.modal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.modal-badge--blue  { background: var(--primary-light); color: var(--primary); }
.modal-badge--green { background: #d1fae5; color: #065f46; }
.modal-badge--amber { background: #fef3c7; color: #92400e; }

.modal-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.modal-spec-item {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.modal-spec-item strong {
  display: block;
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}
.modal-spec-item span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark);
}

.modal-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 16px;
}

.modal-apps {
  margin-bottom: 24px;
}
.modal-apps-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-light);
  margin-bottom: 10px;
}
.modal-apps-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.modal-app-tag {
  font-size: 0.8rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--mid);
}

.modal-inquire-btn { margin-top: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--dark);
  color: #f1f5f9;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  z-index: 9999;
  max-width: 320px;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { border-left: 4px solid var(--accent); }
.toast.error   { border-left: 4px solid #ef4444; }

/* ---------- Battery Products Grid ---------- */
.battery-carousel-shell {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 16px;
  align-items: center;
}

.battery-carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.battery-products-grid {
  display: flex;
  transition: transform .45s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}

.battery-card {
  flex: 0 0 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.battery-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.battery-thumb {
  grid-row: 1 / span 2;
  min-height: 390px;
  background: var(--bg-light);
  border-right: 1px solid var(--border);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.battery-thumb img {
  width: 70%;
  height: auto;
  max-height: 310px;
  object-fit: contain;
}

.battery-card-body {
  padding: 34px 34px 20px;
  min-width: 0;
}
.battery-type {
  display: inline-flex;
  align-items: center;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.battery-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.battery-card p {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.battery-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.battery-meta-grid span {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--mid);
  font-size: 0.82rem;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}
.battery-meta-grid strong {
  display: block;
  color: var(--text-light);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}

.battery-card-actions {
  display: flex;
  gap: 10px;
  padding: 0 34px 34px;
  min-width: 0;
}
.battery-card-actions .btn {
  justify-content: center;
  min-width: 0;
}

.battery-carousel-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.battery-carousel-arrow:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.battery-carousel-arrow:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.battery-carousel-arrow svg {
  width: 20px;
  height: 20px;
}

.battery-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.battery-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}
.battery-carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--primary);
}

.anchor-target {
  display: block;
  position: relative;
  top: -68px;
  visibility: hidden;
}

/* Small button variant */
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-layout    { grid-template-columns: 1fr; gap: 48px; }
  .contact-layout  { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }

  .hero::before {
    background-image: image-set(
      url("../images/hero-export-map-mobile.webp") type("image/webp"),
      url("../images/hero-export-map-mobile.png") type("image/png")
    );
    background-size: cover;
    background-position: 52% bottom;
    filter: brightness(.9) saturate(1.04);
    opacity: .82;
  }

  .hero::after {
    background:
      radial-gradient(circle at 50% 24%, rgba(15,23,42,.84) 0%, rgba(15,23,42,.64) 38%, rgba(15,23,42,.22) 72%),
      linear-gradient(180deg, rgba(15,23,42,.18), rgba(15,23,42,.5));
  }

  .hero-route-layer {
    display: block;
  }

  .hero-route-path {
    stroke-width: .5;
    opacity: .68;
  }

  .nav-links { display: none; flex-direction: column; position: absolute;
    top: 68px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 16px 24px;
    box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-cta  { display: none; }
  .nav-toggle { display: flex; }

  .hero-title { font-size: 2rem; }
  .hero-actions { margin-bottom: 48px; }
  .stats-bar  {
    padding: 18px;
    background: rgba(255,255,255,.035);
    border-color: rgba(255,255,255,.08);
  }
  .stat-item  { padding: 0 16px; }
  .stat-divider { display: none; }

  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .products-grid    { grid-template-columns: 1fr; }
  .battery-carousel-shell {
    display: block;
    padding-bottom: 66px;
  }
  .battery-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .battery-thumb {
    grid-row: auto;
    min-height: 170px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .battery-thumb img {
    width: 46%;
    max-height: 130px;
  }
  .battery-carousel-arrow {
    position: absolute;
    bottom: 0;
  }
  .battery-carousel-arrow--left { left: 0; }
  .battery-carousel-arrow--right { right: 0; }
  .battery-carousel-dots {
    margin-top: -43px;
    min-height: 48px;
    align-items: center;
  }
  .advantages-grid  { grid-template-columns: 1fr 1fr; }
  .cert-grid        { grid-template-columns: repeat(3, 1fr); }

  .factory-showcase-slide {
    height: 300px;
  }

}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .advantages-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .factory-card { grid-template-columns: 1fr; }
    .factory-showcase-slide { height: clamp(200px, 50vw, 320px); }

  .container { padding: 0 18px; }
  .battery-card-body { padding: 20px 18px 16px; }
  .battery-card { width: 100%; }
  .battery-thumb {
    min-height: 118px;
    padding: 14px;
  }
  .battery-thumb img {
    width: 42%;
    max-height: 104px;
  }
  .battery-meta-grid { grid-template-columns: 1fr; }
  .battery-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0 18px 20px;
  }
  .modal-box { padding: 32px 22px 26px; }
  .modal-hero-image {
    aspect-ratio: 1 / 1;
    padding: 12px;
    max-width: 300px;
  }
  .modal-hero-image img {
    width: 80%;
    height: 80%;
  }
  .modal-specs { grid-template-columns: 1fr; }
}
