:root {
  --bg: #090a08;
  --surface: #12130f;
  --gold: #d8b37d;
  --gold-2: #e7c795;
  --green: #35ff57;
  --text: #f4eee4;
  --muted: #a39b90;
  --line-soft: rgba(255,255,255,.07);
  --hover-soft: rgba(216,179,125,.065);
  --press-soft: rgba(216,179,125,.12);
  --shadow: 0 24px 70px rgba(0,0,0,.40);
  --container: 1120px;
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(216,179,125,.06), transparent 360px),
    radial-gradient(circle at 95% 75%, rgba(53,255,87,.04), transparent 340px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { max-width: 100%; }

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(9,10,8,.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  position: relative;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.language-control[hidden] {
  display: none;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 4px 7px 4px 4px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  transition: background .15s ease, filter .15s ease;
}

.brand:hover { background: var(--hover-soft); }
.brand:active { background: var(--press-soft); filter: brightness(.96); }

.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(216,179,125,.24);
  border-radius: 50%;
  background: #090a08;
}

.brand-name {
  font-size: 16px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .075em;
  white-space: nowrap;
}

/* ---------- HEADER CONTROLS ---------- */

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-popover {
  position: relative;
}

.header-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(216,179,125,.24);
  border-radius: 50%;
  background: rgba(255,255,255,.015);
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, filter .15s ease, box-shadow .15s ease;
}

.header-icon-button:hover {
  border-color: rgba(216,179,125,.52);
  background: rgba(216,179,125,.065);
  box-shadow: 0 0 0 3px rgba(216,179,125,.025);
}

.header-icon-button:active {
  background: rgba(216,179,125,.12);
  filter: brightness(.92);
}

.current-language-flag {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.current-language-flag {
  font-size: 21px;
  line-height: 1;
}

.popover-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 7px;
  border: 1px solid rgba(216,179,125,.18);
  border-radius: 14px;
  background: rgba(18,19,15,.98);
  box-shadow: 0 18px 48px rgba(0,0,0,.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.popover-menu::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-left: 1px solid rgba(216,179,125,.18);
  border-top: 1px solid rgba(216,179,125,.18);
  background: rgba(18,19,15,.98);
  transform: rotate(45deg);
}

.language-menu {
  min-width: 178px;
}

.language-option {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, filter .14s ease;
}

.language-option:hover {
  background: rgba(216,179,125,.075);
  color: var(--gold-2);
}

.language-option:active {
  background: rgba(216,179,125,.13);
  filter: brightness(.92);
}

/* CATALOG */
.catalog-section { padding: 32px 0 64px; }

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

.bike-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.014), transparent 28%), var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.bike-card:hover {
  border-color: rgba(216,179,125,.25);
  box-shadow: 0 24px 72px rgba(0,0,0,.46), 0 0 0 1px rgba(216,179,125,.025) inset;
  background: linear-gradient(180deg, rgba(216,179,125,.022), transparent 30%), var(--surface);
}

.bike-card:active {
  border-color: rgba(216,179,125,.34);
  background: linear-gradient(180deg, rgba(216,179,125,.04), transparent 34%), var(--surface);
}

.bike-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 86px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green));
  opacity: .55;
}

/* CARD GALLERY */
.card-gallery {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: #070806;
  cursor: zoom-in;
  touch-action: pan-y;
}

.card-gallery.is-dragging,
.details-carousel.is-dragging,
.image-stage.is-dragging {
  cursor: grabbing;
}

.card-image-button,
.details-main-image-button {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  transition: filter .15s ease;
}

.card-image-button:hover,
.details-main-image-button:hover { filter: brightness(1.035); }

.card-image-button:active,
.details-main-image-button:active { filter: brightness(.94); }

.card-image,
.details-main-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Main photo arrows: white glyph only, with invisible hit areas.
   Left keeps the normal full-height trigger zone.
   Right is lifted above the bottom zoom/cascade area so it cannot steal clicks there. */
.gallery-arrow {
  position: absolute;
  z-index: 7;
  top: 0;
  width: 62px;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  transition: background .15s ease;
}

