/* Akrapovic Shop – modernisiertes Layout nach dem bisherigen Design */
:root {
  --c-red: #c8102e;
  --c-red-dark: #a00d24;
  --c-black: #0d0d0d;
  --c-dark: #1c1c1c;
  --c-dark-2: #2a2a2a;
  --c-grey: #e6e6e6;
  --c-grey-2: #d4d4d4;
  --c-text: #222;
  --c-muted: #666;
  --c-white: #fff;
  --container: 1200px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--c-text);
  background: #151515 repeating-linear-gradient(45deg, #181818 0 2px, #141414 2px 4px);
}
img { max-width: 100%; height: auto; }
a { color: var(--c-red); }
a:hover, a:focus { color: var(--c-red-dark); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--c-white); padding: 8px 12px; }
.skip-link:focus { left: var(--gutter); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Kopfbereich */
.site-header { background: var(--c-black); color: var(--c-white); }
.site-header__top { position: relative; padding: 0; min-height: 110px; display: flex; align-items: center; }
.site-logo { position: relative; z-index: 2; display: block; padding: 12px var(--gutter); }
.site-logo img { display: block; width: clamp(150px, 22vw, 260px); height: auto; }
.site-header__top.has-banner .site-logo { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
/* Kopfbanner (Fahrzeugbild je Seite); mehrere Bilder = Diashow, Logo liegt darüber */
.site-header__banner { position: relative; z-index: 1; width: 100%; aspect-ratio: 980 / 150; overflow: hidden; background: var(--c-black); }
.site-header__banner .frame, .site-header__banner .ce-image, .site-header__banner .ce-gallery, .site-header__banner .ce-outer,
.site-header__banner .ce-inner, .site-header__banner .ce-row, .site-header__banner .ce-column, .site-header__banner figure {
  display: contents !important;
}
.site-header__banner header, .site-header__banner .ce-bodytext, .site-header__banner figcaption { display: none; }
.site-header__banner img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: opacity 1s ease; }
.site-header__banner.is-slideshow img { opacity: 0; }
.site-header__banner.is-slideshow img.is-visible { opacity: 1; }

/* Markenleiste */
.brandbar { background: var(--c-black); border-top: 4px solid var(--c-red); padding: 8px 0; }
.brandbar .frame { margin: 0; }
.brandbar header h1, .brandbar header h2, .brandbar header h3 {
  margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #ddd; text-align: right; font-weight: 600;
}
.brandbar .ce-image, .brandbar .ce-gallery, .brandbar .ce-outer, .brandbar .ce-inner {
  float: none !important; width: 100% !important; right: auto !important; margin: 0 !important;
}
.brandbar .ce-row { display: flex !important; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; margin: 0; }
.brandbar .ce-column { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
.brandbar figure { display: block !important; margin: 0 !important; }
.brandbar img { height: 40px; width: auto; transition: transform .15s ease, filter .15s ease; filter: grayscale(15%); }
.brandbar a:hover img, .brandbar a:focus img { transform: scale(1.08); filter: none; }

/* Hauptnavigation */
.mainnav { background: var(--c-dark); border-bottom: 1px solid #000; }
.mainnav__inner { display: flex; align-items: stretch; justify-content: space-between; flex-wrap: wrap; }
.mainnav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.mainnav__item a { display: block; padding: 14px 16px; color: var(--c-white); text-decoration: none; font-size: 14px; font-weight: 600; }
.mainnav__item a:hover, .mainnav__item a:focus { background: var(--c-dark-2); color: var(--c-white); }
.mainnav__item.is-active a { background: var(--c-white); color: var(--c-black); }
.mainnav__meta { display: flex; align-items: center; gap: 16px; }
.phone { color: var(--c-red); font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 15px; }
.phone:hover, .phone:focus { color: #ff4d64; }
.langnav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.langnav a { display: block; padding: 4px 8px; color: #bbb; text-decoration: none; font-size: 13px; border: 1px solid #444; border-radius: 3px; }
.langnav a.is-active { color: var(--c-white); border-color: var(--c-red); }
.mainnav__toggle { display: none; background: none; border: 0; padding: 18px 6px; cursor: pointer; }
.mainnav__toggle-bar, .mainnav__toggle-bar::before, .mainnav__toggle-bar::after {
  display: block; width: 26px; height: 3px; background: var(--c-white); content: "";
}
.mainnav__toggle-bar { position: relative; }
.mainnav__toggle-bar::before { position: absolute; top: -8px; left: 0; }
.mainnav__toggle-bar::after { position: absolute; top: 8px; left: 0; }

/* Hauptbereich */
.site-main { display: grid; grid-template-columns: 260px minmax(0, 1fr); background: var(--c-white); }
.sidebar { background: var(--c-grey); padding: 20px 0; }
.content { padding: 24px 32px 40px; min-width: 0; }
.subnav ul { list-style: none; margin: 0; padding: 0; }
.subnav a { display: block; padding: 6px 20px; color: var(--c-text); text-decoration: none; font-size: 14px; line-height: 1.35; }
.subnav a:hover, .subnav a:focus { background: var(--c-grey-2); }
.subnav li.is-active > a { background: var(--c-dark-2); color: var(--c-white); font-weight: 600; }
.subnav ul ul a { padding-left: 32px; }
.subnav ul ul ul a { padding-left: 44px; font-size: 13px; }
.subnav ul ul li.is-active > a { background: var(--c-grey-2); color: var(--c-black); }
.sidebar > .frame { padding: 16px 20px 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 20px; padding: 0; font-size: 13px; color: var(--c-muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover, .breadcrumb a:focus { color: var(--c-red); }

/* Inhalte */
.content h1, .content h2, .content h3 { line-height: 1.25; color: var(--c-black); }
.content h1 { font-size: 28px; margin: 0 0 16px; }
.content h2 { font-size: 22px; }
.content h3 { font-size: 18px; }
.content .frame { margin-bottom: 28px; }
.content table { border-collapse: collapse; max-width: 100%; }
.content td, .content th { padding: 4px 8px; vertical-align: top; }
.content iframe { max-width: 100%; }
.content figcaption, .content .image-caption { font-size: 13px; line-height: 1.35; color: var(--c-muted); margin-top: 4px; }
.content .video-embed { position: relative; aspect-ratio: 16 / 9; }
.content .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Formulare */
.content form .form-group { margin-bottom: 14px; }
.content form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.content form input[type=text], .content form input[type=email], .content form input[type=tel], .content form textarea, .content form select {
  width: 100%; max-width: 520px; padding: 9px 10px; border: 1px solid #bbb; border-radius: 3px; font: inherit;
}
.content form textarea { min-height: 120px; }
.content form .btn-primary, .content form button[type=submit] {
  background: var(--c-red); color: var(--c-white); border: 0; padding: 11px 22px; font-weight: 700; border-radius: 3px; cursor: pointer;
}
.content form .btn-primary:hover, .content form button[type=submit]:hover { background: var(--c-red-dark); }
.content form .error, .content form .help-block { color: var(--c-red); font-size: 13px; }

/* Footer */
.site-footer { background: var(--c-black); color: #aaa; font-size: 14px; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 24px; border-top: 4px solid var(--c-red); }
.footernav { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.footernav a, .site-footer a { color: #ddd; text-decoration: none; }
.footernav a:hover, .site-footer a:hover, .footernav a:focus, .site-footer a:focus { color: var(--c-white); text-decoration: underline; }
.site-footer__copy { margin: 0; }

/* Hinweis-Popup */
.notice-popup { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: var(--gutter); }
.notice-popup[hidden] { display: none; }
.notice-popup__dialog { position: relative; background: var(--c-white); max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; padding: 32px; border-top: 4px solid var(--c-red); }
.notice-popup__close { position: absolute; top: 8px; right: 12px; font-size: 28px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--c-muted); }

/* Startseite: Inhalt links, rechte Spalte */
.site-main:has(> .sidebar--right) { grid-template-columns: minmax(0, 1fr) 280px; }
.site-main:not(:has(> .sidebar)) { grid-template-columns: 1fr; }
.sidebar--right { padding: 20px; border-left: 1px solid var(--c-grey-2); }
.sidebar--right .frame { margin-bottom: 24px; }
.sidebar--right header h1, .sidebar--right header h2, .sidebar--right header h3 { font-size: 16px; margin: 0 0 8px; }
.sidebar--right .ce-gallery { float: none !important; margin: 0 0 8px !important; }
.sidebar--right img { max-width: 100%; height: auto; }

/* Mobil */
@media (max-width: 600px) {
  /* Banner ist auf schmalen Displays zu flach – nur Logo zeigen */
  .site-header__banner { display: none; }
  .site-header__top { min-height: 0; }
  .site-header__top.has-banner .site-logo { position: relative; top: auto; transform: none; }

  /* Bilder "im Text links/rechts": Text zuerst, Bilder darunter im 2er-Raster */
  .content .ce-textpic.ce-intext { display: flex; flex-direction: column; }
  .content .ce-textpic.ce-intext .ce-gallery { order: 2; }
  .content .ce-intext .ce-gallery,
  .content .ce-left .ce-gallery,
  .content .ce-right .ce-gallery { float: none !important; width: 100% !important; margin: 16px 0 0 !important; }
  .content .ce-intext.ce-nowrap .ce-bodytext { margin: 0 !important; overflow: visible; }
  .content .ce-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .content .ce-gallery .ce-outer, .content .ce-gallery .ce-inner, .content .ce-gallery .ce-row { display: contents; }
  .content .ce-gallery .ce-column { float: none !important; width: auto !important; margin: 0 !important; }
  .content .ce-gallery figure { margin: 0; }
  .content .ce-gallery img { width: 100%; height: auto; }
  .content .ce-gallery[data-ce-images="1"] { grid-template-columns: 1fr; }
  .content h1, .content h2, .content h3 { hyphens: auto; overflow-wrap: break-word; }
}
@media (max-width: 900px) {
  .site-main, .site-main:has(> .sidebar--right) { grid-template-columns: 1fr; }
  .sidebar--right { border-left: 0; border-top: 1px solid var(--c-grey-2); }
  .sidebar { order: 2; }
  .content { order: 1; padding: 20px var(--gutter) 32px; }
  .brandbar img { height: 30px; }
  .brandbar header { display: none; }
  .mainnav__toggle { display: block; }
  .mainnav__list { display: none; flex-direction: column; width: 100%; order: 3; }
  .mainnav.is-open .mainnav__list { display: flex; }
  .mainnav__meta { padding: 8px 0; }
}
@media (max-width: 480px) {
  .phone { font-size: 13px; }
  .notice-popup__dialog { padding: 24px 18px; }
}

/* Anfrageformular auf Produktseiten */
.product-request { margin-top: 32px; padding: 24px; background: #f4f4f4; border-left: 4px solid var(--c-red); }
.product-request .frame { margin-bottom: 0; }
.content form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; max-width: 520px; }
.content form .form-check, .content form .radio, .content form .inputs-list label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-weight: 400; }
.content form fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.content form fieldset legend { display: block; float: none; width: auto; padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.content form .form-check-label, .content form .radio label { font-weight: 400; }
.content form fieldset > legend.visually-hidden { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
.content form .form-privacy-note { font-size: 13px; color: var(--c-muted); margin: 8px 0 14px; }
.content audio, .content video { width: 100%; max-width: 520px; }
