:root {
  --ink: #17202a;
  --muted: #5f6b7a;
  --line: #dfe5eb;
  --paper: #ffffff;
  --soft: #f4f7f9;
  --blue: #1266f1;
  --green: #139e76;
  --amber: #f4a51c;
  --red: #d64045;
  --shadow: 0 18px 48px rgba(23, 32, 42, .11);
  --radius: 8px;
  --font-body: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --ink-soft: var(--muted);
  --grid-line: var(--line);
  --paper-raised: var(--paper);
  --signal-green: var(--green);
  --silver: #8b98a8;
  --copper: #b56a21;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef4f8 0, var(--soft) 340px),
    var(--soft);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.market-topbar {
  color: #e9eef4;
  background: #101820;
  font-size: 13px;
}
.market-topbar-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.market-topbar a { color: #fff; font-weight: 800; }
.market-topbar span { color: #dbe4eb; text-align: center; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}
.header-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  white-space: nowrap;
}
.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-form {
  display: flex;
  min-width: 0;
  max-width: 560px;
  width: 100%;
  justify-self: center;
}
.search-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #fff;
}
.search-form button {
  width: 52px;
  min-height: 46px;
  border: 1px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--blue);
  color: #fff;
}

.cart-link {
  position: relative;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 900;
  white-space: nowrap;
}
.cart-link:hover { border-color: var(--blue); color: var(--blue); }
.cart-badge {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--amber);
  color: #101820;
  font-size: 12px;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
  scrollbar-width: thin;
}
.pill {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}
.pill.active,
.pill:hover {
  border-color: var(--blue);
  background: #e8f1ff;
  color: var(--blue);
}
.mono { font-variant-numeric: tabular-nums; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr);
  gap: 30px;
  align-items: center;
  padding: 34px 0 30px;
}
.hero-copy {
  min-width: 0;
}
.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 10px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}
.hero h1 span { color: var(--blue); }
.hero p {
  max-width: 640px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.hero-trust span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.stock-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.stock-strip span {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(23, 32, 42, .08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(23, 32, 42, .05);
}
.stock-strip strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.hero-slider {
  position: relative;
  min-width: 0;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 42, .08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(18, 102, 241, .08), transparent 36%),
    linear-gradient(315deg, rgba(19, 158, 118, .11), transparent 42%),
    #fff;
  box-shadow: var(--shadow);
}
.slider-track {
  position: relative;
  min-height: 430px;
}
.slider-item {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(230px, .88fr);
  gap: 22px;
  align-items: center;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity .38s ease, transform .38s ease;
}
.slider-item.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.slider-content {
  min-width: 0;
}
.slider-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.slider-content h2 {
  display: -webkit-box;
  margin: 10px 0 16px;
  overflow: hidden;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.slider-price {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}
.slider-price del {
  color: var(--muted);
  font-size: 14px;
}
.slider-price strong {
  color: var(--blue);
  font-size: 30px;
  font-weight: 950;
}
.slider-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.slider-meta span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e6f6ef;
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}
.slider-meta span + span {
  background: #edf3fb;
  color: var(--muted);
}
.slider-visual {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 18px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 65% 30%, rgba(19, 158, 118, .18), transparent 38%),
    radial-gradient(circle at 26% 76%, rgba(18, 102, 241, .14), transparent 36%),
    #f6f9fc;
}
.slider-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slider-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.slider-controls button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  pointer-events: auto;
}
.slider-controls button:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.slider-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  pointer-events: auto;
}
.slider-dots button {
  width: 9px;
  height: 9px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #aab5c2;
}
.slider-dots button.active {
  width: 22px;
  background: var(--blue);
}
.slider-progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(170, 181, 194, .35);
}
.slider-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--blue), var(--green));
  animation: sliderProgress 5200ms linear forwards;
}
@keyframes sliderProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.hero-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.showcase-card {
  min-height: 142px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.showcase-card.main {
  grid-column: 1 / -1;
  min-height: 170px;
  color: #fff;
  background: linear-gradient(135deg, #101820, #19324a);
}
.showcase-card span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.showcase-card.main span { color: #9df0d6; }
.showcase-card strong {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}
.showcase-card small { color: var(--muted); font-weight: 750; }
.showcase-card.main small { color: #dbe4eb; }

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.btn:hover { filter: brightness(.96); }
.btn.btn-outline {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}
.btn.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.btn.btn-full { width: 100%; }
.btn[disabled] {
  border-color: var(--line);
  background: #d7dde4;
  color: #77808b;
  cursor: not-allowed;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 34px 0 16px;
}
.section-title h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}
.section-title .count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.catalog-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, .9fr) minmax(140px, .7fr) minmax(110px, .55fr) minmax(110px, .55fr) auto minmax(150px, .75fr) auto;
  gap: 10px;
  align-items: end;
  margin: 22px 0 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 24px rgba(23, 32, 42, .05);
}
.filter-field {
  min-width: 0;
}
.filter-field label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 750;
}
.filter-check {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}
.filter-actions {
  display: flex;
  gap: 8px;
}
.filter-actions .btn {
  min-height: 42px;
  padding-inline: 13px;
  white-space: nowrap;
}

