* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f9;
  color: #1f2937;
}

.page {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.hero {
  text-align: center;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 36px;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  font-size: 16px;
  color: #526174;
}

.panel {
  background: white;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.hidden {
  display: none !important;
}

.access-denied {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px;
  text-align: center;
}

.customer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.label,
label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 14px;
}

.access-badge {
  display: inline-block;
  background: #e0ecff;
  color: #174ea6;
  font-weight: 800;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 14px;
}

.payment-message { margin-top: 10px !important; font-weight: 800; color: #166534 !important; }

.note, .small {
  color: #667085;
  margin: 0;
  font-size: 13px;
}

.filters-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  margin-bottom: 16px;
}

select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd6e3;
  border-radius: 9px;
  font-size: 14px;
  background: white;
}

.clear-button {
  border: 1px solid #cfd6e3;
  border-radius: 9px;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.clear-button:hover {
  background: #eef2f7;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.products-panel {
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 125px 145px 120px;
  gap: 10px;
  padding: 11px 16px;
  background: #eef2f7;
  font-weight: 800;
  color: #334155;
  font-size: 14px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 125px 145px 120px;
  gap: 10px;
  align-items: center;
  padding: 9px 16px;
  border-top: 1px solid #e5e7eb;
  min-height: 64px;
}

.product-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
}

.product-meta {
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.25;
}

.price-main, .line-total {
  font-size: 15px;
  font-weight: 800;
}

.msrp-price {
  color: #475467;
}

.your-price {
  color: #111827;
}

.quantity-control {
  display: inline-flex;
  border: 1px solid #cfd6e3;
  border-radius: 9px;
  overflow: hidden;
  background: white;
}

.quantity-control button {
  width: 34px;
  border: 0;
  background: #f8fafc;
  font-size: 18px;
  cursor: pointer;
}

.quantity-control input {
  width: 46px;
  border: 0;
  border-left: 1px solid #cfd6e3;
  border-right: 1px solid #cfd6e3;
  text-align: center;
  font-size: 14px;
  padding: 7px 3px;
}

.summary {
  padding: 18px;
  position: sticky;
  top: 18px;
}

.summary h2 {
  margin: 0 0 14px;
  font-size: 23px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 11px 0;
  font-size: 14px;
}

.summary-row strong {
  text-align: right;
}

.total {
  font-size: 17px;
}

.checkout-button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: #2563eb;
  color: white;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 16px;
  cursor: pointer;
  margin-top: 14px;
}

.checkout-button:hover {
  background: #1d4ed8;
}

.checkout-button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.loading {
  padding: 22px 16px;
  color: #667085;
  font-size: 14px;
}

@media (max-width: 1050px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 850px) {
  .filters-panel { grid-template-columns: 1fr; }
  .table-header { display: none; }
  .product-row { grid-template-columns: 1fr; gap: 8px; }
  .customer-panel { flex-direction: column; align-items: stretch; }
}