.gallery-arrow-left {
  left: 0;
  bottom: 0;
}

.gallery-arrow-right {
  right: 0;
  bottom: 88px;
}

/* Draw the glyph independently from the trigger area's height.
   This keeps both visible arrows centered on the photo. */
.gallery-arrow::after {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(255,255,255,.88);
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,.75);
  transform: translate(-50%, -50%);
  transition: color .15s ease, text-shadow .15s ease;
}

.gallery-arrow-left::after {
  content: "‹";
}

.gallery-arrow-right::after {
  content: "›";
  /* right trigger zone is 88px shorter; compensate by half so the glyph
     remains at the true vertical center of the full photo */
  transform: translate(-50%, calc(-50% + 44px));
}

.gallery-arrow-left:hover {
  background: linear-gradient(90deg, rgba(255,255,255,.055), transparent);
}

.gallery-arrow-right:hover {
  background: linear-gradient(270deg, rgba(255,255,255,.055), transparent);
}

.gallery-arrow:hover::after {
  color: #fff;
  text-shadow: 0 0 13px rgba(255,255,255,.28), 0 2px 10px rgba(0,0,0,.75);
}

.gallery-arrow-left:active {
  background: linear-gradient(90deg, rgba(216,179,125,.10), transparent);
}

.gallery-arrow-right:active {
  background: linear-gradient(270deg, rgba(216,179,125,.10), transparent);
}

.gallery-arrow:active::after {
  color: var(--gold-2);
  text-shadow: 0 0 15px rgba(216,179,125,.35);
}

/* Zoom hint bottom-right. This area belongs to the photo opener, not arrows. */
.zoom-hint {
  position: absolute;
  z-index: 9;
  right: 14px;
  bottom: 14px;
  width: 25px;
  height: 25px;
  pointer-events: none;
  opacity: .90;
  filter: drop-shadow(0 2px 7px rgba(0,0,0,.75));
}

.zoom-hint::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 3px;
  top: 3px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.zoom-hint::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  left: 13px;
  top: 15px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
  transform-origin: left center;
}

/* STRICT CASCADE: prev | current | next, with tiny arrows outside. */
.strict-cascade {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 9px;
  width: 248px;
  height: 72px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 18px 58px 86px 58px 18px;
  align-items: end;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
}

.cascade-mini-arrow,
.cascade-side,
.cascade-current {
  pointer-events: auto;
}

.cascade-mini-arrow {
  align-self: end;
  width: 18px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.84);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 8px rgba(0,0,0,.78);
  transition: color .15s ease, text-shadow .15s ease, filter .15s ease;
}

.cascade-mini-arrow:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,.30), 0 2px 8px rgba(0,0,0,.78);
}

.cascade-mini-arrow:active {
  color: var(--gold-2);
  filter: brightness(.9);
}

.cascade-side,
.cascade-current {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  background: #0a0b08;
  box-shadow: 0 8px 22px rgba(0,0,0,.42);
  cursor: pointer;
  transition: border-color .15s ease, filter .15s ease, opacity .15s ease;
}

.cascade-side {
  width: 58px;
  height: 42px;
  border-radius: 3px;
  opacity: .82;
}

.cascade-current {
  width: 86px;
  height: 58px;
  border-radius: 3px;
  border-color: rgba(255,255,255,.22);
}

.cascade-side:hover,
.cascade-current:hover {
  border-color: rgba(216,179,125,.62);
  filter: brightness(1.10);
  opacity: 1;
}

.cascade-side:active,
.cascade-current:active {
  filter: brightness(.88);
}

.cascade-side img,
.cascade-current img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

/* CARD CONTENT */
.card-body { padding: 18px 22px 21px; }

.card-heading-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.card-type {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.card-title {
  min-width: 0;
  margin: 0;
  font-size: clamp(24px,2.8vw,30px);
  line-height: 1.03;
  letter-spacing: -.038em;
}

.card-description {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.rent-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--gold);
  color: #0e0f0c;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .075em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, filter .15s ease, box-shadow .15s ease;
}

