* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  padding-bottom: 140px;
}

.cot-page {
  padding: 18px;
}

.cot-shell {
  --cot-logo-box-width: 230px;
  max-width: 1180px;
  margin: 0 auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  padding: 20px;
}

.cot-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cot-logo-box-width);
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.cot-top h1 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 48px);
  color: #0b1f4f;
  text-align: center;
  flex: 1;
  line-height: 1.1;
}

.cot-logo {
  width: var(--cot-logo-box-width);
  max-width: var(--cot-logo-box-width);
  min-width: var(--cot-logo-box-width);
  height: 110px;
  max-height: 110px;
  min-height: 110px;
  border-radius: 12px;
  background: #ffffff;
  border: none;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .8px;
  text-align: center;
  padding: 6px;
  margin-left: auto;
  flex-shrink: 0;
  overflow: hidden;
}

.cot-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.cot-help {
  margin: 8px 0 16px;
  max-width: calc(100% - var(--cot-logo-box-width) - 16px);
  color: #1e3a8a;
}

.cot-controls {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  background: #ffffff;
}

.cot-search-row {
  display: block;
  margin-bottom: 10px;
}

.cot-search-input-wrap {
  position: relative;
}

.cot-search-row input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 42px 10px 12px;
  font-size: 15px;
  color: #0f172a;
}

#cotSearchClearBtn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: #e5e7eb;
  color: #374151;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.cot-search-row button,
.cot-actions-row button,
.cot-sort-row button,
.cot-summary-bar button,
.cot-modal-actions button {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  color: #0b1f4f;
}

.cot-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.cot-filters-panel {
  display: none;
  margin-top: 12px;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cot-filters-panel select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  background: #f8fafc;
}

.cot-sort-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-direction: column;
  align-items: flex-start;
}

.cot-sort-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cot-sort-btn.is-active {
  border-color: #64748b;
  color: #334155;
  background: #e5e7eb;
  font-weight: 700;
}

.cot-cards-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
}

.cot-card {
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.cot-card-image-wrap {
  width: 100%;
  height: 116px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}

.cot-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.cot-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 32px;
}

.cot-card h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  color: #0b1f4f;
  min-height: 30px;
}

.cot-card p {
  margin: 0;
  font-size: 12px;
  color: #334155;
}

.cot-card-code {
  margin-top: 3px;
  color: #64748b;
  letter-spacing: .3px;
}

.cot-card-clave {
  margin-top: 2px;
  color: #1e293b;
  font-weight: 700;
}

.cot-card-meta {
  margin-top: 4px;
  color: #1e40af;
}

.cot-card-linea-materia {
  margin-top: 1px;
  color: #475569;
  text-transform: none;
}

.cot-price {
  font-size: 17px;
  color: #0f766e;
  font-weight: 700;
  margin: 6px 0 4px;
  line-height: 1.1;
}

.cot-card-controls {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cot-card-controls button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  color: #334155;
  font-weight: 700;
}

.cot-card-controls span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
  color: #fff;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.35);
  font-weight: 700;
  font-size: 13px;
}

.cot-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 10px;
  color: #64748b;
}

.cot-floating-cart {
  position: fixed;
  right: 20px;
  bottom: 90px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
  color: #fff;
  padding: 10px 12px 8px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 2000;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.4);
  animation: cotCartFloat 1.8s ease-in-out infinite;
}

.cot-floating-cart-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cot-floating-cart-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

#cotFloatingCartCount {
  background: #ef4444;
  border-radius: 999px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  animation: cotBadgeBounce 1.5s ease-in-out infinite;
}

.cot-floating-cart i {
  animation: cotCartWiggle 2.2s ease-in-out infinite;
}

@keyframes cotCartFloat {
  0% { transform: translateY(0) scale(1); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.4); }
  50% { transform: translateY(-6px) scale(1.04); box-shadow: 0 18px 36px rgba(29, 78, 216, 0.45); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.4); }
}

@keyframes cotCartWiggle {
  0%, 60%, 100% { transform: rotate(0deg); }
  70% { transform: rotate(-10deg); }
  80% { transform: rotate(10deg); }
  90% { transform: rotate(-6deg); }
}

@keyframes cotBadgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px) scale(1.08); }
}

.cot-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cot-modal {
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  position: relative;
}

.cot-modal-close-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.cot-product-modal {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cot-product-modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.cot-product-modal-header h2 {
  margin: 0;
  color: #0b1f4f;
}

.cot-product-modal-header .cot-modal-close-x {
  position: static;
  flex: 0 0 auto;
}

.cot-product-modal-body {
  overflow: auto;
  padding: 16px;
}

.cot-product-modal-layout {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 14px;
  align-items: start;
}

.cot-product-modal-image-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cot-product-modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cot-product-modal-image-placeholder {
  font-size: 48px;
  color: #94a3b8;
}

.cot-product-modal-info p {
  margin: 0 0 6px;
  font-size: 14px;
}

.cot-product-modal-section {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.cot-product-modal-section h4 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cot-product-modal-section h4 i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
}

.cot-product-modal-section p {
  margin: 0 0 7px;
}

.cot-reformas-panel {
  margin-top: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.cot-reformas-table-wrap {
  max-height: 220px;
  overflow: auto;
}

.cot-reformas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cot-reformas-table th,
.cot-reformas-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid #eff3f8;
}

.cot-reformas-table th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
}

