/* ============================================================
   style-mobile.css — konfigurator.computer
   Mobile & Tablet Styles (max-width: 820px / 600px)
   ============================================================ */

/* ── Burger Button (global, standardmäßig versteckt) ─────── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background .15s ease;
  z-index: 201;
  margin-left: 8px;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.burger:hover {
  background: rgba(255,255,255,.12);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

body[data-theme="light"] .burger {
  border-color: rgba(0,0,0,.15);
  background: rgba(0,0,0,.05);
}
body[data-theme="light"] .burger span {
  background: rgba(0,0,0,.75);
}

/* ── Mobile Nav Overlay ──────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7,11,20,.97);
  z-index: 200;
  flex-direction: column;
  padding: 80px 24px 40px;
  overflow-y: auto;
  gap: 4px;
}
.mobile-nav.is-open {
  display: flex;
}

body[data-theme="light"] .mobile-nav {
  background: rgba(245,247,252,.98);
}

.mobile-nav-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(233,237,246,.35);
  margin: 16px 0 6px;
  padding: 0 4px;
}
body[data-theme="light"] .mobile-nav-section-title {
  color: rgba(20,30,60,.35);
}

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(233,237,246,.85);
  font-size: 16px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.mobile-nav-link:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
body[data-theme="light"] .mobile-nav-link {
  color: rgba(20,30,60,.8);
}
body[data-theme="light"] .mobile-nav-link:hover {
  background: rgba(0,0,0,.06);
  color: #000;
}

.mobile-nav-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 10px 0;
}
body[data-theme="light"] .mobile-nav-divider {
  background: rgba(0,0,0,.08);
}

.mobile-nav-tier {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background .15s;
}
.mobile-nav-tier:hover {
  background: rgba(255,255,255,.05);
}
body[data-theme="light"] .mobile-nav-tier:hover {
  background: rgba(0,0,0,.04);
}

.mobile-nav-tier-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-nav-tier > div:nth-child(2) {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: rgba(233,237,246,.9);
}
body[data-theme="light"] .mobile-nav-tier > div:nth-child(2) {
  color: rgba(20,30,60,.85);
}

.mobile-nav-tier-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.mobile-nav-tier-btns a {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: all .12s;
}
.mobile-nav-tier-btns a:hover {
  border-color: rgba(255,122,24,.7);
  color: rgba(255,122,24,.95);
  background: rgba(255,122,24,.1);
}
body[data-theme="light"] .mobile-nav-tier-btns a {
  border-color: rgba(0,0,0,.15);
  color: rgba(20,30,60,.55);
}

.mobile-nav-cta {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.mobile-nav-cta .btn {
  width: 100%;
  text-align: center;
  padding: 14px;
  font-size: 15px;
}
body[data-theme="light"] .mobile-nav-cta {
  border-top-color: rgba(0,0,0,.08);
}

/* ── Layout: Sidebar nach den Komponenten auf Mobile ────────── */

/* ── Layout: Sidebar nach den Komponenten ───────────────────── */
@media (max-width: 980px) {
  .layout {
    display: flex !important;
    flex-direction: column !important;
  }
  .layout > div { order: 1; width: 100%; }
  .layout > aside.side { order: 2; width: 100%; position: static !important; }
}

/* ── Tablet (≤820px) ─────────────────────────────────────── */
@media (max-width: 820px) {
  .topbar-actions { display: none; }
  .hero { grid-template-columns: 1fr !important; gap: 1.5rem; }
  .grid3 { grid-template-columns: 1fr 1fr !important; }
  .build-tiles-grid { grid-template-columns: 1fr 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 8px; }
}