.rent-button:hover {
  border-color: var(--gold-2);
  background: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(216,179,125,.055);
}

.rent-button:active {
  filter: brightness(.9);
  box-shadow: 0 0 0 2px rgba(216,179,125,.08);
}

/* DETAILS */
.modal[hidden],
.image-modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(3,3,2,.88);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background .15s ease;
}

.modal-backdrop:hover { background: rgba(3,3,2,.85); }
.modal-backdrop:active { background: rgba(3,3,2,.91); }

.details-dialog {
  position: relative;
  z-index: 1;
  width: min(1110px,100%);
  max-height: calc(100vh - 44px);
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(350px,.9fr);
  overflow: auto;
  border: 1px solid rgba(216,179,125,.18);
  border-radius: 24px;
  background: #10110d;
  box-shadow: 0 36px 120px rgba(0,0,0,.68);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid rgba(216,179,125,.25);
  border-radius: 50%;
  background: rgba(8,9,7,.78);
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}

.modal-close:hover,
.image-modal-close:hover {
  border-color: rgba(216,179,125,.58);
  background: rgba(216,179,125,.10);
  color: var(--gold-2);
}

.modal-close:active,
.image-modal-close:active { filter: brightness(.85); }

.details-gallery {
  min-width: 0;
  padding: 14px 14px 18px;
  border-right: 1px solid var(--line-soft);
  background: #0a0b08;
}

.details-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background: #050604;
  cursor: grab;
  touch-action: pan-y;
}

.details-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.thumbnail-button {
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #0b0c09;
  cursor: pointer;
  transition: border-color .15s ease, filter .15s ease, opacity .15s ease;
}

.thumbnail-button:hover {
  border-color: rgba(216,179,125,.42);
  filter: brightness(1.08);
}

.thumbnail-button:active {
  filter: brightness(.88);
}

.thumbnail-button.is-active {
  border-color: var(--gold);
}

.thumbnail-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  opacity: .62;
  pointer-events: none;
}

.thumbnail-button.is-active img,
.thumbnail-button:hover img {
  opacity: 1;
}

.details-content {
  min-width: 0;
  padding: 48px 34px 34px;
}

.details-kicker {
  margin: 0 0 11px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.details-content h2 {
  margin: 0;
  font-size: clamp(32px,4vw,46px);
  line-height: .98;
  letter-spacing: -.045em;
}

.details-lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.details-price-row {
  margin-top: 22px;
  padding: 17px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.details-price-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin-top: 19px;
}

.spec-item {
  padding: 12px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(255,255,255,.012);
}

.spec-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.spec-value { font-size: 13px; font-weight: 760; }

.details-description { margin-top: 21px; }

.details-description h3 {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.details-description p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
}

.rent-button-large {
  width: 100%;
  min-height: 50px;
  margin-top: 25px;
}

/* FULLSCREEN */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0,0,0,.96);
  cursor: zoom-out;
  transition: background .15s ease;
}

.image-modal-backdrop:hover { background: rgba(0,0,0,.94); }
.image-modal-backdrop:active { background: rgba(0,0,0,.98); }

