/*
Theme Name: G-AUTO
Theme URI: https://g-auto.no
Author: G-AUTO
Description: Godkjent bruktbilforhandler – tilpasset tema for G-AUTO
Version: 1.0
License: Private
Text Domain: g-auto
*/

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

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  background: #f4f6f8;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #222;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Header ─────────────────────────────────────────── */
header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 16px;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

header img.site-logo {
  height: 202px;
  width: auto;
  display: block;
}

/* ── Main grid ───────────────────────────────────────── */
main {
  flex: 1;
  max-width: 1400px;
  margin: 16px auto;
  width: 100%;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ── Shared box style ────────────────────────────────── */
.box {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.box h2 {
  font-size: 1rem;
  color: #222;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.box h3 {
  font-size: 0.95rem;
  color: #222;
  margin-bottom: 6px;
}

.info-box h3 {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Kontakt ─────────────────────────────────────────── */
.contact-section {
  margin-bottom: 16px;
}

.contact-section:last-child {
  margin-bottom: 0;
}

.contact-section p {
  line-height: 1.6;
}

/* ── Til salgs ───────────────────────────────────────── */
.car-list-scroll {
  max-height: 600px;
  overflow-y: auto;
}

.car-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.car-item:last-child {
  border-bottom: none;
}

.car-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #f0f0f0;
}

.car-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.car-info a {
  font-weight: 600;
}

.car-info a:hover {
  text-decoration: underline;
}

.car-info span {
  color: #555;
  font-size: 0.85rem;
}

.empty-notice {
  color: #555;
  font-style: italic;
  padding: 16px 0;
}

/* ── Info-bokser ─────────────────────────────────────── */
.info-box {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.info-box:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.info-box p {
  line-height: 1.55;
  color: #444;
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid #e0e0e0;
  background: #ffffff;
}

/* ── Desktop column order: Info | Til salgs | Kontakt ── */
main > .box:nth-child(1) { order: 3; } /* Kontakt → høyre */
main > .box:nth-child(2) { order: 2; } /* Til salgs → midten */
main > .box:nth-child(3) { order: 1; } /* Info → venstre */

/* ── Responsiv ───────────────────────────────────────── */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }

  main > .box:nth-child(1) { order: 0; }
  main > .box:nth-child(2) { order: 0; }
  main > .box:nth-child(3) { order: 0; }

  header img.site-logo {
    height: 100px;
  }

  .car-list-scroll {
    max-height: none;
  }
}
