:root {
  color-scheme: light;
  --ink: #111216;
  --muted: #666a73;
  --line: #e5e7ec;
  --paper: #f7f7f4;
  --white: #ffffff;
  --red: #b3192a;
  --blue: #2456d6;
  --green: #0f7a3d;
  --gold: #9a6a00;
  --violet: #6650c8;
  --teal: #087f86;
  --shadow: 0 24px 80px rgba(17, 18, 22, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.process-bar {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 4px;
  overflow: hidden;
  opacity: 0;
  background: rgba(179, 25, 42, 0.12);
  transition: opacity 180ms ease;
}

.process-bar.is-active {
  opacity: 1;
}

.process-bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), #111216);
  border-radius: 999px;
  transform: translateX(-100%);
}

.process-bar.is-active span {
  animation: process-slide 1.1s ease-in-out infinite;
}

.status-toast {
  pointer-events: none;
  position: fixed;
  top: calc(env(safe-area-inset-top) + 92px);
  right: max(14px, env(safe-area-inset-right));
  z-index: 120;
  max-width: min(420px, calc(100vw - 28px));
  padding: 14px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.status-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.status-toast.is-success {
  background: #0f7a3d;
}

.status-toast.is-error {
  background: var(--red);
}

.status-toast.is-warning {
  background: #8a5a00;
}

@keyframes process-slide {
  0% {
    transform: translateX(-110%);
  }

  50% {
    transform: translateX(80%);
  }

  100% {
    transform: translateX(260%);
  }
}

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

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

.catalog-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 68px;
  padding: 14px clamp(18px, 5vw, 70px);
  background: rgba(247, 247, 244, 0.82);
  border-bottom: 1px solid rgba(229, 231, 236, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  width: 136px;
}

.brand img {
  max-height: 40px;
  object-fit: contain;
  object-position: left center;
}

.catalog-header nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  color: rgba(17, 18, 22, 0.68);
  font-size: 13px;
  font-weight: 700;
}

.catalog-header nav a {
  transition: color 180ms ease, transform 180ms ease;
}

.catalog-header nav a:hover,
.catalog-header nav [aria-current="page"] {
  color: var(--red);
}

.order-pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease;
}

.order-pill:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.order-pill span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  color: var(--ink);
  background: var(--white);
  border-radius: 999px;
}

.catalog-hero {
  min-height: 38vh;
  display: grid;
  place-items: center;
  padding: clamp(70px, 8vw, 112px) clamp(18px, 6vw, 90px) clamp(30px, 5vw, 58px);
  text-align: center;
}

.hero-copy {
  max-width: 820px;
  animation: rise-in 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 22px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1;
  font-weight: 800;
}

.hero-logo {
  width: min(330px, 68vw);
  margin: 0 auto;
  filter: drop-shadow(0 18px 34px rgba(17, 18, 22, 0.12));
  transform: translateY(0);
  animation: logo-float 5.8s ease-in-out infinite;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  max-width: 1120px;
  margin-inline: auto;
  padding: 0 clamp(18px, 5vw, 70px) 26px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-bar select,
.clear-filters {
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.clear-filters {
  cursor: pointer;
  color: var(--white);
  background: var(--ink);
  transition: background 180ms ease, transform 180ms ease;
}

.clear-filters:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1220px;
  margin-inline: auto;
  padding: 0 clamp(18px, 5vw, 70px) clamp(52px, 7vw, 96px);
}

.style-card {
  cursor: pointer;
  display: grid;
  gap: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(17, 18, 22, 0.06);
  opacity: 0;
  transform: translateY(34px) scale(0.98);
  animation: card-in 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 260ms ease;
}

.style-card.is-hidden {
  display: none;
}

.style-card:nth-child(2) {
  animation-delay: 90ms;
}

.style-card:nth-child(3) {
  animation-delay: 180ms;
}

.style-card:hover,
.style-card:focus-visible {
  outline: none;
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow);
}

.style-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  overflow: hidden;
  border-radius: var(--radius);
}

.style-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 34%, rgba(255, 255, 255, 0.18));
  opacity: 0;
  transition: opacity 220ms ease;
}

