/* =========================================================
   ADADP 10.11 - carrito: jerarquía final y CTA coherente
   ========================================================= */

/* Título CARRITO más grande, con icono discreto */
body#cart .cart-grid-body h1,
body#cart h1.h1,
body.page-cart .cart-grid-body h1,
body.page-cart h1.h1 {
  color: #0B4F8A !important;
  font-size: 32px !important;
  line-height: 1.15 !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
}

.adadp-cart-title-icon-v111 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  color: #0B4F8A !important;
  font-size: 27px !important;
  line-height: 1 !important;
}

/* Aviso inferior */
.adadp-cart-note-v111 {
  display: block !important;
  width: calc(100% - 36px) !important;
  max-width: 760px !important;
  margin: 14px 18px 20px !important;
  padding: 12px 18px !important;
  box-sizing: border-box !important;
  background: #25B9D7 !important;
  color: #FFFFFF !important;
  border: 0 !important;
  border-radius: 4px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  box-shadow: 0 4px 12px rgba(37, 185, 215, .25) !important;
}

/* Texto derecho */
.adadp-cart-auto-v111 {
  display: block !important;
  margin: 2px 0 13px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #0B4F8A !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

/* Ocultar restos de versiones anteriores */
body#cart [class*="adadp-cart-note-v10"]:not(.adadp-cart-note-v111),
body#cart [class*="adadp-cart-auto-v10"]:not(.adadp-cart-auto-v111),
body#cart .adadp-continue-v106,
body#cart .adadp-continue-v107,
body#cart .adadp-cart-edit-hint,
body#cart .adadp-cart-secondary-actions,
body#cart .adadp-cart-hint-v106,
body.page-cart [class*="adadp-cart-note-v10"]:not(.adadp-cart-note-v111),
body.page-cart [class*="adadp-cart-auto-v10"]:not(.adadp-cart-auto-v111),
body.page-cart .adadp-continue-v106,
body.page-cart .adadp-continue-v107,
body.page-cart .adadp-cart-edit-hint,
body.page-cart .adadp-cart-secondary-actions,
body.page-cart .adadp-cart-hint-v106 {
  display: none !important;
}

/* Selector horizontal */
body#cart .bootstrap-touchspin,
body.page-cart .bootstrap-touchspin {
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: stretch !important;
  overflow: hidden !important;
  border-radius: 3px !important;
}

body#cart .bootstrap-touchspin input.form-control,
body#cart .bootstrap-touchspin input.js-cart-line-product-quantity,
body.page-cart .bootstrap-touchspin input.form-control,
body.page-cart .bootstrap-touchspin input.js-cart-line-product-quantity {
  order: 2 !important;
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  border: 1px solid #0B4F8A !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  color: #111111 !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

body#cart .bootstrap-touchspin .bootstrap-touchspin-down,
body#cart .bootstrap-touchspin .bootstrap-touchspin-up,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up {
  position: static !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0B4F8A !important;
  color: #FFFFFF !important;
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

body#cart .bootstrap-touchspin .bootstrap-touchspin-down,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down {
  order: 1 !important;
}

body#cart .bootstrap-touchspin .bootstrap-touchspin-up,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up {
  order: 3 !important;
}

body#cart .bootstrap-touchspin .bootstrap-touchspin-down:hover,
body#cart .bootstrap-touchspin .bootstrap-touchspin-up:hover,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down:hover,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up:hover {
  background: #078FD6 !important;
}

body#cart .bootstrap-touchspin .input-group-btn-vertical,
body.page-cart .bootstrap-touchspin .input-group-btn-vertical {
  display: contents !important;
}

/* Dar más separación visual entre selector y precio */
body#cart .cart-item .product-price,
body#cart .cart-item .current-price,
body#cart .cart-item .product-line-info.product-price,
body#cart .product-line-grid-right .product-price,
body.page-cart .cart-item .product-price,
body.page-cart .cart-item .current-price,
body.page-cart .product-line-grid-right .product-price {
  margin-left: 28px !important;
}

/* Cuando precio y cantidad comparten flex, empujar el precio hacia la derecha */
body#cart .product-line-grid-right,
body.page-cart .product-line-grid-right {
  column-gap: 22px !important;
}

