.af-cotizador,
.af-cotizador * {
  font-family: inherit !important;
  box-sizing: border-box;
}

.af-cotizador {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border: 2px solid #004080;
  border-radius: 14px;
  padding: clamp(12px, 3vw, 22px);
  color: #0a2540;
}

.af-cotizador__title {
  margin: 0 0 8px;
  text-align: center;
  color: #004080;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 900;
}

.af-cotizador__intro {
  text-align: center;
  color: #6c757d;
  margin: 0 0 16px;
  line-height: 1.45;
}

.af-cotizador__section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.af-cotizador__section h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #004080;
}

.af-cotizador__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
}

.af-cot-span2 {
  grid-column: 1 / -1;
}

.af-cot-f {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid #dae1e5;
  border-radius: 10px;
  min-height: 44px;
}

.af-cotizador__check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.af-cotizador__line {
  border: 1px solid #dae1e5;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fafafa;
}

.af-cotizador__line-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem auto;
  gap: 12px 16px;
  align-items: start;
  margin-bottom: 8px;
}

.af-cot-line-col--search {
  min-width: 0;
}

.af-cot-line-col--qty .af-cot-qty-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #0a2540;
}

.af-cot-line-col--qty .af-cot-qty-label-t {
  line-height: 1.2;
}

.af-cot-line-col--qty .af-cot-qty {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 10px 10px;
  border: 1px solid #dae1e5;
  border-radius: 10px;
  min-height: 44px;
}

.af-cot-line-col--actions {
  align-self: end;
  padding-bottom: 2px;
}

@media (max-width: 560px) {
  .af-cotizador__line-head {
    grid-template-columns: 1fr;
  }
  .af-cot-line-col--actions {
    justify-self: start;
  }
}

.af-cot-search {
  flex: 1 1 200px;
  position: relative;
}

.af-cot-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dae1e5;
}

.af-cot-suggest {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #dae1e5;
  border-radius: 10px;
  max-height: 320px;
  overflow: auto;
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.12);
}

.af-cot-suggest li {
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid #eef2f7;
}

.af-cot-suggest li:last-child {
  border-bottom: none;
}

.af-cot-suggest__row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.af-cot-suggest__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #f1f5f9;
}

.af-cot-suggest__thumb--ph {
  display: inline-block;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.af-cot-suggest__meta {
  flex: 1;
  min-width: 0;
}

.af-cot-suggest__name {
  display: block;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  word-wrap: break-word;
}

.af-cot-suggest__price {
  display: block;
  margin-top: 3px;
  font-weight: 800;
  color: #0369a1;
  font-size: 0.95rem;
}

.af-cot-suggest li:hover .af-cot-suggest__row,
.af-cot-suggest li.is-active .af-cot-suggest__row {
  background: rgba(0, 64, 128, 0.07);
}

.af-cotizador__section--products {
  overflow: visible;
}

.af-cot-picker {
  position: relative;
  z-index: 3;
  margin-bottom: 12px;
}

.af-cot-picker__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px 12px;
}

.af-cot-picker__search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.af-cot-picker__search .af-cot-f {
  margin-top: 0;
}

.af-cot-picker .af-cot-add-product {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 44px;
}

@media (max-width: 480px) {
  .af-cot-picker__row {
    flex-wrap: wrap;
  }

  .af-cot-picker .af-cot-add-product {
    flex: 1 1 100%;
    width: 100%;
  }
}

.af-cot-suggest--global {
  z-index: 40;
}

.af-cot-picker__extra {
  margin-top: 10px;
}

.af-cot-cart-heading {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #004080;
}

.af-cot-cart-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.af-cot-cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 5.5rem auto;
  gap: 12px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dae1e5;
  border-radius: 12px;
  background: #fafafa;
}

.af-cot-cart-item__img img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: block;
  background: #f1f5f9;
}

.af-cot-cart-item__ph {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  border: 1px solid #e2e8f0;
}

.af-cot-cart-item__name {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  word-wrap: break-word;
}

.af-cot-cart-item__meta {
  margin-top: 4px;
  font-size: 0.88rem;
  color: #475569;
}

.af-cot-cart-item__sku {
  margin-left: 6px;
  font-size: 0.8rem;
  color: #64748b;
}

.af-cot-cart-item__qtyl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0a2540;
}

.af-cot-cart-item__qtyl input {
  width: 100%;
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid #dae1e5;
  border-radius: 10px;
  min-height: 44px;
}

.af-cot-cart-remove {
  align-self: center;
}

@media (max-width: 560px) {
  .af-cot-cart-item {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .af-cot-cart-item__img {
    grid-row: 1 / span 2;
  }

  .af-cot-cart-item__qtyl {
    grid-column: 2;
  }

  .af-cot-cart-remove {
    grid-column: 2;
    justify-self: start;
  }
}

.af-cot-live-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
  display: inline-block;
  background: #f1f5f9;
}

.af-cot-live-thumb-ph {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}

.af-cot-pick {
  margin-top: 8px;
}

.af-cot-pick__row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.af-cot-pick__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #f1f5f9;
}

.af-cot-pick__thumb--ph {
  display: inline-block;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.af-cot-pick__name {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  word-wrap: break-word;
}

.af-cot-pick__price {
  margin-top: 4px;
  font-weight: 800;
  color: #0369a1;
  font-size: 1rem;
}


.af-cotizador__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  background: #004080;
  color: #fff;
}

.af-cotizador__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.af-cotizador__btn--secondary {
  background: #0ea5e9;
  color: #fff;
}

.af-cot-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.af-cot-result__head {
  margin-bottom: 10px;
  color: #78350f;
}

.af-cot-result__pdf {
  width: 100%;
  min-height: 560px;
  height: 82vh;
  max-height: 1200px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 12px;
  display: block;
}

.af-cot-live-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.af-cot-live-summary__title {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #004080;
}

.af-cot-live-summary__inner table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.af-cot-live-summary__inner th,
.af-cot-live-summary__inner td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.af-cot-live-summary__inner th {
  background: #004080;
  color: #fff;
  font-weight: 700;
}

.af-cot-live-summary__inner .af-cot-live-num {
  text-align: right;
  white-space: nowrap;
}

.af-cot-live-summary__inner .af-cot-live-totals th {
  background: #0f172a;
}

.af-cot-live-summary__inner small {
  display: block;
  color: #475569;
  font-size: 0.78rem;
  margin-top: 2px;
}

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

.af-cotizador__btn--pdf {
  background: #0f172a;
  color: #fff !important;
  text-decoration: none !important;
}

.af-cotizador__btn--woo {
  background: #0369a1;
  color: #fff !important;
  text-decoration: none !important;
  border: 2px solid #0c4a6e;
}

.af-cotizador__btn--stripe {
  background: #635bff;
  color: #fff !important;
  text-decoration: none !important;
}

.af-cot-remove {
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.af-cotizador__msg {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.af-cotizador__msg.is-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.af-cot-var-wrap {
  margin-top: 8px;
}

.af-cot-var-wrap select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dae1e5;
}

@media (max-width: 560px) {
  .af-cotizador__line-head {
    flex-direction: column;
    align-items: stretch;
  }
  .af-cot-qty {
    width: 100%;
  }
}