.style-card:hover .style-media::after,
.style-card:focus-visible .style-media::after {
  opacity: 1;
}

.style-media img {
  width: 122%;
  max-width: none;
  transform: translateY(12px);
  filter: drop-shadow(0 26px 34px rgba(17, 18, 22, 0.18));
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.style-card:hover .style-media img,
.style-card:focus-visible .style-media img {
  transform: translateY(-2px) scale(1.05) rotate(-0.6deg);
}

.graphite {
  background: #20242c;
}

.red {
  background: #efe8e2;
}

.silver {
  background: #e7ebef;
}

.style-copy p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.style-copy h2 {
  margin-bottom: 6px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
}

.style-copy span {
  color: var(--muted);
  font-weight: 700;
}

.data-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-chip {
  color: var(--ink);
  background: #eef1f5;
  border-color: #dce2ea;
}

.collection-chip {
  color: var(--teal);
  background: rgba(8, 127, 134, 0.09);
  border-color: rgba(8, 127, 134, 0.18);
}

.model-chip,
.sku-chip {
  color: var(--blue);
  background: rgba(36, 86, 214, 0.09);
  border-color: rgba(36, 86, 214, 0.18);
}

.color-chip {
  color: var(--red);
  background: rgba(179, 25, 42, 0.08);
  border-color: rgba(179, 25, 42, 0.18);
}

.run-chip {
  color: var(--violet);
  background: rgba(102, 80, 200, 0.09);
  border-color: rgba(102, 80, 200, 0.18);
}

.pairs-chip {
  color: var(--green);
  background: rgba(15, 122, 61, 0.09);
  border-color: rgba(15, 122, 61, 0.18);
}

.lot-chip {
  color: var(--gold);
  background: rgba(154, 106, 0, 0.09);
  border-color: rgba(154, 106, 0, 0.18);
}

.style-meta,
.variant-tags,
.order-tags,
.line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.gallery-modal {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 32px);
  background: rgba(17, 18, 22, 0);
  opacity: 0;
  transition: opacity 240ms ease, background 240ms ease;
}

.gallery-modal.is-open {
  pointer-events: auto;
  background: rgba(17, 18, 22, 0.58);
  opacity: 1;
}

