/* ============================================================
   AFRICARPARTS — Design System (Mobile.de inspired)
   Card-based marketplace UI · v4
   ============================================================ */

:root {
  /* ---------- BRAND COLORS ---------- */
  --brand-orange: #ED2807;     /* primary CTA / accent */
  --brand-orange-hover: #C8210A;
  --brand-orange-soft: #FEE9E1;
  --brand-purple: #2C1665;     /* dark promo backgrounds */
  --brand-purple-deep: #1A0D44;
  --brand-purple-soft: #ECE7F7;

  /* ---------- NEUTRALS ---------- */
  --bg:        #E8EBF1;        /* page background, cool light grey-blue */
  --surface:   #FFFFFF;        /* card/panel background */
  --surface2:  #F5F6F9;        /* subtle inner panels */
  --surface3:  #EDEFF3;
  --border:    #E2E5EC;
  --border2:   #CDD2DC;
  --footer-bg: #0B0B0F;        /* footer black */
  --footer-text: #E8EBF1;

  /* ---------- TEXT ---------- */
  --text:   #14181F;
  --text2:  #4B5562;
  --text3:  #8A93A2;
  --text-on-dark: #FFFFFF;

  /* ---------- LEGACY ALIASES (keep app.js inline styles working) ---------- */
  --p900: #1A0D44;
  --p800: #2C1665;
  --p700: #2C1665;
  --p600: #3A1E80;
  --p500: #4B2DA0;
  --p400: #6B47C9;
  --p300: #9078DC;
  --p200: #B7A6EA;
  --p100: var(--brand-purple-soft);
  --p050: #F5F2FC;

  --a500: var(--brand-orange);
  --a400: #F0461E;
  --a300: #F36842;
  --a100: var(--brand-orange-soft);
  --a050: #FFF6F2;

  --green:  #1A7A40;
  --green2: #D7F0E0;
  --red:    #C0392B;
  --red2:   #FDE8E6;
  --blue:   #1A6AAB;
  --blue2:  #DBEEFF;
  --amber:  #B36A00;
  --amber2: #FFF1CC;

  /* ---------- TYPOGRAPHY ---------- */
  --fh: "Barlow Condensed", "Barlow", system-ui, sans-serif; /* display */
  --fb: "Barlow", system-ui, -apple-system, sans-serif;       /* body */

  /* ---------- SHAPE ---------- */
  --r4:  4px;
  --r3:  6px;
  --r6:  8px;
  --r8:  10px;
  --r12: 14px;
  --r16: 18px;
  --r-pill: 999px;

  /* ---------- SHADOW ---------- */
  --sh:  0 1px 2px rgba(20, 24, 31, 0.04), 0 1px 1px rgba(20, 24, 31, 0.03);
  --sha: 0 6px 18px rgba(20, 24, 31, 0.10), 0 2px 4px rgba(20, 24, 31, 0.04);
  --shc: 0 12px 40px rgba(20, 24, 31, 0.16);

  /* ---------- MOTION ---------- */
  --tr: all .18s cubic-bezier(.4, 0, .2, 1);

  /* ---------- LAYOUT ---------- */
  --page-max: 1180px;
  --gutter: 1.25rem;
}

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

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
ul, ol { list-style: none; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-orange); color: #fff; padding: .5rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 0; }

/* ============================================================
   APP SHELL
   ============================================================ */
#app { display: flex; flex-direction: column; min-height: 100vh; }
#content { flex: 1; }
#topbar { display: none; }

/* ============================================================
   NAVBAR — clean white, mobile.de style
   ============================================================ */
#navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 var(--gutter);
  height: 64px;
  max-width: 100%;
}
#navbar > * { flex-shrink: 0; }

.nav-brand {
  font-family: var(--fh);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  color: var(--text);
  display: flex; align-items: baseline; gap: .35rem;
  padding: 0;
  text-decoration: none !important;
}
.nav-brand:hover { text-decoration: none !important; }
.nav-brand .dot {
  color: var(--brand-orange);
  position: relative;
}
.nav-brand .tag {
  font-family: var(--fb);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text3);
  text-transform: uppercase;
  margin-left: .4rem;
  align-self: center;
  border-left: 1px solid var(--border2);
  padding-left: .5rem;
  line-height: 1.1;
}

.nav-link {
  font-family: var(--fb);
  font-size: .97rem;
  font-weight: 600;
  color: var(--text);
  padding: .55rem .8rem;
  border-radius: var(--r8);
  transition: var(--tr);
  position: relative;
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface2); color: var(--brand-orange); }
.nav-link.always-show { display: inline-flex; }

.nav-spacer { flex: 1; }
.nav-divider {
  width: 1px; height: 28px;
  background: var(--border);
  margin: 0 .25rem;
}

.nav-sel {
  font-size: .85rem; font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r6);
  padding: .4rem .55rem;
  color: var(--text);
  cursor: pointer;
}
.nav-sel:hover { border-color: var(--border2); }

.nav-cart-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: .6rem 1rem;
  border-radius: var(--r8);
  transition: var(--tr);
}
.nav-cart-btn:hover { background: #000; transform: translateY(-1px); }
.cart-ct {
  background: var(--brand-orange);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .08rem .4rem;
  border-radius: var(--r-pill);
  min-width: 18px; text-align: center;
}

.burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px;
  border-radius: var(--r6);
  padding: 0 9px;
}
.burger span {
  display: block; height: 2px; background: var(--text); border-radius: 2px;
  transition: var(--tr);
}
.burger:hover { background: var(--surface2); }

/* MOBILE NAV DRAWER */
.nav-mobile {
  position: fixed; top: 0; right: -100%;
  width: min(320px, 88vw); height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shc);
  z-index: 200;
  transition: right .25s ease;
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1rem;
  overflow-y: auto;
}
.nav-mobile.open { right: 0; }
.nav-mobile .nav-link {
  width: 100%; text-align: left;
  padding: .85rem 1rem;
  font-size: 1rem;
  border-radius: var(--r8);
}
.nav-mobile-close {
  align-self: flex-end;
  font-weight: 700; font-size: .9rem;
  padding: .5rem .9rem;
  border-radius: var(--r8);
  color: var(--text2);
}
.nav-mobile-close:hover { background: var(--surface2); color: var(--text); }

@media (max-width: 900px) {
  .nav-link:not(.always-show) { display: none; }
  .nav-divider { display: none; }
  .nav-sel { display: none; }
  .burger { display: inline-flex; }
  .nav-cart-btn { padding: .5rem .7rem; font-size: .82rem; }
  .nav-brand .tag { display: none; }
}

/* ============================================================
   PAGE LAYOUT — soft grey-blue page with stacked cards
   ============================================================ */
.page-wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1rem var(--gutter);
}
.page-wrap + .page-wrap { padding-top: 0; }

.mp-stack { display: flex; flex-direction: column; gap: 1rem; }

/* Generic white rounded card */
.mp-card {
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  padding: 1.5rem;
  overflow: hidden;
}
.mp-card-tight { padding: 1rem 1.25rem; }
.mp-card-flat { box-shadow: none; border: 1px solid var(--border); }

.mp-card-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.mp-card-title {
  font-family: var(--fb);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.mp-card-title small {
  font-size: .82rem; font-weight: 500;
  color: var(--text3); margin-left: .35rem;
}
.mp-card-link {
  font-size: .88rem; font-weight: 600;
  color: var(--text2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mp-card-link:hover { color: var(--brand-orange); }

/* ============================================================
   HERO — split card: photo left + giant orange initial right
   ============================================================ */
.hero {
  display: block;
  max-width: var(--page-max);
  margin: 1rem auto 0;
  padding: 0 var(--gutter);
  position: relative;
}
.hero-card {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  background: var(--surface);
  border-radius: var(--r12);
  overflow: hidden;
  box-shadow: var(--sh);
  min-height: 240px;
}
.hero-left {
  position: relative;
  background: linear-gradient(120deg, #1c2230 0%, #2C1665 100%);
  color: #fff;
  display: flex;
  overflow: hidden;
}
.hero-left::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 30%, rgba(237, 40, 7, .25), transparent 45%),
    url("https://images.unsplash.com/photo-1487754180451-c456f719a1fc?auto=format&fit=crop&w=900&q=70");
  background-size: cover;
  background-position: center;
  opacity: .85;
  z-index: 0;
}
.hero-left::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(28, 34, 48, 0.55) 0%, rgba(44, 22, 101, 0.85) 65%, var(--brand-purple) 100%);
  z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  padding: 2rem 2.25rem;
  display: flex; flex-direction: column; justify-content: center;
  gap: .35rem;
  width: 100%;
}
.hero-badge {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255,255,255,.75);
  margin-bottom: .4rem;
}
.hero h1 {
  font-family: var(--fb);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--brand-orange);
  letter-spacing: -.015em;
}
.hero h1 em {
  font-style: normal;
  color: #fff;
  display: block;
  font-size: .85em;
  font-weight: 700;
  margin-top: .2rem;
}
.hero p {
  font-size: 1rem;
  color: rgba(255,255,255,.92);
  max-width: 30rem;
  margin-top: .3rem;
}

