@import "data:,";

:root {
  --bg: #f5f3ef;
  --paper: #fbfaf7;
  --ink: #0e0d0c;
  --muted: #7a746c;
  --line: rgba(14, 13, 12, 0.14);
  --accent: #b3122e;
  --blush: #e9c6c0;
  --gutter: clamp(16px, 2.3vw, 34px);
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --sans: "Inter Variable", "Inter", system-ui, -apple-system, sans-serif;
  /* Nudge film frames toward the page white if the footage has a grey cyc. */
  --film-filter: none;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

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

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* ---------- type ---------- */

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.005em;
  margin: 0;
}

.label {
  font-family: var(--sans);
  font-size: clamp(10px, 0.72vw, 11.5px);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.55;
}

.label--ink {
  color: var(--ink);
  font-weight: 600;
}

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

.link {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 26px;
  background: var(--accent);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease, opacity 0.25s ease;
}

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

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--ink);
}

.btn--block {
  width: 100%;
}

/* ---------- header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--gutter) * 0.7) var(--gutter);
  pointer-events: none;
}

.header > * {
  pointer-events: auto;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.6, 0, 0.2, 1);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.bag-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bag-btn::after {
  display: none;
}

.bag-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: 9.5px;
  letter-spacing: 0;
  transition: background 0.3s ease, transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.bag-count.is-full {
  background: var(--accent);
  transform: scale(1.08);
}

.toast {
  position: absolute;
  right: var(--gutter);
  top: calc(var(--gutter) * 0.7 + 34px);
  padding: 12px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  transform: none;
}

@media (max-width: 720px) {
  .header__drop,
  .header__nav .nav-link:not(.bag-btn) {
    display: none;
  }
}

/* ---------- fx widget ---------- */

.fx-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  right: var(--gutter);
  top: calc(var(--gutter) * 0.7 + 34px);
}

.fx-widget__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: var(--accent);
  color: var(--paper);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s ease;
}

.fx-widget__btn:hover {
  background: var(--ink);
}

.fx-widget__src {
  opacity: 0.6;
  font-weight: 500;
}

.fx-widget__box {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  min-width: 64px;
}

@media (max-width: 720px) {
  .fx-widget {
    display: none;
  }
}

/* ---------- bag drawer ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.drawer.is-open {
  pointer-events: auto;
}

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 13, 12, 0.22);
  opacity: 0;
  transition: opacity 0.45s ease;
  cursor: default;
}

.drawer.is-open .drawer__scrim {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  padding: var(--gutter);
  transform: translateX(102%);
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.15, 1);
}

.drawer.is-open .drawer__panel {
  transform: none;
}

.drawer__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer__title {
  font-size: 34px;
}

.drawer__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer__empty {
  padding: 28px 0;
}

.line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.line__img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--bg);
}

.line__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.line__name {
  font-size: 19px;
}

.line__qty {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}

.line__qty button {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  line-height: 1;
}

.line__qty button:hover {
  border-color: var(--ink);
}

.line__price {
  font-size: 13px;
  font-weight: 600;
}

.drawer__foot {
  padding-top: 18px;
  display: grid;
  gap: 16px;
}

.drawer__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.drawer__sum {
  font-size: 26px;
}

/* ---------- missing-asset placeholder ---------- */

.smart-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 60px;
  aspect-ratio: 1;
  padding: 10px;
  text-align: center;
  background: repeating-linear-gradient(-45deg, rgba(14, 13, 12, 0.035) 0 8px, transparent 8px 16px), rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(14, 13, 12, 0.22);
}

.smart-ph__path {
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