.cot-modal h2 {
  margin: 0 34px 12px 0;
  color: #0b1f4f;
}

.cot-loading-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 5200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease, visibility .3s ease;
}

.cot-loading-backdrop.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cot-loading-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
  animation: cotLoadingPop .35s ease-out;
}

.cot-order-send-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  width: min(760px, calc(100vw - 28px));
  max-height: min(88vh, 840px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
  animation: cotLoadingPop .35s ease-out;
  overflow: auto;
}

.cot-order-send-title {
  color: #0b1f4f;
  font-weight: 800;
  font-size: 18px;
}

.cot-order-send-status {
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
}

.cot-order-send-message {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cot-order-send-email-note {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 10px;
  padding: 10px 12px;
  color: #0c4a6e;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

#cotOrderSendAcceptBtn {
  align-self: flex-end;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cot-loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #dbeafe;
  border-top-color: #1d4ed8;
  animation: cotLoadingSpin .8s linear infinite;
}

.cot-loading-text {
  color: #0b1f4f;
  font-weight: 700;
}

@keyframes cotLoadingSpin {
  to { transform: rotate(360deg); }
}

@keyframes cotLoadingPop {
  0% { transform: translateY(8px) scale(.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.cot-cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  margin-bottom: 10px;
}

.cot-cart-modal {
  width: min(860px, 96vw);
  border: 1px solid #d1d5db;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
  padding: 0;
}

.cot-order-modal {
  width: min(980px, calc(100vw - 24px));
  max-height: 92vh;
  overflow: hidden;
  padding: 0;
  border: 1px solid #dbe3ef;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.cot-order-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cot-order-header h2 {
  margin: 0;
}

.cot-order-header .cot-modal-close-x {
  position: static;
}

.cot-order-body {
  padding: 14px 16px;
  overflow: auto;
  overflow-x: hidden;
  max-height: calc(92vh - 140px);
}

.cot-order-summary {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
  margin-bottom: 12px;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.45;
}

.cot-order-slice {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  margin-bottom: 12px;
}

.cot-order-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.cot-order-choice {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.cot-order-choice label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #1e3a8a;
}

.cot-choice-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cot-choice-buttons button {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  padding: 8px 10px;
}

.cot-choice-buttons button.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.cot-order-panel {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  margin-bottom: 12px;
}

.cot-order-panel h3 {
  margin: 0 0 10px;
  color: #0b1f4f;
}

.cot-order-panel-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cot-order-status {
  font-size: 13px;
  color: #334155;
}

.cot-order-status.ok {
  color: #047857;
  font-weight: 700;
}

.cot-order-status.error {
  color: #b91c1c;
  font-weight: 700;
}

.cot-form-section {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  margin-bottom: 12px;
  overflow-x: hidden;
}

.cot-form-section h3 {
  margin: 0 0 10px;
  color: #0b1f4f;
}

.cot-section-help {
  margin: -2px 0 10px;
  color: #475569;
  font-size: 13px;
}

.cot-form-grid {
  display: grid;
  gap: 10px;
}

.cot-form-grid > * {
  min-width: 0;
}

.cot-form-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cot-form-grid.one-col {
  grid-template-columns: 1fr;
}

.cot-form-grid.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cot-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #334155;
  font-size: 14px;
}

.cot-form-grid label.full-row {
  grid-column: 1 / -1;
}

.cot-form-grid input,
.cot-form-grid select,
.cot-form-grid textarea {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.cot-inline-check {
  min-height: 42px;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.cot-order-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cot-order-step-label {
  margin-right: 0;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 7px 12px;
}

.cot-order-footer button {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.cot-order-footer button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.cot-order-footer button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#cotOrderPrevBtn {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

#cotOrderSubmitBtn {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#cotOrderNextBtn {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

#cotOrderCancelBtn {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b91c1c;
}

.cot-cart-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #ffffff;
  padding: 16px 16px 8px;
  border-bottom: 1px solid #e5e7eb;
}

.cot-cart-modal h2 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cot-cart-modal-list {
  flex: 1;
  overflow: auto;
  padding: 10px 16px;
}

.cot-cart-modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 10px 16px 14px;
}

.cot-cart-item strong {
  font-size: 15px;
  color: #0f172a;
}

.cot-cart-item-prices {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 14px;
  color: #334155;
}

.cot-cart-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cot-cart-old-price {
  text-decoration: line-through;
  color: #64748b;
  margin-right: 2px;
}

.cot-cart-code {
  font-weight: 700;
  color: #1e293b;
}

.cot-cart-formula {
  color: #1e3a8a;
  font-weight: 700;
}

.cot-cart-formula-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.cot-cart-subtotal {
  color: #0f766e;
  font-weight: 800;
}

.cot-cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cot-cart-item-actions button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.cot-cart-item-actions button[data-cart-action="remove"] {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}

.cot-cart-item-actions button[data-cart-action="remove"] i {
  color: #dc2626;
}

.cot-cart-total {
  text-align: right;
  font-size: 24px;
  font-weight: 800;
  margin: 2px 0 6px;
  color: #0f172a;
}

.cot-orientativo {
  margin: 0 0 14px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
}

.cot-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

#cotCartOrderBtn {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#cotCartCloseBtn {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

.cot-summary-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0f172a;
  color: #fff;
  padding: 10px 18px 12px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  z-index: 1800;
}

.cot-summary-content {
  width: 100%;
}

.cot-summary-line {
  font-size: 14px;
  line-height: 1.4;
}

.cot-discount-progress-wrap {
  position: relative;
  width: calc(100% - 22px);
  margin: 8px auto;
  padding: 13px 0 16px;
  min-height: 66px;
}

.cot-discount-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.cot-discount-progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, #22c55e, #3b82f6);
  border-radius: 999px;
  transition: width .25s ease;
}

