:root{
  --brand-highlight:#000000;
  --brand-highlight-soft:#dcecff;
  --brand-highlight-text:#ffffff;
}

body[data-brand="WAECO"]{
  --brand-highlight:#0050ff;
  --brand-highlight-soft:#e8efff;
  --brand-highlight-text:#ffffff;
}

*{
  box-sizing:border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fafafa;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  padding-bottom:calc(72px + 20px);
}

.topbar {
  margin-bottom: 20px;
}

.card{
  background:#fff;
  border-radius:24px;
  padding:36px;
  border:none;
  box-shadow:
    0 6px 30px
    rgba(15,23,42,.06);
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

input,
select,
textarea{

  width:100%;

  padding:18px;

  border:1px solid #e5e7eb;

  border-radius:16px;

  font-size:18px;

  background:white;

  transition:.15s ease;
}

input:focus,
select:focus,
textarea:focus{

  outline:none;

  border-color:
    var(--brand-highlight);

  box-shadow:
    0 0 0 4px
    rgba(0,80,255,.08);
}

button{
  width:100%;
  padding:14px;
  background:var(--brand-highlight);
  color:var(--brand-highlight-text);
  border:none;
  border-radius:0;
  text-transform:uppercase;
  letter-spacing:.3px;
  font-size:14px;
  font-weight:700;
}

#productSearch{

  background:#fff;
  color:#000;

  border:1px solid #d9d9d9;

  font-size:18px;
  font-weight:500;

}

#productSearch::placeholder{

  color:#6a6a6a;
  opacity:1;

}

button {
  background: var(--brand-highlight);
  color: var(--brand-highlight-text);
  font-weight: bold;
  border: none;
}

button:active {
  transform: scale(.98);
}

.product {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px;
  margin-bottom: 10px;

  border: 1px solid #ddd;
  border-radius: 0;
}

.qtyControls {
  display: flex;
  gap: 8px;
}

.qtyControls button {
  width: 60px;
}

.totalArea {
  margin-top: 20px;
}

.hidden {
  display: none;
}

.wizard-step:hover{

  opacity:.85;
}

.wizard-progress{
  display:flex;
  gap:12px;
  margin-bottom:28px;
}

.wizard-step{
  flex:1;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:center;

  background:#f4f6f8;
  color:#5f6b7a;

  border:1px solid #e5e7eb;
  border-radius:18px;

  font-size:18px;
  font-weight:700;

  transition:.2s ease;
}

.wizard-step.active{
  background:var(--brand-highlight);
  color:#fff;
  border-color:var(--brand-highlight);

  box-shadow:
    0 8px 24px
    rgba(0,0,0,.15);
}

.wizard-step.completed{
  background:#dff7e9;
  color:#106c2d;
  border-color:#a8dfbc;
}

.wizard-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.wizard-next {
  margin-top: 20px;
}

#productSearch{

  margin-top:10px;
  margin-bottom:0;

}

#products{
  display:grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(340px,1fr)
    );

  gap:16px;

  width:100%;
}

.product {
  min-height: 80px;
}

.qtyControls button {
  height: 60px;
  width: 60px;
  font-size: 24px;
}

#submitBtn {
  height: 80px;
  font-size: 24px;
}

.dealer-card {
  border: 2px solid #e5e7eb;
  border-radius: 0;
  padding: 20px;
  margin-bottom: 15px;
  transition:.15s ease;
  cursor: pointer;
  background: white;
}

.dealer-card:hover{
border-color:#111;
box-shadow:
0 4px 16px rgba(0,0,0,.08);
}

.dealer-card.selected{
border:2px solid var(--brand-highlight);
background:var(--brand-highlight-soft);
}

.dealer-distance{
display:inline-block;
margin-top:10px;
margin-bottom:8px;
padding:5px 9px;
background:#f1f5f9;
color:#111827;
font-size:13px;
font-weight:700;
border-radius:0px;
}

.dealer-type{
display:inline-block;
margin-top:4px;
margin-bottom:8px;
padding:4px 8px;
background:#eef2ff;
color:#1f2937;
font-size:12px;
font-weight:700;
border-radius:0px;
}

.dealer-premium{
display:inline-flex;
align-items:center;
gap:6px;
background:#ffb900;
color:#000;
font-size:12px;
font-weight:700;
padding:6px 10px;
margin-bottom:12px;
text-transform:uppercase;
letter-spacing:.5px;
border-radius:0px;
}

