/*
Theme Name: Autohaus Motors
Theme URI: https://example.com/autohaus-motors
Author: Ronald Scheicher
Author URI: https://example.com
Description: Schlankes WordPress-Theme fuer Autohandel / Gebrauchtwagen. Mit WooCommerce-Shop, eigenem Fahrzeug-Bereich (Foto + Fahrzeugdaten) und Startseite mit Betriebsbeschreibung. Farbwelt: Blau, Silber, Schwarz, Weiss.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autohaus-motors
Tags: automotive, business, e-commerce, custom-post-type, blue, white, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments
WC requires at least: 6.0
WC tested up to: 9.9
*/

/* ==========================================================================
   Farb-Variablen  (Blau / Silber / Schwarz / Weiss)
   ========================================================================== */
:root {
  --ah-blue:       #123b66;   /* Dunkelblau */
  --ah-blue-dark:  #0b2846;
  --ah-blue-light: #2f6bab;
  --ah-silver:     #c3c8ce;   /* Silber */
  --ah-silver-lt:  #eceff3;
  --ah-black:      #16181d;
  --ah-white:      #ffffff;
  --ah-text:       #23262b;
  --ah-radius:     10px;
  --ah-shadow:     0 2px 10px rgba(22,24,29,.08);
  --ah-max:        1160px;
}

/* ==========================================================================
   Reset / Basis
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ah-text);
  background: var(--ah-silver-lt);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ah-blue); text-decoration: none; }
a:hover { color: var(--ah-blue-dark); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ah-black); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--ah-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.ah-btn,
.button,
button,
input[type="submit"] {
  display: inline-block;
  background: var(--ah-blue);
  color: var(--ah-white);
  padding: 12px 26px;
  border: none;
  border-radius: var(--ah-radius);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
  text-decoration: none;
}
.ah-btn:hover,
.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--ah-blue-dark);
  color: var(--ah-white);
  text-decoration: none;
}
.ah-btn--ghost {
  background: transparent;
  color: var(--ah-white);
  border: 2px solid var(--ah-white);
}
.ah-btn--ghost:hover { background: rgba(255,255,255,.15); color: var(--ah-white); }

/* ==========================================================================
   Header (Branding-Zeile: weiss, mit Kontakt + Warenkorb rechts oben)
   ========================================================================== */
.site-header {
  background: var(--ah-white);
  border-bottom: 1px solid var(--ah-silver);
}
/* Blaue Kopfflaeche (wie Hero) */
.site-header--hero {
  background: linear-gradient(135deg, var(--ah-blue-dark), var(--ah-blue) 60%, var(--ah-blue-light));
  border-bottom: none;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 30px;
  padding-bottom: 30px;
  flex-wrap: wrap;
}
.site-branding .site-title {
  margin: 0;
  font-size: 1.9rem;
}
.site-branding .site-title a { color: var(--ah-black); text-decoration: none; }
.site-branding .site-description { margin: 6px 0 0; color: var(--ah-blue); font-size: .95rem; max-width: 560px; }

