:root {
  color-scheme: light;
  --ink: #14211f;
  --muted: #5e6f6a;
  --line: #d8e2dd;
  --panel: #ffffff;
  --soft: #eef4f1;
  --wash: #f6f8f5;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --gold: #c9962c;
  --danger: #a33a2a;
  --shadow: 0 18px 50px rgba(20, 33, 31, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(216, 226, 221, 0.82);
  background: rgba(246, 248, 245, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
  background: var(--soft);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(100vh - 72px));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(246, 248, 245, 0.96), rgba(246, 248, 245, 0.68) 42%, rgba(246, 248, 245, 0.14));
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(620px, calc(100% - 36px));
  margin-left: clamp(18px, 6vw, 76px);
  padding: 54px 0 96px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 560px;
  color: #344b46;
  font-size: 18px;
  line-height: 1.65;
}

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

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.primary,
.whatsapp {
  color: #fff;
  background: var(--accent);
}

.primary:hover,
.whatsapp:hover {
  background: var(--accent-dark);
}

.secondary {
  color: var(--ink);
  border-color: rgba(20, 33, 31, 0.16);
  background: rgba(255, 255, 255, 0.68);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.stats div {
  padding: 24px clamp(18px, 4vw, 56px);
  background: #fff;
}

.stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 28px;
}

.stats span {
  color: var(--muted);
  font-size: 14px;
}

.catalog {
  padding: 46px clamp(18px, 4vw, 56px) 32px;
}

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

.result-count {
  color: var(--muted);
  font-size: 14px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(170px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: #465a55;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.icon-button {
  color: var(--muted);
  border-color: var(--line);
  background: #fff;
}

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

.product-card {
  display: grid;
  gap: 14px;
  min-height: 306px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(20, 33, 31, 0.06);
}

.product-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: var(--soft);
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sku {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.spec {
  color: var(--ink);
  font-size: 26px;
  font-weight: 850;
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.meta div {
  min-height: 56px;
  padding: 9px;
  border-radius: 6px;
  background: var(--soft);
}

.meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 760;
}

.price-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: auto;
}

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

.price strong {
  font-size: 22px;
}

.price span {
  color: var(--muted);
  font-size: 12px;
}

.moq-note,
.trade-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.trade-note {
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  background: #fff8e7;
  color: #6f5a21;
}

.moq-warning {
  color: var(--danger);
  font-weight: 800;
}

.qty-control {
  display: grid;
  grid-template-columns: minmax(92px, 0.9fr) minmax(120px, 1.1fr) minmax(86px, auto);
  gap: 8px;
  align-items: end;
  width: 100%;
  min-width: 0;
}

.qty-control label {
  min-width: 0;
}

.qty-control input,
.qty-control select {
  min-height: 42px;
}

.qty-control .button {
  width: 100%;
  min-width: 86px;
}

.quote-panel {
  padding: 24px clamp(18px, 4vw, 56px) 56px;
}

.quote-inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.1fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.compact-action {
  width: fit-content;
  margin-top: 12px;
}

.quote-summary p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.cart-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
}

.cart-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.cart-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cart-item strong {
  overflow-wrap: anywhere;
}

.cart-item button {
  border: 0;
  color: var(--danger);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cart-item small {
  color: var(--muted);
}

.cart-item input {
  max-width: 130px;
}

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

.pi-preview {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pi-preview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pi-preview-head span {
  color: var(--muted);
  font-size: 13px;
}

.pi-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pi-table-wrap table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.pi-table-wrap th,
.pi-table-wrap td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.pi-table-wrap th {
  color: #465a55;
  background: var(--soft);
  font-size: 11px;
  text-transform: uppercase;
}

.floating-cart {
  position: fixed;
  right: clamp(14px, 3vw, 36px);
  bottom: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(120px, auto) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.floating-cart[hidden] {
  display: none;
}

.floating-cart strong,
.floating-cart span {
  display: block;
}

.floating-cart span {
  color: var(--muted);
  font-size: 13px;
}

.floating-cart .button {
  min-height: 38px;
  padding-inline: 12px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 26px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}

.empty {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

@media (max-width: 980px) {
  .filters,
  .quote-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1180px) {
  .qty-control {
    grid-template-columns: minmax(92px, 1fr) minmax(120px, 1fr);
  }

  .qty-control .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    padding-inline: 8px;
  }

  .hero {
    min-height: 360px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(246, 248, 245, 0.96), rgba(246, 248, 245, 0.82) 58%, rgba(246, 248, 245, 0.22));
  }

  .hero-copy {
    align-self: start;
    padding-top: 34px;
    padding-bottom: 42px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 22px;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.45;
  }

  .hero-actions,
  .stats,
  .product-card .moq-note {
    display: none;
  }

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

  .catalog {
    padding: 20px 12px 18px;
  }

  .filters {
    position: sticky;
    top: 97px;
    z-index: 4;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 10px;
    background: var(--wash);
  }

  .filters label {
    font-size: 11px;
  }

  .filters .icon-button {
    grid-column: 1 / -1;
    min-height: 38px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px;
    border-radius: 8px;
  }

  .product-image {
    grid-row: 1 / span 3;
    height: 92px;
    aspect-ratio: 1;
  }

  .product-top {
    min-width: 0;
  }

  .sku {
    font-size: 11px;
  }

  .spec {
    font-size: 23px;
    line-height: 1;
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .meta div {
    min-height: 0;
    padding: 6px;
  }

  .meta div:nth-child(1),
  .meta div:nth-child(2),
  .meta div:nth-child(5) {
    display: none;
  }

  .meta dt {
    font-size: 9px;
  }

  .meta dd {
    font-size: 12px;
  }

  .price-row {
    gap: 8px;
  }

  .price strong {
    font-size: 18px;
  }

  .price span {
    font-size: 10px;
  }

  .qty-control {
    grid-template-columns: 0.8fr 1fr 58px;
    gap: 6px;
  }

  .qty-control label {
    gap: 4px;
    font-size: 10px;
  }

  .qty-control input,
  .qty-control select {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .qty-control .button {
    grid-column: auto;
    min-width: 58px;
    min-height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  .quote-panel {
    padding: 14px 12px 92px;
  }

  .quote-inner,
  .pi-preview {
    padding: 14px;
  }

  .cart-list {
    max-height: none;
  }

  .cart-item {
    padding: 10px;
  }

  .pi-preview-head {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .pi-table-wrap table {
    min-width: 1040px;
  }

  .floating-cart {
    right: 10px;
    bottom: 10px;
    left: 10px;
    grid-template-columns: minmax(84px, 1fr) auto auto;
    gap: 6px;
    padding: 8px;
  }

  .floating-cart .button {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .floating-cart strong {
    font-size: 13px;
  }

  .floating-cart span {
    font-size: 12px;
  }
}
