/* XO Ordering — quick add (− qty +) */
[data-xo-for][hidden] { display: none !important; }
.xo-qty {
	display: inline-flex; align-items: center; justify-content: space-between; gap: 4px;
	min-width: 128px; height: 44px; padding: 3px; border-radius: 999px;
	background: var(--xof-accent, #1f1f1f); color: #fff; font: inherit; font-weight: 700;
	box-shadow: 0 2px 8px rgba(0,0,0,.15); animation: xo-qty-in .28s cubic-bezier(.2,.9,.3,1.3);
	vertical-align: middle; box-sizing: border-box; max-width: 100%;
}
.xo-qty.is-big { height: 54px; min-width: 220px; font-size: 1.05rem; margin: 8px 0 16px; }
.xo-qty-n { flex: 1; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 4px; }
.xo-qty-btn {
	appearance: none; flex: none; width: 38px; height: 38px; border-radius: 999px; border: 0; margin: 0; padding: 0;
	background: rgba(255,255,255,.16); color: inherit; font: inherit; font-size: 1.35rem; line-height: 1; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; transition: background .12s, transform .12s;
}
.xo-qty.is-big .xo-qty-btn { width: 48px; height: 48px; }
.xo-qty-btn:hover { background: rgba(255,255,255,.28); }
.xo-qty-btn:active { transform: scale(.9); }
.xo-qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.xo-qty-btn:focus-visible { outline: 3px solid #4dabf7; outline-offset: 2px; }
.xo-qty-btn svg { display: block; }

.xo-loading { opacity: .7; pointer-events: none; }
.xo-adding { animation: xo-pop .5s cubic-bezier(.2,.9,.3,1.4); }
.xo-check { display: inline-flex; align-items: center; justify-content: center; animation: xo-check .45s ease-out; }
.xo-fly { position: fixed; z-index: 99999; border-radius: 12px; object-fit: contain; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: none; }
.xo-bump { animation: xo-bump .45s cubic-bezier(.2,.9,.3,1.5); }
.xo-cart-toast {
	position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 99999;
	background: #222; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100vw - 32px);
	box-shadow: 0 6px 24px rgba(0,0,0,.3); transition: opacity .4s;
}
.xo-cart-toast.is-out { opacity: 0; }

@keyframes xo-qty-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes xo-pop { 0% { transform: scale(1); } 35% { transform: scale(.92); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes xo-check { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
@keyframes xo-bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) {
	.xo-qty, .xo-adding, .xo-check, .xo-bump { animation: none; }
}

/* ---------- XO button style for product listings (Settings → Add to cart buttons) ---------- */
body.xo-btns ul.products li.product a.button.add_to_cart_button,
body.xo-btns ul.products li.product a.button.product_type_variable,
body.xo-btns ul.products li.product a.button.product_type_grouped,
body.xo-btns ul.products li.product a.button.product_type_external,
body.xo-btns ul.products li.product a.button.product_type_simple,
body.xo-btns .wc-block-components-product-button .wp-block-button__link,
body.xo-btns .wc-block-grid__product .wp-block-button__link {
	display: flex !important; align-items: center; justify-content: center; gap: 8px;
	width: 100%; min-height: 46px; margin: 10px 0 0 !important; padding: 0 16px !important;
	border-radius: 999px !important; border: 2px solid var(--xof-accent, #1f1f1f) !important;
	background: var(--xof-accent, #1f1f1f) !important; color: #fff !important;
	font-weight: 700 !important; font-size: .95rem !important; line-height: 1.1 !important; letter-spacing: .01em; text-transform: none !important; white-space: nowrap;
	text-decoration: none !important; box-shadow: 0 2px 6px rgba(0,0,0,.12); box-sizing: border-box;
	transition: filter .12s, transform .12s, box-shadow .12s;
}
body.xo-btns ul.products li.product a.button.add_to_cart_button::before,
body.xo-btns .wc-block-components-product-button .wp-block-button__link.add_to_cart_button::before {
	content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px;
	background: rgba(255,255,255,.22); font-size: 1.1rem; font-weight: 800; line-height: 1; flex: none;
}
body.xo-btns ul.products li.product a.button:hover,
body.xo-btns .wc-block-components-product-button .wp-block-button__link:hover { filter: brightness(1.12); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
body.xo-btns ul.products li.product a.button:active,
body.xo-btns .wc-block-components-product-button .wp-block-button__link:active { transform: scale(.97); }
body.xo-btns ul.products li.product a.button:focus-visible,
body.xo-btns .wc-block-components-product-button .wp-block-button__link:focus-visible { outline: 3px solid #4dabf7 !important; outline-offset: 2px; }
/* "Select options" / "Read more" (out of stock): outline style */
body.xo-btns ul.products li.product a.button:not(.add_to_cart_button),
body.xo-btns ul.products li.product a.button.product_type_variable,
body.xo-btns .wc-block-components-product-button .wp-block-button__link:not(.add_to_cart_button) {
	background: #fff !important; color: var(--xof-accent, #1f1f1f) !important; box-shadow: none;
}
body.xo-btns ul.products li.product a.button.product_type_variable::before { content: none; }
/* Hide WooCommerce's "View cart" link that some themes add after adding */
body.xo-btns ul.products li.product a.added_to_cart { display: none !important; }
/* The − qty + counter matches the button so the card doesn't jump */
body.xo-btns ul.products li.product .xo-qty,
body.xo-btns .wc-block-components-product-button .xo-qty,
body.xo-btns .wc-block-grid__product .xo-qty { display: flex; width: 100%; min-width: 0; height: 46px; margin: 10px 0 0; }
body.xo-btns ul.products li.product a.button.xo-adding::before { content: none; }

/* Keep the hidden original button hidden (beats the button style above) */
body.xo-btns ul.products li.product a.button[hidden],
body.xo-btns .wc-block-components-product-button .wp-block-button__link[hidden],
body.xo-btns .wc-block-grid__product .wp-block-button__link[hidden] { display: none !important; }
@media (max-width: 480px) {
	body.xo-btns ul.products li.product a.button,
	body.xo-btns .wc-block-components-product-button .wp-block-button__link { font-size: .88rem !important; padding: 0 10px !important; gap: 6px; }
	body.xo-btns ul.products li.product a.button.add_to_cart_button::before { width: 20px; height: 20px; font-size: 1rem; }
}
