/* ===============================================
   TEILERENNER eBay Style (2025)
   Clean, Weiß, Mobile First
   =============================================== */

/* 0. Grundlayout */
body {
  font-family: system-ui, -apple-system, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f2937; /* text-gray-800 */
  background: #ffffff;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 1. Logo + Titel */
.teilerenner-logo {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 10px auto 15px auto;
}
.teilerenner-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1rem 0;
}

/* 2. Tabs */
.tabs {
  margin: 0 auto;
  max-width: 1100px;
  padding: 0;
}
.tabs input[type="radio"] {
  display: none;
}
.tab-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: -1px;
}
.tab-labels label {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border-radius: 8px 8px 0 0;
  font-size: 0.95rem;
  color: #374151;
}
.tab-labels label:hover {
  background: #f9fafb;
}
.tabs input[type="radio"]:checked + label {
  background: #ffffff;
  color: #111827;
  border-bottom: 2px solid #ffffff;
}
.tab-content {
  display: none;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 8px 8px;
  padding: 1rem 1.25rem;
  background: #ffffff;
}
#tab1:checked ~ #content1,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3,
#tab4:checked ~ #content4 {
  display: block;
}

/* ===============================
   3. Galerie – großes Hauptbild + Thumbnails unten
   =============================== */
.teilerenner-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 10px 0 20px 0;
}

/* Hauptbild */
.gallery-main-img {
  width: 100%;
  max-width: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.gallery-main-img img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

/* Thumbnails */
.gallery-thumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.gallery-thumbs label {
  cursor: pointer;
}
.gallery-thumbs img {
  width: 55px;
  height: 55px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  object-fit: contain;
  opacity: 0.7;
  transition: all 0.25s ease;
}
.gallery-thumbs img:hover {
  opacity: 1;
  border-color: #60a5fa;
}
input[name="gal"] {
  display: none;
}

/* Aktives Bild anzeigen */
input[name="gal"]:checked ~ .gallery-main-img img {
  display: none;
}
input#img0:checked ~ .gallery-main-img .img0,
input#img1:checked ~ .gallery-main-img .img1,
input#img2:checked ~ .gallery-main-img .img2,
input#img3:checked ~ .gallery-main-img .img3,
input#img4:checked ~ .gallery-main-img .img4,
input#img5:checked ~ .gallery-main-img .img5 {
  display: block;
}

/* Aktives Thumbnail hervorheben */
input#img0:checked ~ .gallery-thumbs label[for="img0"] img,
input#img1:checked ~ .gallery-thumbs label[for="img1"] img,
input#img2:checked ~ .gallery-thumbs label[for="img2"] img,
input#img3:checked ~ .gallery-thumbs label[for="img3"] img,
input#img4:checked ~ .gallery-thumbs label[for="img4"] img,
input#img5:checked ~ .gallery-thumbs label[for="img5"] img {
  opacity: 1;
  border-color: #1d4ed8; /* blau aktiv */
}

/* Mobile Anpassung */
@media (max-width: 640px) {
  .gallery-main-img {
    max-width: 90vw;
  }
  .gallery-thumbs img {
    width: 44px;
    height: 44px;
  }
}

/* ===============================
   4. Tabellen (Fahrzeuge etc.)
   =============================== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}
th {
  background: #f9fafb;
  font-weight: 600;
  color: #111827;
}
tr:nth-child(even) td {
  background: #f9fafb;
}
.ok {
  color: #16a34a;
  font-weight: 600;
}

/* ===============================
   5. OE-Listen / Aufzählungen
   =============================== */
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul li {
  margin: 4px 0;
}
.oe-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 10px;
}

/* ===============================
   6. Altöl Abschnitt
   =============================== */
.tab-content h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #111827;
}
.tab-content p {
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

/* ===============================
   7. Mobile Optimierung
   =============================== */
@media (max-width: 640px) {
  .teilerenner-logo {
    max-width: 150px;
    margin: 6px auto 10px auto;
  }
  .teilerenner-title {
    font-size: 1.2rem;
  }
  .tab-labels {
    flex-direction: column;
    align-items: stretch;
  }
  .tab-labels label {
    border-radius: 6px;
    text-align: center;
  }
  .tab-content {
    padding: 0.8rem;
  }
  table {
    font-size: 0.85rem;
  }
}