.dealer-company {
  font-size: 22px;
  font-weight: 700;
}

.dealer-meta{
font-size:13px;
color:#666;
margin-top:4px;
margin-bottom:10px;
}

.dealer-address {
  color: #666;
  margin-top: 8px;
}

.dealer-email {
  margin-top: 8px;
  font-size: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 18px;
}

.checkbox-row input {
  width: auto;
}

#clearSignatureBtn {
  margin-bottom: 20px;
}

.summary-card {
  background: #f8f9fb;
  border-radius: 0;
  padding: 15px;
  margin-bottom: 15px;
}

.summary-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.summary-total {
  font-size: 24px;
  font-weight: bold;
  color:var(--brand-highlight);
}

.products-column {
  min-width: 0;
}

@media (max-width: 1024px) {

  .products-layout {
    grid-template-columns: 1fr;
  }

  .cart-column {
    min-width: auto;
  }

  .sticky-cart {
    position: static;
  }

}

.cartRow {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cartRow:last-child {
  border-bottom: 0;
}

.signature-error {
  background: #ffe5e5;
  color: #b00020;
  border: 1px solid #ffb3b3;
  border-radius: 0;
  padding: 12px;
  margin-bottom: 15px;
  font-weight: 600;
}

.logo {
  max-width: 260px;
  margin-bottom: 30px;
}

.header {
  border-bottom: 2px solid #000000;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.product-card{
  min-height:320px;
  padding:22px;

  display:flex;
  flex-direction:column;

  background:#ffffff;
  border:1px solid #e4e7ec;
  border-radius:20px;

  box-shadow:
    0 2px 8px
    rgba(16,24,40,.04);

  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

.product-card:hover{
  transform:translateY(-1px);

  border-color:#d0d5dd;

  box-shadow:
    0 8px 20px
    rgba(16,24,40,.08);
}

.bundle-card{
  border:2px solid #7fd09b;
}

.offer-card{
  background:#ffffff;
  border:1px solid #f0b400;
}

.offer-card .product-header{
  font-size:20px;
  font-weight:700;
  line-height:1.1;
  margin-bottom:6px;
}

.offer-card .product-price{
  color:#111;
  font-weight:700;
}

.product-header{
  font-size:20px;
  line-height:1.15;
  font-weight:700;

  min-height:50px;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;

  overflow:hidden;

  margin-bottom:16px;
}

.product-sku{
  font-size:12px;
  color:#7a7a7a;
  margin-bottom:6px;
}

.price-rrp{

  font-size:14px;

  color:#555;

  text-decoration:line-through;

}

.price-offer{

  font-size:34px;

  line-height:1;

  font-weight:800;

}

.price-normal{

  font-size:28px;

  font-weight:700;

}

.product-price{
  margin-top:8px;
  margin-bottom:10px;
}

.product-controls{
  display:flex;

  align-items:center;

  justify-content:center;

  gap:16px;

  margin-top:12px;
}

.qty-btn{
  width:60px;
  height:60px;

  border-radius:16px;

  font-size:28px;

  background:#111;

  color:#fff;
}

.qty-display{

  min-width:40px;

  text-align:center;

  font-size:22px;

  font-weight:700;

}

#categoryButtons{

  display:flex;

  flex-wrap:nowrap;

  gap:8px;

  width:100%;

  overflow-x:auto;
  overflow-y:hidden;

  margin-bottom:20px;

  padding-bottom:8px;

  -webkit-overflow-scrolling:touch;

  scrollbar-width:none;

}

#categoryButtons::-webkit-scrollbar{
  display:none;
}

.category-btn{

  width:auto !important;

  flex:0 0 auto;

  padding:0 18px;

  height:44px;

  display:flex;
  align-items:center;
  justify-content:center;

  background:#ffffff;

  border:1px solid #e4e7ec;

  border-radius:14px;

  color:#475467;

  font-size:15px;

  font-weight:600;

  white-space:nowrap;

  text-transform:none;

  letter-spacing:0;

  transition:.15s ease;

}

.category-btn.active{

  background:#101828;

  border-color:#101828;

  color:#ffffff;

}

#categoryButtons{
  position:sticky;

  top:0;

  z-index:50;

  background:white;

  min-height:56px;

  padding-top:10px;
  padding-bottom:10px;

  border-bottom:1px solid #e5e7eb;
}