.rail-shell {
  position: relative;
  min-width: 0;
}
.rail-shell::before,
.rail-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 12px;
  z-index: 2;
  width: 54px;
  pointer-events: none;
}
.rail-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--soft), rgba(244, 247, 249, 0));
}
.rail-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--soft), rgba(244, 247, 249, 0));
}
.rail-nav {
  position: absolute;
  top: 42%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(23, 32, 42, .12);
}
.rail-nav.prev { left: -12px; }
.rail-nav.next { right: -12px; }
.rail-nav:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}
.rail-nav:disabled {
  opacity: .35;
  cursor: default;
}
.featured-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 268px);
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.featured-row .product-card { scroll-snap-align: start; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding-bottom: 24px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0 48px;
}
.page-link,
.page-ellipsis {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
}
.page-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.page-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.page-link.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.page-link.disabled {
  color: #9aa5b2;
  background: #edf1f5;
  cursor: default;
}
.page-ellipsis {
  min-width: 24px;
  padding-inline: 2px;
  color: var(--muted);
}
.product-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(23, 32, 42, .06);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 102, 241, .35);
  box-shadow: var(--shadow);
}
.product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 14px;
  background: #f7f9fb;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.placeholder {
  color: #a7b0bc;
  font-size: 30px;
  font-weight: 900;
}
.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--amber);
  color: #101820;
  font-size: 12px;
  font-weight: 900;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px 0;
}
.product-category {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.product-sku {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.product-name {
  min-height: 48px;
  display: -webkit-box;
  margin: 8px 14px 10px;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.product-name a:hover { color: var(--blue); }
.product-price {
  display: grid;
  gap: 2px;
  padding: 0 14px;
}
.product-price del {
  color: var(--muted);
  font-size: 13px;
}
.product-price strong {
  color: var(--blue);
  font-size: 22px;
  font-weight: 950;
}
.stock-badge {
  justify-self: start;
  margin: 10px 14px 0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.stock-badge.in { background: #e6f6ef; color: var(--green); }
.stock-badge.out { background: #fdebec; color: var(--red); }
.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 14px;
}
.product-actions form { min-width: 0; }
.product-actions .btn { min-height: 40px; padding-inline: 10px; font-size: 13px; }

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  margin-bottom: 40px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}
.empty-state > div {
  font-size: 24px;
  font-weight: 950;
}
.empty-state p { margin: 0; color: var(--muted); }
.empty-state a { color: var(--blue); font-weight: 900; }

.print-tool {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  align-items: start;
  margin: 26px 0 58px;
}
.print-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.print-viewer-panel {
  min-width: 0;
  overflow: hidden;
}
.print-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.print-viewer-head h1 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.08;
}
.file-pick {
  position: relative;
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.print-stage {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(246, 249, 252, .3), rgba(237, 243, 251, .95)),
    #f7f9fb;
}
.print-stage::before {
  content: attr(data-empty);
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #8b98a8;
  font-weight: 900;
  pointer-events: none;
}
.print-stage.has-model::before {
  display: none;
}
.print-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.print-layer {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 12%;
  z-index: 2;
  height: 3px;
  border-radius: 999px;
  background: rgba(244, 165, 28, .9);
  box-shadow: 0 0 18px rgba(244, 165, 28, .55);
  opacity: 0;
  pointer-events: none;
}
.print-layer.is-printing {
  animation: printScan 9s linear infinite;
}
@keyframes printScan {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translateY(-390px); opacity: 0; }
}
.print-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.print-readouts span {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.print-readouts strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.print-controls {
  position: sticky;
  top: 120px;
  padding: 18px;
}
.print-controls h2 {
  margin: 0 0 14px;
  font-size: 24px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.estimate-box {
  display: grid;
  gap: 4px;
  margin: 16px 0 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: #101820;
  color: #fff;
}
.estimate-box span {
  color: #dbe4eb;
  font-size: 13px;
  font-weight: 850;
}
.estimate-box strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}
.estimate-box small {
  color: #dbe4eb;
  font-weight: 750;
}
.estimate-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  margin: 20px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}
.breadcrumb a { color: var(--blue); }
.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, .86fr) minmax(0, 1.14fr);
  gap: 34px;
  align-items: start;
  margin: 26px 0 58px;
}
.detail-image {
  position: sticky;
  top: 120px;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-name {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}
.detail-price {
  margin: 18px 0;
  color: var(--blue);
  font-size: 34px;
  font-weight: 950;
}
.detail-desc {
  color: var(--muted);
  font-size: 17px;
}
.qty-row { margin: 20px 0; }
.qty-stepper {
  width: fit-content;
  display: grid;
  grid-template-columns: 42px 64px 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.qty-stepper button,
.qty-stepper input {
  min-height: 44px;
  border: 0;
  background: #fff;
  text-align: center;
  font-weight: 900;
}
.qty-stepper input {
  border-inline: 1px solid var(--line);
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr);
  gap: 24px;
  align-items: start;
  margin: 20px 0 58px;
}
.cart-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.cart-row + .cart-row { margin-top: 10px; }
.cart-row .thumb {
  width: 76px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #f7f9fb;
  overflow: hidden;
}
.cart-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cart-row .name { font-weight: 900; }
.cart-row .unit { color: var(--muted); font-size: 14px; }
.cart-row .line-total {
  color: var(--blue);
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}
.qty-form {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.qty-form input {
  width: 70px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.qty-form button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 900;
}
.remove-link {
  display: inline-flex;
  margin-top: 7px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}
.summary-panel {
  position: sticky;
  top: 120px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.summary-panel h3 { margin: 0 0 14px; font-size: 22px; }
.summary-line,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0;
  font-weight: 850;
}
.summary-total {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-size: 24px;
  font-weight: 950;
}
.summary-note {
  color: var(--muted);
  font-size: 13px;
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.field textarea { min-height: 76px; resize: vertical; }
.whatsapp-btn {
  border-color: var(--green);
  background: var(--green);
}
.whatsapp-btn.is-disabled,
.whatsapp-btn[aria-disabled="true"] {
  border-color: var(--line);
  background: #d7dde4;
  color: #667085;
  cursor: not-allowed;
  pointer-events: auto;
}

.site-footer {
  margin-top: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 14px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--blue); font-weight: 900; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #101820;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 900;
}

@media (max-width: 920px) {
  .market-topbar span { display: none; }
  .header-row {
    grid-template-columns: 1fr auto;
  }
  .search-form {
    grid-column: 1 / -1;
    max-width: none;
    order: 3;
  }
  .hero,
  .product-detail,
  .print-tool,
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .hero-slider,
  .slider-track {
    min-height: 390px;
  }
  .catalog-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filter-search,
  .filter-actions {
    grid-column: span 3;
  }
  .filter-actions {
    justify-content: flex-end;
  }
  .rail-nav.prev { left: 4px; }
  .rail-nav.next { right: 4px; }
  .detail-image,
  .print-controls,
  .summary-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .container { width: min(100% - 22px, 1180px); }
  .market-topbar-row {
    justify-content: center;
  }
  .market-topbar-row a:first-child { display: none; }
  .header-row {
    min-height: 70px;
    gap: 10px;
  }
  .brand { font-size: 17px; }
  .brand small { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .cart-link {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 13px;
  }
  .search-form input,
  .search-form button {
    min-height: 42px;
  }
  .category-strip {
    margin-inline: -11px;
    padding-inline: 11px;
  }
  .hero { padding: 24px 0 18px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 16px; }
  .stock-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stock-strip span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .stock-strip strong { font-size: 20px; }
  .hero-slider,
  .slider-track {
    min-height: 535px;
  }
  .slider-item {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 14px;
    padding: 20px;
  }
  .slider-visual {
    order: -1;
    max-height: 230px;
  }
  .slider-content h2 {
    font-size: 23px;
    -webkit-line-clamp: 2;
  }
  .slider-price strong { font-size: 25px; }
  .slider-controls {
    left: 12px;
    right: 12px;
    bottom: 16px;
  }
  .slider-progress {
    left: 12px;
    right: 12px;
  }
  .rail-shell::before,
  .rail-shell::after {
    display: none;
  }
  .rail-nav {
    display: none;
  }
  .featured-row {
    grid-auto-columns: minmax(172px, 74vw);
    margin-inline: -11px;
    padding-inline: 11px;
  }
  .hero-showcase { grid-template-columns: 1fr; }
  .showcase-card.main { min-height: 150px; }
  .print-tool {
    margin-top: 18px;
    gap: 12px;
  }
  .print-viewer-head {
    flex-direction: column;
  }
  .file-pick {
    width: 100%;
  }
  .print-stage {
    min-height: 390px;
  }
  .print-readouts {
    grid-template-columns: 1fr;
  }
  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .catalog-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 11px;
  }
  .filter-search,
  .filter-actions {
    grid-column: 1 / -1;
  }
  .filter-check {
    justify-content: center;
  }
  .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pagination {
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 34px;
  }
  .page-link,
  .page-ellipsis {
    min-width: 36px;
    min-height: 36px;
    padding-inline: 10px;
    font-size: 13px;
  }
  .page-prev,
  .page-next {
    flex: 1 1 calc(50% - 6px);
  }
  .product-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .product-name {
    min-height: 58px;
    margin-inline: 10px;
    font-size: 13px;
    -webkit-line-clamp: 3;
  }
  .product-price,
  .product-meta {
    padding-inline: 10px;
  }
  .product-price strong { font-size: 18px; }
  .stock-badge { margin-inline: 10px; }
  .product-actions {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .cart-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .cart-row .thumb { width: 64px; }
  .cart-row .line-total {
    grid-column: 2;
    justify-self: start;
  }
}