/* Giant orange "P" accent on right */
.hero-right {
  position: relative;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-mark {
  font-family: var(--fb);
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 16rem);
  color: var(--brand-orange);
  line-height: .8;
  letter-spacing: -.08em;
  transform: translateY(.04em);
  user-select: none;
  position: relative;
}
.hero-mark::after {
  content: "";
  position: absolute;
  left: 18%; bottom: 14%;
  width: 14%; height: 14%;
  background: var(--surface);
  border-radius: 50%;
}

/* Hide hero stats and old search inside hero — they live in their own cards now */
.hero-stats { display: none; }
.hero .search-bar-hero { display: none; }

@media (max-width: 760px) {
  .hero-card {
    grid-template-columns: 1fr;
    min-height: 280px;
  }
  .hero-right { min-height: 110px; }
  .hero-mark { font-size: 7rem; }
  .hero-inner { padding: 1.5rem; }
}

/* ============================================================
   SEARCH CARD — big white card with title + input + arrow btn
   ============================================================ */
.mp-search-card {
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  padding: 1.75rem;
  text-align: center;
}
.mp-search-card h2 {
  font-family: var(--fb);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.mp-search-row {
  display: flex; align-items: stretch; gap: .5rem;
  max-width: 640px;
  margin: 0 auto;
  border-bottom: 1.5px solid var(--text);
  padding-bottom: .25rem;
}
.mp-search-row .icon {
  display: flex; align-items: center; padding-left: .25rem;
  color: var(--text2);
}
.mp-search-row input {
  flex: 1;
  border: 0;
  padding: .7rem .5rem;
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  outline: none;
}
.mp-search-row input::placeholder { color: var(--text3); }
.mp-search-btn {
  width: 44px; height: 44px;
  background: var(--brand-orange);
  border-radius: var(--r8);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--tr);
  flex-shrink: 0;
  margin-bottom: 2px;
}
.mp-search-btn:hover { background: var(--brand-orange-hover); transform: translateX(2px); }

/* ============================================================
   FILTER CARD — vehicle type strip + brand/model/year + count CTA
   ============================================================ */
.mp-filter-card {
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
}
.mp-vtypes {
  display: flex; flex-direction: column; gap: .35rem;
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}
.mp-vtype {
  width: 48px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r8);
  background: var(--surface2);
  color: var(--text2);
  transition: var(--tr);
}
.mp-vtype:hover, .mp-vtype.active {
  background: var(--brand-orange-soft);
  color: var(--brand-orange);
}
.mp-vtype svg { width: 22px; height: 22px; }

.mp-filter-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
  align-content: start;
}
.mp-filter-body .full { grid-column: 1 / -1; }
.mp-field { display: flex; flex-direction: column; gap: .3rem; }
.mp-field label {
  font-size: .78rem; font-weight: 700;
  color: var(--text); letter-spacing: 0;
}
.mp-field select, .mp-field input {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r6);
  padding: .55rem .7rem;
  font-size: .9rem;
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%234B5562' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 10px;
  padding-right: 2rem;
  cursor: pointer;
}
.mp-field input { background-image: none; padding-right: .7rem; cursor: text; }
.mp-field select:hover, .mp-field input:hover { border-color: var(--text3); }
.mp-field select:focus, .mp-field input:focus {
  outline: 0;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(237, 40, 7, .12);
}

.mp-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r6);
  padding: 2px;
  gap: 2px;
}
.mp-toggle button {
  padding: .45rem 1rem;
  font-size: .88rem; font-weight: 600;
  color: var(--text2);
  border-radius: var(--r4);
}
.mp-toggle button.active {
  background: var(--surface);
  color: var(--brand-purple);
  outline: 1.5px solid var(--brand-purple);
}

.mp-filter-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--brand-orange);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .7rem 1.2rem;
  border-radius: var(--r8);
  transition: var(--tr);
  white-space: nowrap;
}
.mp-filter-cta:hover { background: var(--brand-orange-hover); }
.mp-filter-cta .count {
  background: rgba(255,255,255,.18);
  border-radius: var(--r-pill);
  padding: .05rem .45rem;
  font-size: .8rem;
  font-weight: 700;
}

.mp-filter-foot {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  margin-top: .25rem;
}
.mp-foot-left { display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: var(--text2); }
.mp-foot-right { margin-left: auto; display: flex; gap: 1rem; font-size: .85rem; color: var(--text2); }
.mp-foot-right a { color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mp-foot-right a:hover { color: var(--brand-orange); }

@media (max-width: 760px) {
  .mp-filter-card { grid-template-columns: 1fr; }
  .mp-vtypes { flex-direction: row; flex-wrap: wrap; border-right: 0; padding-right: 0;
               border-bottom: 1px solid var(--border); padding-bottom: .75rem; }
  .mp-filter-body { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .mp-filter-body { grid-template-columns: 1fr; }
}

/* ============================================================
   HORIZONTAL CARD SCROLLER (Top Deals, Categories, Types)
   ============================================================ */
.mp-scroller {
  position: relative;
  overflow: hidden;
}
.mp-scroller-track {
  display: flex; gap: .85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .25rem;
  scrollbar-width: thin;
}
.mp-scroller-track::-webkit-scrollbar { height: 4px; }
.mp-scroller-track::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
.mp-scroller-track > * { scroll-snap-align: start; flex: 0 0 auto; }

.mp-scroller-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sha);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  color: var(--text);
}
.mp-scroller-btn:hover { background: var(--surface2); }
.mp-scroller-btn.left { left: -8px; }
.mp-scroller-btn.right { right: -8px; }
@media (max-width: 640px) { .mp-scroller-btn { display: none; } }

/* ============================================================
   PRODUCT CARDS (Top Deals style)
   ============================================================ */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .85rem;
}
.mp-scroller-track .pcard { width: 240px; }

