:root {
  color-scheme: light;
  --page: #f4f4f1;
  --surface: #ffffff;
  --surface-soft: #f8f8f5;
  --ink: #111111;
  --ink-soft: #2a2d2f;
  --muted: #687076;
  --line: #dddeda;
  --line-strong: #b8bcb8;
  --green: #008f4c;
  --blue: #2f62ff;
  --yellow: #f2c94c;
  --red: #d64024;
  --shadow: 0 24px 60px rgba(17, 17, 17, 0.12);
  --shadow-soft: 0 8px 24px rgba(17, 17, 17, 0.07);
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --z-header: 10;
  --z-menu: 30;
  --z-backdrop: 40;
  --z-drawer: 50;
  --z-floating: 60;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.filters-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 98, 255, 0.22);
  outline-offset: 2px;
}

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

/* Typography polish: balanced headings, readable body, aligned numerics. */
h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.price,
.cart-line-total,
.totals dd,
.product-stats span,
.inventory-stats span,
.pagination-controls span,
.result-count,
.cart-badge,
.cart-link span,
.qty-controls span,
.spotlight-copy strong {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(240px, 520px) auto;
  gap: 20px;
  align-items: center;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 52px);
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  font-weight: 950;
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
}

.header-search {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.header-search input,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 98, 255, 0.12);
}

.cart-link,
.shop-link {
  justify-self: end;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 15px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.cart-link span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 510px);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  width: min(1480px, 100%);
  min-height: calc(100dvh - 78px);
  margin: 0 auto;
  padding: clamp(46px, 8vw, 96px) clamp(16px, 4vw, 52px);
  background:
    linear-gradient(112deg, rgba(17, 17, 17, 0.84), rgba(17, 17, 17, 0.72)),
    url("/assets/lighthouse-logo.jpg") center right / min(62vw, 680px) no-repeat,
    #111111;
  color: #ffffff;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-section .eyebrow,
.cart-hero .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.hero-section h1,
.cart-hero h1 {
  max-width: 820px;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 950;
  line-height: 0.96;
}

