/* Final desktop product purchase controls override. */
@media (min-width: 641px) {
  .page-product .fa-product-title-row .fa-product-fav--mobile { display: none !important; }
  .page-product .fa-product-actions .product__actions-qty-add { display: grid !important; grid-template-columns: 128px minmax(0, 1fr) 52px; gap: 12px; align-items: end; }
  .page-product .fa-product-actions .product__add-to-cart { grid-column: auto !important; }
  .page-product .fa-product-actions .fa-product-action-fav { display: grid !important; width: 52px; min-width: 52px; height: 52px; place-items: center; padding: 0; border: 1px solid var(--accent); border-radius: 10px; background: #fff; color: var(--accent); }
  .page-product .fa-product-actions .fa-product-action-fav::before { content: "♡"; font-family: Arial, sans-serif; font-size: 29px; font-weight: 400; line-height: 1; }
  .page-product .fa-product-actions .fa-product-action-fav:hover, .page-product .fa-product-actions .fa-product-action-fav.is-wishlist-active { background: rgba(0, 82, 165, .08); }
  .page-product .fa-product-actions .fa-product-action-fav.is-wishlist-active::before { content: "♥"; }
}

/* Trust / assurance badges below add-to-cart. */
.page-product .fa-product-assurances {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 640px) {
  .page-product .fa-product-assurances {
    margin-top: 22px;
  }
}

.page-product .fa-product-assurance {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent, #0052a5);
}

.page-product .fa-product-assurance__icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: var(--accent, #0052a5);
}

.page-product .fa-product-assurance__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  color: #2a2a2a;
}

.page-product .fa-product-assurance__text strong {
  font-weight: 700;
  color: var(--accent, #0052a5);
  font-size: 15px;
}

.page-product .fa-product-assurance__text {
  font-size: 13px;
}

.page-product .fa-product-assurance__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.page-product .fa-product-assurance__link-icon {
  margin-left: 4px;
  vertical-align: -1px;
  flex-shrink: 0;
}

.page-product .fa-product-assurance__link:hover,
.page-product .fa-product-assurance__link:focus {
  text-decoration-thickness: 2px;
}

/* El favorito añadido en la tarjeta se usa solo en móvil. En escritorio se
   mantiene sin cambios el acceso a favoritos que ya tenía la ficha. */
@media (max-width: 640px) {
  .page-product .fa-product-buy-card {
    position: relative;
  }

  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product {
  display: grid !important;
  position: absolute;
  top: 96px;
  right: 16px;
  z-index: 1;
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center;
  border: 1.5px solid var(--accent) !important;
  border-radius: 9px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--accent) !important;
  font-size: 0 !important;
  }

  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product::before {
  content: "" !important;
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  }

  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product:hover {
  background: #fff !important;
  color: var(--accent) !important;
  }

  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product.is-wishlist-active {
  background: #fff !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
  }

  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product.is-wishlist-active::before {
  /* Mismo corazón, relleno azul como el resto de acciones de favoritos. */
  content: "" !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23004996' stroke='%23004996' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  -webkit-mask: none !important;
  mask: none !important;
  }

  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product i,
  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product .material-icons {
  display: none !important;
  }

  .page-product .fa-product-actions .product__actions-qty-add {
  display: grid !important;
  grid-template-columns: 128px minmax(0, 1fr) !important;
  gap: 12px !important;
  }

  .page-product .fa-product-actions .product__add-to-cart,
  .page-product .fa-product-actions .product__add-to-cart-button {
  width: 100%;
  }

  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product {
    top: 76px;
    right: 14px;
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
  }
}

/* En escritorio, carrito y favorito comparten la misma fila. El carrito deja
   libre el ancho exacto del corazón para que no se superpongan. */
@media (min-width: 641px) {
  .page-product .fa-product-buy-card {
    position: relative;
  }

  .page-product .fa-product-actions .product__add-to-cart {
    margin-right: 0 !important;
  }

  .page-product .fa-product-actions .product__add-to-cart-button {
    width: calc(100% - 56px) !important;
  }

  /* El aviso forma parte del flujo, bajo los controles y antes de envíos. */
  .page-product .fa-product-actions > .fa-wishlist-feedback {
    margin: 10px 0 0;
  }

  .page-product .fa-product-card-fav,
  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product {
    display: grid !important;
    position: absolute;
    top: 144px;
    right: 16px;
    z-index: 2;
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    padding: 0 !important;
    place-items: center;
    border: 1.5px solid var(--accent) !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--accent) !important;
    font-size: 0 !important;
  }

  .page-product .fa-product-card-fav::before,
  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product::before {
    content: "" !important;
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    background: currentColor !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  }

  .page-product .fa-product-card-fav.is-wishlist-active::before,
  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product.is-wishlist-active::before {
    content: "" !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23004996' stroke='%23004996' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
    -webkit-mask: none !important;
    mask: none !important;
  }

  .page-product .fa-product-card-fav.is-wishlist-active,
  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product.is-wishlist-active {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
  }

  .page-product .fa-product-card-fav i,
  .page-product .fa-product-card-fav .material-icons,
  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product i,
  .page-product .fa-product-buy-card > .wishlist-button-add.wishlist-button-product .material-icons {
    display: none !important;
  }
}
