/* Shain Store v1.0.73 — scoped second-pass polish for product, cart, account, homepage/footer.
   Layout rules are responsive; dark colors are scoped to html.ss-dark-mode only. */

/* Product detail: consistent spacing and clear purchase area without forcing a new color scheme in light mode. */
body.single-product div.product.pt-single-product,
body.single-product .woocommerce div.product { min-width:0; }
body.single-product div.product.pt-single-product .summary,
body.single-product div.product.pt-single-product .woocommerce-tabs,
body.single-product div.product.pt-single-product .pt-product-extra,
body.single-product div.product.pt-single-product .pt-spec-list { min-width:0; overflow-wrap:anywhere; }
body.single-product div.product.pt-single-product .summary .cart,
body.single-product div.product.pt-single-product form.cart { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
body.single-product div.product.pt-single-product .quantity { max-width:100%; }
body.single-product div.product.pt-single-product .quantity input.qty { max-width:100%; min-height:42px; }
body.single-product div.product.pt-single-product .single_add_to_cart_button { min-height:44px; border-radius:10px; font-weight:800; }
body.single-product div.product.pt-single-product .woocommerce-tabs ul.tabs { display:flex; flex-wrap:wrap; gap:6px; }
body.single-product div.product.pt-single-product .woocommerce-tabs ul.tabs li { margin:0 0 4px; }
body.single-product div.product.pt-single-product .woocommerce-tabs .panel { min-width:0; overflow-wrap:anywhere; }
body.single-product div.product.pt-single-product .woocommerce-product-gallery,
body.single-product div.product.pt-single-product .woocommerce-product-gallery__wrapper { min-width:0; }
body.single-product div.product.pt-single-product .woocommerce-product-gallery img { max-width:100%; height:auto; object-fit:contain; }

/* Cart/checkout: prevent long totals and controls from overflowing RTL mobile layouts. */
body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce,
body.woocommerce-cart .entry-content,
body.woocommerce-checkout .entry-content { min-width:0; max-width:100%; }
body.woocommerce-cart table.shop_table,
body.woocommerce-checkout table.shop_table { width:100%; max-width:100%; border-collapse:separate; border-spacing:0; }
body.woocommerce-cart table.shop_table th,
body.woocommerce-cart table.shop_table td,
body.woocommerce-checkout table.shop_table th,
body.woocommerce-checkout table.shop_table td { overflow-wrap:anywhere; word-break:normal; }
body.woocommerce-cart .product-name,
body.woocommerce-cart .product-price,
body.woocommerce-cart .product-quantity,
body.woocommerce-cart .product-subtotal { min-width:0; }
body.woocommerce-cart .quantity { display:inline-flex; align-items:center; max-width:100%; }
body.woocommerce-cart .quantity input.qty { width:4.2em; max-width:100%; }
body.woocommerce-cart .cart_totals,
body.woocommerce-cart .cart-collaterals,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout #customer_details { min-width:0; max-width:100%; }
body.woocommerce-cart .cart_totals table,
body.woocommerce-checkout #order_review table { table-layout:fixed; width:100%; }
body.woocommerce-cart .cart_totals th,
body.woocommerce-cart .cart_totals td,
body.woocommerce-checkout #order_review th,
body.woocommerce-checkout #order_review td { overflow-wrap:anywhere; }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-checkout #place_order { display:block; width:100%; max-width:100%; white-space:normal; min-height:46px; border-radius:10px; }

/* Account dashboard: tidy horizontal tabs on desktop and scrollable tabs on narrow screens. */
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content { min-width:0; }
body.woocommerce-account .woocommerce-MyAccount-navigation ul { display:flex; flex-wrap:wrap; align-items:stretch; gap:8px; margin:0 0 18px; padding:0; list-style:none; }
body.woocommerce-account .woocommerce-MyAccount-navigation ul li { margin:0; min-width:0; }
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a { display:flex; align-items:center; justify-content:center; min-height:42px; padding:10px 14px; border-radius:10px; text-decoration:none; overflow-wrap:anywhere; }
body.woocommerce-account .woocommerce-MyAccount-content table { width:100%; max-width:100%; }
body.woocommerce-account .woocommerce-MyAccount-content td,
body.woocommerce-account .woocommerce-MyAccount-content th { overflow-wrap:anywhere; }
body.woocommerce-account .woocommerce-MyAccount-content input,
body.woocommerce-account .woocommerce-MyAccount-content select,
body.woocommerce-account .woocommerce-MyAccount-content textarea { max-width:100%; }

/* Homepage and footer: layout-only refinements, preserve current brand colors and hero styling. */
.site-footer.ss-footer-v13 .footer-top { display:grid; grid-template-columns:minmax(220px,1.15fr) minmax(200px,1fr) minmax(180px,.85fr); align-items:start; gap:28px; }
.site-footer.ss-footer-v13 .footer-brand,
.site-footer.ss-footer-v13 .footer-contact-details,
.site-footer.ss-footer-v13 .footer-links { min-width:0; max-width:100%; }
.site-footer.ss-footer-v13 .footer-logo { display:flex; align-items:center; gap:10px; min-width:0; max-width:100%; }
.site-footer.ss-footer-v13 .footer-logo .brand-copy { display:flex; flex-direction:column; min-width:0; overflow-wrap:anywhere; }
.site-footer.ss-footer-v13 .footer-logo .brand-copy b { white-space:nowrap; }
.site-footer.ss-footer-v13 .footer-logo .brand-copy small { white-space:normal; line-height:1.6; }
.site-footer.ss-footer-v13 .footer-brand > p { max-width:42ch; }
.site-footer.ss-footer-v13 .footer-contact-details p,
.site-footer.ss-footer-v13 .footer-links a { overflow-wrap:anywhere; }

/* Dark mode only: align panels to the theme canvas and guarantee readable text/borders. */
html.ss-dark-mode body.single-product div.product.pt-single-product .woocommerce-tabs,
html.ss-dark-mode body.single-product div.product.pt-single-product .woocommerce-tabs .panel,
html.ss-dark-mode body.single-product div.product.pt-single-product .pt-product-extra,
html.ss-dark-mode body.single-product div.product.pt-single-product .pt-spec-list,
html.ss-dark-mode body.woocommerce-cart table.shop_table,
html.ss-dark-mode body.woocommerce-checkout table.shop_table,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-navigation ul li a,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content table { background:var(--bg,#14161c); color:var(--ink,#f2f3f7); border-color:var(--line,#343744); }
html.ss-dark-mode body.single-product div.product.pt-single-product .woocommerce-tabs :is(h1,h2,h3,h4,p,li,th,td,label,span),
html.ss-dark-mode body.single-product div.product.pt-single-product .pt-product-extra :is(h1,h2,h3,h4,p,li,th,td,label,span),
html.ss-dark-mode body.single-product div.product.pt-single-product .pt-spec-list :is(h1,h2,h3,h4,p,li,th,td,label,span),
html.ss-dark-mode body.woocommerce-cart :is(.cart_totals,.cart-collaterals,table.shop_table) :is(th,td,span,strong,small,label),
html.ss-dark-mode body.woocommerce-checkout :is(#customer_details,#order_review) :is(th,td,span,strong,small,label),
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content :is(h1,h2,h3,h4,p,li,th,td,label,span) { color:var(--ink,#f2f3f7); }
html.ss-dark-mode body.woocommerce-cart table.shop_table td,
html.ss-dark-mode body.woocommerce-cart table.shop_table th,
html.ss-dark-mode body.woocommerce-checkout table.shop_table td,
html.ss-dark-mode body.woocommerce-checkout table.shop_table th,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content td,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content th { border-color:var(--line,#343744); }
html.ss-dark-mode body.woocommerce-cart input,
html.ss-dark-mode body.woocommerce-cart select,
html.ss-dark-mode body.woocommerce-cart textarea,
html.ss-dark-mode body.woocommerce-checkout input,
html.ss-dark-mode body.woocommerce-checkout select,
html.ss-dark-mode body.woocommerce-checkout textarea,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content input,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content select,
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-content textarea { background:#20232c; color:#f7f7fa; border:1px solid #484c5b; }
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a { background:#b5122a; color:#fff; }
html.ss-dark-mode body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover { border-color:#b5122a; color:#fff; }

@media (max-width: 900px) {
 .site-footer.ss-footer-v13 .footer-top { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
 body.woocommerce-account .woocommerce-MyAccount-navigation ul { gap:6px; }
 body.woocommerce-account .woocommerce-MyAccount-navigation ul li a { padding:9px 11px; }
}
@media (max-width: 600px) {
 .site-footer.ss-footer-v13 .footer-top { grid-template-columns:minmax(0,1fr); gap:18px; }
 .site-footer.ss-footer-v13 .footer-brand { order:0; }
 .site-footer.ss-footer-v13 .footer-contact-details { order:1; }
 .site-footer.ss-footer-v13 .footer-links { order:2; }
 body.single-product div.product.pt-single-product .summary .cart,
 body.single-product div.product.pt-single-product form.cart { align-items:stretch; }
 body.single-product div.product.pt-single-product .single_add_to_cart_button { flex:1 1 100%; }
 body.woocommerce-cart table.shop_table { table-layout:auto; }
 body.woocommerce-cart .cart_totals table { table-layout:fixed; }
 body.woocommerce-cart .cart_totals th { width:42%; }
 body.woocommerce-cart .cart_totals td { width:58%; }
 body.woocommerce-account .woocommerce-MyAccount-navigation ul { flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-x:contain; padding-bottom:5px; }
 body.woocommerce-account .woocommerce-MyAccount-navigation ul li { flex:0 0 auto; }
 body.woocommerce-account .woocommerce-MyAccount-content { overflow-wrap:anywhere; }
}

/* Cart: remove per-item line totals as requested, retain unit prices and final cart total. */
body.woocommerce-cart table.shop_table th.product-subtotal,
body.woocommerce-cart table.shop_table td.product-subtotal { display:none !important; }
body.woocommerce-cart .wc-block-cart-items__header-total,
body.woocommerce-cart .wc-block-cart-item__total,
body.woocommerce-cart .wc-block-components-product-badge + .wc-block-cart-item__total { display:none !important; }