.pcard {
  background: var(--surface);
  border-radius: var(--r8);
  overflow: hidden;
  cursor: pointer;
  transition: var(--tr);
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
}
.pcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--sha);
  border-color: var(--border2);
}
.pcard-img {
  aspect-ratio: 4 / 3;
  background: var(--surface2);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: .85rem;
  overflow: hidden;
}
.pcard-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.pcard-badges {
  position: absolute; top: .55rem; left: .55rem;
  display: flex; gap: .3rem; z-index: 2;
}
.pbadge {
  font-size: .65rem; font-weight: 700;
  padding: .15rem .45rem;
  border-radius: var(--r4);
  background: var(--surface);
  color: var(--text);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.pbadge-china { background: var(--brand-orange); color: #fff; }
.pbadge-new   { background: var(--brand-orange-soft); color: var(--brand-orange); }
.pbadge-used  { background: #FFF1CC; color: #8B5A00; }
.pbadge-refurbished { background: #E2E8FF; color: #2D3FAF; }
.pbadge-moq {
  position: absolute; bottom: .55rem; left: .55rem;
  font-size: .65rem; font-weight: 700;
  padding: .15rem .45rem;
  border-radius: var(--r4);
  background: rgba(20,24,31,.85);
  color: #fff;
  letter-spacing: .03em;
}
.pcard-heart {
  position: absolute; top: .55rem; right: .55rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-purple);
  z-index: 2;
  transition: var(--tr);
}
.pcard-heart:hover { background: var(--brand-orange-soft); color: var(--brand-orange); transform: scale(1.06); }

.pcard-body {
  padding: .85rem 1rem 1rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.pcard-title {
  font-size: .95rem; font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5rem;
}
.pcard-price {
  font-size: 1.1rem; font-weight: 800;
  color: var(--text);
}
.pcard-price small {
  font-size: .75rem; font-weight: 500;
  color: var(--text3);
  margin-left: .15rem;
}
.pcard-meta {
  display: flex; flex-wrap: wrap; gap: .35rem;
  font-size: .78rem;
  color: var(--text2);
  margin-top: .15rem;
}
.pcard-meta span {
  background: var(--surface2);
  padding: .15rem .5rem;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: .25rem;
}
.pcard-meta .loc::before { content: "📍"; font-size: .7rem; }
.pcard-deal {
  display: inline-block;
  background: var(--brand-orange);
  color: #fff;
  font-size: .7rem; font-weight: 700;
  padding: .15rem .55rem;
  border-radius: var(--r-pill);
  letter-spacing: .04em;
  margin-top: .1rem;
  width: max-content;
  text-transform: uppercase;
}
.pcard-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .25rem;
  padding-top: .55rem;
  border-top: 1px solid var(--border);
  gap: .5rem;
}
.pcard-loc {
  font-size: .78rem; color: var(--text2);
  display: inline-flex; align-items: center; gap: .25rem;
}
.pcard-add {
  background: var(--text);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: .35rem .65rem;
  border-radius: var(--r6);
  transition: var(--tr);
}
.pcard-add:hover { background: var(--brand-orange); }

/* ============================================================
   FEATURED CATEGORIES (small image tiles)
   ============================================================ */
.mp-cat-tile {
  width: 170px;
  background: var(--surface2);
  border-radius: var(--r8);
  padding: .85rem;
  display: flex; flex-direction: column; gap: .5rem;
  cursor: pointer;
  transition: var(--tr);
  position: relative;
  overflow: hidden;
  min-height: 165px;
}
.mp-cat-tile:hover { background: var(--surface3); transform: translateY(-2px); }
.mp-cat-tile.blue { background: #E7EEFB; }
.mp-cat-tile.amber { background: #FFF3E0; }
.mp-cat-tile.green { background: #DFF1E4; }
.mp-cat-tile.violet { background: #ECE7F7; }
.mp-cat-tile .cat-img {
  align-self: center;
  width: 100%;
  height: 80px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.mp-cat-tile .cat-img svg { width: 64px; height: 64px; }
.mp-cat-tile .cat-label {
  display: flex; align-items: center; gap: .4rem;
  font-weight: 700; font-size: .92rem;
  color: var(--text);
}
.mp-cat-tile .cat-sub {
  font-size: .76rem;
  color: var(--text2);
  line-height: 1.3;
}

/* ============================================================
   POPULAR CATEGORIES (large image cards with filter chips)
   ============================================================ */
.mp-pop-tile {
  width: 260px;
  background: var(--surface);
  border-radius: var(--r8);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--tr);
  display: flex; flex-direction: column;
}
.mp-pop-tile:hover { box-shadow: var(--sha); transform: translateY(-2px); border-color: var(--border2); }
.mp-pop-tile .pop-img {
  aspect-ratio: 16 / 11;
  background: var(--surface2);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.mp-pop-tile .pop-img svg { width: 65%; height: 65%; color: var(--text3); }
.mp-pop-tile .pop-body { padding: .85rem 1rem 1rem; }
.mp-pop-tile h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.mp-pop-tile .pop-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.mp-pop-tile .pop-chip {
  font-size: .72rem; font-weight: 500;
  background: var(--surface2);
  padding: .15rem .5rem;
  border-radius: var(--r-pill);
  color: var(--text2);
}

/* Part-type tiles (white car style row) */
.mp-type-tile {
  width: 200px;
  background: var(--surface);
  border-radius: var(--r8);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--tr);
  text-align: center;
  padding: 0 0 1rem;
  overflow: hidden;
}
.mp-type-tile:hover { box-shadow: var(--sha); transform: translateY(-2px); }
.mp-type-tile .type-img {
  height: 110px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
}
.mp-type-tile .type-img svg { width: 80px; height: 80px; }
.mp-type-tile h4 { font-size: .98rem; font-weight: 700; margin: .65rem 0 .15rem; }
.mp-type-tile .type-sub { font-size: .78rem; color: var(--text3); }

/* ============================================================
   AI HELPER STRIP
   ============================================================ */
.mp-ai-strip {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}
.mp-ai-logo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--fb);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--brand-orange);
}
.mp-ai-logo .beta {
  font-size: .65rem; font-weight: 700;
  background: var(--surface2);
  color: var(--text2);
  padding: .1rem .4rem;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mp-ai-body { flex: 1; min-width: 220px; color: var(--text2); font-size: .92rem; }
.mp-ai-btn {
  background: var(--brand-purple);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: .7rem 1.2rem;
  border-radius: var(--r8);
  transition: var(--tr);
  display: inline-flex; align-items: center; gap: .5rem;
}
.mp-ai-btn:hover { background: var(--brand-purple-deep); }

/* ============================================================
   SPONSORED / BRAND PORTAL
   ============================================================ */
.mp-sponsor {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}
.mp-sponsor-img {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1c2230, var(--brand-purple));
  border-radius: var(--r8);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  position: relative;
  overflow: hidden;
}
.mp-sponsor-img::after {
  content: "";
  position: absolute; inset: 0;
  background: url("https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=700&q=70") center/cover;
  opacity: .9;
}
.mp-sponsor-label {
  font-size: .78rem; font-weight: 600;
  color: var(--text3);
  margin-bottom: .35rem;
}
.mp-sponsor h3 {
  font-size: 1.35rem; font-weight: 800;
  margin-bottom: .25rem;
}
.mp-sponsor-logo {
  font-family: var(--fh);
  font-weight: 800; font-size: 1.3rem;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: .85rem;
  display: block;
}
.mp-sponsor p { color: var(--text2); margin-bottom: 1rem; line-height: 1.5; font-size: .95rem; }
.mp-sponsor-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1.5px solid var(--brand-purple);
  color: var(--brand-purple);
  background: transparent;
  font-weight: 700;
  font-size: .9rem;
  padding: .6rem 1.2rem;
  border-radius: var(--r8);
  transition: var(--tr);
}
.mp-sponsor-btn:hover { background: var(--brand-purple); color: #fff; }
.mp-sponsor-tag {
  font-size: .78rem; color: var(--text3);
  display: inline-flex; align-items: center; gap: .25rem;
  margin-left: auto;
}

@media (max-width: 720px) {
  .mp-sponsor { grid-template-columns: 1fr; }
}

/* ============================================================
   SELL-YOUR-PARTS PROMO (dark purple, like Auto Bewerten)
   ============================================================ */
.mp-sell-promo {
  background: var(--brand-purple);
  color: #fff;
  border-radius: var(--r12);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 240px;
}
.mp-sell-promo-body {
  padding: 1.75rem;
  display: flex; flex-direction: column; justify-content: center; gap: .85rem;
}
.mp-sell-promo h3 {
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.01em;
}
.mp-sell-promo p {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  max-width: 28rem;
}
.mp-sell-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
  margin-top: .5rem;
}
.mp-sell-fields label {
  font-size: .75rem; font-weight: 700;
  color: rgba(255,255,255,.85);
  display: block; margin-bottom: .25rem;
}
.mp-sell-fields select {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 0;
  border-radius: var(--r6);
  padding: .55rem .7rem;
  font-size: .9rem;
}
.mp-sell-btn {
  display: inline-flex; justify-content: center; align-items: center;
  background: var(--brand-orange);
  color: #fff;
  font-weight: 700;
  padding: .8rem 1.4rem;
  border-radius: var(--r8);
  transition: var(--tr);
  font-size: .95rem;
  margin-top: .4rem;
  align-self: stretch;
}
.mp-sell-btn:hover { background: var(--brand-orange-hover); }
.mp-sell-promo-img {
  background:
    radial-gradient(circle at 30% 30%, rgba(237, 40, 7, .35), transparent 50%),
    radial-gradient(circle at 75% 65%, rgba(255, 255, 255, .12), transparent 55%),
    linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-purple-deep) 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mp-sell-promo-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,.04) 12px 13px),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(255,255,255,.04) 12px 13px);
}
.mp-sell-promo-img::after {
  content: "💰";
  font-size: 6rem;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.4));
  z-index: 1;
}
@media (max-width: 720px) {
  .mp-sell-promo { grid-template-columns: 1fr; }
  .mp-sell-promo-img { min-height: 160px; }
}

/* ============================================================
   SHOPS / DEALERS NEARBY
   ============================================================ */
