/* =========================================================================
   Carrito de Cotización OTR (Request for Quote)
   ========================================================================= */

/* ---------- Botón "Agregar a cotización" (card + single) ---------- */
.otrcart-action {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: stretch;
}

.otrcart-action--card {
  margin-top: 8px;
}

.otrcart-action--large {
  margin-top: 12px;
}

.otrcart-add {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: #14304a;
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}

.otrcart-add:hover {
  background: #1e496f;
}

.otrcart-add:active {
  transform: scale(.985);
}

.otrcart-add.is-added {
  background: #1f7a4d;
  pointer-events: none;
}

.otrcart-action--large .otrcart-add {
  padding: 16px 18px;
  font-size: 15px;
}

/* ---------- Selector de cantidad inline (en single OTR) ---------- */
.otrcart-action__qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.otrcart-qty__btn {
  width: 36px;
  border: 0;
  background: #f4f6fa;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-weight: 600;
  color: #14304a;
}

.otrcart-qty__btn:hover {
  background: #e7ecf3;
}

.otrcart-qty__input {
  width: 50px;
  border: 0;
  text-align: center;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #14304a;
  outline: none;
  -moz-appearance: textfield;
}

.otrcart-qty__input::-webkit-outer-spin-button,
.otrcart-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- Floating Action Button (FAB) ---------- */
.otrcart-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #14304a;
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(20, 48, 74, .30);
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: transform .15s ease, background-color .15s ease;
}

.otrcart-fab:hover {
  background: #1e496f;
  transform: translateY(-1px);
}

.otrcart-fab i {
  font-size: 16px;
}

.otrcart-fab__label {
  display: inline-block;
}

.otrcart-fab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e94e3a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.otrcart-fab:not(.has-items) .otrcart-fab__badge {
  display: none;
}

.otrcart-fab.bump {
  animation: otrcart-bump .35s ease;
}

@keyframes otrcart-bump {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.12);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .otrcart-fab {
    right: 12px;
    bottom: 76px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .otrcart-fab__label {
    display: none;
  }
}

/* ---------- Drawer ---------- */
.otrcart-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.otrcart-drawer[aria-hidden="false"] {
  pointer-events: auto;
}

.otrcart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 29, 45, .55);
  opacity: 0;
  transition: opacity .25s ease;
}

.otrcart-drawer[aria-hidden="false"] .otrcart-drawer__backdrop {
  opacity: 1;
}

.otrcart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .18);
  font-family: 'Rubik', sans-serif;
}

.otrcart-drawer[aria-hidden="false"] .otrcart-drawer__panel {
  transform: translateX(0);
}

.otrcart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #eef1f5;
}

.otrcart-drawer__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #14304a;
}

.otrcart-drawer__title i {
  color: #1e496f;
}

.otrcart-drawer__close {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f4f6fa;
  color: #14304a;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

.otrcart-drawer__close:hover {
  background: #e7ecf3;
}

.otrcart-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 22px;
}

.otrcart-drawer__foot {
  border-top: 1px solid #eef1f5;
  padding: 14px 22px 22px;
  background: #fafbfc;
}

.otrcart-drawer__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12.5px;
  color: #54627a;
}

.otrcart-drawer__actions {
  display: flex;
  gap: 10px;
}

/* ---------- Botones genéricos del carrito ---------- */
.otrcart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.otrcart-btn--primary {
  background: #14304a;
  color: #fff;
  flex: 1 1 auto;
}

.otrcart-btn--primary:hover {
  background: #1e496f;
  color: #fff;
}

.otrcart-btn--ghost {
  background: #fff;
  color: #54627a;
  border-color: #d8dde6;
}

.otrcart-btn--ghost:hover {
  background: #f4f6fa;
  color: #14304a;
}

.otrcart-btn--xl {
  padding: 16px 22px;
  font-size: 15px;
}

/* ---------- Lista de items ---------- */
.otrcart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.otrcart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  background: #fff;
  position: relative;
}

.otrcart-item__media {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f6fa;
  display: block;
}

.otrcart-item__img,
.otrcart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.otrcart-item__body {
  flex: 1 1 auto;
  min-width: 0;
}

.otrcart-item__title {
  display: block;
  font-size: 13.5px;
  color: #14304a;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.otrcart-item__title:hover {
  color: #1e496f;
}

.otrcart-item__qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d8dde6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.otrcart-item__qty .otrcart-qty__btn {
  width: 28px;
  font-size: 14px;
}

.otrcart-item__qty .otrcart-qty__input {
  width: 42px;
  font-size: 13px;
  padding: 4px 0;
}

.otrcart-item__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #a3aab8;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
}

.otrcart-item__remove:hover {
  background: #fbe7e3;
  color: #c0392b;
}

/* ---------- Estado vacío ---------- */
.otrcart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 12px;
  color: #54627a;
}

.otrcart-empty__icon {
  font-size: 42px;
  color: #c8d0dc;
  margin-bottom: 14px;
}

.otrcart-empty p {
  margin: 0 0 18px;
  font-size: 14.5px;
}

/* ---------- Página /cotizacion/ ---------- */
.otrcart-page {
  font-family: 'Rubik', sans-serif;
  max-width: 860px;
  margin: 40px auto;
  padding: 0 20px;
}

.otrcart-page__items {
  margin-bottom: 30px;
}

.otrcart-page .otrcart-list {
  gap: 14px;
}

.otrcart-page .otrcart-item {
  padding: 16px;
}

.otrcart-page .otrcart-item__media {
  flex-basis: 86px;
  width: 86px;
  height: 86px;
}

.otrcart-page .otrcart-item__title {
  font-size: 15px;
}

.otrcart-form {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 12px;
  padding: 28px;
}

.otrcart-form__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #14304a;
}

.otrcart-form__lead {
  margin: 0 0 22px;
  font-size: 14px;
  color: #54627a;
}

.otrcart-form__hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.otrcart-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.otrcart-form__field {
  display: flex;
  flex-direction: column;
}

.otrcart-form__field label {
  font-size: 13px;
  font-weight: 600;
  color: #14304a;
  margin-bottom: 6px;
}

.otrcart-form__field input,
.otrcart-form__field textarea {
  border: 1px solid #d8dde6;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  font-family: 'Rubik', sans-serif;
  color: #14304a;
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.otrcart-form__field input:focus,
.otrcart-form__field textarea:focus {
  border-color: #1e496f;
  box-shadow: 0 0 0 3px rgba(30, 73, 111, .12);
}

.otrcart-form__req {
  color: #c0392b;
}

.otrcart-form__actions {
  margin-top: 22px;
}

.otrcart-form__feedback {
  margin-top: 14px;
  font-size: 14px;
}

.otrcart-form__feedback.is-success {
  color: #1f7a4d;
}

.otrcart-form__feedback.is-error {
  color: #c0392b;
}

@media (max-width: 640px) {
  .otrcart-form {
    padding: 20px;
  }

  .otrcart-form__row {
    grid-template-columns: 1fr;
  }

  .otrcart-drawer__panel {
    width: 100%;
  }
}