.image-viewer-shell {
  position: relative;
  z-index: 3;
  width: min(1260px,96vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

.image-stage {
  position: relative;
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  max-height: calc(94vh - 92px);
  cursor: grab;
  touch-action: pan-y;
}

.image-full {
  max-width: min(1120px, calc(96vw - 150px));
  max-height: calc(94vh - 92px);
  display: block;
  object-fit: contain;
  border-radius: 10px;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  box-shadow: 0 35px 110px rgba(0,0,0,.65);
}

.image-arrow {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  width: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.88);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
  transition: color .15s ease, text-shadow .15s ease, background .15s ease;
}

.image-arrow:hover {
  color: #fff;
  text-shadow: 0 0 17px rgba(255,255,255,.30), 0 2px 12px rgba(0,0,0,.8);
  background: rgba(255,255,255,.025);
}

.image-arrow:active {
  color: var(--gold-2);
  text-shadow: 0 0 18px rgba(216,179,125,.45);
  background: rgba(216,179,125,.05);
}

.image-arrow-left { left: -64px; }
.image-arrow-right { right: -64px; }

/* X now lives directly beside the photo. */
.image-modal-close {
  position: absolute;
  z-index: 8;
  top: 0;
  right: -58px;
  width: 42px;
  height: 42px;
  padding: 0 0 4px;
  border: 1px solid rgba(216,179,125,.27);
  border-radius: 50%;
  background: rgba(8,9,7,.78);
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}

/* Fullscreen cascade is below the photo, never on top of it. */
.fullscreen-cascade {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  flex: 0 0 72px;
}

/* Focus */
button:focus-visible,
a:focus-visible,
.bike-card:focus-visible {
  outline: 2px solid rgba(216,179,125,.82);
  outline-offset: 2px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .details-dialog { grid-template-columns: 1fr; }
  .details-gallery {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .image-full { max-width: min(88vw,1020px); }
  .image-arrow-left { left: -52px; }
  .image-arrow-right { right: -52px; }
  .image-modal-close { right: -48px; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .header-inner { min-height: 70px; }
  .brand-logo { width: 46px; height: 46px; }
  .brand-name { font-size: 13px; }
  .header-icon-button {
    width: 37px;
    height: 37px;
  }

  .current-language-flag {
    font-size: 19px;
  }

  .header-actions {
    gap: 6px;
  }

  .popover-menu {
    top: calc(100% + 8px);
  }

  .catalog-section { padding-top: 18px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 16px; }
  .bike-card { border-radius: 19px; }

  .card-body { padding: 16px 18px 18px; }
  .card-title { font-size: 27px; }
  .card-description { font-size: 12px; }

  .gallery-arrow {
    width: 48px;
  }

  .gallery-arrow-left {
    bottom: 0;
  }

  .gallery-arrow-right {
    bottom: 82px;
  }

  .gallery-arrow::after {
    font-size: 31px;
  }

  .gallery-arrow-right::after {
    transform: translate(-50%, calc(-50% + 41px));
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .details-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 22px 22px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .details-gallery { padding: 9px 9px 15px; }
  .details-content { padding: 27px 19px 28px; }

  .image-modal { padding: 16px; }
  .image-viewer-shell { width: 100%; }
  .image-full {
    max-width: calc(100vw - 94px);
    max-height: calc(92vh - 92px);
  }

  .image-arrow { width: 42px; font-size: 34px; }
  .image-arrow-left { left: -44px; }
  .image-arrow-right { right: -44px; }
  .image-modal-close {
    right: -38px;
    top: -6px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

@media (max-width: 430px) {
  .header-inner {
    gap: 8px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-icon-button {
    width: 34px;
    height: 34px;
  }

  .current-language-flag {
    font-size: 17px;
  }

  .brand-name {
    max-width: 150px;
    white-space: normal;
    line-height: 1.05;
  }

  .card-heading-row { gap: 8px; }
  .card-title { font-size: 24px; }
  .spec-grid { grid-template-columns: 1fr; }

  .strict-cascade {
    width: 220px;
    grid-template-columns: 16px 52px 76px 52px 16px;
    gap: 2px;
  }

  .cascade-mini-arrow {
    width: 16px;
    height: 38px;
    font-size: 19px;
  }

  .cascade-side {
    width: 52px;
    height: 38px;
  }

  .cascade-current {
    width: 76px;
    height: 52px;
  }

  .image-full { max-width: calc(100vw - 78px); }
  .image-arrow-left { left: -38px; }
  .image-arrow-right { right: -38px; }
  .image-modal-close { right: -32px; }
}

@media (hover: none) {
  .bike-card:hover {
    border-color: var(--line-soft);
    box-shadow: var(--shadow);
    background: linear-gradient(180deg, rgba(255,255,255,.014), transparent 28%), var(--surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ===== v11 card price grid redesign ===== */

.card-description {
  margin-bottom: 14px;
}

.card-pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 14px;
  align-items: stretch;
}

.card-prices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  align-content: start;
}

.card-price-tile {
  min-width: 0;
}

.card-price-value {
  display: block;
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.02em;
}

.card-price-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: lowercase;
}

.card-side-actions {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  align-self: stretch;
}

.card-more-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(216,179,125,.22);
  border-radius: 12px;
  background: rgba(255,255,255,.015);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, filter .15s ease, box-shadow .15s ease;
}

.card-more-button:hover {
  border-color: rgba(216,179,125,.52);
  background: rgba(216,179,125,.055);
  box-shadow: 0 0 0 3px rgba(216,179,125,.03);
}

.card-more-button:active {
  background: rgba(216,179,125,.11);
  filter: brightness(.95);
}

.card-action-rent {
  margin-top: 0;
}

@media (max-width: 760px) {
  .card-pricing-layout {
    grid-template-columns: 1fr;
  }

  .card-side-actions {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .card-more-button {
    min-height: 42px;
  }
}

@media (max-width: 420px) {
  .card-prices-grid {
    gap: 8px 12px;
  }

  .card-price-value {
    font-size: 18px;
  }

  .card-price-label {
    font-size: 10px;
  }
}

/* ===== v13 tariff refinement ===== */
.card-price-label {
  margin-top: 7px;
}

.details-price-row {
  display: grid;
  gap: 16px;
}

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

.details-price-option {
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255,255,255,.015);
}

.details-price-option-value {
  display: block;
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.details-price-option-label {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: lowercase;
}

@media (max-width: 900px) {
  .details-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .details-price-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== v14 card action alignment ===== */
.card-pricing-layout {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 10px 12px;
  align-items: stretch;
}

.card-prices-grid,
.card-side-actions {
  display: contents;
}

.card-price-tile:nth-child(1) { grid-column: 1; grid-row: 1; }
.card-price-tile:nth-child(2) { grid-column: 2; grid-row: 1; }
.card-price-tile:nth-child(3) { grid-column: 1; grid-row: 2; }

.card-more-button {
  grid-column: 3;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}

.card-action-rent {
  grid-column: 2 / 4;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding-inline: 12px;
  white-space: nowrap;
}

.current-language-flag,
.flag-image {
  width: 24px;
  height: 16px;
  display: block;
  object-fit: cover;
  border-radius: 2px;
}

.flag-image {
  flex: 0 0 24px;
}

.details-price-row {
  gap: 10px;
}

.details-price-label {
  margin: 0;
}

@media (max-width: 760px) {
  .card-pricing-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
  }
  .card-price-tile:nth-child(1) { grid-column: 1; grid-row: 1; }
  .card-price-tile:nth-child(2) { grid-column: 2; grid-row: 1; }
  .card-price-tile:nth-child(3) { grid-column: 1; grid-row: 2; }
  .card-more-button { grid-column: 2; grid-row: 2; }
  .card-action-rent { grid-column: 1 / 3; grid-row: 3; }
}

@media (max-width: 1040px) {
  .header-inner { flex-wrap: wrap; gap: 8px; padding-top: 7px; padding-bottom: 8px; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .brand-name { font-size: 11px; }
  .header-actions { gap: 5px; }
}

.card-more-button, .card-action-rent, .rent-button, .language-option { overflow-wrap: break-word; word-wrap: break-word; }
.card-action-rent { white-space: normal; text-align: center; }

/* ================== v20: details ordering / photo workstation ================== */
.details-content .spec-grid { margin-top: 23px; }
.details-content .details-description { margin-top: 23px; }
.details-content .details-price-row { margin-top: 23px; }
/* The user requested a deliberate reading order: specs, description, prices. */
.image-viewer-shell { width: min(1320px, 98vw); gap: 14px; }
.image-stage { display:block; width: max-content; max-width: 100%; cursor:default; touch-action: auto; }
.image-photo-frame {
  width: min(1120px, calc(96vw - 150px), calc((94vh - 158px) * 4 / 3));
  aspect-ratio:4/3; position:relative; overflow:hidden;
  display:grid; place-items:center; border-radius:10px;
  background: #060706; cursor:grab; touch-action:pan-y;
}
.image-stage.is-zoomed .image-photo-frame { cursor:move; touch-action:none; }
.image-full {
  position:absolute; inset:0; /* вертикальные и не 4:3 фото целиком вписываются в рамку */
  width:100%; height:100%; max-width:none; max-height:none; display:block;
  object-fit:contain; transform-origin:center center;
  box-shadow:none; transition: transform .12s ease-out;
}
.image-stage .image-arrow { z-index:7; }
.image-viewer-toolbar {
  position:relative; width:max-content; max-width:100%; min-height:72px;
  display:flex; align-items:center; justify-content:center; gap:9px;
}
.image-viewer-toolbar.is-no-cascade { gap:3px; min-height:45px; }
.image-viewer-toolbar .fullscreen-cascade {
  position:relative; width:248px; height:72px; left:auto; bottom:auto;
  flex:0 0 248px; transform:none; margin:0;
}
.image-toolbar-group {
  display:flex; align-items:center; justify-content:center; flex:0 0 auto; gap:3px;
  padding:4px; border:1px solid rgba(216,179,125,.24); border-radius:12px;
  background:rgba(22,23,20,.94); box-shadow:0 7px 21px rgba(0,0,0,.35);
}
.image-tool {
  width:31px; height:35px; display:grid; place-items:center; padding:0;
  color:#ede3d5; border:1px solid transparent; border-radius:8px; background:transparent;
  font-size:17px; font-weight:550; cursor:pointer; line-height:1;
  transition:color .13s ease, background .13s ease, border-color .13s ease;
}
.image-tool:hover { color:#fff; border-color:rgba(216,179,125,.28); background:rgba(216,179,125,.12); }
.image-tool:active { color:var(--gold); background:rgba(216,179,125,.21); }
.image-tool.image-reset { min-width:44px; width:auto; padding:0 5px; font-size:11px; font-weight:750; font-variant-numeric:tabular-nums; }
.image-tools-divider { height:22px; width:1px; margin:0 2px; background:rgba(216,179,125,.24); }
/* Off means no empty cascade slot. Groups sit immediately next to one another. */
.image-viewer-toolbar.is-no-cascade .image-toolbar-group { margin:0; }
@media (max-width: 820px) {
  .image-viewer-toolbar:not(.is-no-cascade) { flex-wrap:wrap; width:min(100%,550px); row-gap:4px; }
  .image-viewer-toolbar:not(.is-no-cascade) .fullscreen-cascade { order:0; flex-basis:100%; margin:0 auto; }
  .image-viewer-toolbar:not(.is-no-cascade) .image-zoom-controls { order:1; }
  .image-viewer-toolbar:not(.is-no-cascade) .image-transform-controls { order:2; }
  .image-viewer-toolbar.is-no-cascade { flex-wrap:nowrap; }
  .image-photo-frame { width:min(calc(100vw - 100px),calc((94vh - 155px) * 4 / 3)); }
}
@media (max-width: 430px) {
  .image-modal { padding:8px; }
  .image-viewer-shell { width:100%; }
  .image-tool { width:26px; height:31px; font-size:15px; }
  .image-tool.image-reset { min-width:38px; font-size:10px; padding:0 3px; }
  .image-toolbar-group { gap:1px; padding:3px; border-radius:9px; }
  .image-tools-divider { margin:0 1px; }
  .image-photo-frame { width:min(calc(100vw - 82px),calc((94vh - 170px) * 4 / 3)); }
}
/* Disabled navigation must stay hidden in both modern and legacy CSS. */
.image-arrow[hidden], .gallery-arrow[hidden], .strict-cascade[hidden] { display:none !important; }

.image-tool:disabled, .image-tool:disabled:hover { opacity:.36; cursor:default; background:transparent; border-color:transparent; box-shadow:none; }

/* v23: items within the unlocked extras section are contiguous. */

/* ===== фильтры каталога во второй строке шапки ===== */
.header-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-filters::-webkit-scrollbar { display: none; }
.header-filters select, .filter-reset {
  flex: 1 1 0;
  min-width: 120px;
  min-height: 34px;
  padding: 0 30px 0 14px;
  border: 1px solid rgba(216,179,125,.27);
  border-radius: 999px;
  background: rgba(216,179,125,.045) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23d8b37d'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.header-filters select option { background: var(--surface); color: var(--text); }
.header-filters select:focus-visible, .filter-reset:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.filter-reset { flex: 0 0 auto; min-width: 0; padding: 0 16px; background: transparent; color: #afa496; }
.filter-reset:hover { color: var(--text); background: rgba(216,179,125,.075); }
.catalog-empty { padding: 40px 0; text-align: center; color: var(--muted); }
@media (max-width: 480px) {
  .header-filters select { min-width: 108px; font-size: 11px; }
}

/* v25: фильтры в одной строке шапки */
.header-inner { gap: 14px; }
.header-inner .brand { flex: none; }
.header-inner .header-filters { flex: 1 1 auto; min-width: 0; padding: 0; gap: 6px; justify-content: flex-end; }
.header-inner .header-filters select {
  flex: 0 1 150px; min-width: 92px; min-height: 30px; padding: 0 24px 0 11px;
  font-size: 11px; background-position: right 9px center; text-overflow: ellipsis;
}
.header-inner .filter-reset { flex: none; width: 30px; min-height: 30px; padding: 0; font-size: 12px; }
@media (max-width: 1040px) {
  .header-inner .header-actions { order: 2; margin-left: 0; }
  .header-inner .header-filters { order: 3; flex: 1 1 100%; justify-content: flex-start; }
  .header-inner .header-filters select { flex: 1 1 0; }
}
@media (max-width: 480px) {
  .header-inner .header-filters select { min-width: 96px; }
  .header-inner .header-actions { order: 1; margin-left: auto; }  /* флаг — в строке с логотипом */
}

/* ===== v29 phone: two cards per row ===== */
@media (max-width: 720px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bike-card { border-radius: 14px; }
  .card-cascade { width: 152px; height: 44px; bottom: 6px; grid-template-columns: 12px 36px 50px 36px 12px; gap: 2px; }
  .card-cascade .cascade-mini-arrow { width: 12px; height: 26px; font-size: 16px; }
  .card-cascade .cascade-side { width: 36px; height: 27px; }
  .card-cascade .cascade-current { width: 50px; height: 38px; }
  .gallery-arrow { width: 32px; }
  .gallery-arrow::after { font-size: 22px; }
  .gallery-arrow-right { bottom: 52px; }
  .gallery-arrow-right::after { transform: translate(-50%, calc(-50% + 26px)); }
  .card-body { padding: 10px 10px 12px; }
  .card-heading-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .card-type { font-size: 8px; letter-spacing: .12em; }
  .card-title { font-size: 17px; }
  .card-description { font-size: 10px; margin-bottom: 8px; }
  .card-pricing-layout { gap: 8px; }
  .card-prices-grid { grid-template-columns: 1fr; gap: 6px; }
  .card-price-value { font-size: 15px; }
  .card-price-label { font-size: 9px; margin-top: 2px; }
  .card-side-actions { gap: 6px; }
  .card-more-button { min-height: 34px; padding: 0 6px; font-size: 9px; letter-spacing: .06em; border-radius: 9px; }
  .card-action-rent { min-height: 38px; padding: 0 6px; font-size: 10px; letter-spacing: .04em; border-radius: 10px; white-space: normal; line-height: 1.15; }
  .card-pricing-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .card-price-tile:nth-child(n), .card-more-button, .card-action-rent { grid-column: 1; grid-row: auto; }
  .card-price-value { white-space: nowrap; }
}

/* v31: транспорт без фото — окно деталей без галереи */
.no-photos .details-gallery { display: none; }
.no-photos .details-dialog { grid-template-columns: 1fr; width: min(640px, 100%); }

/* v32: карточки без фото вдвое ниже — две такие встают рядом с одной карточкой с фото */
.catalog-grid { grid-auto-flow: row; }
.bike-card:not(.no-photo) { grid-row: span 2; }