.mp-shops-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}
.mp-shops-aside {
  background: #DDE8FB;
  border-radius: var(--r8);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: .5rem;
  color: var(--text);
}
.mp-shops-aside strong { font-size: .98rem; font-weight: 700; }
.mp-shops-aside p { font-size: .87rem; color: var(--text2); }
.mp-shops-aside a { color: var(--brand-purple); text-decoration: underline; font-weight: 600; }
.mp-shops-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}
.mp-shop-item {
  display: flex; gap: .75rem;
  background: var(--surface2);
  border-radius: var(--r6);
  padding: .75rem;
  cursor: pointer;
  transition: var(--tr);
  align-items: center;
}
.mp-shop-item:hover { background: var(--surface3); }
.mp-shop-logo {
  width: 50px; height: 50px;
  border-radius: var(--r6);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--brand-orange);
  font-family: var(--fh);
  font-size: 1.15rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.mp-shop-info { min-width: 0; flex: 1; }
.mp-shop-name {
  font-weight: 700; font-size: .92rem;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-shop-loc {
  font-size: .78rem; color: var(--text2);
  display: inline-flex; align-items: center; gap: .25rem;
}
.mp-shop-loc::before { content: "📍"; }

@media (max-width: 760px) {
  .mp-shops-grid { grid-template-columns: 1fr; }
  .mp-shops-list { grid-template-columns: 1fr; }
}

/* ============================================================
   POPULAR BRANDS GRID
   ============================================================ */
.mp-brands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .5rem;
}
.mp-brand {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: 1.25rem .75rem;
  background: var(--surface);
  border-radius: var(--r6);
  cursor: pointer;
  transition: var(--tr);
}
.mp-brand:hover { background: var(--surface2); }
.mp-brand-icon {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  font-family: var(--fh);
  font-weight: 800;
  font-size: 1.05rem;
}
.mp-brand-name { font-size: .9rem; font-weight: 700; color: var(--text); }

/* ============================================================
   LINK COLUMN BLOCK (Beliebte Marken & mehr)
   ============================================================ */
.mp-link-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1.25rem;
}
.mp-link-col h5 {
  font-size: .92rem; font-weight: 700;
  color: var(--text);
  margin-bottom: .55rem;
}
.mp-link-col ul li {
  display: flex; align-items: center; gap: .35rem;
  font-size: .87rem;
  color: var(--text2);
  padding: .22rem 0;
  cursor: pointer;
  transition: var(--tr);
}
.mp-link-col ul li::before {
  content: "›";
  color: var(--text3);
  font-weight: 700;
}
.mp-link-col ul li:hover { color: var(--brand-orange); }

@media (max-width: 760px) {
  .mp-link-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .mp-link-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   SEO LONG TEXT BLOCK
   ============================================================ */
.mp-seo {
  font-size: .92rem;
  color: var(--text2);
  line-height: 1.65;
}
.mp-seo h2, .mp-seo h3 {
  color: var(--text);
  font-weight: 700;
  margin: 1rem 0 .5rem;
  font-size: 1.05rem;
}
.mp-seo p { margin-bottom: .85rem; }
.mp-seo a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.mp-seo a:hover { color: var(--brand-orange); }
.mp-seo strong { color: var(--text); }

.mp-seo-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.mp-seo-cols h4 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; color: var(--text); }
@media (max-width: 720px) { .mp-seo-cols { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER — black, dense, mobile.de style
   ============================================================ */
#footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 3rem var(--gutter) 2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand-col { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-social {
  display: flex; gap: 1rem;
}
.footer-social a {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--footer-text);
  transition: var(--tr);
}
.footer-social a:hover { color: var(--brand-orange); }
.footer-select-group { display: flex; flex-direction: column; gap: .75rem; }
.footer-select-group label {
  font-size: .85rem; font-weight: 600;
  color: rgba(255,255,255,.85);
}
.footer-select-group select {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  padding: .5rem .7rem;
  border-radius: var(--r6);
  font-size: .85rem;
  cursor: pointer;
}
.footer-col-title {
  font-size: .95rem; font-weight: 700;
  margin-bottom: .85rem;
  color: #fff;
}
.footer-links { display: flex; flex-direction: column; gap: .55rem; }
.footer-link {
  font-size: .85rem;
  color: rgba(255,255,255,.78);
  cursor: pointer;
  transition: var(--tr);
  background: transparent;
  border: 0; padding: 0;
  text-align: left;
  display: inline-flex; align-items: center; gap: .35rem;
}
.footer-link:hover { color: var(--brand-orange); text-decoration: underline; }
.footer-link .flink-icon { font-size: 1rem; }

.footer-bot {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem var(--gutter);
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem var(--gutter) 1.5rem; }
}

/* ============================================================
   LEGACY COMPATIBILITY — keep other pages (products, cart, etc.)
   ============================================================ */
.loading-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 40vh;
}
.spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--brand-orange);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Section helpers used by products/cart/etc */
.section {
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.sec-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}
.sec-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.sec-title small {
  font-weight: 500; font-size: .82rem;
  color: var(--text3); margin-left: .35rem;
}
.sec-sub { font-size: .85rem; color: var(--text2); margin-top: .15rem; }
.view-all {
  font-size: .87rem; font-weight: 600;
  color: var(--text2);
  text-decoration: underline; text-underline-offset: 3px;
}
.view-all:hover { color: var(--brand-orange); }

.cat-scroll {
  display: flex; gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: thin;
}
.cat-pill {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: .55rem 1rem;
  border-radius: var(--r-pill);
  font-size: .88rem; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  white-space: nowrap;
  transition: var(--tr);
}
.cat-pill:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.cat-icon { font-size: 1rem; }

.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--text3);
}
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text2); margin-top: .5rem; }
.empty-icon { font-size: 2rem; opacity: .5; }

/* Feature grid (Why us?) - keep but restyled */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--surface);
  border-radius: var(--r8);
  padding: 1.25rem;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .4rem;
}
.feature-icon {
  width: 36px; height: 36px;
  border-radius: var(--r6);
  background: var(--brand-orange-soft);
  color: var(--brand-orange);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.feature-title { font-weight: 700; font-size: 1rem; }
.feature-desc { font-size: .87rem; color: var(--text2); }

/* Promo banners — kept compatible */
.promo-banner-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .85rem;
}
.promo-banner {
  display: flex; align-items: center; gap: .85rem;
  background: var(--surface);
  border-radius: var(--r8);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--tr);
  text-decoration: none !important;
  color: var(--text);
}
.promo-banner:hover { box-shadow: var(--sha); transform: translateY(-2px); border-color: var(--border2); }
.promo-banner .pb-icon {
  width: 44px; height: 44px;
  border-radius: var(--r6);
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-orange);
  flex-shrink: 0;
}
.promo-blue .pb-icon { background: #DDE8FB; color: var(--brand-purple); }
.promo-orange .pb-icon { background: var(--brand-orange-soft); color: var(--brand-orange); }
.promo-green .pb-icon { background: #DFF1E4; color: #1A7A40; }
.promo-banner .pb-text { flex: 1; min-width: 0; }
.promo-banner .pb-text strong { display: block; font-weight: 700; font-size: .95rem; }
.promo-banner .pb-text span { font-size: .8rem; color: var(--text2); }
.promo-banner .pb-cta {
  font-size: .82rem; font-weight: 600;
  color: var(--brand-orange);
  white-space: nowrap;
}

/* Toast */
#toast-container {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: .8rem 1.5rem;
  border-radius: var(--r8);
  font-size: .9rem; font-weight: 600;
  box-shadow: var(--shc);
  animation: toastIn .25s ease;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* Generic form bits used by login/register/cart */
.form-card {
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  padding: 2rem;
  max-width: 460px;
  margin: 2rem auto;
}
.form-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.25rem; }
.form-card label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .3rem; margin-top: .85rem; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r6);
  padding: .65rem .8rem;
  font-size: .95rem;
  color: var(--text);
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: 0;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(237,40,7,.12);
}

