/* ==========================================================================
   DRC ELEKTRONİK - HIGH-CONTRAST INDUSTRIAL ENGINEERING DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Color Palette - Ultra-High Contrast Engineering Theme */
  --bg-dark: #090D16;
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #111827;
  --bg-input: #030712;

  /* Accents - High Visibility Industrial Colors */
  --accent-cyan: #38BDF8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-blue: #0284C7;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-red: #EF4444;

  /* Typography Colors - WCAG AAA Compliant High Contrast */
  --text-main: #FFFFFF;       /* 100% Pure White for Titles & Headers */
  --text-muted: #E2E8F0;      /* Ultra-Readable Light Slate for Body Text */
  --text-dim: #94A3B8;        /* Secondary Technical Labels */
  
  /* Borders */
  --border-subtle: #334155;
  --border-active: #38BDF8;

  /* Fonts */
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Layout */
  --container-width: 1280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: all 0.2s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-muted);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: var(--accent-cyan);
  color: #000;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

/* Badges & Labels */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
  white-space: nowrap;
}

.badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.4);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.4);
}

.badge-mono {
  font-family: var(--font-mono);
  background: #1E293B;
  color: #FFFFFF;
  border-color: var(--border-subtle);
}

/* Prices */
.price-tag {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.price-old {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-left: 6px;
}

/* ==========================================================================
   Header & Topbar
   ========================================================================== */

.top-bar {
  background: #030712;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  padding: 10px 0;
  color: var(--text-muted);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-contacts {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.top-contacts a {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: var(--transition);
}

.top-contacts a:hover {
  color: var(--accent-cyan);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #0284C7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: #FFFFFF;
  border: 1px solid var(--accent-cyan);
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle-btn {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Mobile Drawer Navigation */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg-primary);
  border-left: 2px solid var(--border-active);
  z-index: 2500;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  z-index: 2450;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-links {
  list-style: none;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #0284C7;
  color: #FFFFFF;
  border: 1px solid var(--accent-cyan);
}

.btn-primary:hover {
  background: #0369A1;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--bg-secondary);
}

.btn-whatsapp {
  background: #16A34A;
  color: #FFFFFF;
  border: 1px solid #22C55E;
}

.btn-whatsapp:hover {
  background: #15803D;
}

/* ==========================================================================
   Hero Technical Section
   ========================================================================== */

.hero {
  position: relative;
  padding: 50px 0 50px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-dark) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  margin: 14px 0;
  color: var(--text-main);
}

.hero-title span {
  color: var(--accent-cyan);
}

.hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.stat-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

/* Terminal & Pinout Simulation Card */
.terminal-card {
  background: #030712;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
}

.terminal-screen {
  background: #090D16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38BDF8;
}

.terminal-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.terminal-line span:first-child {
  color: var(--text-dim);
}

.terminal-line span:last-child {
  color: #FFFFFF;
  font-weight: 700;
}

/* ==========================================================================
   Technical Catalog & Matrix Section
   ========================================================================== */

.section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 36px;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  margin: 10px 0;
  color: var(--text-main);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Toolbar: Search, Filters & View Toggle */
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.catalog-search-bar {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.catalog-search-bar input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.9rem;
  outline: none;
}

.catalog-search-bar input:focus {
  border-color: var(--accent-cyan);
}

.catalog-search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.view-toggle {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn.active {
  background: var(--bg-secondary);
  color: var(--accent-cyan);
  border: 1px solid var(--border-subtle);
}

/* Category Filter Track */
.category-filter-wrapper {
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}

.category-filter {
  display: flex;
  gap: 8px;
  width: max-content;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
  background: #0284C7;
  color: #FFFFFF;
  border-color: var(--accent-cyan);
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.product-card:hover {
  border-color: var(--border-active);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.product-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #FFFFFF;
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.product-specs-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.product-specs-table td {
  padding: 6px 0;
}

.product-specs-table td:first-child {
  color: var(--text-dim);
}

.product-specs-table td:last-child {
  color: #FFFFFF;
  font-weight: 600;
  text-align: right;
  font-family: var(--font-mono);
}

.product-card-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.product-card-footer .btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.82rem;
}

/* Technical Matrix Table View */
.matrix-container {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.tech-table th {
  background: #030712;
  color: var(--accent-cyan);
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--border-subtle);
  white-space: nowrap;
  font-family: var(--font-heading);
}

.tech-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  vertical-align: middle;
}

.tech-table tr:hover {
  background: var(--bg-secondary);
}

.tech-table .model-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #FFFFFF;
}

/* ==========================================================================
   Modbus & Technical Parameters Section
   ========================================================================== */

.tech-spec-section {
  background: var(--bg-primary);
  border-y: 1px solid var(--border-subtle);
}

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-body);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-cyan);
}

/* Footer */
.footer {
  background: #030712;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 20px;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 14px;
  color: #FFFFFF;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  justify-content: flex-end;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-drawer {
  width: 90%;
  max-width: 540px;
  height: 100vh;
  background: var(--bg-primary);
  border-left: 2px solid var(--border-active);
  padding: 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--accent-cyan);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--accent-emerald);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid,
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle-btn {
    display: flex;
  }
}