.cot-discount-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  min-width: 68px;
}

.cot-discount-point-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto;
  border: 2px solid #94a3b8;
  background: #0f172a;
}

.cot-discount-point.is-reached .cot-discount-point-dot {
  border-color: #22c55e;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.cot-discount-point-amount {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cot-discount-point-percent {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cot-discount-point.is-reached .cot-discount-point-amount,
.cot-discount-point.is-reached .cot-discount-point-percent {
  color: #dcfce7;
}

.cot-discount-toast {
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translate(-50%, -16px) scale(0.86);
  background: radial-gradient(circle at top, #fef08a, #f97316);
  color: #111827;
  border: 3px solid #fde047;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .4px;
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.55);
  z-index: 5000;
  opacity: 0;
  pointer-events: none;
}

.cot-discount-toast.is-showing {
  animation: cotDiscountToastPop 1.7s ease forwards;
}

@keyframes cotDiscountToastPop {
  0% { opacity: 0; transform: translate(-50%, -16px) scale(0.86); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  65% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(0.96); }
}

.cot-discount-table {
  width: 100%;
  border-collapse: collapse;
}

.cot-discount-table th,
.cot-discount-table td {
  border: 1px solid #e2e8f0;
  padding: 8px;
  text-align: left;
}

@media (max-width: 820px) {
  .cot-modal-backdrop {
    padding: 10px;
  }

  .cot-order-modal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .cot-top {
    grid-template-columns: 1fr auto;
    align-items: flex-start;
  }

  .cot-top h1 {
    text-align: center;
    width: auto;
    min-width: 0;
    margin: 0;
    font-size: clamp(24px, 5vw, 36px);
    justify-self: stretch;
    line-height: 1.05;
  }

  .cot-logo {
    width: 138px;
    min-width: 138px;
    max-width: 138px;
    height: 94px;
    min-height: 94px;
    max-height: 94px;
  }

  .cot-help {
    max-width: 100%;
  }

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

  .cot-summary-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .cot-discount-progress-wrap {
    width: calc(100% - 14px);
    margin: 8px auto;
    padding: 12px 0 15px;
    min-height: 62px;
  }

  .cot-discount-point {
    min-width: 56px;
  }

  .cot-discount-point-amount,
  .cot-discount-point-percent {
    font-size: 10px;
  }

  .cot-discount-toast {
    top: 14px;
    width: calc(100% - 30px);
    font-size: 18px;
    text-align: center;
    padding: 12px 14px;
  }

  .cot-floating-cart {
    right: 16px;
  }

  .cot-cards-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cot-cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .cot-order-top-grid,
  .cot-form-grid.two-cols,
  .cot-form-grid.three-cols {
    grid-template-columns: 1fr;
  }

  .cot-order-body {
    padding: 12px;
    overflow-x: hidden;
  }

  .cot-form-section {
    padding: 10px;
  }

  .cot-order-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px 12px;
  }

  .cot-order-footer button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .cot-order-send-card {
    width: calc(100vw - 20px);
    max-height: 90vh;
    padding: 14px;
  }


  .cot-order-step-label {
    width: auto;
    margin-right: 0;
  }

  .cot-cart-item-actions {
    justify-content: center;
    align-self: center;
  }

  .cot-cart-item-prices {
    gap: 3px;
    font-size: 13px;
  }

  .cot-card {
    padding: 7px;
  }

  .cot-card-image-wrap {
    height: 90px;
  }

  .cot-product-modal-layout {
    grid-template-columns: 1fr;
  }
}