.btn-primary {
  background: var(--brand-orange);
  color: #fff;
  font-weight: 700;
  padding: .75rem 1.25rem;
  border-radius: var(--r8);
  font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  transition: var(--tr);
  border: 0; cursor: pointer;
}
.btn-primary:hover { background: var(--brand-orange-hover); }
.btn-secondary {
  background: var(--text);
  color: #fff;
  font-weight: 700;
  padding: .75rem 1.25rem;
  border-radius: var(--r8);
  font-size: .95rem;
  border: 0; cursor: pointer;
  transition: var(--tr);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn-secondary:hover { background: #000; }
.btn-outline {
  background: transparent;
  color: var(--brand-purple);
  border: 1.5px solid var(--brand-purple);
  font-weight: 700;
  padding: .65rem 1.15rem;
  border-radius: var(--r8);
  cursor: pointer;
  transition: var(--tr);
}
.btn-outline:hover { background: var(--brand-purple); color: #fff; }

/* Old hero search bar (kept for products page filter) */
.search-bar {
  display: flex; gap: .5rem; flex-wrap: wrap;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r8);
  padding: .35rem;
}
.search-bar input, .search-bar select {
  flex: 1; min-width: 0;
  border: 0;
  padding: .55rem .65rem;
  background: transparent;
  outline: 0;
  font-size: .95rem;
}
.sb-btn {
  background: var(--brand-orange);
  color: #fff; font-weight: 700;
  padding: .5rem 1rem;
  border-radius: var(--r6);
  display: inline-flex; align-items: center; gap: .4rem;
  border: 0; cursor: pointer;
}
.sb-btn:hover { background: var(--brand-orange-hover); }
.sb-cat-wrap, .sb-input-wrap { display: flex; align-items: center; gap: .25rem; padding: 0 .35rem; }
.sb-cat-arrow, .sb-search-icon { color: var(--text2); }

/* RTL */
html[dir="rtl"] .nav-brand { direction: ltr; }
html[dir="rtl"] .pcard-meta .loc::before { content: ""; }

/* ============================================================
   PRODUCTS PAGE — Autodoc-style two-column layout
   ============================================================ */
.products-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1rem var(--gutter) 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* ---------- LEFT SIDEBAR ---------- */
.pp-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Vehicle selector card */
.pp-vehicle-card {
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  padding: 1.25rem;
}
.pp-vehicle-card h3 {
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .9rem;
  line-height: 1.3;
}
.vs-step {
  display: flex;
  align-items: center;
  gap: .65rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r8);
  padding: .7rem .85rem;
  margin-bottom: .55rem;
  cursor: pointer;
  transition: var(--tr);
  background: var(--surface);
  position: relative;
}
.vs-step:hover { border-color: var(--border2); }
.vs-step.active {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(237, 40, 7, .12);
}
.vs-step.disabled { opacity: .55; cursor: not-allowed; }
.vs-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800;
  background: var(--surface2);
  color: var(--text3);
  flex-shrink: 0;
}
.vs-step.active .vs-num {
  background: var(--brand-orange);
  color: #fff;
}
.vs-step.done .vs-num {
  background: var(--green);
  color: #fff;
}
.vs-label {
  flex: 1;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-step.disabled .vs-label { color: var(--text3); }
.vs-caret {
  color: var(--text3);
  flex-shrink: 0;
  transition: var(--tr);
}
.vs-step.open .vs-caret { transform: rotate(180deg); }

/* Dropdown panel that opens under a step */
.vs-dropdown {
  display: none;
  background: var(--surface);
  border: 1.5px solid var(--brand-orange);
  border-top: 0;
  border-radius: 0 0 var(--r8) var(--r8);
  margin: -.55rem 0 .55rem;
  max-height: 240px;
  overflow-y: auto;
}
.vs-step.open + .vs-dropdown { display: block; }
.vs-option {
  padding: .55rem .85rem;
  font-size: .88rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--tr);
}
.vs-option:last-child { border-bottom: 0; }
.vs-option:hover { background: var(--brand-orange-soft); color: var(--brand-orange); }

.vs-search-btn {
  width: 100%;
  background: var(--brand-orange);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .8rem;
  border-radius: var(--r8);
  margin-top: .5rem;
  transition: var(--tr);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.vs-search-btn:hover { background: var(--brand-orange-hover); }
.vs-search-btn:disabled {
  background: var(--surface2);
  color: var(--text3);
  cursor: not-allowed;
}

/* HSN/TSN card */
.pp-hsn-card {
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  padding: 1.25rem;
}
.pp-hsn-hd {
  display: flex; align-items: flex-start; gap: .5rem;
  margin-bottom: .9rem;
}
.pp-hsn-hd h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}
.pp-hsn-info {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-purple);
  color: var(--brand-purple);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
  cursor: help;
  flex-shrink: 0;
}
.pp-hsn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-bottom: .5rem;
}
.pp-hsn-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r6);
  padding: .65rem .8rem;
  font-size: .95rem;
  text-align: center;
  font-weight: 600;
}
.pp-hsn-input:focus {
  outline: 0;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(237, 40, 7, .12);
}
.pp-hsn-hint {
  font-size: .72rem;
  color: var(--text3);
  text-align: left;
}
.pp-hsn-hints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-bottom: 1rem;
}
.pp-not-found-link {
  display: block;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-top: .85rem;
  cursor: pointer;
  line-height: 1.4;
}
.pp-not-found-link:hover { color: var(--brand-orange-hover); }

/* ---------- MAIN AREA ---------- */
.pp-main { min-width: 0; }

.pp-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}
.pp-title .accent { color: var(--brand-orange); }

.pp-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .85rem;
}

/* Category tile scroller */
.pp-cat-scroller {
  position: relative;
  margin-bottom: 1.5rem;
}
.pp-cat-track {
  display: flex;
  gap: .65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .25rem;
  scrollbar-width: thin;
}
.pp-cat-track::-webkit-scrollbar { height: 4px; }
.pp-cat-track::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
.pp-cat-tile {
  flex: 0 0 auto;
  width: 150px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r8);
  padding: 1rem .75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  transition: var(--tr);
  scroll-snap-align: start;
  position: relative;
}
.pp-cat-tile:hover { border-color: var(--border2); }
.pp-cat-tile.active {
  border-color: var(--brand-orange);
  background: var(--surface);
}
.pp-cat-tile .pp-cat-img {
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  background: var(--surface2);
  border-radius: var(--r6);
}
.pp-cat-tile .pp-cat-img svg { width: 38px; height: 38px; }
.pp-cat-tile.active .pp-cat-img { background: var(--brand-orange-soft); color: var(--brand-orange); }
.pp-cat-tile .pp-cat-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}

.pp-cat-scroll-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sha);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  z-index: 2;
}
.pp-cat-scroll-btn.left { left: -10px; }
.pp-cat-scroll-btn.right { right: -10px; }
.pp-cat-scroll-btn:hover { background: var(--surface2); }
@media (max-width: 640px) { .pp-cat-scroll-btn { display: none; } }

/* Result bar */
.pp-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--r12) var(--r12) 0 0;
  box-shadow: var(--sh);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.pp-result-count { font-size: 1rem; font-weight: 700; color: var(--text); }
.pp-sort {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .88rem; color: var(--text2);
}
.pp-sort select {
  border: 0;
  background: transparent;
  font-weight: 700;
  color: var(--brand-orange);
  cursor: pointer;
  padding-right: 1.2rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23ED2807' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}

/* Product list rows */
.pp-list {
  background: var(--surface);
  border-radius: 0 0 var(--r12) var(--r12);
  box-shadow: var(--sh);
  overflow: hidden;
}
.pp-row {
  display: grid;
  grid-template-columns: 180px 1fr 240px;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--tr);
  position: relative;
}
.pp-row:last-child { border-bottom: 0; }
.pp-row:hover { background: var(--surface2); }