.modal-shell {
  width: min(1260px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  padding: clamp(20px, 4vw, 42px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(34px) scale(0.96);
  transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-modal.is-open .modal-shell {
  transform: translateY(0) scale(1);
}

.modal-close {
  cursor: pointer;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

.modal-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.modal-heading h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
}

#variantCount {
  color: var(--muted);
  font-weight: 800;
}

.order-controls {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(90px, 0.5fr);
  gap: 12px;
  margin-top: 24px;
}

.order-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-controls select,
.order-controls input {
  min-height: 44px;
  width: 100%;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}

.size-breakdown {
  grid-column: 1 / -1;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.size-breakdown-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.size-breakdown-head strong {
  color: var(--ink);
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.size-point {
  display: grid;
  gap: 6px;
}

.size-point span {
  color: var(--violet);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.size-point input {
  min-height: 40px;
  padding: 0 8px;
  text-align: center;
}

.size-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.size-hint.is-error {
  color: var(--red);
  font-weight: 800;
}

.size-hint.is-ok {
  color: #0f7a3d;
  font-weight: 800;
}

.line-notes-field {
  grid-column: 1 / -1;
}

.line-notes-field textarea {
  width: 100%;
  padding: 12px 14px;
  resize: vertical;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  text-transform: none;
}

.add-order {
  cursor: pointer;
  grid-column: 1 / -1;
  min-height: 46px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease;
}

.add-order:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
}

.variant-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.variant-toolbar select {
  min-height: 40px;
  padding: 0 12px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.variant-card {
  cursor: pointer;
  min-height: 100%;
  padding: clamp(12px, 2vw, 18px);
  background: #f7f7f4;
  border: 1px solid transparent;
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(18px);
  animation: card-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.variant-card:hover,
.variant-card.is-active {
  background: var(--white);
  border-color: rgba(179, 25, 42, 0.32);
  transform: translateY(-3px);
}

.variant-card img {
  aspect-ratio: 1 / 1.04;
  width: 100%;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 14px 20px rgba(17, 18, 22, 0.14));
}

.variant-card strong {
  display: block;
  font-size: clamp(14px, 1.5vw, 18px);
  text-align: center;
}

.variant-card span {
  display: flex;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  text-align: center;
}

.variant-card .data-chip,
.style-copy .data-chip,
.order-item .data-chip {
  display: inline-flex;
  margin-top: 0;
}

.image-viewer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  padding: clamp(22px, 5vw, 58px);
  color: var(--white);
  background: rgba(10, 10, 12, 0);
  opacity: 0;
  transition: opacity 240ms ease, background 240ms ease;
}

.image-viewer.has-order-panel {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.image-viewer.is-open {
  pointer-events: auto;
  background: rgba(10, 10, 12, 0.88);
  opacity: 1;
}

.viewer-stage {
  display: grid;
  place-items: center;
  gap: 20px;
  min-width: 0;
}

.image-viewer img {
  max-width: min(1120px, 94vw);
  max-height: 72vh;
  object-fit: contain;
  filter: drop-shadow(0 34px 64px rgba(0, 0, 0, 0.42));
  transform: translateY(28px) scale(0.94);
  transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

.image-viewer.is-open img {
  transform: translateY(0) scale(1);
}

.viewer-stage div {
  text-align: center;
}

.image-viewer p {
  margin-bottom: 8px;
  color: #ff7380;
  font-weight: 800;
}

.image-viewer h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 48px);
}

.viewer-close {
  cursor: pointer;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 32px;
  line-height: 1;
}

.viewer-nav {
  cursor: pointer;
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.viewer-nav {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
}

.viewer-prev {
  left: 18px;
}

.viewer-next {
  right: 18px;
}

.viewer-cart {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: min(360px, calc(100vw - 52px));
  padding: 0 22px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.viewer-nav:hover,
.viewer-cart:hover {
  color: var(--white);
  background: var(--red);
}

.viewer-cart:hover {
  transform: translateY(-2px);
}

.viewer-order-panel {
  align-self: center;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: clamp(16px, 3vw, 24px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.viewer-order-panel.is-hidden {
  display: none;
}

.viewer-order-panel p {
  margin-bottom: 8px;
  color: var(--red);
}

.viewer-order-panel h3 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.viewer-order-panel > span {
  display: block;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.order-drawer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 18, 22, 0);
  opacity: 0;
  transition: opacity 220ms ease, background 220ms ease;
}

.order-drawer.is-open {
  pointer-events: auto;
  background: rgba(17, 18, 22, 0.44);
  opacity: 1;
}

.order-panel {
  width: min(520px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(20px, 4vw, 34px);
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.order-drawer.is-open .order-panel {
  transform: translateX(0);
}

.order-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.order-heading h2 {
  margin-bottom: 0;
  font-size: 42px;
  line-height: 1;
}

.drawer-close {
  cursor: pointer;
  width: 42px;
  height: 42px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.customer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.customer-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-fields input,
.customer-fields textarea {
  width: 100%;
  padding: 12px 14px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.customer-fields textarea {
  grid-column: 1 / -1;
}

.order-items {
  display: grid;
  gap: 12px;
}

.empty-order {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: #f7f7f4;
  border-radius: var(--radius);
  text-align: center;
}

.order-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-item img {
  aspect-ratio: 1 / 1;
  width: 88px;
  object-fit: contain;
  background: var(--white);
  border-radius: var(--radius);
}

.order-item h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.order-item p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.order-item strong {
  display: block;
  font-size: 13px;
}

.line-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.size-list {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.order-item .order-tags,
.order-item .line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.order-item .order-tags {
  margin-bottom: 6px;
}

.order-item .size-list {
  color: #566070;
}

.style-copy .brand-chip,
.order-item .brand-chip {
  color: var(--ink);
}

.style-copy .collection-chip,
.order-item .collection-chip {
  color: var(--teal);
}

.style-copy .sku-chip,
.order-item .sku-chip,
.order-item .model-chip {
  color: var(--blue);
}

.style-copy .color-chip,
.order-item .color-chip {
  color: var(--red);
}

.style-copy .run-chip,
.order-item .run-chip {
  color: var(--violet);
}

.style-copy .pairs-chip,
.order-item .pairs-chip {
  color: var(--green);
}

.remove-order {
  cursor: pointer;
  width: 34px;
  height: 34px;
  color: var(--red);
  background: var(--white);
  border: 1px solid rgba(179, 25, 42, 0.24);
  border-radius: 999px;
  font-size: 20px;
}

.order-summary {
  display: flex;
  justify-content: space-between;
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.order-folio {
  display: grid;
  gap: 4px;
  margin: -4px 0 14px;
  padding: 12px 14px;
  color: var(--muted);
  background: #f7f7f4;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.order-folio strong {
  color: var(--red);
  font-size: 20px;
  letter-spacing: 0;
}

.order-folio.is-saved {
  color: #0f7a3d;
  background: rgba(15, 122, 61, 0.08);
  border-color: rgba(15, 122, 61, 0.28);
}

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

.order-actions .primary-action {
  grid-column: 1 / -1;
}

.order-actions button {
  cursor: pointer;
  min-height: 44px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}

.order-actions button:hover {
  background: var(--red);
}

.send-flow {
  margin-top: 14px;
  padding: 14px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.send-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.send-flow-head button {
  cursor: pointer;
  width: 34px;
  height: 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.send-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.send-options p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.send-options label,
.send-company-copy {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.send-destination-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.send-destination-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.send-destination-grid input {
  width: 100%;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  text-transform: none;
}

.send-company-copy {
  margin-top: 12px;
  border-radius: var(--radius);
}

.send-email-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #8a5a00;
  background: rgba(138, 90, 0, 0.1);
  border: 1px solid rgba(138, 90, 0, 0.2);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.send-flow .primary-action {
  cursor: pointer;
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}

.send-flow .primary-action:hover {
  background: var(--red);
}

.history-screen {
  position: fixed;
  inset: 0;
  z-index: 140;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(17, 18, 22, 0.48);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.history-screen[hidden] {
  display: none;
}

.history-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(980px, 100%);
  min-height: min(760px, calc(100vh - 88px));
  max-height: calc(100vh - clamp(32px, 8vw, 88px));
  margin: 0 auto;
  padding: clamp(20px, 4vw, 34px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.history-heading h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

.history-heading button {
  cursor: pointer;
  width: 42px;
  height: 42px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.history-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

.history-tools input {
  min-height: 44px;
  padding: 0 14px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
}

.history-tools button {
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}

.history-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

#historyList {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 180px;
  overflow: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.history-card strong {
  display: block;
  font-size: 14px;
}

.history-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.programmed-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reprint-order {
  cursor: pointer;
  min-height: 34px;
  padding: 0 12px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.reprint-order:hover {
  background: var(--red);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 920px) {
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .style-grid {
    grid-template-columns: 1fr;
  }

  .image-viewer {
    grid-template-columns: 1fr;
    align-content: center;
    overflow: auto;
  }

  .image-viewer.has-order-panel {
    grid-template-columns: 1fr;
  }

  .viewer-order-panel {
    width: min(520px, 100%);
    margin-inline: auto;
  }

  .variant-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .variant-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-card {
    grid-template-columns: 1fr;
  }

  .history-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .catalog-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-header nav {
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .order-controls,
  .customer-fields,
  .order-actions,
  .send-options,
  .send-destination-grid,
  .history-tools {
    grid-template-columns: 1fr;
  }

  .history-screen {
    padding: 0;
    background: var(--white);
  }

  .history-panel {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  #historyList {
    min-height: 280px;
    padding-bottom: 24px;
  }

  .size-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-item {
    grid-template-columns: 72px 1fr auto;
  }

  .order-item img {
    width: 72px;
  }

  .style-media {
    min-height: 230px;
  }

  .filter-bar,
  .variant-toolbar {
    grid-template-columns: 1fr;
  }

  .modal-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .variant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewer-nav {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  .viewer-cart {
    width: min(340px, calc(100vw - 36px));
    min-height: 52px;
    font-size: 15px;
  }

  .image-viewer img {
    max-height: 58vh;
    max-height: 58dvh;
  }

  .order-drawer {
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  }

  .order-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }
}
