/* Cart UI (inc/cart-ui.php, assets/cart-ui.js) — theme tokens, the mockup's buttons, 44 px targets */

/* product cards: the add button becomes [ − Додано N + ] */
.wc-block-components-product-button.pinta-in-cart > .wp-block-button__link,
.wc-block-components-product-button.pinta-in-cart > .added_to_cart,
.wc-block-components-product-button > .added_to_cart { display: none !important; }
.wc-block-components-product-button .pinta-qty { display: none; }
.wc-block-components-product-button.pinta-in-cart .pinta-qty { display: flex; }
.pinta-qty { box-sizing: border-box; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; margin-top: 14px; padding: 0 4px; border: 2px solid var(--wsc-color-accent); border-radius: var(--wsc-radius-button); background: var(--wsc-color-accent); color: var(--wsc-color-ink); }
.pinta-qty__btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin: -1px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font: 800 24px/1 var(--wsc-font-body); cursor: pointer; }
.pinta-qty__btn:hover { background: rgba(20, 22, 23, .14); }
.pinta-qty__btn:focus-visible { outline: 3px solid var(--wsc-color-paper); outline-offset: -3px; }
.pinta-qty__value { flex: 1; text-align: center; font: 700 15px/1 var(--wsc-font-body); white-space: nowrap; }
.pinta-qty.is-busy, .wc-block-components-product-button .is-busy { opacity: .6; cursor: progress; }

/* product page: − [ 4 ] + */
.product-info .quantity.pinta-quantity { display: inline-flex; align-items: center; min-height: 52px; border: 1px solid var(--wsc-color-line); border-radius: var(--wsc-radius-button); background: var(--wsc-color-ink); }
.product-info form.cart .quantity.pinta-quantity input.qty { width: 48px; min-width: 0; box-shadow: none; min-height: 48px; margin: 0; padding: 0; border: 0; background: transparent; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.product-info .quantity.pinta-quantity .qty::-webkit-outer-spin-button,
.product-info .quantity.pinta-quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pinta-step span, .pinta-qty__btn span { display: block; line-height: 1; transform: translateY(-1px); }
.pinta-step { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--wsc-color-paper); font: 800 22px/1 var(--wsc-font-body); cursor: pointer; }
.pinta-step:hover { color: var(--wsc-color-accent); }
.pinta-step:focus-visible { outline: 3px solid var(--wsc-color-accent); outline-offset: -3px; }

/* product page: the price follows the quantity (replaces WooCommerce's variation price line) */
.product-info form.pinta-has-total .woocommerce-variation-price { display: none; }
.pinta-total { margin: 14px 0 0; font: 800 22px/1.2 var(--wsc-font-body); color: var(--wsc-color-paper); }
.pinta-total[hidden] { display: none; }
.pinta-total__each { margin-left: 8px; font: 600 15px/1.2 var(--wsc-font-body); color: var(--wsc-color-muted); }

/* variation select: «Очистити» as a small ghost button next to the select, only when a value is chosen */
.product-info table.variations td.value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.product-info table.variations td.value { flex-wrap: nowrap; }
.product-info table.variations td.value select { flex: 1 1 0; width: auto; min-width: 0 !important; margin: 0 !important; } /* WooCommerce: min-width 70-75 %, margin-right 1em */
.product-info table.variations td.value .reset_variations { flex: none; }
.product-info .woocommerce-variation-add-to-cart .single_add_to_cart_button, .product-info form.cart:not(.variations_form) .single_add_to_cart_button { flex: 1; min-width: 0; white-space: nowrap; padding-inline: 16px; }
.product-info .reset_variations { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; padding: 0 16px; border: 1px solid var(--wsc-color-line); border-radius: var(--wsc-radius-button); color: var(--wsc-color-muted); font: 600 14px/1 var(--wsc-font-body); text-decoration: none; }
.product-info .reset_variations::before { content: "×"; font-size: 20px; line-height: 1; }
.product-info .reset_variations:hover { border-color: var(--wsc-color-accent); color: var(--wsc-color-paper); }
.product-info .reset_variations:focus-visible { outline: 3px solid var(--wsc-color-accent); outline-offset: 2px; }
.product-info .reset_variations[style*="hidden"], .product-info .reset_variations[hidden] { display: none; }
.product-info table.variations tr { grid-template-columns: minmax(0, 1fr); } /* the mockup's grid row sized to the select's content and pushed «Очистити» out at 390 px */
.wsc-page .product-grid > * { min-width: 0; } /* grid items may shrink: the buy row (stepper + button) must not widen the column at 390 px */
/* checkout, pickup: no address — the billing street is filled with «Самовивіз» (cart-ui.js) and hidden */
body.pinta-pickup .wc-block-checkout__billing-fields .wc-block-components-address-form__address_1 { display: none; }
