/* City Engineering UPS comparison — V13 extension */
.ce-product-catalog .ce-comparison-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;
  gap:9px 12px;
}
.ce-product-catalog .ce-comparison-actions>a:first-child{justify-self:start;min-width:0}
.ce-product-catalog .ce-comparison-actions>a:nth-child(2){justify-self:end;white-space:nowrap}
.ce-product-catalog .ce-compare-toggle{
  grid-column:1/-1;
  display:inline-flex!important;
  width:100%;
  min-height:42px;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border:1px solid #c8dce9;
  border-radius:10px;
  background:#f3f9fc;
  color:var(--ce-navy,#163b62);
  font:inherit;
  font-size:.82rem;
  font-weight:750;
  line-height:1.25;
  cursor:pointer;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
.ce-product-catalog .ce-compare-toggle:hover{border-color:var(--ce-blue,#00a1d6);background:#e8f5fb;color:var(--ce-navy,#163b62)}
.ce-product-catalog .ce-compare-toggle[aria-pressed="true"]{border-color:var(--ce-navy,#163b62);background:var(--ce-navy,#163b62);color:#fff}
.ce-product-catalog .ce-compare-toggle:focus-visible,
.ce-compare-tray button:focus-visible,
.ce-compare-dialog button:focus-visible,
.ce-compare-dialog a:focus-visible{outline:3px solid var(--ce-blue,#00a1d6);outline-offset:2px}
.ce-product-catalog .ce-compare-toggle:active{transform:translateY(1px)}

.ce-compare-tray[hidden],
.ce-compare-dialog [hidden]{display:none!important}
.ce-compare-tray{
  position:fixed;
  z-index:9998;
  inset-inline:16px;
  bottom:calc(16px + env(safe-area-inset-bottom,0px));
  width:min(780px,calc(100vw - 32px));
  margin-inline:auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px 24px;
  padding:14px 18px;
  border:1px solid #c9dce9;
  border-radius:16px;
  background:#fff;
  color:var(--ce-navy,#163b62);
  box-shadow:0 14px 44px rgba(12,40,75,.2);
}
.ce-compare-tray-copy{min-width:0}
.ce-compare-tray-copy strong{display:block;font-size:.98rem;line-height:1.35}
.ce-compare-status{margin:3px 0 0;color:#53677a;font-size:.82rem;line-height:1.45}
.ce-compare-tray-actions{display:flex;align-items:center;gap:9px}
.ce-compare-tray button,
.ce-compare-dialog button{
  min-height:44px;
  border:1px solid #cbd9e4;
  border-radius:10px;
  padding:9px 14px;
  background:#fff;
  color:var(--ce-navy,#163b62);
  font:inherit;
  font-size:.86rem;
  font-weight:700;
  cursor:pointer;
}
.ce-compare-tray .ce-compare-open{border-color:var(--ce-blue,#00a1d6);background:var(--ce-blue,#00a1d6);color:#fff}
.ce-compare-tray .ce-compare-open:hover{filter:brightness(.94)}
.ce-compare-tray button:disabled{opacity:.52;cursor:not-allowed}
.ce-compare-tray .ce-compare-clear{background:#f7fafc}
body.ce-has-comparison-selection{padding-bottom:112px}

.ce-compare-dialog{
  width:min(1120px,calc(100vw - 36px));
  max-width:none;
  max-height:min(86vh,880px);
  overflow:hidden;
  padding:0;
  border:1px solid #c9dce9;
  border-radius:20px;
  background:#fff;
  color:#193c5d;
  box-shadow:0 22px 80px rgba(5,25,50,.3);
}
.ce-compare-dialog::backdrop{background:rgba(8,28,52,.58);backdrop-filter:blur(3px)}
.ce-compare-dialog-header{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 22px;
  border-bottom:1px solid #e1ebf1;
  background:#fff;
}
.ce-compare-dialog-header h2{margin:0;color:var(--ce-navy,#163b62);font-size:clamp(1.15rem,2vw,1.55rem);font-weight:800;line-height:1.25}
.ce-compare-dialog-header .ce-compare-close{width:44px;min-width:44px;padding:0;border-radius:50%;font-size:1.55rem;line-height:1}
.ce-compare-note{margin:0;padding:13px 22px 5px;color:#52677b;font-size:.9rem;line-height:1.55}
.ce-compare-dialog-status{margin:0;padding:8px 22px;color:var(--ce-navy,#163b62);font-size:.9rem}
.ce-compare-retry{margin:0 22px 10px!important;background:#f3f9fc!important}
.ce-compare-table-scroll{max-height:calc(min(86vh,880px) - 145px);overflow:auto;overscroll-behavior:contain;padding:8px 22px 22px}
.ce-compare-table{width:100%;min-width:680px;border-collapse:separate;border-spacing:0;table-layout:fixed;color:#334b60;font-size:.88rem;line-height:1.5}
.ce-compare-table th,.ce-compare-table td{padding:13px 14px;border-bottom:1px solid #e4edf2;text-align:start;vertical-align:top;overflow-wrap:anywhere}
.ce-compare-table thead th{position:sticky;top:0;z-index:1;background:#f1f7fa;color:var(--ce-navy,#163b62);font-weight:750}
.ce-compare-table thead th:first-child{width:180px}
.ce-compare-table tbody th{position:sticky;inset-inline-start:0;z-index:1;width:180px;background:#f8fbfd;color:var(--ce-navy,#163b62);font-weight:750}
.ce-compare-table .ce-compare-model-name{display:block;color:var(--ce-navy,#163b62);font-size:.98rem;font-weight:800}
.ce-compare-table .ce-compare-model-count{display:block;margin-top:4px;color:#61778b;font-size:.75rem;font-weight:500}
.ce-compare-table .ce-compare-details-link{display:inline-block;margin-top:8px;color:var(--ce-blue,#008fbf);font-size:.78rem;font-weight:700;text-decoration:underline;text-underline-offset:2px}
.ce-compare-table .ce-compare-not-listed{color:#728191;font-style:italic;background:#fbfcfd}
.ce-compare-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(max-width:760px){
  .ce-product-catalog .ce-comparison-actions{gap:9px 8px}
  .ce-product-catalog .ce-comparison-actions>a.inline-flex{font-size:.78rem!important}
  .ce-product-catalog .ce-comparison-actions>a:nth-child(2){font-size:.72rem}
  .ce-product-catalog .ce-compare-toggle{min-height:44px}
  .ce-compare-tray{grid-template-columns:1fr;gap:10px;padding:13px 14px}
  .ce-compare-tray-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)}
  .ce-compare-tray-actions button{width:100%;padding-inline:9px}
  body.ce-has-comparison-selection{padding-bottom:150px}
  .ce-compare-dialog{width:calc(100vw - 18px);max-height:90vh;border-radius:16px}
  .ce-compare-dialog-header{padding:14px 15px}
  .ce-compare-note{padding:12px 15px 5px;font-size:.82rem}
  .ce-compare-dialog-status{padding-inline:15px}
  .ce-compare-retry{margin-inline:15px!important}
  .ce-compare-table-scroll{max-height:calc(90vh - 165px);padding:8px 12px 16px}
  .ce-compare-table{min-width:700px;font-size:.82rem}
  .ce-compare-table th,.ce-compare-table td{padding:11px 10px}
  .ce-compare-table thead th:first-child,.ce-compare-table tbody th{width:145px;min-width:145px}
}
@media(prefers-reduced-motion:reduce){.ce-product-catalog .ce-compare-toggle{transition:none}}