/* ── Mobile (≤600px) ─────────────────────────────────────── */
@media (max-width: 600px) {
  .mobile-nav { top: 0; z-index: 200; }
  .topbar { z-index: 10000 !important; }
  .burger { display: flex; margin-right: 8px; }
  .topbar-inner > .nav { display: none !important; }
  #themeToggle .theme-label { display: none; }
  #themeToggle { width: 36px; min-width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; transition: none; }
  #themeToggle .theme-icon { line-height: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
  .pill { white-space: normal; display: inline-flex !important; align-items: center; flex-wrap: wrap; padding-left: 0 !important; }
  .pill-dot { display: none; }
  .pill-lieferzeit { display: none; }
  .pill-sep { display: none; }
  .pill-sep-space { display: none; }
  .pill img { width: 12px; height: 9px; margin: 0 5px 0 0; flex-shrink: 0; }
  .brand-text em { display: none; }
  .hero { grid-template-columns: 1fr !important; }
  .hero-right { display: none; }
  .grid3 { grid-template-columns: 1fr !important; }
  .build-tiles-grid { grid-template-columns: 1fr !important; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .filters { flex-wrap: wrap; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr !important; text-align: center; }
  .footer-features span[style*="top:-5px"] { position: static !important; top: 0 !important; }
  .footer-features { grid-template-columns: 1fr 1fr !important; }
  .footer-features > div:last-child { grid-column: 1 / -1; }
  .footer-links a { padding: 2px 0; display: block; font-size: 0.8rem; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-legal { flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 0.8rem; }
  .footer-legal a { font-size: 0.8rem; }
  .btn-wide { width: 100%; }
  .footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .mobile-nav { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
}

/* ── Fortschrittsbalken volle Breite auf Mobile ─────────────── */
@media (max-width: 600px) {
  .progress {
    min-width: 0;
    width: 100%;
    align-items: flex-start;
  }
  .progress-bar {
    width: 100%;
  }
}

/* ── Kontakt: 2-Spalten auf Desktop, 1-Spalte auf Mobile ────── */
.kontakt-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}
@media (max-width: 820px) {
  .kontakt-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  .kontakt-layout > div:first-child { order: 2; }
  .kontakt-layout > div:last-child  { order: 1; }
  body[data-page="kontakt"] .input {
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 7px 12px;
  }
  .form-control {
    box-sizing: border-box !important;
    width: 100% !important;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem !important;
    padding: 0.6rem 0.8rem !important;
  }
  .kontakt-layout .card { padding: 1rem !important; }
}

/* ── Checkout: Mobile Layout ─────────────────────────────── */
@media (max-width: 820px) {
  #checkoutForm > div {
    grid-template-columns: 1fr !important;
  }
  .checkout-main { order: 2; }
  .checkout-sidebar { order: 1; width: 100% !important; }
  .form-control {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 600px) {
  #checkoutForm > div > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Checkout: Mobile Layout ─────────────────────────────── */
@media (max-width: 820px) {
  /* Grid auf 1 Spalte */
  #checkoutForm > div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
  }
  /* Formular zuerst, Sidebar danach */
  .checkout-main { order: 1; }
  .checkout-sidebar { order: 2; width: 100% !important; }
  /* Sticky deaktivieren */
  .checkout-sidebar .card { position: static !important; }
  /* Komponentenliste ausblenden */
  #checkoutSummary { display: none !important; }
  /* Formular-Felder volle Breite */
  .form-control { width: 100% !important; box-sizing: border-box !important; }
  /* Innenfelder (PLZ/Stadt) nebeneinander lassen */
  #checkoutForm div[style*="grid-template-columns:1fr 1fr"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Parts: Filter-Kacheln – Sub-Text ausblenden, Padding links ── */
@media (max-width: 600px) {
  .gpu-tab-sub {
    display: none !important;
  }
  .gpu-tab {
    padding-left: 5px !important;
  }
}

/* ── Configurator: "Build speichern" Link auf Mobile ausblenden ── */
@media (max-width: 600px) {
  body[data-page="configurator"] .progress a[href="builds.html"] {
    display: none !important;
  }
}

/* ── Configurator: Fortschrittsbalken volle Breite auf Mobile ── */
@media (max-width: 600px) {
  body[data-page="configurator"] .progress > div {
    width: 100% !important;
  }
  #progressInner {
    width: 100% !important;
  }
  #progressInner .progress-bar {
    width: 100% !important;
  }
}
