/* Storefront and product browsing */
.storefront {
  --store-ink: #192820;
  --store-muted: #55635a;
  --store-rule: #d4dbd1;
  --store-surface: #eef1e9;
  color: var(--store-ink);
  padding-bottom: clamp(3rem, 6vw, 6rem);
}
.storefront :is(h1, h2, h3, strong) { text-wrap: balance; line-height: 1.12; }
.storefront :is(.card, .pill, .showcase a, .wheel-types a, button) { -webkit-tap-highlight-color: transparent; }
.storefront :is(a, button, input):focus-visible { outline: 3px solid #427250; outline-offset: 3px; }
.storefront .section { margin-top: clamp(2.75rem, 5.5vw, 5.5rem); }
.storefront .heading { margin-bottom: 1.4rem; }
.storefront .heading h2, .storefront .details h2 { font-size: clamp(1.75rem, 3.5vw, 3rem); letter-spacing: -.045em; }
.storefront .hero {
  align-items: center;
  min-height: clamp(28rem, 41vw, 37rem);
  padding: clamp(2rem, 5vw, 5rem);
  border-radius: clamp(1rem, 1.6vw, 1.75rem);
  background: #16251e;
}
.storefront .hero > img { width: 76%; object-position: 65% 55%; }
.storefront .hero:after { background: linear-gradient(90deg, #16251e 8%, #17271ef7 26%, #142018c4 46%, #15241c2c 72%, transparent); }
.storefront .hero > div { max-width: min(35rem, 52%); }
.storefront .hero small { font-size: .75rem; letter-spacing: .095em; color: #dce6d9; }
.storefront .hero h1 {
  font-size: clamp(2.55rem, 4.7vw, 4.5rem);
  margin: .24em 0 .3em;
  letter-spacing: -.045em;
  hyphens: auto;
}
.storefront .hero p { margin: 0; line-height: 1.55; font-size: clamp(1rem, 1.4vw, 1.14rem); color: #f1f4ed; }
.storefront .hero .pill, .storefront .showcase a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 1.45rem;
  color: #18251c;
  background: #f1f4e8;
  font-weight: 650;
  text-decoration: none;
}
.storefront .hero .pill:hover, .storefront .showcase a:hover { background: white; }

.storefront .home-series { margin: 0 0 1.5rem; gap: .5rem; }
.storefront .wheel-types a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem 1rem;
  border-color: var(--store-rule);
  background: white;
  line-height: 1.4;
}
.storefront .wheel-types a:hover, .storefront .wheel-types a[aria-current="true"] { color: white; background: #304b3b; }
.storefront .home-series .upcoming-series { color: var(--store-muted); background: transparent; }
.storefront .home-models { gap: clamp(.85rem, 1.5vw, 1.5rem); margin-top: 0; }
.storefront .home-models .card {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.45fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: end;
  overflow: hidden;
  background: #e7ece3;
  border: 1px solid var(--store-rule);
  border-radius: 1.1rem;
  padding: clamp(1rem, 2.2vw, 2rem);
}
.storefront .home-models .card:nth-child(2) { background: #eeeae2; border-color: #dfdacf; }
.storefront .home-models :is(strong, p) { grid-column: 1; position: relative; z-index: 1; }
.storefront .home-models strong {
  grid-row: 1;
  display: block;
  font-size: clamp(1.4rem, 2.75vw, 2.6rem);
  letter-spacing: -.045em;
  margin: 0 0 .45rem;
}
.storefront .home-models b { display: inline-block; font-size: .55em; margin-inline-start: .18em; vertical-align: top; }
.storefront .home-models p { grid-row: 2; align-self: start; line-height: 1.45; }
.storefront .home-models .photo {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 100%;
  aspect-ratio: 1.43;
  background: transparent;
  overflow: visible;
}
.storefront .grid { gap: clamp(.9rem, 1.7vw, 1.5rem); }
.storefront .grid .photo { border-radius: .9rem; }
.storefront .grid strong { align-items: baseline; gap: .5rem; font-size: clamp(1.05rem,1.6vw,1.45rem); }
.storefront .grid p, .storefront .home-models p { font-size: .9rem; color: var(--store-muted); }
.storefront .about, .storefront .details {
  max-width: none;
  padding: clamp(1.5rem, 3.5vw, 3.5rem) 0 0;
  border-top: 1px solid var(--store-rule);
}
.storefront .about h2 { margin: .5em 0; }
.storefront .details > p, .storefront .about p { max-width: 70ch; font-size: 1.02rem; }
.storefront .details .link { display: inline-block; padding-block: .65rem; text-underline-offset: .2em; }
.storefront .parts-preview { margin-block: 1.5rem; background: radial-gradient(ellipse at 50% 38%, #f7f5ee, #dfdfd7); }
.storefront .parts-preview model-viewer { height: clamp(22rem, 48vw, 36rem); }
.storefront .parts-preview figcaption { border-top: 1px solid var(--store-rule); }

.storefront.catalog { padding-top: clamp(1rem,2.2vw,2rem); }
.storefront .catalog-intro { align-items: end; margin-bottom: 1.5rem; }
.storefront .catalog-intro h1 { margin: .16em 0; font-size: clamp(2.4rem,4.5vw,4.15rem); letter-spacing: -.052em; }
.storefront .catalog-intro .catalog-tagline { margin: .4em 0 0; }
.storefront .catalog-intro label { font-weight: 600; }
.storefront #series-search { min-height: 44px; width: min(17rem,100%); border-radius: .6rem; padding-inline: .9rem; }
.storefront .showcase {
  display: grid;
  align-content: center;
  min-height: clamp(22rem,31vw,30rem);
  padding: clamp(1.75rem,4.5vw,4rem);
}
.storefront .showcase > div { width: min(48%,34rem); }
.storefront .showcase h2 { font-size: clamp(3rem, 6.7vw, 6rem); letter-spacing: -.065em; margin: .1em 0 .15em; }
.storefront .showcase p { margin: .65em 0 0; max-width: none; line-height: 1.5; font-size: 1rem; }
.storefront .showcase img { width: 53%; object-fit: contain; padding: clamp(1rem,3vw,3rem); }
.storefront .showcase nav { width: fit-content; flex-wrap: wrap; margin-top: 1.25rem; }
.storefront .showcase button { min-height: 40px; padding-inline: .85rem; }
.storefront .browser-grid { grid-template-columns: minmax(10rem, 14rem) minmax(0,1fr); gap: clamp(1.3rem,3vw,3.25rem); margin-top: clamp(2.5rem,4vw,4rem); }
.storefront .browser-grid aside { position: sticky; top: 1.25rem; align-self: start; }
.storefront #filters button { min-height: 44px; line-height: 1.35; }
.storefront #filters button:hover { background: var(--store-surface); }
.storefront .result-head { align-items: baseline; padding-bottom: 1rem; border-bottom: 1px solid var(--store-rule); }
.storefront .series-group + .series-group { margin-top: 2rem !important; }
.storefront .model-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  overflow: visible;
  gap: .8rem;
}
.storefront #cards article { overflow: hidden; border: 1px solid var(--store-rule); background: #fff; }
.storefront #cards .model-link { padding: .85rem; }
.storefront #cards a.model-link:hover { box-shadow: inset 0 0 0 2px #829786; text-decoration: none; }
.storefront #cards .card-heading { min-height: 2.2rem; line-height: 1.25; gap: .35rem; flex-wrap: wrap; }
.storefront #cards .card-heading h3 { font-size: 1.45rem; }
.storefront #cards .card-heading small { font-size: .72rem; letter-spacing: 0; }
.storefront #cards .version-thumb { aspect-ratio: 1.5; margin-bottom: .8rem; }
.storefront #cards .version-thumb img { width: 100%; height: 100%; }
.storefront #cards .version-thumb img[src*="thumbnail"] { object-fit: contain; }
.storefront #cards .version-thumb span { max-width: calc(100% - .6rem); font-size: .68rem; line-height: 1.2; }
.storefront #cards article p { margin: 0; font-size: .88rem; line-height: 1.5; }
.storefront #reset { border: 1px solid var(--store-rule); background: white; }
@media (max-width: 800px) {
  .storefront .hero > div { max-width: 60%; }
  .storefront .catalog-intro { display: grid; grid-template-columns: 1fr; }
  .storefront #series-search { width: 100%; }
  .storefront .catalog-intro label { margin-bottom: 0; }
  .storefront .browser-grid { display: block; }
  .storefront .browser-grid aside { position: static; }
  .storefront .browser-grid aside h2 { display: block; }
  .storefront #filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 1.4rem; }
  .storefront #filters button { border: 1px solid var(--store-rule); padding-inline: .8rem; }
}
@media (max-width: 620px) {
  .storefront .hero {
    display: flex;
    align-items: end;
    min-height: 0;
    padding: 0;
  }
  .storefront .hero > img { width: 100%; height: clamp(14rem,66vw,22rem); object-position: 50% 48%; }
  .storefront .hero:after { inset: 0 0 auto; height: clamp(14rem,66vw,22rem); background: linear-gradient(to bottom, transparent 58%, #16251e); }
  .storefront .hero > div { width: 100%; max-width: none; margin-top: clamp(12.5rem,56vw,19rem); padding: 0 1.35rem 1.6rem; }
  .storefront .hero h1 { font-size: clamp(2rem, 7.6vw, 3rem); }
  .storefront .hero .pill { margin-top: 1.1rem; }
  .storefront .home-models { grid-template-columns: 1fr; }
  .storefront .home-models .card { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .storefront .home-models .photo { max-height: 8rem; }
  .storefront .wheel-types { flex-wrap: wrap; }
  .storefront .showcase { display: flex; flex-direction: column; align-items: stretch; padding: 1.4rem; min-height: 0; }
  .storefront .showcase img { position: static; width: 100%; height: clamp(9.5rem,39vw,15rem); padding: 0; }
  .storefront .showcase > div { width: 100%; }
  .storefront .showcase h2 { font-size: 3rem; }
  .storefront .showcase a { margin-top: 1rem; }
  .storefront .model-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .storefront #cards .model-link { padding: .65rem; }
}
@media (max-width: 360px) {
  .storefront .grid, .storefront .model-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .storefront *, .storefront *::before, .storefront *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 621px) {
  .storefront .hero > img { mask-image: linear-gradient(90deg, transparent, #000 19%); }
}
.storefront #cards a.model-link .card-heading::after { content: "↗"; color: #48614e; font-size: 1rem; }

.storefront .showcase {
  background: radial-gradient(ellipse at 78% 74%, #495074 0, #1a3449 42%, #0a151f 80%);
}
.storefront .showcase::before {
  content: ""; position: absolute; inset: -12%; z-index: -3; pointer-events: none;
  background: radial-gradient(ellipse at 78% 53%, transparent 29%, #85b5cb66 29.4%, transparent 30.3%),
              radial-gradient(ellipse at 71% 48%, transparent 41%, #a596d433 41.4%, transparent 42.2%),
              radial-gradient(1px 1px at 30% 40%, #deeafe 95%, transparent) 0 0 / 151px 119px,
              radial-gradient(1px 1px at 74% 66%, #a0c6d6 95%, transparent) 0 0 / 247px 197px;
}
@media (prefers-reduced-motion: no-preference) {
  .showcase[data-playing="true"]::before { animation: orbit-drift 16s ease-in-out infinite alternate; }
}
@keyframes orbit-drift { to { transform: translate3d(1.7%, -2%, 0) rotate(-2deg); } }
