:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #62707a;
  --line: #d8e0e5;
  --surface: #ffffff;
  --band: #f3f6f8;
  --brand: #126b63;
  --brand-dark: #0d4c47;
  --accent: #b84d2a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--band);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

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

.nav a,
.nav button,
.button,
button {
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

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

.nav form {
  margin: 0;
}

main,
.messages {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.message {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: #e6f4f1;
  border: 1px solid #b5ddd5;
  border-radius: 8px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: end;
  min-height: 360px;
  padding: 56px 0 34px;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.9rem);
  line-height: 0.98;
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow,
.sku {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel,
.summary,
.form-panel,
.auth-panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-panel span,
.summary span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.toolbar,
.page-heading,
.checkout-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
}

.search-form,
.purchase-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.search-form input {
  flex: 1 1 360px;
}

.search-form select {
  flex: 0 1 220px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}

.part-card,
.order-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.part-media,
.detail-media {
  display: grid;
  place-items: center;
  min-height: 170px;
  color: var(--brand-dark);
  background: #dfe9ea;
  font-weight: 800;
}

.part-media img,
.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.part-body {
  padding: 18px;
}

.part-body h2 {
  margin: 0;
  font-size: 1.2rem;
}

.part-body p,
.page-heading p {
  color: var(--muted);
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
}

dd {
  margin: 0;
  font-weight: 800;
}

.price {
  font-size: 1.2rem;
}

.detail,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 24px;
  margin: 34px 0;
}

.detail-content {
  padding: 20px 0;
}

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

.purchase-box {
  align-items: end;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.purchase-box input {
  width: 110px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

td span {
  color: var(--muted);
}

.secondary {
  color: var(--brand);
  background: #dcecea;
}

.summary-row,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary-total {
  font-size: 1.2rem;
  border-bottom: 0;
}

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

.order-card {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.order-card em {
  color: var(--muted);
}

.shipment {
  display: grid;
  gap: 8px;
  padding: 12px 0;
}

.late {
  color: #9b2c2c;
}

.auth-panel {
  max-width: 480px;
  margin: 56px auto;
}

@media (max-width: 820px) {
  .site-header,
  .toolbar,
  .page-heading,
  .checkout-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero,
  .detail,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  dl,
  .specs {
    grid-template-columns: 1fr;
  }
}