body#cart .product-line-grid-right .cart-line-product-actions,
body.page-cart .product-line-grid-right .cart-line-product-actions {
  margin-left: 18px !important;
}

/* FINALIZAR COMPRA: misma presencia visual que el aviso inferior */
body#cart .cart-detailed-actions .btn-primary,
body#cart .checkout .btn-primary,
body#cart a[href*="order"].btn-primary,
body.page-cart .cart-detailed-actions .btn-primary,
body.page-cart .checkout .btn-primary,
body.page-cart a[href*="order"].btn-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 50px !important;
  padding: 12px 18px !important;
  box-sizing: border-box !important;

  background: #0B4F8A !important;
  color: #FFFFFF !important;
  border: 0 !important;
  border-radius: 4px !important;

  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: center !important;

  box-shadow: 0 4px 12px rgba(11, 79, 138, .28) !important;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease !important;
}

body#cart .cart-detailed-actions .btn-primary:hover,
body#cart .checkout .btn-primary:hover,
body#cart a[href*="order"].btn-primary:hover,
body.page-cart .cart-detailed-actions .btn-primary:hover,
body.page-cart .checkout .btn-primary:hover,
body.page-cart a[href*="order"].btn-primary:hover {
  background: #078FD6 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(7, 143, 214, .30) !important;
}

/* Papelera */
body#cart .remove-from-cart,
body#cart [data-link-action="delete-from-cart"],
body.page-cart .remove-from-cart,
body.page-cart [data-link-action="delete-from-cart"] {
  color: #0B4F8A !important;
  opacity: 1 !important;
}

@media (max-width: 767px) {
  body#cart .cart-grid-body h1,
  body#cart h1.h1,
  body.page-cart .cart-grid-body h1,
  body.page-cart h1.h1 {
    font-size: 27px !important;
  }

  .adadp-cart-note-v111 {
    width: calc(100% - 20px) !important;
    margin: 12px 10px 18px !important;
    padding: 11px 12px !important;
    font-size: 14px !important;
  }

  .adadp-cart-auto-v111 {
    font-size: 13px !important;
  }
}


/* =========================================================
   ADADP 10.36 - cantidades sin parpadeo
   ========================================================= */
body#cart .bootstrap-touchspin .bootstrap-touchspin-down,
body#cart .bootstrap-touchspin .bootstrap-touchspin-up,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up {
  font-size: 0 !important;
  line-height: 42px !important;
  transition: background-color .12s ease !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body#cart .bootstrap-touchspin .bootstrap-touchspin-down::before,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down::before {
  content: "−";
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #FFFFFF !important;
}

body#cart .bootstrap-touchspin .bootstrap-touchspin-up::before,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up::before {
  content: "+";
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #FFFFFF !important;
}

body#cart .bootstrap-touchspin .bootstrap-touchspin-down > *,
body#cart .bootstrap-touchspin .bootstrap-touchspin-up > *,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down > *,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up > * {
  display: none !important;
}

/* Evita cambios visuales de opacidad durante la petición AJAX. */
body#cart .cart-overview,
body#cart .cart-item,
body#cart .product-line-grid,
body#cart .bootstrap-touchspin,
body.page-cart .cart-overview,
body.page-cart .cart-item,
body.page-cart .product-line-grid,
body.page-cart .bootstrap-touchspin {
  opacity: 1 !important;
}


/* =========================================================
   ADADP 10.37 - actualización del carrito sin destello
   ========================================================= */
body#cart .adadp-cart-refresh-ghost,
body.page-cart .adadp-cart-refresh-ghost {
  position: fixed !important;
  z-index: 1200 !important;
  margin: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

body#cart .adadp-cart-refresh-ghost *,
body.page-cart .adadp-cart-refresh-ghost * {
  animation: none !important;
  transition: none !important;
}

body#cart .adadp-cart-refresh-ghost input,
body.page-cart .adadp-cart-refresh-ghost input {
  caret-color: transparent !important;
}


/* =========================================================
   ADADP 10.68 - carrito: toda la superficie de +/- clicable
   Sin modificar tamaño, posición ni aspecto de v10.66.
   ========================================================= */
body#cart .bootstrap-touchspin .bootstrap-touchspin-down,
body#cart .bootstrap-touchspin .bootstrap-touchspin-up,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up {
  position: relative !important;
  z-index: 5 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

/* Cualquier elemento interno deja pasar el clic al botón real. */
body#cart .bootstrap-touchspin .bootstrap-touchspin-down > *,
body#cart .bootstrap-touchspin .bootstrap-touchspin-up > *,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down > *,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up > * {
  pointer-events: none !important;
}