.hero-section p:not(.eyebrow),
.cart-hero p:not(.eyebrow) {
  max-width: 610px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action,
.product-actions button,
#checkoutButton,
.empty-state a,
.empty-state button,
.drawer-clear {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 950;
}

.primary-action {
  background: #ffffff;
  color: var(--ink);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.inventory-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  max-width: 620px;
  margin-top: 30px;
}

.inventory-stats span {
  display: grid;
  min-height: 56px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 950;
}

.hero-board {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.spotlight-image {
  display: grid;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.spotlight-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.spotlight-image img.is-missing {
  display: none;
}

.spotlight-copy {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.spotlight-copy span,
.spotlight-copy p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.spotlight-copy h2 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 24px;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.spotlight-copy strong {
  font-size: 30px;
  line-height: 1;
}

.collections-section,
.catalog-section,
.cart-page {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 54px clamp(16px, 4vw, 52px);
}

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

.section-heading h2 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
}

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

.collection-tile {
  position: relative;
  display: grid;
  min-height: 310px;
  align-content: end;
  justify-items: start;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 22px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transition: transform 160ms ease;
}

.collection-tile:hover {
  transform: translateY(-3px);
}

.collection-tile img {
  position: absolute;
  top: 34px;
  left: 50%;
  max-width: 72%;
  max-height: 130px;
  transform: translateX(-50%);
  object-fit: contain;
}

.collection-tile span {
  position: relative;
  z-index: 1;
  font-size: 28px;
  font-weight: 950;
}

.collection-tile.logo-missing::before {
  position: absolute;
  top: 44px;
  left: 50%;
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  content: "TCG";
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 950;
}

.collection-more {
  border-radius: var(--radius);
  background: #111111;
  color: #ffffff;
}

.collection-more strong {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.more-series {
  position: relative;
}

.more-series-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: var(--z-menu);
  display: grid;
  min-width: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.more-series-menu[hidden],
.filter-backdrop[hidden] {
  display: none;
}

.more-series-menu button {
  min-height: 44px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.more-series-menu button:hover {
  background: var(--surface-soft);
}

.catalog-section {
  padding-top: 26px;
}

.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 18px 0 20px;
}

.filter-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: var(--z-floating);
  display: inline-flex;
  width: 46px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.filter-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.2);
}

/* Reserve room on the left of the header so the fixed, page-level filter
   button never overlaps the brand lockup on the catalog page. */
body[data-page="catalog"] .site-nav {
  padding-left: max(clamp(16px, 4vw, 52px), 74px);
}

.filter-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.filter-toggle strong {
  position: absolute;
  top: -7px;
  right: -7px;
  display: none;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 11px;
  line-height: 20px;
}

.filter-toggle[data-active="true"] strong {
  display: grid;
}

.result-count {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.page-size-control select {
  width: 82px;
  min-height: 38px;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pagination-controls button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.pagination-controls span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.status-message {
  min-height: 22px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
}

.status-message[data-tone="success"] {
  color: var(--green);
}

.product-grid,
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.image-wrap {
  position: relative;
  display: grid;
  aspect-ratio: 3 / 4;
  place-items: center;
  background: var(--surface-soft);
}

.image-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  filter: drop-shadow(0 18px 22px rgba(17, 17, 17, 0.16));
}

.image-wrap img.is-missing {
  width: 72px;
  height: 104px;
  padding: 0;
  opacity: 0.35;
}

.stock-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border: 1px solid rgba(0, 143, 76, 0.18);
  border-radius: var(--radius);
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
}

.product-body {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 15px;
}

.product-topline,
.signal-row,
.product-actions,
.cart-head,
.totals div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.serial,
.rarity,
.language,
.condition,
.stock,
.market-signal {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.serial {
  color: var(--ink);
}

.rarity {
  padding: 5px 8px;
  background: #fff6d6;
  color: #71570a;
}

.product-card h3 {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.series {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.market-signal {
  padding: 6px 8px;
  background: #eef7f1;
  color: var(--green);
}

.market-signal[data-tone="hot"] {
  background: #fff0eb;
  color: #a6341f;
}

.market-signal[data-tone="warm"] {
  background: #fff6d6;
  color: #71570a;
}

.market-signal[data-tone="blue"] {
  background: #eef2ff;
  color: #243ec8;
}

.sparkline {
  display: grid;
  grid-template-columns: repeat(5, 5px);
  align-items: end;
  gap: 3px;
  width: 37px;
  height: 26px;
}

.sparkline i {
  display: block;
  min-height: 7px;
  background: var(--green);
}

.sparkline i:nth-child(2) {
  background: var(--blue);
}

.sparkline i:nth-child(4) {
  background: var(--yellow);
}

.product-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-stats span {
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  background: #eef2ef;
}

.price-stack {
  display: grid;
  gap: 2px;
}

.price-stack span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.price {
  font-size: 21px;
  line-height: 1.1;
}

.product-actions {
  align-self: end;
  margin-top: 2px;
}

.product-actions button,
#checkoutButton,
#payButton {
  background: var(--ink);
  color: #ffffff;
}

.payment-section {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.payment-section[hidden] {
  display: none;
}

#payButton {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 950;
}

.product-actions button {
  min-width: 120px;
}

/* Checkout gate button (reveals the form on click) */
.checkout-cta {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.2px;
  box-shadow: var(--shadow-soft);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.checkout-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.checkout-cta[hidden],
.success-notice[hidden],
.checkout-form[hidden] {
  display: none;
}

/* Payment-successful notice */
.success-notice {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 30px 22px;
  border: 1px solid #cfe8da;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f1faf4 0%, #ffffff 72%);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.success-notice h2 {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 950;
  color: #0b7a43;
}

.success-notice p {
  max-width: 360px;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.success-cta {
  margin-top: 16px;
  background: var(--green);
  color: #ffffff;
}

.success-notice.is-visible {
  animation: successPop 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes successPop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animated checkmark */
.success-check svg {
  width: 76px;
  height: 76px;
}

.success-check__circle {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.success-check__mark {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.success-notice.is-visible .success-check__circle {
  animation: drawCircle 520ms ease-out forwards;
}

.success-notice.is-visible .success-check__mark {
  animation: drawMark 320ms 380ms ease-out forwards;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawMark {
  to {
    stroke-dashoffset: 0;
  }
}

.filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  background: rgba(0, 0, 0, 0.42);
}

.filter-drawer {
  position: fixed;
  z-index: var(--z-drawer);
  top: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(390px, calc(100vw - 28px));
  align-content: start;
  gap: 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: #ffffff;
  padding: 22px;
  padding-top: max(22px, env(safe-area-inset-top));
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  box-shadow: 30px 0 80px rgba(0, 0, 0, 0.2);
  transform: translateX(-104%);
  transition: transform 180ms ease;
}

.filter-drawer[data-open="true"] {
  transform: translateX(0);
}

.filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.filter-head h2 {
  font-size: 28px;
  line-height: 1;
}

.filter-head button {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #111111;
  color: #ffffff;
  font-weight: 950;
}

.filter-fields {
  display: grid;
  gap: 14px;
}

.filter-fields label,
.checkout-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.drawer-clear {
  background: var(--surface-soft);
  color: var(--ink);
}

.empty-state {
  display: grid;
  grid-column: 1 / -1;
  min-height: 300px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

.empty-state__mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 950;
}

.empty-state h3 {
  margin-top: 14px;
  color: var(--ink);
  font-size: 20px;
}

.empty-state p {
  max-width: 440px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.empty-state a,
.empty-state button {
  margin-top: 16px;
  background: var(--ink);
  color: #ffffff;
}

.loading-card {
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(110deg, #ffffff 0%, #eef0ec 45%, #ffffff 90%);
  background-size: 220% 100%;
  animation: loading-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-pulse {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.cart-page {
  display: grid;
  gap: 28px;
}

.cart-hero {
  display: grid;
  min-height: 360px;
  align-content: end;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 56px);
  background:
    linear-gradient(104deg, rgba(17, 17, 17, 0.86), rgba(17, 17, 17, 0.58)),
    url("/assets/lighthouse-logo.jpg") center right / min(60vw, 520px) no-repeat,
    #111111;
  color: #ffffff;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 22px;
}

.cart-list-panel,
.checkout-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.cart-head h2 {
  font-size: 28px;
}

.cart-badge {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.cart-items {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.cart-items.empty {
  min-height: 230px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

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

.cart-thumb {
  display: grid;
  width: 76px;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.cart-thumb.is-missing img {
  display: none;
}

.cart-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.cart-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.qty-controls {
  display: grid;
  grid-template-columns: 32px minmax(22px, auto) 32px;
  align-items: center;
  gap: 7px;
}

.qty-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 950;
}

.qty-controls span {
  font-weight: 950;
  text-align: center;
}

.cart-line-total {
  font-size: 16px;
}

.totals {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.totals dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.totals dd {
  margin: 0;
  font-weight: 950;
}

.checkout-form {
  display: grid;
  gap: 12px;
}

.checkout-title {
  display: grid;
  gap: 3px;
}

.checkout-title strong {
  font-size: 14px;
}

.checkout-title span,
.cart-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.cart-note {
  margin-top: 14px;
}

@media (max-width: 1180px) {
  .site-nav,
  .hero-section,
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 12px;
  }

  .cart-link,
  .shop-link {
    justify-self: start;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-board {
    max-width: 720px;
  }

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

@media (max-width: 720px) {
  .site-nav {
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand-lockup span {
    font-size: 14px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .hero-section h1,
  .cart-hero h1 {
    font-size: 43px;
  }

  .hero-section p:not(.eyebrow),
  .cart-hero p:not(.eyebrow) {
    font-size: 15px;
  }

  .inventory-stats,
  .collection-grid,
  .hero-board {
    grid-template-columns: 1fr;
  }

  .collection-tile {
    min-height: 250px;
  }

  .catalog-controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .page-size-control,
  .pagination-controls {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .product-grid,
  .loading-grid {
    grid-template-columns: 1fr;
  }

  .cart-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .qty-controls,
  .cart-line-total {
    grid-column: 2;
    justify-self: start;
  }
}
