/* f82-panel.css — F82 BMW M4 catalog browser styles
 * Reuses tokens from main.css / components.css; cards layered on the
 * existing .part-card / .mv-box / .aftermarket-card foundation.
 */

.f82-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px 24px;
  color: var(--c-text, #e8e8e8);
}

.f82-panel__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--c-border, rgba(255,255,255,0.08));
  padding-bottom: 10px;
}
.f82-panel__header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c-accent, #b8b8b8);
}
.f82-panel__stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
}
.f82-stat {
  background: rgba(255,255,255,0.05);
  padding: 3px 8px;
  border-radius: 12px;
  color: var(--c-text-dim, #999);
}

.f82-panel__slots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 110px;
  overflow-y: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.f82-slot-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--c-text-dim, #999);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.f82-slot-chip:hover {
  background: rgba(255,255,255,0.09);
  color: var(--c-text, #e8e8e8);
}
.f82-slot-chip.is-active {
  background: rgba(120,160,255,0.18);
  border-color: rgba(120,160,255,0.55);
  color: #fff;
}
.f82-slot-chip__count {
  background: rgba(255,255,255,0.1);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
}

.f82-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card overrides on top of .part-card */
.f82-card.part-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.008));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.f82-card.part-card:hover {
  border-color: rgba(120,160,255,0.3);
}

.f82-card .part-card__thumb,
.f82-card .am-card__thumb,
.f82-card .f82-thumb {
  position: relative;
  width: 100% !important;
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  aspect-ratio: auto !important;
  overflow: hidden;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
}
.f82-card .am-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.f82-card .f82-img-fallback {
  object-fit: contain;
  width: 32px;
  height: 32px;
  opacity: 0.4;
}
.f82-thumb__count {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}
.f82-thumb--empty {
  background: rgba(255,255,255,0.03);
}
.f82-thumb--empty .am-card__letter {
  font-size: 30px;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
}

.f82-card .part-card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.f82-card .part-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.f82-card .part-card__brand {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-dim, #999);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.f82-card .part-card__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-text, #e8e8e8);
}

.f82-desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--c-text-dim, #aaa);
  max-height: 4.5em;
  overflow: hidden;
}

/* Specs grid */
.f82-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin: 4px 0;
  font-size: 11px;
}
.f82-specs__row {
  display: contents;
}
.f82-specs__row dt {
  color: var(--c-text-dim, #888);
  font-weight: 400;
}
.f82-specs__row dd {
  margin: 0;
  color: var(--c-text, #ddd);
  font-weight: 500;
}

/* Install info */
.f82-install {
  background: rgba(255,255,255,0.025);
  border-radius: 6px;
  padding: 6px 8px;
}
.f82-install__row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.f82-install__notes {
  font-size: 10.5px;
  color: var(--c-text-dim, #888);
  margin-top: 4px;
  line-height: 1.4;
}
.difficulty-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: inline-block;
}
.difficulty-dot.filled {
  background: linear-gradient(135deg, #ffa066, #ff6b3b);
}

/* Pills */
.f82-pill {
  background: rgba(255,255,255,0.07);
  color: var(--c-text-dim, #aaa);
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
}
.f82-pill--warn {
  background: rgba(255,180,80,0.18);
  color: #ffd699;
}
.f82-pill--year {
  background: rgba(80,180,255,0.15);
  color: #b3d9ff;
}

/* Dyno badge */
.f82-dyno-badge {
  display: inline-block;
  background: linear-gradient(90deg, rgba(80,200,120,0.18), rgba(80,200,120,0.06));
  color: #b6f4cc;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid rgba(80,200,120,0.3);
  text-decoration: none;
  font-weight: 500;
}
.f82-dyno-badge:hover {
  background: rgba(80,200,120,0.25);
  color: #fff;
}

/* Video player */
.f82-videos {
  margin: 4px 0;
}
.f82-videos__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}
.f82-videos__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.f82-videos__more {
  font-size: 10.5px;
  color: var(--c-text-dim, #888);
  margin-top: 4px;
  text-align: right;
}

/* Expert notes + forum */
.f82-notes, .f82-forum {
  background: rgba(255,255,255,0.02);
  border-left: 2px solid rgba(120,160,255,0.5);
  padding: 8px 10px;
  border-radius: 0 4px 4px 0;
}
.f82-notes__heading, .f82-forum__heading {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-dim, #999);
  margin-bottom: 4px;
}
.f82-notes ul, .f82-forum ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.f82-notes li {
  font-size: 11px;
  color: var(--c-text-dim, #bbb);
  line-height: 1.45;
}
.f82-forum li a {
  color: #9bc1ff;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.4;
}
.f82-forum li a:hover { color: #fff; text-decoration: underline; }

/* Meta row */
.f82-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.f82-price {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.f82-price--tbd { color: var(--c-text-dim, #888); font-weight: 500; }

.f82-line {
  font-size: 11px;
  color: var(--c-text, #ccc);
  line-height: 1.4;
}
.f82-line--muted {
  color: var(--c-text-dim, #888);
  font-style: italic;
}
.f82-line code {
  background: rgba(255,255,255,0.05);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
}

.f82-stock { font-weight: 600; font-size: 11px; }
.f82-stock--ok { color: #b6f4cc; }
.f82-stock--oos { color: #ff9b9b; }
.f82-stock--mixed { color: #ffd699; }

.part-card__actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

/* Toggle button — floats fixed on viewport so it works on landing + main app */
.f82-toggle-btn {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 99999;
  background: linear-gradient(135deg, rgba(255,200,80,0.15), rgba(255,150,40,0.1));
  border: 1px solid rgba(255,200,80,0.4);
  color: #ffd699;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.f82-toggle-btn:hover {
  background: linear-gradient(135deg, rgba(255,200,80,0.3), rgba(255,150,40,0.2));
  color: #fff;
}
.f82-toggle-btn.is-active {
  background: linear-gradient(135deg, rgba(120,160,255,0.3), rgba(80,120,255,0.2));
  border-color: rgba(120,160,255,0.5);
  color: #fff;
}
