:root {
  color-scheme: dark;
  --bg: #07090b;
  --surface: #101418;
  --surface-soft: #151b20;
  --surface-strong: #1d242b;
  --text: #eef4f2;
  --muted: #98a6ad;
  --line: #27313a;
  --accent: #d6a84f;
  --accent-dark: #f1c76c;
  --gold: #d89b2b;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -12%, rgba(214, 168, 79, 0.16), transparent 34%),
    var(--bg);
  color: var(--text);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.spec-svg-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding-bottom: 32px;
}

.store-header {
  background: var(--surface);
  border-bottom: 1px solid rgba(214, 168, 79, 0.14);
}

.store-cover {
  position: relative;
  aspect-ratio: 8 / 3;
  max-height: 443px;
  overflow: hidden;
  background: #1d242b;
}

.store-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(7, 9, 11, 0.08), rgba(7, 9, 11, 0.75));
}

.store-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-profile {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: end;
  padding: 0 18px 18px;
  margin-top: -30px;
  position: relative;
  z-index: 2;
}

.store-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid rgba(214, 168, 79, 0.45);
  border-radius: 18px;
  background: linear-gradient(145deg, #f1c76c, #7a5a20);
  color: #11100d;
  font-weight: 800;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.store-copy {
  min-width: 0;
}

.store-kicker,
.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.store-copy h1 {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 2.6rem);
  line-height: 1.05;
}

.store-copy p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.social-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 18px 18px;
  scrollbar-width: none;
}

.social-actions::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar {
  display: none;
}

.social-actions a,
.tab {
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.promo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 14px 0;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(214, 168, 79, 0.18);
  background: linear-gradient(145deg, #151b20, #0e1215);
  color: var(--text);
}

.promo-strip span {
  display: block;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.promo-strip strong {
  display: block;
  margin-top: 3px;
  font-size: 0.96rem;
  line-height: 1.28;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: pointer;
}

.catalog-section {
  padding: 20px 14px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.32rem, 5vw, 2rem);
  line-height: 1.1;
}

.stock-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.category-tabs {
  display: flex;
  gap: 8px;
  margin: 16px -14px 16px;
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab {
  border: 0;
  cursor: pointer;
}

.tab.is-active {
  background: linear-gradient(145deg, #f1c76c, #b9822c);
  color: #15100a;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border: 1px dashed #3a4650;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.45;
}

.vehicle-card {
  display: flex;
  min-width: 0;
  min-height: 252px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  text-align: left;
}

.vehicle-card:focus-visible,
.tab:focus-visible,
.floating-cta:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgba(214, 168, 79, 0.32);
  outline-offset: 3px;
}

.vehicle-media {
  position: relative;
  aspect-ratio: 1.18 / 1;
  background: #242c33;
}

.vehicle-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(214, 168, 79, 0.92);
  color: #15100a;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px;
}

.vehicle-card h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.2;
}

.vehicle-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.vehicle-spec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.vehicle-spec-strip span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(214, 168, 79, 0.1);
  color: #d7dfdc;
  font-size: 0.68rem;
  font-weight: 900;
}

.vehicle-spec-strip b,
.spec-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(214, 168, 79, 0.16);
  color: var(--accent-dark);
}

.spec-icon .spec-svg-icon {
  width: 14px;
  height: 14px;
}

.vehicle-card-price {
  margin: auto 0 0;
  padding-top: 10px;
  color: var(--accent-dark);
  font-size: 0.98rem;
  font-weight: 900;
}

.vehicle-modal {
  width: 100%;
  max-width: 760px;
  height: 100%;
  max-height: 100%;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.vehicle-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.modal-panel {
  position: relative;
  min-height: 100%;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: var(--surface);
}

.modal-topbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
}

.modal-topbar .icon-button {
  border-color: rgba(214, 168, 79, 0.22);
  background: rgba(13, 17, 20, 0.9);
  color: var(--text);
  font-size: 1.55rem;
}

.gallery {
  background: #11171c;
}

.gallery > img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  object-fit: cover;
  cursor: zoom-in;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--surface);
}

.thumb {
  height: 58px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  padding: 0;
  cursor: pointer;
}

.thumb.is-active {
  border-color: var(--accent);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-details {
  padding: 18px;
}

.vehicle-tag {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-details h2 {
  margin: 0;
  font-size: clamp(1.42rem, 6vw, 2.15rem);
  line-height: 1.06;
}

.vehicle-price {
  margin: 10px 0 0;
  color: var(--accent-dark);
  font-size: 1.34rem;
  font-weight: 900;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.spec-list div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.spec-list dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.spec-list dd {
  margin: 4px 0 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.vehicle-description {
  margin: 0;
  color: #c6d0d0;
  line-height: 1.55;
}

.floating-cta {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #2fe46d, #0f9f4d);
  color: #06140b;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(47, 228, 109, 0.24);
}

.floating-cta::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset -5px -5px 0 -4px currentColor;
}

.floating-cta.is-disabled {
  background: #303a40;
  color: #aeb9bd;
  pointer-events: none;
  box-shadow: none;
}

.photo-viewer {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #050607;
  color: var(--text);
  overflow: hidden;
}

.photo-viewer::backdrop {
  background: #050607;
}

.photo-viewer[open] {
  display: grid;
  place-items: center;
}

.photo-viewer-topbar {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.viewer-button,
.photo-viewer-topbar span,
.viewer-nav {
  border: 1px solid rgba(214, 168, 79, 0.26);
  background: rgba(13, 17, 20, 0.84);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.viewer-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 900;
  pointer-events: auto;
}

.photo-viewer-topbar span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.84rem;
  font-weight: 900;
}

.photo-viewer img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center center;
  transition: transform 0.18s ease;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.photo-viewer.is-zoomed img {
  cursor: grab;
  transition: none;
}

.photo-viewer.is-dragging img {
  cursor: grabbing;
}

.viewer-nav {
  position: fixed;
  top: 50%;
  z-index: 4;
  display: none;
  place-items: center;
  width: 46px;
  height: 58px;
  border-radius: var(--radius);
  font-size: 2rem;
  cursor: pointer;
}

.viewer-prev {
  left: 12px;
}

.viewer-next {
  right: 12px;
}

@media (min-width: 680px) {
  .store-profile,
  .social-actions,
  .catalog-section {
    padding-right: 28px;
    padding-left: 28px;
  }

  .promo-strip {
    margin-right: 28px;
    margin-left: 28px;
  }

  .category-tabs {
    margin-right: -28px;
    margin-left: -28px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .vehicle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .vehicle-card {
    min-height: 292px;
  }

  .vehicle-modal {
    max-height: 92vh;
    margin: auto;
  }

  .modal-panel {
    min-height: auto;
    border-radius: 18px;
  }

  .floating-cta {
    right: calc(50% - 348px);
    left: auto;
    width: 240px;
  }

  .viewer-nav {
    display: grid;
  }
}

@media (min-width: 1024px) {
  .vehicle-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
