/* Motodok — Dark Industrial (Variant A) */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  --bg: #0d0d0d;
  --bg2: #1a1a1a;
  --surface: #1f1f1f;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text2: #888;
  --accent: #ff6b35;
  --accent-hover: #ff8c5a;
  --radius: 10px;
  --max-w: 1200px;
}

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

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

a { color: var(--accent); text-decoration: none; transition: color .2s }
a:hover { color: var(--accent-hover) }

img { max-width: 100%; height: auto }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem }

/* ── Header ──────────────────────────────── */

.site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--accent) !important;
  text-transform: uppercase;
}

.nav { display: flex; gap: .25rem; flex-wrap: wrap }

.nav a {
  color: var(--text2);
  font-size: .85rem;
  font-weight: 500;
  padding: .5rem .75rem;
  border-radius: 6px;
  transition: color .2s, background .2s;
}

.nav a:hover { color: var(--text); background: rgba(255,255,255,.05) }

.dropdown { position: relative; display: flex; align-items: center }
.dropdown:hover .dropdown-content { display: flex }
.dropbtn { cursor: pointer }
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .25rem 0;
  flex-direction: column;
  z-index: 200;
}
.dropdown-content a {
  padding: .5rem 1rem;
  border-radius: 0;
  white-space: nowrap;
  background: transparent;
}
.dropdown-content a:hover { background: rgba(255,255,255,.05); color: var(--text) }

/* ── Hero ────────────────────────────────── */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--accent) }

.hero p {
  color: var(--text2);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap }

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #000 !important;
  font-weight: 600;
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-size: .95rem;
  transition: background .2s, transform .1s;
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); color: #000 !important }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: .9rem;
  transition: border-color .2s, background .2s;
}

.btn-secondary:hover { border-color: var(--accent); background: rgba(255,107,53,.05) }

/* ── Sections ────────────────────────────── */

.section { padding: 3rem 0 }

.section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* ── Category Grid ────────────────────────── */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}

.category-card:hover { border-color: var(--accent); transform: translateY(-2px) }

.cat-icon { font-size: 2rem; line-height: 1 }
.cat-name { font-weight: 600; font-size: .85rem; color: var(--text) }

/* ── Product Grid ──────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.product-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}

.product-card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit }

.product-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; color: var(--text) }

.product-card p {
  color: var(--text2);
  font-size: .82rem;
  line-height: 1.5;
  margin-bottom: .75rem;
}

.product-card .price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

/* ── News Grid ────────────────────────────── */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.news-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}

.news-card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit }

.news-card time {
  display: block;
  color: var(--accent);
  font-size: .78rem;
  margin-bottom: .4rem;
  font-weight: 600;
}

.news-card h3 { font-size: .95rem; font-weight: 600; color: var(--text) }

/* ── Content Page ──────────────────────────── */

.layout { display: flex; flex-direction: column; min-height: 100vh }
.layout main { flex: 1 }
.page-content { padding: 3rem 0 }

.page-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.page-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
}

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 .5rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--text2);
  line-height: 1.7;
}

.page-content ul, .page-content ol {
  margin: 0 0 1rem 1.5rem;
  color: var(--text2);
}

.page-content li { margin-bottom: .35rem }

.page-content strong { color: var(--text) }

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.page-content td, .page-content th {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  text-align: left;
  font-size: .85rem;
}

.page-content th { background: var(--surface); font-weight: 600; color: var(--text) }
.page-content td { color: var(--text2) }

.page-content .box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ── Listing Grid (news/articles index) ─────── */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.listing-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}

.listing-card:hover { border-color: var(--accent); transform: translateY(-2px) }

.listing-card time {
  display: block;
  color: var(--accent);
  font-size: .78rem;
  margin-bottom: .4rem;
  font-weight: 600;
}

.listing-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Footer ──────────────────────────────── */

.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text2);
  font-size: .85rem;
}

.site-footer a { color: var(--text2) }
.site-footer a:hover { color: var(--accent) }

.footer-contacts { margin-top: .25rem; font-size: .8rem }

.full-list-link {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.full-list-link a {
  display: inline-block;
  padding: .75rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}

.full-list-link a:hover { border-color: var(--accent); background: var(--bg2) }

/* ── Responsive ──────────────────────────── */

@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: .75rem 1rem; gap: .5rem }
  .nav { justify-content: center }
  .nav a { font-size: .8rem; padding: .35rem .5rem }
  .dropdown { position: static }
  .dropdown-content { left: auto; right: 0 }
  .hero { padding: 3rem 0 2.5rem }
  .hero h1 { font-size: 1.6rem }
  .hero p { font-size: .95rem }
  .category-grid { grid-template-columns: repeat(3, 1fr) }
  .product-grid { grid-template-columns: 1fr }
  .news-grid { grid-template-columns: 1fr }
  .page-content { padding: 1.5rem 0 }
  .page-content h1 { font-size: 1.5rem }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: repeat(2, 1fr) }
  .hero-cta { flex-direction: column; align-items: stretch }
  .btn-primary, .btn-secondary { justify-content: center }
}