/* Left col: brand + image */
.pp-row-left {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  align-items: center;
}
.pp-row-brand {
  height: 32px;
  font-family: var(--fh);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--brand-orange);
  letter-spacing: -.01em;
  display: flex; align-items: center;
  text-transform: uppercase;
  width: 100%;
  justify-content: center;
}
.pp-row-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  border-radius: var(--r6);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
  overflow: hidden;
  font-size: .8rem;
}
.pp-row-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Middle col: title + meta + specs */
.pp-row-mid { min-width: 0; }
.pp-row-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: .35rem;
}
.pp-row-title .brand-prefix { color: var(--brand-orange); margin-right: .35rem; }
.pp-row-subtitle {
  font-size: .9rem;
  color: var(--text2);
  margin-bottom: .65rem;
}
.pp-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .85rem;
  font-size: .82rem;
  margin-bottom: .75rem;
  color: var(--text2);
}
.pp-row-art {
  font-size: .82rem;
  color: var(--text);
  font-weight: 600;
}
.pp-row-art strong { color: var(--text); font-weight: 700; }
.pp-row-stars { display: inline-flex; gap: 2px; color: #FFB400; font-size: .92rem; }
.pp-row-stars .empty { color: var(--border2); }
.pp-row-reviews {
  font-size: .82rem;
  color: var(--brand-orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pp-row-specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .35rem 1rem;
  font-size: .85rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--border);
}
.pp-spec-k { color: var(--text2); font-weight: 500; }
.pp-spec-v { color: var(--text); font-weight: 600; }

/* Right col: stock + price + buy */
.pp-row-right {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  align-items: flex-end;
  text-align: right;
}
.pp-stock {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem;
  color: var(--green);
  font-weight: 700;
}
.pp-stock::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.pp-stock.out { color: var(--red); }
.pp-stock.out::before { background: var(--red); }
.pp-stock.low { color: #B36A00; }
.pp-stock.low::before { background: #B36A00; }

.pp-discount-badge {
  background: var(--brand-orange-soft);
  color: var(--brand-orange);
  font-size: .76rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: .3rem;
  letter-spacing: .01em;
}
.pp-uvp-old {
  font-size: .8rem;
  color: var(--text3);
  text-decoration: line-through;
}

.pp-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.01em;
}
.pp-price .cents { font-size: 1.1rem; font-weight: 700; }
.pp-price .currency { font-size: .95rem; font-weight: 700; margin-left: .15rem; }
.pp-price-info {
  font-size: .72rem;
  color: var(--text3);
  line-height: 1.45;
}
.pp-price-info a, .pp-price-info span { color: var(--text2); text-decoration: underline; cursor: pointer; }

.pp-buy-row {
  display: flex;
  align-items: stretch;
  gap: .4rem;
  margin-top: .25rem;
  width: 100%;
}
.pp-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: var(--r6);
  background: var(--surface);
  overflow: hidden;
}
.pp-qty input {
  width: 36px;
  text-align: center;
  border: 0;
  background: transparent;
  font-size: .95rem; font-weight: 700;
  -moz-appearance: textfield;
}
.pp-qty input::-webkit-outer-spin-button,
.pp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pp-qty-btn {
  width: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: .65rem;
  color: var(--text2);
  background: transparent;
  border: 0;
  padding: 0;
}
.pp-qty-btn:hover { background: var(--surface2); color: var(--brand-orange); }
.pp-qty-btn.up { border-bottom: 1px solid var(--border); }

.pp-buy-btn {
  flex: 1;
  background: var(--brand-orange);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .65rem .85rem;
  border-radius: var(--r6);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  transition: var(--tr);
  border: 0; cursor: pointer;
}
.pp-buy-btn:hover { background: var(--brand-orange-hover); }
.pp-buy-btn:disabled {
  background: var(--surface2);
  color: var(--text3);
  cursor: not-allowed;
}

.pp-row-seller {
  font-size: .78rem;
  color: var(--text2);
  margin-top: .25rem;
}
.pp-row-seller strong { color: var(--text); }

/* Pagination */
.pp-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--r12);
  box-shadow: var(--sh);
  margin-top: 1rem;
  flex-wrap: wrap;
}
.pp-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 .85rem;
  border-radius: var(--r6);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700; font-size: .9rem;
  cursor: pointer;
  transition: var(--tr);
}
.pp-page-btn:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.pp-page-btn.active {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
}
.pp-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pp-page-info { color: var(--text2); font-size: .88rem; }

