/* Variación "solo ícono" de Add to Cart Button. Tamaño y colores se ajustan con variables CSS. */
.hs-add-cart-icon {
    --hs-icon-btn-size: 40px;
    --hs-icon-btn-icon-size: 18px;
    --hs-icon-btn-bg: #000;
    --hs-icon-btn-color: #fff;
    --hs-icon-btn-border: #000;
    --hs-icon-btn-hover-bg: #fff;
    --hs-icon-btn-hover-color: #000;
    --hs-icon-btn-added-bg: transparent;
    --hs-icon-btn-added-color: #000;
    --hs-icon-cart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5M3.102 4l1.313 7h8.17l1.313-7zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4m7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2m7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2'/%3E%3C/svg%3E");
    --hs-icon-cart-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M11.354 6.354a.5.5 0 0 0-.708-.708L8 8.293 6.854 7.146a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0zM.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.408l1.5-8A.5.5 0 0 0 14.5 3H2.89l-.405-1.621A.5.5 0 0 0 2 1zm3.915 10L3.102 4h10.796l-1.313 7zM6 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0m7 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0'/%3E%3C/svg%3E");
}

.hs-add-cart-icon :is(.wp-block-button__link, .wc-block-components-product-button__button) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
    position: relative;
    width: var(--hs-icon-btn-size) !important;
    height: var(--hs-icon-btn-size) !important;
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    font-size: 0 !important;
    text-indent: 0 !important;
    border-radius: 8px;
    background-color: var(--hs-icon-btn-bg) !important;
    border-color: var(--hs-icon-btn-border) !important;
    color: var(--hs-icon-btn-color) !important;
    opacity: 1 !important;
}

/* Se anula el ::before del tema padre (cuadro verde con ícono). */
.hs-add-cart-icon :is(.wp-block-button__link, .wc-block-components-product-button__button)::before {
    display: none !important;
}

.hs-add-cart-icon :is(.wp-block-button__link, .wc-block-components-product-button__button)::after {
    content: "";
    position: static !important;
    width: var(--hs-icon-btn-icon-size) !important;
    height: var(--hs-icon-btn-icon-size) !important;
    left: auto !important;
    background-color: currentColor;
    -webkit-mask: var(--hs-icon-cart) center / contain no-repeat;
    mask: var(--hs-icon-cart) center / contain no-repeat;
}

/* Se oculta el enlace "Ver carrito" del tema padre (cuadro verde superpuesto al botón). */
.hs-add-cart-icon span[data-wp-bind--hidden="!state.displayViewCart"],
.hs-add-cart-icon span[data-wp-bind--hidden="!selectors.woocommerce.displayViewCart"] {
    display: none !important;
}

/* Producto ya en el carrito: la clase hs-in-cart la agrega Interactivity API. */
.hs-add-cart-icon :is(.wp-block-button__link, .wc-block-components-product-button__button).hs-in-cart {
    background-color: var(--hs-icon-btn-added-bg) !important;
    border-color: var(--hs-icon-btn-border) !important;
    color: var(--hs-icon-btn-added-color) !important;
}

.hs-add-cart-icon :is(.wp-block-button__link, .wc-block-components-product-button__button).hs-in-cart::after {
    -webkit-mask-image: var(--hs-icon-cart-check);
    mask-image: var(--hs-icon-cart-check);
}

.hs-add-cart-icon :is(.wp-block-button__link, .wc-block-components-product-button__button):is(:hover, :focus) {
    background-color: var(--hs-icon-btn-hover-bg) !important;
    border-color: var(--hs-icon-btn-border) !important;
    color: var(--hs-icon-btn-hover-color) !important;
}

/* .added_to_cart, .hs_home_add_cart_btn span {
	color: black!important;
}

.added_to_cart::before {
	background-color: black!important;
} */

/* La primera clase se pone como anclaje en el bloque */
/* .hs_home_add_cart_btn .add_to_cart_button:hover::before {
    background-color: black!important;
    border-color: black!important;
} */
