.eae-box {
  border: 1px solid #ddd;
  padding: 16px;
  margin: 16px 0;
  border-radius: 8px;
  background: #fafafa;
}

.eae-title {
  margin: 0 0 16px;
  font-size: 18px;
}

.eae-general-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.eae-general-option {
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  color: #111827;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.eae-general-option.is-active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.eae-group.is-eae-hidden {
  display: none;
}

.eae-group {
  margin-bottom: 20px;
}

.eae-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.eae-group-title {
  margin-bottom: 0;
  font-weight: 700;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.4;
  display: flow-root;
}

.eae-group-title__label {
  float: left;
  margin-right: 0;
}

.eae-selected-text {
  display: block;
  overflow: hidden;
  font-weight: 400;
  color: #333;
  min-width: 0;
}

.eae-selected-text:not(:empty)::before {
  content: "\00a0:\00a0";
  white-space: nowrap;
}

.eae-help-button {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 0;
  border-radius: 999px;
  background: #6b7280;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 2px;
  box-shadow: 0 0 0 0 rgba(107, 114, 128, 0.12);
  animation: eae-help-pulse 3.6s ease-in-out infinite;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0.88;
}

.eae-help-button:hover,
.eae-help-button:focus {
  background: #4b5563;
  transform: scale(1.02);
  outline: none;
  opacity: 1;
}

.eae-help-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

@keyframes eae-help-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(107, 114, 128, 0.1);
  }

  40% {
    transform: scale(1.025);
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(107, 114, 128, 0);
  }
}

.eae-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.eae-cards.eae-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.eae-card {
  display: block;
  width: 180px;
  cursor: pointer;
  margin: 0;
}

.eae-radio {
  display: none;
}

.eae-card-inner {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 100%;
}

.eae-card:hover .eae-card-inner {
  border-color: #999;
}

.eae-radio:checked + .eae-card-inner {
  border-color: #007bff;
  background: #f7fbff;
}

.eae-card-image {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 10px;
}

.eae-card-noimage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
  background: #f0f0f0;
  color: #666;
  font-size: 13px;
  text-align: center;
  padding: 10px;
}

.eae-card-empty .eae-card-noimage {
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eae-card-noimage-icon {
  width: 34px;
  height: 34px;
  display: block;
  flex: 0 0 auto;
}

.eae-card-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.eae-card-reference {
  font-size: 12px;
  color: #666;
}

.eae-cards.eae-mini .eae-card-inner {
  width: 64px;
  height: 64px;
  min-height: 64px;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: visible;
}

.eae-cards.eae-mini .eae-card {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  margin: 0;
}

.eae-cards.eae-mini .eae-radio:checked + .eae-card-inner {
  border-color: #0d6efd;
  box-shadow: 0 0 0 1px #0d6efd inset;
  background: #f7fbff;
}

.eae-cards.eae-mini .eae-card-image,
.eae-cards.eae-mini .eae-card-noimage {
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  padding: 0;
}

.eae-cards.eae-mini .eae-card-noimage {
  background: #f5f5f5;
  color: #777;
  font-weight: 600;
  font-size: 12px;
  border-radius: 4px;
}

.eae-cards.eae-mini .eae-card-empty .eae-card-noimage {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eae-cards.eae-mini .eae-card-name,
.eae-cards.eae-mini .eae-card-reference {
  display: none;
}

.eae-error {
  margin-top: 12px;
  color: #b30000;
  font-size: 14px;
}

.eae-help-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
}

.eae-help-modal.is-open {
  display: block;
}

.eae-help-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.56);
}

.eae-help-modal__dialog {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 24px;
}