/* Capa transparente que cubre exactamente el área visual existente. */
body#cart .bootstrap-touchspin .bootstrap-touchspin-down::after,
body#cart .bootstrap-touchspin .bootstrap-touchspin-up::after,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-down::after,
body.page-cart .bootstrap-touchspin .bootstrap-touchspin-up::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 10 !important;
  pointer-events: auto !important;
  background: transparent !important;
}

/* =========================================================
   ADADP 11.75 - donativo voluntario en la cesta
   ========================================================= */
body#cart .adadp-donation-v115,
body.page-cart .adadp-donation-v115 {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 16px !important;
  padding: 18px 18px 16px !important;
  background: #f8fbfe !important;
  border: 1px solid #dce8f3 !important;
  border-radius: 5px !important;
  box-shadow: 0 3px 12px rgba(11, 79, 138, .07) !important;
  color: #202020 !important;
}

body#cart .adadp-donation-v115__title,
body.page-cart .adadp-donation-v115__title {
  margin: 0 0 6px !important;
  color: #0B4F8A !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
}

body#cart .adadp-donation-v115__intro,
body.page-cart .adadp-donation-v115__intro {
  margin: 0 0 12px !important;
  color: #4f6375 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

body#cart .adadp-donation-v115__current,
body.page-cart .adadp-donation-v115__current {
  margin: 0 0 11px !important;
  padding: 8px 10px !important;
  background: #eef6ff !important;
  border-radius: 4px !important;
  color: #0B4F8A !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

body#cart .adadp-donation-v115__form,
body.page-cart .adadp-donation-v115__form {
  margin: 0 !important;
}

body#cart .adadp-donation-v115__label,
body.page-cart .adadp-donation-v115__label {
  display: block !important;
  margin: 0 0 6px !important;
  color: #24415f !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
}

body#cart .adadp-donation-v115__controls,
body.page-cart .adadp-donation-v115__controls {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  flex-wrap: wrap !important;
}

body#cart .adadp-donation-v115__amount,
body.page-cart .adadp-donation-v115__amount {
  display: flex !important;
  align-items: center !important;
  width: 130px !important;
  height: 42px !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1px solid #cfdbe7 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

body#cart .adadp-donation-v115__input,
body.page-cart .adadp-donation-v115__input {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 90px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #202020 !important;
  font-size: 15px !important;
  line-height: 40px !important;
}

body#cart .adadp-donation-v115__input:focus,
body.page-cart .adadp-donation-v115__input:focus {
  box-shadow: inset 0 0 0 2px rgba(7, 143, 214, .18) !important;
}

body#cart .adadp-donation-v115__currency,
body.page-cart .adadp-donation-v115__currency {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 40px !important;
  color: #0B4F8A !important;
  background: #eef6ff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

body#cart .adadp-donation-v115__button,
body.page-cart .adadp-donation-v115__button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 15px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #0B4F8A !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  text-transform: none !important;
  cursor: pointer !important;
}

body#cart .adadp-donation-v115__button:hover,
body#cart .adadp-donation-v115__button:focus,
body.page-cart .adadp-donation-v115__button:hover,
body.page-cart .adadp-donation-v115__button:focus {
  background: #078FD6 !important;
  color: #ffffff !important;
}

body#cart .adadp-donation-v115__button:disabled,
body.page-cart .adadp-donation-v115__button:disabled,
body#cart .adadp-donation-v115__remove:disabled,
body.page-cart .adadp-donation-v115__remove:disabled {
  opacity: .65 !important;
  cursor: wait !important;
}

body#cart .adadp-donation-v115__help,
body.page-cart .adadp-donation-v115__help {
  margin: 7px 0 0 !important;
  color: #6d7a86 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body#cart .adadp-donation-v115__status,
body.page-cart .adadp-donation-v115__status {
  min-height: 0 !important;
  margin: 6px 0 0 !important;
  color: #4f6375 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body#cart .adadp-donation-v115__status:empty,
body.page-cart .adadp-donation-v115__status:empty {
  display: none !important;
}

body#cart .adadp-donation-v115__status--error,
body.page-cart .adadp-donation-v115__status--error {
  display: block !important;
  color: #b42318 !important;
  font-weight: 600 !important;
}

body#cart .adadp-donation-v115__remove,
body.page-cart .adadp-donation-v115__remove {
  display: inline-block !important;
  margin: 9px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0B4F8A !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
}

/* El donativo sigue siendo una línea real del pedido, pero no permitimos
   cambiar su cantidad: se modifica exclusivamente desde el bloque de donativo. */
body#cart .adadp-donation-product-line-v115 .bootstrap-touchspin,
body#cart .adadp-donation-product-line-v115 .js-cart-line-product-quantity,
body.page-cart .adadp-donation-product-line-v115 .bootstrap-touchspin,
body.page-cart .adadp-donation-product-line-v115 .js-cart-line-product-quantity {
  display: none !important;
}

body#cart .adadp-donation-product-line-v115 .remove-from-cart,
body.page-cart .adadp-donation-product-line-v115 .remove-from-cart {
  display: none !important;
}

body#cart .adadp-donation-line-label-v115,
body.page-cart .adadp-donation-line-label-v115 {
  display: block !important;
  margin-top: 4px !important;
  color: #5f7182 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
}

@media (max-width: 767px) {
  body#cart .adadp-donation-v115,
  body.page-cart .adadp-donation-v115 {
    padding: 16px 14px 14px !important;
  }

  body#cart .adadp-donation-v115__controls,
  body.page-cart .adadp-donation-v115__controls {
    display: grid !important;
    grid-template-columns: 116px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  body#cart .adadp-donation-v115__amount,
  body.page-cart .adadp-donation-v115__amount {
    width: 116px !important;
  }

  body#cart .adadp-donation-v115__button,
  body.page-cart .adadp-donation-v115__button {
    width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* =========================================================
   ADADP 11.80 - donativo integrado junto a FINALIZAR COMPRA
   ========================================================= */
body#cart .cart-grid-right .adadp-donation-v115,
body.page-cart .cart-grid-right .adadp-donation-v115 {
  margin: 0 0 14px !important;
  padding: 15px 14px 13px !important;
  background: #f8fbfe !important;
}

body#cart .cart-grid-right .adadp-donation-v115__title,
body.page-cart .cart-grid-right .adadp-donation-v115__title {
  font-size: 17px !important;
  text-align: left !important;
}

body#cart .cart-grid-right .adadp-donation-v115__intro,
body.page-cart .cart-grid-right .adadp-donation-v115__intro {
  font-size: 13px !important;
  text-align: left !important;
}

body#cart .cart-grid-right .adadp-donation-v115__label,
body.page-cart .cart-grid-right .adadp-donation-v115__label,
body#cart .cart-grid-right .adadp-donation-v115__help,
body.page-cart .cart-grid-right .adadp-donation-v115__help,
body#cart .cart-grid-right .adadp-donation-v115__status,
body.page-cart .cart-grid-right .adadp-donation-v115__status {
  text-align: left !important;
}

body#cart .cart-grid-right .adadp-donation-v115__controls,
body.page-cart .cart-grid-right .adadp-donation-v115__controls {
  display: grid !important;
  grid-template-columns: 105px minmax(0, 1fr) !important;
  gap: 8px !important;
}

body#cart .cart-grid-right .adadp-donation-v115__amount,
body.page-cart .cart-grid-right .adadp-donation-v115__amount {
  width: 105px !important;
}

body#cart .cart-grid-right .adadp-donation-v115__button,
body.page-cart .cart-grid-right .adadp-donation-v115__button {
  width: 100% !important;
  min-width: 0 !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

@media (max-width: 991px) {
  body#cart .cart-grid-right .adadp-donation-v115__controls,
  body.page-cart .cart-grid-right .adadp-donation-v115__controls {
    grid-template-columns: 120px minmax(0, 1fr) !important;
  }
  body#cart .cart-grid-right .adadp-donation-v115__amount,
  body.page-cart .cart-grid-right .adadp-donation-v115__amount {
    width: 120px !important;
  }
}
