/* Commerce presentation only: native data, forms and gallery remain intact. */
.tps-product-page > div.product > .woocommerce-product-details__short-description {
 display:flow-root; grid-column:1 / -1; min-width:0; margin:0; padding-block:1.5rem;
 border-top:1px solid var(--tps-line); color:var(--tps-ink); overflow-wrap:anywhere;
}
.tps-product-page > div.product > .woocommerce-product-details__short-description img {
 display:block; max-width:100%; height:auto; margin-inline:auto;
}
.tps-product-page .summary .price { color:var(--tps-ink); font-size:clamp(1.15rem,2vw,1.5rem); line-height:1.5; overflow-wrap:anywhere; }
.tps-product-page .summary .price ins { background:transparent; color:inherit; font-weight:700; text-decoration:none; }
.tps-product-page .summary .price del { font-size:.8em; opacity:.75; }
.tps-product-page .summary .price del .amount { color:inherit; }
.tps-product-page .summary form.cart { min-width:0; }
.tps-product-page .summary .variations td,.tps-product-page .summary .variations select { box-sizing:border-box; min-width:0; max-width:100%; }

/* Count rendered cards, not the query's total stock count. */
.tps-catalog-products ul.products { --tps-catalog-gap:1.6rem; gap:var(--tps-catalog-gap); }
.tps-catalog-products ul.products:has(> li.product:only-child) { grid-template-columns:minmax(0,1fr)!important; width:min(100%,280px); margin-inline:auto!important; }
.tps-catalog-products ul.products:has(> li.product:nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr))!important; width:min(100%,calc(560px + var(--tps-catalog-gap))); margin-inline:auto!important; }
.tps-catalog-products ul.products:has(> li.product:nth-child(3):last-child) { grid-template-columns:repeat(3,minmax(0,1fr))!important; width:min(100%,calc(840px + 2 * var(--tps-catalog-gap))); margin-inline:auto!important; }
.tps-catalog-empty { min-width:0; }
.tps-catalog-empty-return { margin:1rem 0 0; }
.tps-catalog-empty-return .button,.woocommerce-cart .return-to-shop .button { box-sizing:border-box; min-height:48px; max-width:100%; white-space:normal; text-align:center; }
.woocommerce-cart .cart-empty { background:var(--tps-section-soft); color:var(--tps-ink); }

/* Native logged-out forms do not inherit the dashboard's sidebar grid. */
body.woocommerce-account:not(.logged-in) .woocommerce { display:block; }
.tps-account-entry-nav { display:flex; flex-wrap:wrap; justify-content:center; gap:.75rem; margin:0 0 1.5rem; }
.tps-account-entry-nav a { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-height:48px; max-width:100%; padding:.65rem 1.25rem; border:1px solid var(--tps-line); color:var(--tps-ink); background:var(--tps-section-soft); text-decoration:none; overflow-wrap:anywhere; }
.tps-account-entry-nav a[href="#tps-register"] { color:var(--tps-white); background:var(--tps-dark); }
.tps-account-entry-anchor { display:block; scroll-margin-top:16rem; }
.woocommerce-account #customer_login { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2rem; }
.woocommerce-account #customer_login::before,.woocommerce-account #customer_login::after { content:none; display:none; }
.woocommerce-account #customer_login > .u-column1,.woocommerce-account #customer_login > .u-column2 { float:none; width:auto; min-width:0; }
.woocommerce-account .woocommerce-form-login,.woocommerce-account .woocommerce-form-register,.woocommerce-account .lost_reset_password { box-sizing:border-box; width:100%; }
.woocommerce-account .lost_reset_password { max-width:620px; margin-inline:auto; background:var(--tps-section-soft); padding:clamp(1.25rem,3vw,2rem); border:1px solid var(--tps-line); }
.woocommerce-account .woocommerce > h2 { text-align:center; }
.woocommerce-account .woocommerce form .form-row { min-width:0; }
.woocommerce-account .woocommerce form input.input-text { box-sizing:border-box; width:100%; }
.woocommerce-account .woocommerce form .button { min-height:48px; }
.woocommerce-account .woocommerce-LostPassword a { display:inline-flex; align-items:center; min-height:44px; }
.woocommerce-account .woocommerce-form-login__rememberme { display:inline-flex!important; align-items:center; gap:.5rem; min-height:44px; }

/* Native commerce feedback and labels must fit without hiding their content. */
body:is(.single-product,.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .woocommerce :is(a.button,button.button) {
 max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:center;
}
body:is(.single-product,.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) :is(.woocommerce-error,.woocommerce-info,.woocommerce-message,.wc-block-components-notice-banner) {
 overflow-wrap:anywhere;
}
.tps-product-page .summary form.cart .reset_variations {
 display:inline-flex; align-items:center; min-height:44px;
}

@media(max-width:900px) {
 .tps-catalog-products ul.products:has(> li.product:nth-child(3):last-child) { grid-template-columns:repeat(2,minmax(0,1fr))!important; width:100%; }
 .woocommerce-account #customer_login { grid-template-columns:minmax(0,1fr); gap:1.5rem; }
}
@media(max-width:600px) {
 /* Keep the theme-only floating control away from native checkout/account fields. */
 body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .tps-back-to-top { display:none!important; }
 body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button { min-height:48px!important; white-space:normal; overflow-wrap:anywhere; }
 /* The desktop 10rem flex basis becomes a height in this column layout. */
 .woocommerce-cart table.cart td.actions .coupon .input-text { flex:0 1 auto; min-width:0; }
 .tps-catalog-products ul.products { --tps-catalog-gap:1rem; }
 .tps-catalog-products ul.products:has(> li.product:only-child) { width:calc((100% - var(--tps-catalog-gap)) / 2); }
 .tps-catalog-products ul.products:has(> li.product:nth-child(2):last-child) { width:100%; }
 .tps-product-page > div.product > .woocommerce-product-details__short-description { padding-block:1rem; }
 .tps-catalog-empty .woocommerce-info { padding:1.25rem 1rem 1.25rem 2.5rem!important; }
 .woocommerce-account .lost_reset_password .form-row { float:none; width:100%; }
}