.cart-drawer{
  position:fixed;

  left:0;
  right:0;
  bottom:0;

  height:auto;

  z-index:9999;

  background:#fff;

  border-top:1px solid #ddd;

  box-shadow:
    0 -2px 10px rgba(0,0,0,.1);

  transform:translateZ(0);
}


.cart-drawer-header{

  display:flex;

  justify-content:space-between;
  align-items:center;

  padding:18px;

  cursor:pointer;

  font-weight:700;

}

.cart-drawer-content{

  padding:20px;

  max-height:40vh;

  overflow:auto;

}

.cart-drawer-total{

  margin-top:16px;

  font-size:22px;
  font-weight:700;

}

#cartDrawerArrow{

  font-size:20px;

}

.cartRow{

  padding:12px 0;
  border-bottom:1px solid #eee;

}

.cartRowInfo{
display:flex;
justify-content:space-between;
align-items:flex-start;
gap:16px;
margin-bottom:10px;
}

.cartRowName{
font-size:18px;
font-weight:600;
line-height:1.3;
margin-bottom:4px;
}

.cartRowPrice{
white-space:nowrap;
font-weight:700;
text-align:right;
min-width:90px;
}

.cartRowQty{

  display:flex;
  align-items:center;
  gap:12px;

}

.cartQtyBtn{

  width:40px !important;
  height:40px;
  padding:0;
  border-radius: 0;

}

.cartRowMeta{
font-size:13px;
color:#666;
margin-bottom:8px;
}

.cartRowTotal{
font-size:22px;
font-weight:700;
text-align:right;
margin-bottom:12px;
}

.products-toolbar{

  position:sticky;
  top:0;
  z-index:100;
  background:white;
  padding-top:10px;
  padding-bottom:10px;
  margin-bottom:15px;
  border-bottom:1px solid #eee;

}

.cart-drawer-navigation{

  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:16px;

}

.cart-drawer-navigation button{

  flex:1;

  margin:0;

}
.cart-drawer-header{

  display:flex;

  align-items:center;

  gap:12px;

}

#cartDrawerSummary{

  flex:1;

}

#cartDrawerQuickAction{

  margin-left:auto;

}

.cart-quick-btn{

  padding:10px 18px;

background:var(--brand-highlight);

color:var(--brand-highlight-text);

  border:none;

  border-radius: 0;

  font-weight:600;

}

.login-overlay{

  position:fixed;

  inset:0;

  background:#fff;

  z-index:99999;

  display:flex;

  align-items:center;

  justify-content:center;

}

.login-card{

  width:min(
    400px,
    90vw
  );

  padding:32px;

  background:#fff;

  border-radius: 0;

  box-shadow:0 10px 30px rgba(0,0,0,.15);

}

.login-overlay.hidden{

  display:none;

}

.success-overlay{

  position:fixed;

  inset:0;

  background:rgba(
    255,
    255,
    255,
    0.96
  );

  z-index:99999;

  display:flex;

  align-items:center;

  justify-content:center;

}

.success-card{

  width:min(
    500px,
    90vw
  );

  background:#fff;

  padding:40px;

  border-radius: 0;

  text-align:center;

  box-shadow:
    0 10px 40px
    rgba(0,0,0,.15);

}

.success-card h2{

  margin-top:0;

}

.success-overlay.hidden{

  display:none;

}

.input-error{
  border:2px solid #c40000 !important;
  background:#fff4f4;
}

.form-error-message{
  background:#fff4f4;
  color:#c40000;
  border:1px solid #c40000;
  border-radius: 0;
  padding:12px;
  margin-bottom:16px;
  font-weight:600;
}

.signature-card{
  margin-top:20px;
}

.signature-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:12px;
}

.signature-status{
  margin-top:4px;
  font-size:14px;
  color:#666;
}

.signature-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.signature-primary-btn{
  width:auto !important;
  padding:10px 16px;
  font-size:15px;
  border-radius: 0;
}

.signature-secondary-btn{
  width:auto !important;
  padding:8px 12px;
  font-size:14px;
  border-radius: 0;
  background:#e8edf2;
  color:#111;
  font-weight:600;
}

#signaturePad{
  width:100%;
  aspect-ratio:3/1;
  height:auto;
  background:#fff;
  border:2px solid #ddd;
  border-radius: 0;
  margin-bottom:12px;
  touch-action:none;
}

#signaturePad.signature-disabled{
  pointer-events:none;
  opacity:.55;
  background:#f6f6f6;
}

#signaturePad.signature-locked{
  pointer-events:none;
  border-color:#2f8f46;
  background:#f8fff8;
}