.eae-help-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.eae-help-modal__close:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.eae-help-popup__title {
  margin: 0 32px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.eae-help-popup__body {
  margin-top: 16px;
}

.eae-help-popup__text {
  margin: 0 0 12px;
  color: #334155;
  line-height: 1.55;
}

.eae-help-popup__list {
  margin: 0;
  padding-left: 18px;
}

.eae-help-popup__list-item {
  margin-bottom: 8px;
  color: #334155;
}

.eae-help-popup__product-name {
  font-weight: 600;
}

.eae-help-popup__product-reference {
  margin-left: 6px;
  color: #64748b;
}

body.eae-help-modal-open {
  overflow: hidden;
}

.eae-modal-accessories {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.eae-modal-accessories__title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.eae-modal-accessories__item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.eae-modal-accessories__thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.eae-modal-accessories__text {
  min-width: 0;
}

.eae-modal-suggestions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.eae-modal-suggestions__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.eae-modal-suggestions__carousel {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 10px;
  align-items: center;
}

.eae-modal-suggestions__arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eae-modal-suggestions__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 2px 0;
}

.eae-modal-suggestions__track {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 2px;
}

.eae-modal-suggestions__item {
  flex: 0 0 180px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-rows: 120px auto auto auto auto;
  gap: 8px;
}

.eae-modal-suggestions__thumb {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: block;
}

.eae-modal-suggestions__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.eae-modal-suggestions__ref {
  font-size: 12px;
  color: #666;
  line-height: 1.2;
}

.eae-modal-suggestions__qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eae-modal-suggestions__qty-label {
  font-size: 12px;
  color: #666;
}

.eae-modal-suggestions__qty-input {
  width: 70px;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
}

.eae-modal-suggestions__button {
  height: 36px;
  border: 1px solid #0d6efd;
  background: #0d6efd;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
}

.eae-modal-suggestions__button[disabled] {
  opacity: 0.65;
  cursor: default;
}

/* Conflict and B2B Styles */
.eae-conflict-alert {
  background-color: #fff3f3;
  border: 1px solid #ffcccc;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  color: #721c24;
}

.eae-conflict-message {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
  font-weight: 500;
}

.eae-b2b-cta {
  display: inline-block;
  background-color: #2fb5d2;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none !important;
  font-weight: 700;
  transition: background 0.2s;
}

.eae-b2b-cta:hover {
  background-color: #259db8;
}


/* Accesorios bloqueados en carrito: dejar solo un contador limpio */
.cart .product-line:has(.eae-linked-label) .bootstrap-touchspin,
.cart .cart__item:has(.eae-linked-label) .bootstrap-touchspin,
.cart .product-line:has(.eae-linked-label) .input-group.bootstrap-touchspin,
.cart .cart__item:has(.eae-linked-label) .input-group.bootstrap-touchspin {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  padding: 0 !important;
}
/* Ocultar + y - de los accesorios bloqueados */
.cart .product-line:has(.eae-linked-label) .bootstrap-touchspin .btn,
.cart .cart__item:has(.eae-linked-label) .bootstrap-touchspin .btn,
.cart .product-line:has(.eae-linked-label) .bootstrap-touchspin .input-group-btn,
.cart .cart__item:has(.eae-linked-label) .bootstrap-touchspin .input-group-btn {
  display: none !important;
}
/* Dejar la cantidad como una pastilla limpia */
.cart .product-line:has(.eae-linked-label) .js-cart-line-product-quantity,
.cart .cart__item:has(.eae-linked-label) .js-cart-line-product-quantity {
  width: 52px !important;
  min-width: 52px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
  font-weight: 600 !important;
  color: #444 !important;
  background: #f5f5f5 !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  opacity: 1 !important;
  cursor: default !important;
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}
/* Quitar flechas nativas del input number */
.cart .product-line:has(.eae-linked-label) .js-cart-line-product-quantity::-webkit-outer-spin-button,
.cart .product-line:has(.eae-linked-label) .js-cart-line-product-quantity::-webkit-inner-spin-button,
.cart .cart__item:has(.eae-linked-label) .js-cart-line-product-quantity::-webkit-outer-spin-button,
.cart .cart__item:has(.eae-linked-label) .js-cart-line-product-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

@media (max-width: 767px) {
  .eae-help-modal__dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    margin: 12px auto;
    padding: 20px 16px 16px;
  }

  .eae-help-popup__title {
    font-size: 19px;
  }
}

/* EAE experimental 4.8.0: agrupar visualmente cada motor configurado con sus accesorios */
.cart__item.eae-bundle-parent-item {
  margin-top: 14px;
}

.cart__item.eae-bundle-parent-item > .product-line {
  border: 1px solid #d9e7ef;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding-top: 12px;
  padding-bottom: 10px;
  background: #fff;
}

.cart__item.eae-bundle-child-item > .product-line {
  border-left: 1px solid #d9e7ef;
  border-right: 1px solid #d9e7ef;
  padding-top: 8px;
  padding-bottom: 8px;
  background: #fbfdff;
}

.cart__item.eae-bundle-child-last > .product-line {
  border-bottom: 1px solid #d9e7ef;
  border-radius: 0 0 10px 10px;
  margin-bottom: 12px;
}

.cart__item.eae-bundle-parent-item > hr,
.cart__item.eae-bundle-child-item > hr {
  display: none !important;
}

.cart__item.eae-bundle-child-item .product-line__image img {
  max-width: 70px;
  height: auto;
}

.cart__item.eae-bundle-child-item .product-line__title::before {
  content: "↳ ";
  color: #2fb5d2;
  font-weight: 700;
}