/* Responsive */
@media (max-width: 900px) {
  .products-page { grid-template-columns: 1fr; }
  .pp-sidebar { position: static; }
}
@media (max-width: 720px) {
  .pp-row {
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  .pp-row-right {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
    border-top: 1px dashed var(--border);
    text-align: left;
  }
  .pp-row-specs { grid-template-columns: 1fr 1fr; }
  .pp-buy-row { width: auto; }
}
@media (max-width: 480px) {
  .pp-cat-tile { width: 120px; padding: .75rem .5rem; }
  .pp-cat-tile .pp-cat-img { width: 56px; height: 56px; }
  .pp-cat-tile .pp-cat-img svg { width: 30px; height: 30px; }
  .pp-row-specs { grid-template-columns: 1fr; }
  .pp-row-right { flex-direction: column; align-items: stretch; }
}


/* ═════════════════════════════════════════════════════════════════
   PKW-ERSATZTEILE BUTTON (in home search row)
   Sits LEFT of the search input. Doesn't change card size.
   ═════════════════════════════════════════════════════════════════ */
.mp-search-row {
  position: relative;
}
.mp-pkw-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  margin-right: .55rem;
  background: var(--p600, #ED2807);
  color: #fff;
  border: none;
  border-radius: var(--r8, 8px);
  font-family: var(--fh, inherit);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
  box-shadow: 0 2px 6px rgba(237, 40, 7, .25);
  flex-shrink: 0;
}
.mp-pkw-btn:hover { background: var(--p700, #c92306); box-shadow: 0 4px 12px rgba(237, 40, 7, .35); }
.mp-pkw-btn:active { transform: scale(.97); }
.mp-pkw-btn svg { flex-shrink: 0; }
.mp-pkw-btn .mp-pkw-label { line-height: 1; }

[dir="rtl"] .mp-pkw-btn { margin-right: 0; margin-left: .55rem; }

/* Mobile: hide label, keep just icon */
@media (max-width: 640px) {
  .mp-pkw-btn { padding: .65rem .8rem; }
  .mp-pkw-btn .mp-pkw-label { display: none; }
}


/* ═════════════════════════════════════════════════════════════════
   PKW OVERLAY PANEL (Autodoc-style)
   Fixed overlay above page — page content stays the same size.
   ═════════════════════════════════════════════════════════════════ */
.pkw-ov {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}
.pkw-ov.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: pkwFadeIn .18s ease;
}
@keyframes pkwFadeIn { from { opacity: 0; } to { opacity: 1; } }

.pkw-ov-bg {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 30, .55);
  backdrop-filter: blur(2px);
}
.pkw-ov-panel {
  position: relative;
  width: 100%;
  max-width: 980px;
  max-height: 88vh;
  margin: 4vh 1rem;
  background: var(--surface, #fff);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  animation: pkwSlideUp .22s ease;
}
@keyframes pkwSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Header */
.pkw-ov-hd {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: var(--p600, #ED2807);
  color: #fff;
  flex-shrink: 0;
}
.pkw-ov-hd h2 {
  flex: 1;
  font-family: var(--fh, inherit);
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: .2px;
}
.pkw-ov-back, .pkw-ov-close {
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease;
  flex-shrink: 0;
}
.pkw-ov-back:hover, .pkw-ov-close:hover { background: rgba(255, 255, 255, .28); }

/* Body — two panes side-by-side */
.pkw-ov-body {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

/* Left pane — main categories */
.pkw-ov-mains {
  background: var(--surface, #fff);
  border-right: 1px solid var(--border, #e5e7eb);
  overflow-y: auto;
  padding: .5rem 0;
}

.pkw-main-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .8rem 1rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  color: var(--text1, #1c2530);
}
.pkw-main-row:hover { background: var(--surface2, #f7f8fa); }
.pkw-main-row.active {
  background: var(--p050, #fff1ed);
  border-left-color: var(--p600, #ED2807);
}
.pkw-main-row.active .pkw-main-name { color: var(--p700, #c92306); font-weight: 700; }

.pkw-main-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--surface2, #f7f8fa);
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
}
.pkw-main-row.active .pkw-main-icon {
  background: #fff;
  border-color: var(--p200, #fcc5b6);
}
.pkw-main-name {
  flex: 1;
  font-weight: 600;
  font-size: .94rem;
  line-height: 1.25;
}
.pkw-main-arrow { opacity: .4; flex-shrink: 0; }

/* Right pane — subcategories */
.pkw-ov-subs {
  background: var(--surface, #fff);
  overflow-y: auto;
  padding: 1rem 1.25rem 1.5rem;
}
.pkw-sub-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text3, #8a96a8);
  font-size: .95rem;
}
.pkw-sub-hd {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-bottom: .85rem;
  margin-bottom: .5rem;
  border-bottom: 2px solid var(--p100, #fee9e1);
}
.pkw-sub-hd-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--p050, #fff1ed);
  border-radius: 10px;
}
.pkw-sub-hd-name {
  font-family: var(--fh, inherit);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text1);
}

.pkw-sub-list { display: flex; flex-direction: column; gap: 2px; }

.pkw-sub-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
  color: var(--text1, #1c2530);
}
.pkw-sub-row:hover {
  background: var(--p050, #fff1ed);
  color: var(--p700, #c92306);
}
.pkw-sub-row.pkw-sub-all {
  background: var(--surface2, #f7f8fa);
  margin-bottom: .65rem;
  font-size: .9rem;
}
.pkw-sub-row.pkw-sub-all:hover { background: var(--p100, #fee9e1); }

.pkw-sub-icon { width: 22px; text-align: center; opacity: .55; }
.pkw-sub-name { flex: 1; font-size: .92rem; line-height: 1.3; font-weight: 500; }
.pkw-sub-arrow { opacity: .35; flex-shrink: 0; }

.pkw-loading { padding: 2rem; text-align: center; color: var(--text3, #8a96a8); }

/* Mobile: two-step view (mains → subs) */
@media (max-width: 720px) {
  .pkw-ov-panel { margin: 0; max-height: 100vh; height: 100vh; border-radius: 0; }
  .pkw-ov-body {
    grid-template-columns: 100% 100%;
    width: 200%;
    transition: transform .25s ease;
  }
  .pkw-ov-panel.show-subs .pkw-ov-body { transform: translateX(-50%); }
  [dir="rtl"] .pkw-ov-panel.show-subs .pkw-ov-body { transform: translateX(50%); }
  .pkw-ov-mains { border-right: none; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .pkw-ov-bg { background: rgba(0, 0, 0, .65); }
  .pkw-main-icon { background: var(--surface2); }
  .pkw-sub-hd-icon { background: var(--p050); }
}


/* ═══════════════════════════════════════════════════════════════════
   ADMIN CATEGORIES v2 (Phase 4)
   Toolbar · Bulk · Inline edit · DnD · Modal
   ═══════════════════════════════════════════════════════════════════ */

/* Toolbar */
.adm-cat-toolbar {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.adm-cat-search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .85rem;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--r8, 8px);
  background: var(--surface, #fff);
  transition: border-color .15s ease;
}
.adm-cat-search:focus-within { border-color: var(--p400, #f4805e); }
.adm-cat-search svg { color: var(--text3, #8a96a8); flex-shrink: 0; }
.adm-cat-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: .9rem;
  color: var(--text1, #1c2530);
}

/* Bulk action bar */
.adm-cat-bulk {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .85rem;
  background: var(--p050, #fff1ed);
  border: 1.5px solid var(--p200, #fcc5b6);
  border-radius: var(--r8, 8px);
  flex-wrap: wrap;
}
.adm-cat-bulk-count {
  font-weight: 700;
  color: var(--p700, #c92306);
  font-size: .85rem;
}
.adm-cat-bulk-btn {
  padding: .35rem .8rem;
  background: var(--surface, #fff);
  border: 1px solid var(--p200, #fcc5b6);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--p700, #c92306);
  transition: background .12s ease;
}
.adm-cat-bulk-btn:hover { background: var(--p100, #fee9e1); }
.adm-cat-bulk-btn.danger { color: #dc2626; border-color: #fecaca; }
.adm-cat-bulk-btn.danger:hover { background: #fee2e2; }
.adm-cat-bulk-btn.ghost { color: var(--text3, #8a96a8); border-color: var(--border, #e5e7eb); }

/* Tree */
.adm-cat-tree { display: flex; flex-direction: column; gap: .35rem; }
.adm-cat-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text3, #8a96a8);
  font-size: .92rem;
}
.adm-cat-link {
  background: none;
  border: none;
  color: var(--p600, #ED2807);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: .88rem;
}

/* Main category row */
.adm-cat-main {
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.adm-cat-main:hover { border-color: var(--p200, #fcc5b6); }
.adm-cat-main.selected {
  border-color: var(--p600, #ED2807);
  box-shadow: 0 0 0 2px var(--p100, #fee9e1);
}
.adm-cat-main.inactive { opacity: .55; }
.adm-cat-main.drop-target { background: var(--p050, #fff1ed); border-color: var(--p400, #f4805e); border-style: dashed; }

.adm-cat-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1rem;
}

.adm-cat-grip {
  cursor: grab;
  color: var(--text3, #8a96a8);
  font-weight: 700;
  letter-spacing: -2px;
  padding: 0 .15rem;
  font-size: .9rem;
  user-select: none;
}
.adm-cat-grip:active { cursor: grabbing; }

.adm-cat-chk {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--p600, #ED2807);
  flex-shrink: 0;
}

.adm-cat-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3, #8a96a8);
  padding: .25rem;
  border-radius: 4px;
  transition: transform .15s ease, background .12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adm-cat-toggle:hover { background: var(--surface2, #f7f8fa); color: var(--text1); }
.adm-cat-main.collapsed .adm-cat-toggle { transform: rotate(-90deg); }

.adm-cat-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: var(--surface2, #f7f8fa);
  border-radius: 6px;
  flex-shrink: 0;
}
.adm-cat-icon.sm { width: 24px; height: 24px; font-size: .9rem; }

.adm-cat-name-wrap { flex: 1; min-width: 0; }

.adm-cat-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text1, #1c2530);
  cursor: text;
  padding: .15rem .35rem;
  margin: -.15rem -.35rem;
  border-radius: 4px;
  transition: background .12s ease;
}
.adm-cat-name:hover { background: var(--surface2, #f7f8fa); }
.adm-cat-sub .adm-cat-name { font-weight: 600; font-size: .9rem; }

.adm-cat-inline-edit {
  width: 100%;
  padding: .25rem .45rem;
  border: 1.5px solid var(--p400, #f4805e);
  border-radius: 4px;
  font-size: .92rem;
  font-weight: 700;
  background: #fff;
  color: var(--text1, #1c2530);
  outline: none;
}

.adm-cat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .25rem;
}
.adm-cat-meta-pill {
  display: inline-block;
  padding: .1rem .5rem;
  background: var(--surface2, #f7f8fa);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--text2, #4a5666);
}
.adm-cat-meta-pill.products { background: #dcfce7; color: #166534; }
.adm-cat-meta-pill.inactive { background: #fef3c7; color: #92400e; }
.adm-cat-meta-slug {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .7rem;
  color: var(--text3, #8a96a8);
}

.adm-cat-actions {
  display: flex;
  gap: .3rem;
  flex-shrink: 0;
}
.adm-cat-act {
  padding: .35rem .65rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text2, #4a5666);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.adm-cat-act:hover { background: var(--surface2, #f7f8fa); }
.adm-cat-act.primary { color: var(--p700, #c92306); border-color: var(--p200, #fcc5b6); background: var(--p050, #fff1ed); }
.adm-cat-act.primary:hover { background: var(--p100, #fee9e1); }
.adm-cat-act.danger { color: #dc2626; border-color: #fecaca; }
.adm-cat-act.danger:hover { background: #fee2e2; }

/* Subs */
.adm-cat-subs {
  display: flex;
  flex-direction: column;
  background: var(--surface2, #f7f8fa);
  border-top: 1px solid var(--border, #e5e7eb);
  max-height: 800px;
  overflow: hidden;
  transition: max-height .25s ease;
}
.adm-cat-subs.collapsed,
.adm-cat-main.collapsed .adm-cat-subs { max-height: 0; }

.adm-cat-sub {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1rem .55rem 2.5rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  transition: background .12s ease;
}
.adm-cat-sub:last-child { border-bottom: none; }
.adm-cat-sub:hover { background: var(--surface, #fff); }
.adm-cat-sub.selected { background: var(--p050, #fff1ed); }
.adm-cat-sub.inactive { opacity: .55; }

.adm-cat-sub-arrow { color: var(--text3, #8a96a8); font-size: .85rem; opacity: .55; }
.adm-cat-sub-empty {
  padding: .75rem 1rem .75rem 2.5rem;
  font-size: .82rem;
  font-style: italic;
  color: var(--text3, #8a96a8);
  border-bottom: 1px solid var(--border, #e5e7eb);
}

/* Modal */
.adm-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 30, .55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.adm-modal-card {
  background: var(--surface, #fff);
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  max-height: 90vh;
  overflow-y: auto;
  margin: 1rem;
}
.adm-modal-title {
  font-family: var(--fh, inherit);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 1.25rem 0;
  color: var(--text1);
}
.adm-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
.adm-modal-fld { display: flex; flex-direction: column; gap: .35rem; }
.adm-modal-fld label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text2);
}
.adm-modal-fld input {
  padding: .55rem .75rem;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-size: .92rem;
  background: var(--surface, #fff);
  outline: none;
  transition: border-color .15s ease;
}
.adm-modal-fld input:focus { border-color: var(--p400, #f4805e); }
.adm-modal-fld input[type="checkbox"] { width: auto; }
.adm-modal-fld label[style*="display:flex"] { font-size: .88rem; color: var(--text1); font-weight: 500; }

.adm-modal-section {
  background: var(--surface2, #f7f8fa);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}
.adm-modal-section-hd {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: .65rem;
}
.adm-modal-trans-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: .65rem;
  align-items: center;
  margin-bottom: .5rem;
}
.adm-modal-trans-row:last-child { margin-bottom: 0; }
.adm-modal-trans-row label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text2);
}
.adm-modal-trans-row input {
  padding: .45rem .65rem;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: .88rem;
  background: var(--surface, #fff);
  outline: none;
}
.adm-modal-trans-row input:focus { border-color: var(--p400, #f4805e); }

.adm-modal-extra summary {
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .3px;
  padding-bottom: .5rem;
}
.adm-modal-extra[open] summary { border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: .65rem; }

.adm-modal-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.adm-modal-btn {
  padding: .6rem 1.25rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border, #e5e7eb);
  background: transparent;
  color: var(--text1);
  transition: background .12s ease, opacity .15s ease;
}
.adm-modal-btn.ghost { color: var(--text2); }
.adm-modal-btn.ghost:hover { background: var(--surface2, #f7f8fa); }
.adm-modal-btn.primary {
  background: var(--p600, #ED2807);
  color: #fff;
  border-color: var(--p600, #ED2807);
}
.adm-modal-btn.primary:hover { background: var(--p700, #c92306); }
.adm-modal-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Mobile */
@media (max-width: 640px) {
  .adm-cat-row { flex-wrap: wrap; }
  .adm-cat-actions { width: 100%; justify-content: flex-end; margin-top: .35rem; }
  .adm-cat-sub { padding-left: 1.25rem; flex-wrap: wrap; }
  .adm-modal-grid { grid-template-columns: 1fr; }
  .adm-modal-trans-row { grid-template-columns: 1fr; gap: .25rem; }
  .adm-modal-trans-row label { font-size: .75rem; }
  .adm-cat-bulk { width: 100%; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .adm-cat-sub { background: rgba(255,255,255,.02); }
  .adm-cat-sub:hover { background: rgba(255,255,255,.04); }
  .adm-cat-meta-pill.products { background: rgba(34,197,94,.15); color: #4ade80; }
  .adm-cat-meta-pill.inactive { background: rgba(251,191,36,.15); color: #fbbf24; }
}


/* ═══════════════════════════════════════════════════════════════════
   HERO BANNER ROTATOR (background slides)
   ═══════════════════════════════════════════════════════════════════ */
.hero { position: relative; overflow: hidden; }
#hero-banner-mount {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero-slide-bg.is-active { opacity: 1; }
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,.15) 100%);
  pointer-events: none;
}
.hero > .hero-card { position: relative; z-index: 1; }
.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 2;
  pointer-events: all;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, transform .15s ease;
}
.hero-dot.is-active { background: #fff; transform: scale(1.2); }
.hero-dot:hover { background: rgba(255,255,255,.5); }


/* ═══════════════════════════════════════════════════════════════════
   PARTNER SLOT (replaces Bosch block, rotating possible)
   ═══════════════════════════════════════════════════════════════════ */
.partner-slot .partner-rotator {
  position: relative;
  width: 100%;
  min-height: 240px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2, #f7f8fa);
}
.partner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  display: block;
}
.partner-slide.is-active { opacity: 1; }
.partner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.partner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .4rem;
  z-index: 2;
}
.partner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.25);
  cursor: pointer;
  padding: 0;
}
.partner-dot.is-active { background: #fff; }


/* ═══════════════════════════════════════════════════════════════════
   SIDE SKYSCRAPER BANNERS (mobile.de style — only on very wide screens)
   ═══════════════════════════════════════════════════════════════════ */
.side-banner {
  position: fixed;
  top: 120px;
  width: 160px;
  height: 600px;
  z-index: 50;
  display: none; /* hidden by default — only show on wide screens */
  pointer-events: auto;
}
.side-banner-left  { left: 16px; }
.side-banner-right { right: 16px; }

.side-rotator {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  background: var(--surface, #fff);
}
.side-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  display: block;
}
.side-slide.is-active { opacity: 1; }
.side-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.side-ad-label {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,.85);
  color: #555;
  padding: 1px 6px;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: .3px;
  z-index: 2;
}

/* Show side banners only when viewport ≥ 1480px
   (page max-width ~1240 + 160px banner + 16px gap on each side = ~1592 - we cut at 1480 for tighter fit) */
@media (min-width: 1480px) {
  .side-banner { display: block; }
}

/* On very wide screens, push them out further */
@media (min-width: 1700px) {
  .side-banner-left  { left: 32px; }
  .side-banner-right { right: 32px; }
}


/* ═══════════════════════════════════════════════════════════════════
   SEO TEXT BLOCKS
   ═══════════════════════════════════════════════════════════════════ */
.seo-blocks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.seo-block {
  background: var(--surface, #fff);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border, #e5e7eb);
}
.seo-block-title {
  font-family: var(--fh, inherit);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .85rem 0;
  color: var(--text1, #1c2530);
  line-height: 1.25;
}
.seo-block-body {
  color: var(--text2, #4a5666);
  font-size: .95rem;
  line-height: 1.65;
}
.seo-block-body p { margin: 0 0 .85rem 0; }
.seo-block-body p:last-child { margin-bottom: 0; }
.seo-block-body h2,
.seo-block-body h3 { margin: 1.1rem 0 .55rem 0; color: var(--text1); font-family: var(--fh, inherit); }
.seo-block-body a { color: var(--p600, #ED2807); text-decoration: underline; }
.seo-block-body ul,
.seo-block-body ol { margin: 0 0 .85rem 0; padding-left: 1.5rem; }
.seo-block-body strong { color: var(--text1); }


/* ═══════════════════════════════════════════════════════════════════
   ADMIN: Placement badges (banner list)
   ═══════════════════════════════════════════════════════════════════ */
.banner-pl-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.banner-pl-hero       { background: #dbeafe; color: #1d4ed8; }
.banner-pl-partner    { background: #fef3c7; color: #92400e; }
.banner-pl-side_left  { background: #dcfce7; color: #166534; }
.banner-pl-side_right { background: #fce7f3; color: #9d174d; }


/* ═══════════════════════════════════════════════════════════════════
   ADMIN: SEO Texts form
   ═══════════════════════════════════════════════════════════════════ */
#seoForm textarea {
  padding: .55rem .75rem;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--surface, #fff);
  outline: none;
  transition: border-color .15s ease;
  resize: vertical;
}
#seoForm textarea:focus { border-color: var(--p400, #f4805e); }
#seoForm input {
  padding: .55rem .75rem;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--surface, #fff);
  outline: none;
  transition: border-color .15s ease;
}
#seoForm input:focus { border-color: var(--p400, #f4805e); }


/* Mobile: hide side banners completely */
@media (max-width: 1479px) {
  .side-banner { display: none !important; }
}

/* ─────────────────────────────────────────────────────────
   POPULAR BRANDS GRID  (replaces old Popular Categories
   + Part Types sections on the homepage)
   ───────────────────────────────────────────────────────── */
.mp-brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .9rem;
}

.mp-brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1.25rem .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease,
              border-color .18s ease, background .18s ease;
  text-align: center;
  min-height: 130px;
}
.mp-brand-tile:hover {
  transform: translateY(-2px);
  border-color: var(--brand-orange);
  box-shadow: 0 6px 20px rgba(237, 40, 7, .12);
  background: var(--surface);
}
.mp-brand-tile:active { transform: translateY(0); }

.mp-brand-logo {
  width: 72px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mp-brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter .18s ease;
}
.mp-brand-tile:hover .mp-brand-logo img { filter: grayscale(0%); }

/* Fallback: shown when the logo image fails to load.
   Uses the brand's own name in clean typography. */
.mp-brand-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fb);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.01em;
  color: var(--text2);
  background: linear-gradient(135deg, var(--surface2), var(--border));
  border-radius: 8px;
  padding: .35rem .5rem;
  text-align: center;
  line-height: 1.05;
}

.mp-brand-tile .mp-brand-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.005em;
}

/* Tighter packing on smaller screens */
@media (max-width: 640px) {
  .mp-brand-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
  }
  .mp-brand-tile {
    min-height: 110px;
    padding: 1rem .5rem .75rem;
  }
  .mp-brand-tile .mp-brand-logo { width: 56px; height: 44px; }
  .mp-brand-tile .mp-brand-name { font-size: .78rem; }
}