.signature-preview{

  border:2px solid #e5e7eb;

  background:#fafcff;

  border-radius:24px;
}

.signature-preview img{

  width:100%;
  height:auto;

}

#signaturePreviewText{

  color:#666;

  font-size:18px;

  font-weight:600;

}

.signature-overlay{

  position:fixed;

  inset:0;

  background:
    rgba(0,0,0,.65);

  z-index:999999;

  display:flex;

  align-items:center;

  justify-content:center;

}

.signature-overlay.hidden{
  display:none;
}


.signature-modal{

  width:min(
    1000px,
    95vw
  );

  background:white;

  border-radius: 0;

  padding:24px;

}

#signatureModalCanvas{
  width:100%;
  height:350px;
  touch-action:none;
  background:white;
  border:2px solid #ddd;
  border-radius:0;
  display:block;
}

.signature-modal-actions{

  margin-top:16px;

  display:flex;

  justify-content:space-between;

}

.sales-staff-grid{

  display:grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(260px,1fr)
    );

  gap:18px;
}

.sales-staff-card{

  min-height:120px;

  border-radius:24px;

  border:none;

  background:white;

  box-shadow:
    0 4px 20px
    rgba(15,23,42,.06);

  display:flex;

  align-items:center;
  justify-content:center;

  font-size:22px;
  font-weight:700;
}

.brand-bar{

  background:white;

  border-radius:24px;

  padding:20px;

  box-shadow:
    0 4px 20px
    rgba(15,23,42,.05);

  margin-bottom:24px;
}

.sales-staff-card{
  min-height:128px;
  padding:24px;
  border:2px solid transparent;
  border-radius:24px;
  background:#ffffff;
  box-shadow:
    0 4px 20px
    rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  cursor:pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.sales-staff-card:hover{
  transform:translateY(-2px);
  box-shadow:
    0 12px 28px
    rgba(15,23,42,.09);
}

.sales-staff-card.selected{
  border-color:var(--brand-highlight);
  background:var(--brand-highlight-soft);
}

.sales-staff-card h3{
  margin:0 0 6px;
  font-size:22px;
  line-height:1.2;
}

.sales-staff-card p{
  margin:0;
  color:#667085;
  font-size:15px;
}

@media (max-width:900px){
  .container{
    padding:16px;
    padding-bottom:110px;
  }

  .card{
    padding:24px;
    border-radius:20px;
  }

  .wizard-progress{
    overflow-x:auto;
    gap:8px;
    padding-bottom:6px;
    scrollbar-width:none;
  }

  .wizard-progress::-webkit-scrollbar{
    display:none;
  }

  .wizard-step{
    flex:0 0 auto;
    min-width:150px;
    height:56px;
    padding:0 16px;
    font-size:15px;
    border-radius:16px;
  }

  #products{
    grid-template-columns:
      repeat(
        auto-fill,
        minmax(220px,1fr)
      );
  }
}

@media (max-width:640px){
  .grid{
    grid-template-columns:1fr;
  }

  .card{
    padding:18px;
  }

  .brand-bar{
    padding:16px;
    border-radius:18px;
  }

  #products{
    grid-template-columns:1fr;
  }

  .signature-modal{
    padding:16px;
    border-radius:20px;
  }

  #signatureModalCanvas{
    height:260px;
    border-radius:16px;
  }
}

.bundle-details-btn{

  width:100%;

  margin-top:16px;

  padding:12px 16px;

  display:flex;
  align-items:center;
  justify-content:center;

  background:#f8fafc;

  color:#475467;

  border:1px solid #e4e7ec;

  border-radius:14px;

  font-size:14px;

  font-weight:600;

  text-transform:none;

  letter-spacing:0;

  box-shadow:none;

}

.bundle-details-btn:hover{

  background:#f2f4f7;

}

.bundle-details-btn:active{
  transform:none;
}

.bundle-panel{
  position:fixed;
  inset:0;
  z-index:999999;

  display:flex;
  justify-content:flex-end;

  background:
    rgba(16,24,40,.42);

  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}

.bundle-panel.hidden{
  display:none;
}

.bundle-panel-content{
  width:min(520px,92vw);
  height:100%;

  padding:28px;

  overflow-y:auto;
  overscroll-behavior:contain;

  background:#ffffff;

  box-shadow:
    -16px 0 40px
    rgba(16,24,40,.18);

  animation:
    bundlePanelIn .2s ease-out;
}

