/* Shared storefront design tokens. Page files own layout; this file owns primitives. */
:root {
    --jj-brand: #f37429;
    --jj-brand-hover: #d95f18;
    --jj-brand-text: #c6530b;
    --jj-brand-soft: #ffeadb;
    --jj-card-surface: #fff8f2;
    --jj-card-border: #f6c5a4;
    --jj-focus: #804bb1;
    --jj-action-dark: #2f2f2f;
    --jj-action-dark-hover: #1f1f1f;
    --jj-input-border: #d7dce1;
    --jj-surface: #fff;
    --jj-text: #393439;
    --jj-control-radius: 4px;
    --jj-card-radius: 8px;
    --jj-control-height: 48px;
    --jj-page-title-space: 24px;
}

/* Native WooCommerce controls; exclude icon-only controls, checkboxes and radios. */
body .woocommerce :is(a.button, button.button, input.button),
body .wc-block-components-button {
    box-sizing: border-box;
    min-height: var(--jj-control-height);
    padding: 12px 22px;
    border-radius: var(--jj-control-radius);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

/* Purchase buttons retain their existing stock/backorder semantics. */
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
body.woocommerce-checkout #place_order,
body .wc-block-cart__submit-button,
body .wc-block-components-checkout-place-order-button {
    background-color: var(--jj-brand);
    color: #fff;
}
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover,
body.woocommerce-checkout #place_order:hover,
body .wc-block-cart__submit-button:hover,
body .wc-block-components-checkout-place-order-button:hover {
    background-color: var(--jj-brand-hover);
}

body .woocommerce :is(input.input-text, textarea.input-text, select),
body .wc-block-components-text-input :is(input, textarea) {
    box-sizing: border-box;
    min-height: var(--jj-control-height);
    border: 1px solid var(--jj-input-border);
    border-radius: var(--jj-control-radius);
    background-color: var(--jj-surface);
    color: var(--jj-text);
    box-shadow: none;
    font-size: 16px;
}
body .woocommerce :is(input.input-text, textarea.input-text, select) {
    padding: 11px 14px;
}
body .woocommerce textarea.input-text {
    min-height: 120px;
}
body .woocommerce .woocommerce-invalid :is(input.input-text, select, textarea) {
    border-color: #b32d2e;
}
body .woocommerce :is(button, input):disabled {
    cursor: not-allowed;
    opacity: .55;
}

/* One focus ring, including mouse focus on checkout. Keep keyboard focus visible. */
body :is(a, button, input, select, textarea, [role="button"]):focus {
    outline: 2px solid var(--jj-focus) !important;
    outline-offset: 3px !important;
}
body :is(a.button, button, input, select, textarea, .wc-block-components-button):focus {
    box-shadow: none !important;
}
@media (max-width: 767px) {
    :root { --jj-page-title-space: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    body .jj-account-shortcut { transition: none; }
    body .jj-account-shortcut:hover { transform: none; }
}
