.vehicle-profile-shell {
  display: grid;
  gap: 18px;
}

.vehicle-gallery {
  display: grid;
  gap: 10px;
}

.vehicle-hero-frame {
  position: relative;
  overflow: hidden;
  min-height: min(70vh, 680px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #08090a;
}

.hero-image-button {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
}

.hero-image-button img {
  width: 100%;
  height: min(70vh, 680px);
  object-fit: cover;
  display: block;
}

.expand-photo-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.72);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.vehicle-hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(5, 6, 7, 0.92), rgba(5, 6, 7, 0.04) 62%);
  pointer-events: none;
}

.vehicle-hero-copy {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 5vw, 48px);
  right: clamp(18px, 5vw, 48px);
  bottom: clamp(18px, 5vw, 42px);
  pointer-events: none;
}

.vehicle-hero-copy h1 {
  margin: 6px 0;
  font-size: clamp(3rem, 10vw, 7rem);
}

.gallery-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transform: translateY(-50%);
  padding: 0;
  font-size: 2rem;
  background: rgba(5, 6, 7, 0.68);
  backdrop-filter: blur(8px);
}

.gallery-arrow.previous { left: 12px; }
.gallery-arrow.next { right: 12px; }

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
}

.gallery-thumbnails button {
  flex: 0 0 96px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  scroll-snap-align: start;
}

.gallery-thumbnails button.active { border-color: var(--flame); }
.gallery-thumbnails img { width: 96px; height: 72px; display: block; object-fit: cover; }

.photo-lightbox[hidden],
.owner-gallery-tools[hidden],
.follow-vehicle-button[hidden],
.vehicle-social-actions[hidden] {
  display: none !important;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: clamp(10px,2vw,24px);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
}

.photo-lightbox figure {
  position: relative;
  width: min(94vw, 1400px);
  max-height: 92vh;
  min-width: 0;
  margin: 0;
  display: grid;
  place-items: center;
  gap: 10px;
}

.photo-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0,0,0,.7);
}

.photo-lightbox figcaption {
  max-width: min(820px, 90vw);
  color: rgba(255,255,255,.82);
  text-align: center;
}

.lightbox-close,
.lightbox-arrow {
  position: fixed;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  color: #fff !important;
  background: rgba(8,9,11,.68) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.42) !important;
  backdrop-filter: blur(10px);
}

.lightbox-close {
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  width: 36px;
  height: 36px;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 9px !important;
  font-size: 1.35rem !important;
  line-height: 1;
}

.lightbox-arrow {
  top: 50%;
  width: 38px;
  height: 54px;
  min-width: 38px !important;
  min-height: 54px !important;
  transform: translateY(-50%);
  border-radius: 10px !important;
  font-size: 1.7rem !important;
  line-height: 1;
}

.lightbox-arrow.previous { left: max(18px, env(safe-area-inset-left)); }
.lightbox-arrow.next { right: max(18px, env(safe-area-inset-right)); }

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgba(20,22,26,.86) !important;
  transform: translateY(-50%);
}

.lightbox-close:hover { transform: none; }

.lightbox-counter {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8,9,11,.68);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

body.lightbox-open { overflow: hidden; }

.vehicle-social-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.follow-vehicle-button {
  min-height: 48px;
  padding-inline: 22px;
  background: linear-gradient(90deg, var(--red), var(--flame));
}

.follow-vehicle-button.following {
  color: var(--ink);
  background: rgba(255,255,255,.1);
  border: 1px solid var(--line);
}

.owner-gallery-tools { display: grid; gap: 12px; }
.owner-gallery-tools input[type="file"] { width: 100%; }
.vehicle-tabs { display: flex; gap: 8px; overflow-x: auto; }
.vehicle-tabs button { flex: 0 0 auto; min-height: 44px; background: rgba(255,255,255,.06); }
.vehicle-tabs button.active { background: linear-gradient(90deg, var(--red), var(--flame)); }
.vehicle-tab-panel { display: none; }
.vehicle-tab-panel.active { display: block; }
.specs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.specs-grid div, .contributor-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); }
.specs-grid span, .contributor-card strong, .contributor-card span { display: block; }
.specs-grid span, .contributor-card span { color: var(--muted); }
.contributor-list { display: grid; gap: 12px; margin-top: 16px; }

@media (max-width: 700px) {
  .vehicle-profile-shell { width: min(100% - 18px, 1180px); }
  .vehicle-hero-frame, .hero-image-button img { min-height: 58vh; height: 58vh; }
  .gallery-arrow { width: 40px; height: 40px; }
  .expand-photo-hint { top: 10px; right: 10px; font-size: .74rem; }
  .vehicle-social-actions { align-items: stretch; }
  .follow-vehicle-button { width: 100%; }
  .specs-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-lightbox { padding: 6px; }
  .photo-lightbox figure { width: 100%; max-height: 96vh; }
  .photo-lightbox img { max-height: 86vh; border-radius: 8px; }
  .lightbox-close {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 32px;
    height: 32px;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    font-size: 1.15rem !important;
  }
  .lightbox-arrow {
    width: 32px;
    height: 48px;
    min-width: 32px !important;
    min-height: 48px !important;
    font-size: 1.45rem !important;
    border-radius: 8px !important;
  }
  .lightbox-arrow.previous { left: max(6px, env(safe-area-inset-left)); }
  .lightbox-arrow.next { right: max(6px, env(safe-area-inset-right)); }
}