/* Auf blauer Kopfflaeche: Titel in silbernem Rechteck, Slogan hell */
.site-header--hero .site-title { display: inline-block; }
.site-header--hero .site-title a {
  display: inline-block;
  background: var(--ah-silver);
  color: var(--ah-blue-dark);
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 0;            /* eckige Ecken */
  border: 2px solid #8f969e;
}
.site-header--hero .site-title a:hover { background: #d4d9de; color: var(--ah-blue-dark); text-decoration: none; }
.site-header--hero .site-description { color: #dbe6f2; margin-top: 10px; }

/* Kontakt + Warenkorb rechts oben */
.header-contact { display: flex; align-items: center; gap: 22px; }
.header-contact__info { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.header-contact__item { color: var(--ah-text); font-weight: 600; font-size: .92rem; }
.header-contact__item:hover { color: var(--ah-blue); text-decoration: none; }
.site-header--hero .header-contact__item { color: var(--ah-white); }
.site-header--hero .header-contact__item:hover { color: #dbe6f2; }
.header-contact__note { font-size: .82rem; font-style: italic; }
.site-header--hero .header-contact__note { color: #dbe6f2; }

.header-cart {
  display: inline-flex; align-items: center; gap: 8px;
  background: #c62828; color: var(--ah-white);
  padding: 10px 16px; border-radius: var(--ah-radius); font-weight: 700;
}
.header-cart:hover { background: #a31f1f; color: var(--ah-white); text-decoration: none; }
.header-cart__icon { font-size: 1.15rem; }
.header-cart__count {
  background: var(--ah-white); color: #c62828;
  min-width: 22px; height: 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; padding: 0 6px;
}
.header-cart__total { font-size: .9rem; }

/* Warenkorb in der Menueleiste (neben Impressum): schwarz + kleiner */
.header-cart--menu {
  background: var(--ah-black);
  color: var(--ah-white);
  padding: 6px 12px;
  font-weight: 600;
  font-size: .85rem;
  border-radius: 6px;
}
.header-cart--menu:hover { background: #000; color: var(--ah-white); }
.header-cart--menu .header-cart__icon { font-size: 1rem; }
.header-cart--menu .header-cart__count {
  background: var(--ah-white); color: var(--ah-black);
  min-width: 18px; height: 18px; font-size: .72rem;
}

/* ==========================================================================
   Menue-Leiste (voll breit, direkt unter dem Header)
   ========================================================================== */
.top-bar {
  background: var(--ah-silver);
  border-top: 3px solid var(--ah-blue);
  border-bottom: 3px solid var(--ah-blue);
}
.top-bar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
}
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-navigation a {
  color: var(--ah-blue-dark);
  font-weight: 600;
  padding: 15px 16px;
  display: block;
}
.main-navigation a:hover { color: var(--ah-white); background: var(--ah-blue); text-decoration: none; }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { background: var(--ah-blue); color: var(--ah-white); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: var(--ah-blue);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--ah-radius);
  margin: 8px 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.site-content { padding: 36px 0; }
.content-area {
  background: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 32px;
}
.content-with-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;   /* Sidebar links */
  gap: 28px;
  align-items: start;
}
.widget-area .widget,
.sidebar-nav {
  background: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 20px;
  margin-bottom: 22px;
}
.widget-area .widget-title,
.sidebar-nav__title {
  border-bottom: 2px solid var(--ah-silver);
  padding-bottom: 8px;
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav > ul > li + li { margin-top: 2px; }
.sidebar-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ah-text);
  font-weight: 500;
}
.sidebar-nav a:hover { color: var(--ah-blue); background: var(--ah-silver-lt); text-decoration: none; }
.sidebar-nav .current_page_item > a,
.sidebar-nav .current-cat > a {
  color: var(--ah-white);
  background: var(--ah-blue);
  font-weight: 600;
}
.sidebar-nav .current_page_item > a .count,
.sidebar-nav .current-cat > a .count { color: #dbe6f2; }
.sidebar-nav .count { color: #9aa2ac; font-weight: 400; font-size: .82rem; }

/* Unterkategorien / Unterseiten (verschachtelt) */
.sidebar-nav .children {
  list-style: none;
  margin: 2px 0 2px 10px;
  padding-left: 10px;
  border-left: 2px solid var(--ah-silver-lt);
}
.sidebar-nav .children a { font-weight: 400; font-size: .95rem; padding: 7px 10px; }

/* ==========================================================================
   Kontaktformular
   ========================================================================== */
.ahm-contact-form { max-width: 640px; }
.ahm-contact-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.ahm-contact-form input[type="text"],
.ahm-contact-form input[type="email"],
.ahm-contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--ah-silver);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
.ahm-contact-form input:focus,
.ahm-contact-form textarea:focus { outline: 2px solid var(--ah-blue-light); border-color: var(--ah-blue); }
.ahm-contact-form p { margin: 0 0 16px; }
.ahm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ahm-form-success {
  background: #e7f6ec; border: 1px solid #63a877; color: #1e6b3a;
  padding: 16px 18px; border-radius: var(--ah-radius); font-weight: 600;
}
.ahm-form-error {
  background: #fdecec; border: 1px solid #e0a0a0; color: #a32d2d;
  padding: 14px 16px; border-radius: var(--ah-radius); margin-bottom: 18px;
}
@media (max-width: 600px) { .ahm-form-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Hero (Startseite)
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--ah-blue-dark), var(--ah-blue) 60%, var(--ah-blue-light));
  color: var(--ah-white);
  border-radius: var(--ah-radius);
  padding: 60px 40px;
  box-shadow: var(--ah-shadow);
  margin-bottom: 40px;
}
.hero h1 { color: var(--ah-white); font-size: 2.6rem; max-width: 720px; }
.hero p { font-size: 1.2rem; max-width: 640px; color: #eaf1fa; }
.hero .hero-actions { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; }

.section-title {
  text-align: center;
  margin: 0 0 8px;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--ah-blue);
  margin: 12px auto 0;
  border-radius: 4px;
}
.section-intro { text-align: center; max-width: 720px; margin: 0 auto 32px; color: #555; }
.home-section { margin: 48px 0; }
.home-main { min-width: 0; }
.home-main > .home-section:first-child { margin-top: 0; }

.about-box {
  background: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 40px;
  border-left: 6px solid var(--ah-blue);
}

/* ==========================================================================
   Fahrzeug-Grid & Karten
   ========================================================================== */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.vehicle-card {
  background: var(--ah-white);
  border: 1px solid var(--ah-silver);
  border-radius: var(--ah-radius);
  overflow: hidden;
  box-shadow: var(--ah-shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.vehicle-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(20,80,140,.18); }
.vehicle-card__thumb { aspect-ratio: 4 / 3; background: var(--ah-silver-lt); overflow: hidden; }
.vehicle-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-card__noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #9aa2ac; font-size: .9rem; background: var(--ah-silver-lt);
}
.vehicle-card__body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.vehicle-card__title { font-size: 1.15rem; margin: 0 0 6px; }
.vehicle-card__title a { color: var(--ah-black); }
.vehicle-card__title a:hover { color: var(--ah-blue); text-decoration: none; }
.vehicle-card__price { color: var(--ah-blue); font-weight: 700; font-size: 1.25rem; margin: 4px 0 10px; }
.vehicle-card__specs {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  font-size: .88rem; color: #555;
}
.vehicle-card__specs li strong { color: var(--ah-black); font-weight: 600; }
.vehicle-card__footer { margin-top: auto; }

.vehicle-filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
  background: var(--ah-white); border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow); padding: 18px; margin-bottom: 28px;
}
.vehicle-filter-bar label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 4px; }
.vehicle-filter-bar select, .vehicle-filter-bar input {
  padding: 9px 12px; border: 1px solid var(--ah-silver); border-radius: 8px; min-width: 150px;
}

/* ==========================================================================
   Einzel-Fahrzeug
   ========================================================================== */
.vehicle-single { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.vehicle-gallery__main {
  border-radius: var(--ah-radius); overflow: hidden; box-shadow: var(--ah-shadow);
  background: var(--ah-silver-lt);
}
.vehicle-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.vehicle-gallery__thumbs img {
  width: 88px; height: 66px; object-fit: cover; border-radius: 6px;
  cursor: pointer; border: 2px solid transparent;
}
.vehicle-gallery__thumbs img:hover { border-color: var(--ah-blue); }

.vehicle-datasheet {
  background: var(--ah-white); border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow); padding: 26px;
}
.vehicle-datasheet .vehicle-price {
  color: var(--ah-blue); font-size: 2rem; font-weight: 800; margin: 0 0 4px;
}
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--ah-silver-lt); font-size: .95rem; }
.spec-table th { color: #667; font-weight: 600; width: 45%; }
.badge {
  display: inline-block; background: var(--ah-silver-lt); color: var(--ah-blue-dark);
  border: 1px solid var(--ah-silver); border-radius: 999px; padding: 4px 12px;
  font-size: .8rem; font-weight: 600; margin: 0 6px 6px 0;
}

/* ==========================================================================
   WooCommerce Feinschliff
   ========================================================================== */
.woocommerce ul.products li.product { background: var(--ah-white); border-radius: var(--ah-radius); box-shadow: var(--ah-shadow); padding: 14px; }
.woocommerce span.price, .woocommerce div.product p.price { color: var(--ah-blue); font-weight: 700; }
.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit, .woocommerce input.button {
  background: var(--ah-blue); color: #fff; border-radius: var(--ah-radius);
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--ah-blue-dark); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ah-black);
  color: var(--ah-silver);
  padding: 44px 0 24px;
  margin-top: 48px;
}
.site-footer a { color: var(--ah-silver); }
.site-footer a:hover { color: var(--ah-white); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.site-footer h4 { color: var(--ah-white); border-bottom: 2px solid var(--ah-blue); padding-bottom: 8px; }

/* Oeffnungszeiten */
.opening-hours { width: 100%; border-collapse: collapse; }
.opening-hours th,
.opening-hours td { text-align: left; padding: 6px 0; font-size: .9rem; font-weight: 400; vertical-align: top; }
.opening-hours th { color: inherit; padding-right: 14px; white-space: nowrap; }
.opening-hours td { text-align: right; font-weight: 600; }
.opening-hours .opening-hours--closed { color: #d85a30; }
.sidebar-nav .opening-hours th { color: var(--ah-text); }
.sidebar-nav .opening-hours td { color: var(--ah-blue); }
.footer-bottom { border-top: 1px solid #2a2d34; margin-top: 30px; padding-top: 16px; text-align: center; font-size: .85rem; }

/* ==========================================================================
   Beitraege / allgemein
   ========================================================================== */
.entry-header { margin-bottom: 18px; }
.entry-meta { color: #778; font-size: .85rem; margin-bottom: 10px; }
.post-thumbnail img { border-radius: var(--ah-radius); margin-bottom: 18px; }
.page-title { border-bottom: 3px solid var(--ah-blue); padding-bottom: 12px; margin-bottom: 26px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .content-with-sidebar .content-area { order: 1; }
  .content-with-sidebar .widget-area { order: 2; }
  .vehicle-single { grid-template-columns: 1fr; }
  .hero { padding: 44px 26px; }
  .hero h1 { font-size: 2rem; }
  .site-header .container { justify-content: center; text-align: center; }
  .header-contact { justify-content: center; }
  .header-contact__info { text-align: center; }
}
@media (max-width: 720px) {
  .menu-toggle { display: inline-block; }
  .main-navigation { display: none; width: 100%; }
  .main-navigation.toggled { display: block; }
  .main-navigation ul { flex-direction: column; gap: 10px; }
  .site-header .container { flex-wrap: wrap; }
}
