@font-face {
  font-family: Bomstad;
  src: url('./assets/bomstad-semibold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Helvena;
  src: url('./assets/helvena-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Helvena;
  src: url('./assets/helvena-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Helvena;
  src: url('./assets/helvena-semibold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --red: #e0041d;
  --navy: #021927;
  --paper: #f2f2f2;
  --ink: #12252f;
  --muted: #4f606b;
  --line: #dbe1e4;
  --surface: #fff;
  --tint: #edf2f5;
  --gutter: clamp(1rem, 4.5vw, 4rem);
  --section-space: clamp(3.5rem, 8vw, 8rem);
  --card-space: clamp(1.25rem, 2.2vw, 2rem);
  --radius: 1.5rem;
  --shadow: 0 6px 26px #0219270a;
  font: 1rem/1.5 Helvena, system-ui, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
:where(h1, h2, h3, strong, th) { font-weight: 600; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; object-fit: cover; }
button, input, select, textarea { min-width: 0; font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 3px solid #1b79b2; outline-offset: 3px; }
.wrap { width: min(80rem, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  z-index: 4;
  inset: 0.75rem auto auto 0.75rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip-path: none;
  color: var(--ink);
  background: white;
}

.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  border: 1px solid transparent;
  border-radius: 2rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: background-color .18s, border-color .18s, color .18s;
}
.button { gap: .625rem; padding: .75rem 1.15rem; font-size: .9375rem; }
.button span { font-family: system-ui, sans-serif; flex: none; }
.icon-button {
  padding: 0;
  background: var(--tint);
  color: var(--navy);
  font: 500 1.4rem/1 system-ui, sans-serif;
}
.icon-button:hover, .secondary:hover { background: #dfe8ed; }
.primary { background: var(--red); color: white; }
.primary:hover { background: #b90017; }
.secondary { background: var(--tint); color: var(--navy); }
.outline { background: #ffffff0a; border-color: #ffffff67; color: white; }
.outline:hover { background: #ffffff1a; border-color: white; }
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  gap: .5rem;
  color: var(--navy);
  font-weight: 500;
}
.text-link:hover { text-decoration: underline; text-underline-offset: .22em; }

.intro { background: var(--navy); color: var(--paper); }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.5rem, 2vw, 2rem);
  padding-block: 1rem;
  min-height: 5.25rem;
}
.logo { display: inline-flex; align-items: center; min-height: 2.75rem; }
.logo img { height: auto; object-fit: contain; }
.site-header .logo img { width: clamp(9rem, 17vw, 12.625rem); }
.site-header nav { display: flex; align-items: center; gap: clamp(.25rem, 1.8vw, 1.75rem); }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .25rem;
  color: #e0e8ed;
  font-weight: 500;
  text-align: center;
}
.site-header nav a:hover { color: white; text-decoration: underline; text-underline-offset: .25em; }

.hero {
  --hero-image-height: clamp(13rem, 56vw, 22rem);
  --hero-shift: 5%;
  display: grid;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(29rem, 67svh, 40rem);
  border-top: 1px solid #ffffff18;
  background: #04151f;
}
.hero-photo, .hero-shade { position: absolute; inset: 0; z-index: -2; }
.hero-photo {
  background: url('./assets/hero.jpg') center 48%/cover no-repeat;
  animation: hero-enter 1s ease-out both;
}
.hero-shade {
  z-index: -1;
  background: linear-gradient(90deg, #04151f 0%, #04151fed 21%, #04151fa6 40%, transparent 72%),
              linear-gradient(0deg, #04151fa0, transparent 28%);
}
.hero-inner { display: grid; align-items: center; position: relative; padding-block: clamp(4rem, 7vw, 6rem); }
.hero-copy { width: min(100%, 33rem); animation: copy-enter .65s .1s ease-out both; }
.kicker {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #e1ebef;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .125em;
}
.kicker span { width: 1rem; height: 3px; flex: none; background: var(--red); }
.hero h1 {
  margin-block: clamp(1.375rem, 2.7vw, 2rem) 1.25rem;
  color: white;
  font: 600 clamp(2.375rem, 4.8vw, 4.125rem)/1.06 Bomstad, Helvena, system-ui, sans-serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero h1 em { color: #ff4257; font-style: normal; }
.hero-description {
  max-width: 32ch;
  margin-bottom: 1.75rem;
  color: #e1ebef;
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.6;
  text-wrap: pretty;
}
@keyframes hero-enter { from { transform: scale(1.035); } to { transform: scale(1); } }
@keyframes copy-enter { from { transform: translateY(12px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

.stock { padding-block: var(--section-space); background: var(--paper); color: var(--ink); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  column-gap: 2rem;
  row-gap: .5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.75rem);
}
.section-heading h2 {
  font-size: clamp(1.875rem, 3.6vw, 3.25rem);
  letter-spacing: -.04em;
  line-height: 1.12;
  text-wrap: balance;
}
.filters, .inventory-filters { display: grid; gap: .75rem; }
.filters { grid-template-columns: minmax(0, 1.65fr) repeat(3, minmax(0, 1fr)); }
.search, select, input:not([type=checkbox]), textarea {
  min-height: 3rem;
  padding: .625rem .875rem;
  border: 1px solid #c5d0d6;
  border-radius: .75rem;
  background: var(--surface);
  font-size: 1rem;
}
.search { display: flex; align-items: center; gap: .625rem; min-width: 0; padding-block: 0; }
.search span { color: var(--muted); font: 500 1.45rem/1 system-ui, sans-serif; }
.search input { min-height: 3rem; width: 100%; padding-inline: 0; border: 0; background: transparent; }
.search:focus-within { outline: 3px solid #1b79b2; outline-offset: 3px; }
.search input:focus-visible { outline: none; }
select { width: 100%; padding-right: .5rem; }
.stock-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin-block: 1rem .75rem;
  color: var(--muted);
  font-size: .9375rem;
}
.stock-meta a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-underline-offset: .22em; }
.bike-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.bike-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #e1e5e7;
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
}
.bike-image, .detail-photo {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1.48;
  overflow: hidden;
  background: #e8edf0;
}
.bike-image { padding: 0; border: 0; }
.bike-image:focus-visible { outline-offset: -5px; }
.bike-image img, .detail-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (hover: hover) {
  .bike-image img { transition: transform .3s ease; }
  .bike-image:hover img { transform: scale(1.04); }
}
.status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 100%;
  padding: .3rem .65rem;
  border-radius: 1rem;
  background: var(--tint);
  color: #344954;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.status::before { content: ''; flex: 0 0 .4rem; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.bike-image .status { position: absolute; inset: .875rem auto auto .875rem; }
.status.available { color: #075a40; background: #e0f3e9; }
.status.reserved { color: #744600; background: #fff0d3; }
.status.sold { color: #9a1e30; background: #ffe9ed; }
.status.draft { color: #45535f; background: #edf1f4; }
.bike-body { display: flex; flex-direction: column; flex: 1; padding: var(--card-space); }
.bike-brand {
  display: block;
  margin-bottom: .3rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .075em;
  overflow-wrap: anywhere;
}
.bike-body h3 { font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.25; letter-spacing: -.022em; }
.bike-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .75rem;
  margin-top: .65rem;
  color: var(--muted);
  font-size: .9375rem;
}
.bike-specs span + span::before { content: '·'; margin-right: .75rem; }
.bike-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  margin-top: auto;
  padding-top: 1.25rem;
}
.bike-bottom strong { font-size: clamp(1.125rem, 1.8vw, 1.375rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
.bike-bottom .button { font-size: .875rem; }
.empty {
  grid-column: 1/-1;
  padding: var(--card-space);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.no-photo { color: var(--muted); font-size: .875rem; text-align: center; }

.services { padding-block: var(--section-space); background: #061520; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.service-grid article {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: clamp(1.625rem, 4.5vw, 4rem);
  border: 1px solid #ffffff24;
  border-radius: var(--radius);
  background: #0b2332;
  scroll-margin-top: 1rem;
}
.service-grid h2 { font-size: clamp(1.5rem, 2.9vw, 2.5rem); letter-spacing: -.035em; line-height: 1.12; text-wrap: balance; }
.service-grid p { max-width: 35ch; margin-block: 1rem 1.625rem; color: #d5e2e8; line-height: 1.6; text-wrap: pretty; }
.service-grid .button { margin-top: auto; }
.site-footer { background: var(--navy); }
.footer-main {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-block: clamp(2.75rem, 5vw, 5rem);
}
.footer-main > div { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; color: #d6e1e7; }
.footer-main strong { color: white; font-size: 1.125rem; }
.footer-main a, .footer-bottom a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer-main a:hover, .footer-bottom a:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-main .text-link { color: white; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding-block: .625rem;
  border-top: 1px solid #ffffff29;
  color: #d4e0e6;
  font-size: .9375rem;
}
.footer-bottom div { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }

dialog {
  width: min(58rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  box-shadow: 0 1.25rem 5rem #02192750;
  overscroll-behavior: contain;
}
dialog::backdrop { background: #02131fc9; }
.detail-toolbar {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e9edef;
  background: white;
}
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
#detail-gallery {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .75rem;
  padding: var(--card-space);
  background: #f4f6f7;
}
.detail-photo { aspect-ratio: 1.28; border-radius: 1rem; }
.detail-photo img { object-fit: contain; }
#detail-info { padding: clamp(1.25rem, 3.5vw, 3rem); align-self: center; }
#detail-info .bike-brand { margin-top: 1rem; }
#detail-info h2 { font-size: clamp(1.5rem, 3.2vw, 2.125rem); line-height: 1.15; letter-spacing: -.03em; }
.detail-price { display: block; margin-block: 1.25rem; font-size: clamp(1.25rem, 2.4vw, 1.625rem); letter-spacing: -.03em; }
.bike-description { margin-top: 1rem; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.gallery-nav { display: flex; justify-content: center; align-items: center; gap: 1rem; color: var(--muted); }

.admin {
  display: grid;
  grid-template-columns: clamp(12rem, 17vw, 15rem) minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f6f7;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 2rem 1.25rem;
  background: var(--navy);
  color: white;
}
.sidebar .logo { margin: 0 .25rem 2rem; }
.sidebar nav { display: grid; gap: .375rem; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .55rem .875rem;
  border-radius: .75rem;
  color: #dce8ed;
  font-weight: 500;
}
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #ffffff13; color: white; }
.sidebar nav a[aria-current] { box-shadow: inset 3px 0 var(--red); }
.admin-content { width: min(100%, 91rem); margin-inline: auto; padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3.75rem); }
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.admin-heading h1 {
  font-size: clamp(2.125rem, 4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -.052em;
  text-wrap: balance;
}
.admin-heading p { max-width: 44ch; margin-top: .65rem; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.125rem); text-wrap: pretty; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: .875rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
}
.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .55rem;
  min-width: 0;
  min-height: 6.75rem;
  padding: .875rem clamp(.875rem, 1.8vw, 1.375rem);
  border: 1px solid #e3e8ea;
  border-radius: 1rem;
  background: white;
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: .9375rem;
  overflow-wrap: anywhere;
}
.stat.total { background: var(--navy); color: #e4edf2; border-color: var(--navy); }
.stat strong { color: var(--ink); font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat.total strong { color: white; }
.stat.available strong { color: #075a40; }
.stat.reserved strong { color: #744600; }
.stat.sold strong { color: #9a1e30; }
.inventory {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8eb;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}
.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .875rem 1.25rem;
  padding: var(--card-space);
}
.inventory h2 { font-size: clamp(1.375rem, 2.6vw, 1.875rem); letter-spacing: -.035em; line-height: 1.15; }
.inventory-filters { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); width: min(100%, 25rem); }
.panel-message { padding: 0 var(--card-space) 1rem; color: var(--muted); }
.panel-message:empty { display: none; }
.inventory-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9375rem; }
.inventory-table th { background: #f3f6f8; color: var(--muted); font-size: .875rem; }
.inventory-table :is(th, td) { padding: .875rem clamp(.5rem, 1.2vw, 1rem); border-top: 1px solid #e8edf0; vertical-align: middle; }
.inventory-table :is(th, td):first-child { padding-left: var(--card-space); }
.inventory-table :is(th, td):last-child { padding-right: var(--card-space); }
.inventory-table td { overflow-wrap: anywhere; }
.row-bike { display: flex; align-items: center; gap: .875rem; }
.row-bike > div {
  display: grid;
  place-items: center;
  flex: 0 0 3.75rem;
  width: 3.75rem;
  height: 3.25rem;
  border-radius: .625rem;
  overflow: hidden;
  background: var(--tint);
}
.row-bike img { width: 100%; height: 100%; }
.row-bike p { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.row-bike p span { color: var(--muted); font-size: .875rem; }
.row-bike p strong { font-size: 1rem; }
.row-action { text-align: right; }
.row-action .button { padding-inline: .875rem; font-size: .875rem; }
.cell-label { display: none; }

.editor { width: min(45rem, calc(100% - 2rem)); }
#bike-form { display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); }
.editor-head, .editor-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: none;
  gap: .75rem;
  padding: 1rem var(--card-space);
  background: white;
}
.editor-head { border-bottom: 1px solid #e5eaed; }
.editor-head h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); line-height: 1.15; letter-spacing: -.035em; }
.editor-body { min-height: 0; padding: var(--card-space); overflow-y: auto; overscroll-behavior: contain; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid label, .description-field, .upload { display: grid; min-width: 0; gap: .375rem; font-size: .9375rem; font-weight: 500; }
.form-grid input, .form-grid select, .description-field textarea { width: 100%; font-weight: 400; }
.field-help, .description-field small { color: var(--muted); font-size: .875rem; font-weight: 400; }
.field-help { margin-top: .625rem; }
.description-field { margin-top: 1.5rem; }
.description-field small { margin-inline-start: .375rem; }
.description-field textarea { resize: vertical; }
.check-label { display: flex; align-items: center; gap: .625rem; min-height: 2.75rem; margin-top: .75rem; }
.check-label input { width: 1.25rem; height: 1.25rem; flex: none; margin: 0; accent-color: var(--red); }
.photo-area { margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid #e5eaed; }
.upload input[type=file] { width: 100%; padding: .375rem; font-weight: 400; }
.upload input::file-selector-button {
  min-height: 2.75rem;
  margin-inline-end: .5rem;
  padding: .4rem .75rem;
  border: 0;
  border-radius: .5rem;
  background: var(--tint);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.photo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .75rem; margin-top: .875rem; }
.photo-list:empty { display: none; }
.photo-item { min-width: 0; border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; }
.photo-item img { aspect-ratio: 1.48; width: 100%; }
.photo-item div { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; padding: .3rem; font-size: .8125rem; }
.photo-item button { min-width: 2.75rem; min-height: 2.75rem; border: 0; border-radius: .5rem; background: var(--tint); }
.editor-actions { flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid #e5eaed; }
.editor-actions p { flex: 1 1 100%; color: #9a1e30; font-size: .875rem; }
.editor-actions p:empty { display: none; }

@media (min-width: 79rem) {
  .inventory-table { table-layout: fixed; }
  .inventory-table :is(th, td):not(:first-child) { white-space: nowrap; }
  .inventory-table th:nth-child(2) { width: 7.25rem; }
  .inventory-table th:nth-child(3) { width: 8.75rem; }
  .inventory-table th:nth-child(4) { width: 9.25rem; }
  .inventory-table th:nth-child(5) { width: 8.5rem; }
  .inventory-table th:nth-child(6) { width: 10.25rem; }
}

@media (width < 79rem) {
  .inventory-header { border-bottom: 1px solid #e8edf0; }
  .inventory-table, .inventory-table tbody { display: block; }
  .inventory-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .875rem;
    padding: var(--card-space);
    background: #f7f8f9;
  }
  .inventory-table tbody:empty { display: none; }
  .inventory-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .inventory-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    align-items: center;
    gap: .9rem .75rem;
    min-width: 0;
    padding: 1.125rem;
    border: 1px solid #e3e9ec;
    border-radius: 1rem;
    background: white;
  }
  .inventory-table tbody td { padding: 0; border: 0; }
  .row-title, .row-action { grid-column: 1/-1; }
  .inventory-table tbody .row-title { padding-bottom: .625rem; border-bottom: 1px solid #e9eef0; }
  .row-action { margin-top: .25rem; }
  .row-action .button { width: 100%; }
  .cell-label { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
}

@media (max-width: 60rem) {
  .bike-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin { display: block; }
  .sidebar {
    position: static;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    height: auto;
    padding: .625rem var(--gutter);
  }
  .sidebar .logo { margin: 0; }
  .sidebar .logo img { width: 9.5rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: .25rem; }
  .sidebar nav a { font-size: .9375rem; padding-inline: .65rem; }
}

@media (max-width: 48rem) {
  .site-header { flex-wrap: wrap; min-height: 0; padding-block: .625rem; gap: .25rem .5rem; }
  .site-header nav { order: 3; justify-content: space-between; width: 100%; gap: 0 .25rem; }
  .site-header nav a { font-size: .875rem; }
  .header-contact { padding-inline: .75rem; font-size: .875rem; }
  .hero { --hero-shift: 3%; min-height: 0; }
  .hero-inner { padding-block: clamp(3rem, 8vw, 4.75rem) calc(var(--hero-image-height) + 1.5rem); }
  .hero-photo, .hero-shade { inset: auto 0 0; height: calc(var(--hero-image-height) + 2rem); }
  .hero-photo { background-size: cover; background-position: 75% 53%; }
  .hero-shade { background: linear-gradient(#04151f, #04151f15 30%, transparent 65%, #04151f59); }
  .hero h1 { text-wrap: wrap; }
  .hero-description { margin-bottom: 1.5rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main > div:first-child { grid-column: 1/-1; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-photo { aspect-ratio: 1.58; }
}

@media (max-width: 40rem) {
  .inventory-table tbody { grid-template-columns: minmax(0, 1fr); padding: .875rem; }
  .inventory-header { align-items: stretch; }
  .inventory-filters { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat.total { grid-column: 1/-1; min-height: 0; flex-direction: row; align-items: center; }
}

@media (max-width: 34rem) {
  .bike-grid, .footer-main { grid-template-columns: minmax(0, 1fr); }
  .bike-bottom { gap: .75rem; }
  .filters .search { grid-column: 1/-1; }
  .filters #order { grid-column: 1/-1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .inventory-filters { grid-template-columns: minmax(0, 1fr); }
  .editor-actions .button { flex: 1; padding-inline: .65rem; }
  .editor-body { padding: 1rem var(--card-space); }
}

@media (max-width: 23rem) {
  .sidebar nav { width: 100%; }
  .site-header nav a { padding-inline: .15rem; }
}

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