@keyframes bundlePanelIn{
  from{
    transform:translateX(100%);
  }

  to{
    transform:translateX(0);
  }
}

body.bundle-panel-open{
  overflow:hidden;
}

.bundle-panel-header{
  position:sticky;
  top:-28px;
  z-index:2;

  margin:-28px -28px 20px;
  padding:24px 28px 18px;

  display:grid;
  grid-template-columns:1fr 48px;
  align-items:start;
  gap:18px;

  background:#ffffff;
  border-bottom:1px solid #eaecf0;
}

.bundle-panel-header h2{
  margin:0;

  color:#101828;
  font-size:25px;
  line-height:1.2;
}

.bundle-panel-header button{
  width:48px;
  min-width:48px;
  height:48px;
  padding:0;

  display:flex;
  align-items:center;
  justify-content:center;

  background:#101828;
  color:#ffffff;

  border:0;
  border-radius:12px;

  font-size:21px;
  line-height:1;
}

.bundle-panel-intro{
  margin-bottom:18px;
}

.bundle-panel-intro p{
  margin:10px 0 0;

  color:#475467;
  font-size:14px;
  line-height:1.5;
}

.bundle-panel-badge{
  display:inline-flex;

  padding:6px 10px;

  background:#fffaeb;
  color:#93370d;

  border:1px solid #fedf89;
  border-radius:999px;

  font-size:12px;
  font-weight:700;
}

.bundle-table-wrap{
  overflow-x:auto;

  border:1px solid #eaecf0;
  border-radius:14px;
}

.bundle-detail-table{
  width:100%;
  margin:0;

  border-collapse:collapse;
  table-layout:auto;
}

.bundle-detail-table th{
  padding:11px 12px;

  background:#f9fafb;
  color:#475467;

  border-bottom:1px solid #eaecf0;

  text-align:left;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.bundle-detail-table th:nth-child(2),
.bundle-detail-table th:nth-child(3){
  text-align:right;
}

.bundle-detail-table td{
  padding:14px 12px;

  color:#101828;

  border-bottom:1px solid #eaecf0;

  vertical-align:top;
  font-size:14px;
}

.bundle-detail-table tbody tr:last-child td{
  border-bottom:0;
}

.bundle-item-name{
  font-weight:700;
  line-height:1.35;
}

.bundle-item-sku{
  margin-top:3px;

  color:#667085;
  font-size:12px;
  line-height:1.35;
}

.bundle-money-cell{
  text-align:right;
  white-space:nowrap;
}

.bundle-offer-value{
  color:#147a36;
  font-weight:700;
}

.bundle-no-offer{
  color:#98a2b3;
}

.bundle-panel-summary{
  margin-top:20px;
  padding:18px;

  display:block;

  background:#f9fafb;

  border:1px solid #eaecf0;
  border-radius:14px;

  font-size:14px;
}

.bundle-summary-row{
  padding:5px 0;

  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;

  color:#475467;
}

.bundle-summary-row strong{
  color:#101828;
  text-align:right;
  white-space:nowrap;
}

.bundle-summary-saving,
.bundle-summary-saving strong{
  color:#147a36;
}

.bundle-summary-divider{
  height:1px;

  margin:12px 0;

  background:#d0d5dd;
}

.bundle-summary-total{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:20px;

  color:#101828;
  font-size:18px;
  font-weight:800;
}

.bundle-summary-total strong{
  font-size:24px;
  white-space:nowrap;
}

@media (max-width:640px){
  .bundle-panel-content{
    width:100%;
    padding:20px;
  }

  .bundle-panel-header{
    top:-20px;

    margin:-20px -20px 16px;
    padding:18px 20px 14px;
  }

  .bundle-panel-header h2{
    font-size:21px;
  }

  .bundle-detail-table th,
  .bundle-detail-table td{
    padding-left:9px;
    padding-right:9px;
  }

  .bundle-summary-total strong{
    font-size:21px;
  }
}

.offer-badge,
.bundle-badge{

  display:inline-flex;

  align-items:center;

  width:auto;

  padding:6px 12px;

  border-radius:999px;

  font-size:11px;

  font-weight:700;

  letter-spacing:.4px;

  text-transform:uppercase;

  margin-bottom:14px;
}

.offer-badge{

  background:#fff7d6;

  color:#8a5c00;

  border:1px solid #f1d06b;
}

.bundle-badge{

  background:#e8fff0;

  color:#147a36;

  border:1px solid #7fd09b;
}