:root {
  --bg: #09090b;
  --surface: #141416;
  --surface-2: #1c1c20;
  --fg: #f3efe6;
  --muted: #a39e94;
  --primary: #e10600;
  --primary-ink: #fff7f5;
  --border: #2c2c31;
  --check: #f3efe6;
  --font: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --display: "Syne", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.5;
}

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

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  text-wrap: balance;
  letter-spacing: -0.03em;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

.narrow { width: min(42rem, calc(100% - 2rem)); }

.page { padding: 2rem 0 3rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(9 9 11 / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
}

.brand img { width: 2.75rem; height: 2.75rem; object-fit: contain; }

.brand-name {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.brand-sub { display: block; color: var(--muted); font-size: 0.75rem; }

.flag-rule {
  height: 0.625rem;
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, var(--check) 25%, transparent 25%),
    linear-gradient(-45deg, var(--check) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--check) 75%),
    linear-gradient(-45deg, transparent 75%, var(--check) 75%);
  background-size: 0.625rem 0.625rem;
  background-position: 0 0, 0 0.3125rem, 0.3125rem -0.3125rem, -0.3125rem 0;
}

.icon { width: 1rem; height: 1rem; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  font-weight: 600;
  transition: transform 150ms ease-out;
}

.btn:active { transform: scale(0.96); }

.btn:disabled { opacity: 0.5; }

.btn.primary { background: var(--primary); color: var(--primary-ink); }

.btn.ghost {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border);
}

.btn.block { width: 100%; }

.count { color: var(--primary); font-variant-numeric: tabular-nums; }

.nums { font-variant-numeric: tabular-nums; }

.muted { color: var(--muted); }

.kicker {
  margin: 0;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 650;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0.7rem 0 0;
  font-size: clamp(2.4rem, 7vw, 3.75rem);
  line-height: 0.95;
}

.lede {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-ship { display: flex; justify-content: center; }

.hero-ship img { height: 13rem; width: auto; }

.search { position: relative; margin-top: 2.5rem; }

.search .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0 1rem 0 2.75rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 600;
}

.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.tally { margin: 2rem 0 0; color: var(--muted); font-size: 0.875rem; }

.grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--surface);
}

.shot { display: block; background: var(--bg); }

.shot img, .frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.aisle {
  margin: 1rem 0 0;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card h2, .line-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.35rem 0 0;
  font-size: 0.925rem;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.price { margin: 0; font-size: 1.125rem; font-weight: 650; font-weight: 600; }

.price.xl { margin-top: 1rem; font-size: 1.875rem; }

.empty[hidden],
.note[hidden],
.card[hidden] { display: none; }

.empty, .note, .receipt {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--surface);
}

.empty {
  margin-top: 1.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty h2 { margin: 0; font-size: 1.5rem; }

.empty .btn, .center .btn, .page > .btn { margin-top: 1.25rem; }

.product {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.qty button {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--fg);
}

.qty-value {
  width: 2rem;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 650;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lines { list-style: none; margin: 0; padding: 0 1rem; overflow: auto; }

.page-lines {
  margin-top: 1.5rem;
  padding: 0;
}

.line {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.line img {
  width: 5rem;
  height: 5rem;
  flex: none;
  object-fit: contain;
  border-radius: 0.75rem;
  background: var(--surface);
}

.line-body { min-width: 0; flex: 1; }

.line-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.text-btn {
  min-height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
}

.checkout-box {
  border-top: 1px solid var(--border);
  padding: 1rem;
}

.page-lines + .checkout-box { border: 0; padding: 1rem 0 0; }

.total-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.total-row p { margin: 0; }

.total { font-family: var(--display); font-size: 1.875rem; font-weight: 800; }

.note { margin-top: 0.75rem; padding: 1rem; background: var(--surface-2); }

.note h3 { margin: 0; font-size: 1.25rem; }

.note p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.875rem; }

.note .btn { margin-top: 1rem; }

.receipt { list-style: none; margin: 1.5rem 0 0; padding: 0; }

.receipt li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.receipt li:first-child { border-top: 0; }

.receipt .strong { font-weight: 650; font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.center { text-align: center; }

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 2rem 0;
}

.drawer[hidden] { display: none; }

.drawer { position: fixed; inset: 0; z-index: 40; }

.drawer-overlay { position: absolute; inset: 0; background: rgb(9 9 11 / 0.7); }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(28rem, 100%);
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.45);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 { margin: 0; font-size: 1.25rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
}

.drawer-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}

.drawer-empty .icon { width: 2rem; height: 2rem; }

.drawer-panel [data-drawer-body] {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.drawer-panel .lines { flex: 1; }

.drawer-panel .checkout-box { margin-top: auto; }

body.drawer-open { overflow: hidden; }

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.toast[hidden] { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

.rise { animation: rise 480ms ease-out both; }
.delay-1 { animation-delay: 90ms; }
.delay-2 { animation-delay: 180ms; }

@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .footer-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero-ship img { height: 18rem; }
}

@media (min-width: 768px) {
  .hero { grid-template-columns: 1.3fr 0.7fr; }
  .page { padding: 3rem 0 4rem; }
}

@media (min-width: 1024px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
  .product { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .delay-1, .delay-2 { animation: none; }
  .btn { transition: none; }
}
