/**
 * PWG Commerce Elements — shared responsive foundation.
 * Prevents theme/WooCommerce defaults from forcing PWG widgets outside their containers.
 * @since 4.0.0
 */
.pwgce-widget,
.pwgce-widget *,
.pwgce-cart-page,
.pwgce-cart-page *,
.pwgce-checkout-page,
.pwgce-checkout-page *{box-sizing:border-box}

.pwgce-widget,
.pwgce-cart-page,
.pwgce-checkout-page,
.pwgce-shop-product-list,
.pwgce-product-page{max-width:100%;min-width:0}

.pwgce-widget :where(img,svg,video,canvas,iframe),
.pwgce-cart-page :where(img,svg,video,canvas,iframe),
.pwgce-checkout-page :where(img,svg,video,canvas,iframe){max-width:100%}

.pwgce-widget :where(input,select,textarea,button),
.pwgce-cart-page :where(input,select,textarea,button),
.pwgce-checkout-page :where(input,select,textarea,button){font:inherit;max-width:100%}

.pwgce-widget :where(.pwgce-product-grid,.pwgce-product-list,.pwgce-shop-products,.pwgce-cart-items,.pwgce-drawer,.pwgce-drawer-body,.pwgce-filter-panel),
.pwgce-cart-page :where(.woocommerce,.woocommerce-cart-form,.cart-collaterals,.cart_totals),
.pwgce-checkout-page :where(form.checkout,#customer_details,#order_review){min-width:0}

.pwgce-widget :where(h1,h2,h3,h4,h5,h6,p,a,span,strong,small),
.pwgce-cart-page :where(h1,h2,h3,h4,p,a,span,strong,small),
.pwgce-checkout-page :where(h1,h2,h3,h4,p,a,span,strong,small){overflow-wrap:anywhere}

/* Drawers / overlays: never exceed the current viewport and respect notches. */
.pwgce-drawer{max-width:min(92vw,420px);overscroll-behavior:contain;padding-left:max(18px,env(safe-area-inset-left,0px));padding-right:max(18px,env(safe-area-inset-right,0px));padding-bottom:max(18px,env(safe-area-inset-bottom,0px))}
.pwgce-drawer-overlay{inset:0}
body.pwgce-lock-scroll{overflow:hidden!important;touch-action:none}

/* WooCommerce cart: neutralise theme floats/widths that conflict with the PWG grid. */
.pwgce-cart-live .woocommerce{max-width:100%;min-width:0;width:100%}
.pwgce-cart-live .woocommerce-cart-form,
.pwgce-cart-live .cart-collaterals,
.pwgce-cart-live .cart-collaterals .cart_totals,
.pwgce-cart-live .cart_totals{float:none!important;max-width:100%!important;min-width:0!important;width:100%!important}
.pwgce-cart-live .woocommerce-cart-form{overflow:hidden}
.pwgce-cart-live table.shop_table{max-width:100%;table-layout:auto;width:100%}
.pwgce-cart-live .cart_totals table{table-layout:fixed}
.pwgce-cart-live .cart_totals th,
.pwgce-cart-live .cart_totals td{min-width:0;overflow-wrap:anywhere;word-break:normal}
.pwgce-cart-live .cart_totals td :where(.amount,.woocommerce-Price-amount){white-space:normal}
.pwgce-cart-live ul#shipping_method,
.pwgce-cart-live ul#shipping_method li,
.pwgce-cart-live ul#shipping_method label{max-width:100%;min-width:0}
.pwgce-cart-live ul#shipping_method label{align-items:flex-start;flex-wrap:wrap;overflow-wrap:anywhere}
.pwgce-cart-live .woocommerce-shipping-destination,
.pwgce-cart-live .shipping-calculator-form{max-width:100%;overflow-wrap:anywhere}
.pwgce-cart-live .select2-container{max-width:100%!important;width:100%!important}

/* Checkout: keep the review/payment column inside the layout. */
.pwgce-checkout-live form.checkout,
.pwgce-checkout-live #customer_details,
.pwgce-checkout-live #order_review{max-width:100%;min-width:0}
.pwgce-checkout-live #order_review{width:100%}
.pwgce-checkout-live .woocommerce-checkout-review-order-table{table-layout:fixed}
.pwgce-checkout-live .woocommerce-checkout-review-order-table th,
.pwgce-checkout-live .woocommerce-checkout-review-order-table td{min-width:0;overflow-wrap:anywhere}
.pwgce-checkout-live .woocommerce-checkout-review-order-table .product-total{white-space:normal}
.pwgce-checkout-live .select2-container{max-width:100%!important}

/* Shop cards: protect long titles/prices and prevent action buttons from pushing cards wider. */
.pwgce-shop-product-list .pwgce-reference-product-card,
.pwgce-shop-product-list .pwgce-card-info,
.pwgce-shop-product-list .pwgce-card-bottom,
.pwgce-shop-product-list .pwgce-card-price{max-width:100%;min-width:0}
.pwgce-shop-product-list .pwgce-card-title,
.pwgce-shop-product-list .pwgce-card-price{overflow-wrap:anywhere}
.pwgce-shop-product-list .pwgce-card-bottom{flex-wrap:wrap}
.pwgce-shop-product-list .pwgce-card-plus{flex:0 0 auto}
.pwgce-shop-product-list .pwgce-toolbar-controls,
.pwgce-shop-product-list .pwgce-toolbar-label{min-width:0}
.pwgce-shop-product-list .pwgce-toolbar-label select{min-width:0}


/* Complete single product: hard stops for theme/grid overflow on tablets and phones. */
.pwgce-complete-product,.pwgce-complete-product .pwgce-product-shell,.pwgce-complete-product .pwgce-product-main,.pwgce-complete-product .pwgce-product-gallery,.pwgce-complete-product .pwgce-product-summary{max-width:100%;min-width:0}
.pwgce-complete-product :where(.woocommerce-variation-add-to-cart,.variations_form,.variations,.quantity,.pwgce-product-actions){max-width:100%;min-width:0}
.pwgce-complete-product .variations{table-layout:fixed;width:100%}
.pwgce-complete-product .variations :where(th,td){overflow-wrap:anywhere;white-space:normal}

@media(max-width:640px){.pwgce-complete-product .pwgce-product-gallery{grid-template-columns:minmax(0,1fr)!important}.pwgce-complete-product .pwgce-product-thumbnails{display:flex!important;gap:8px;max-width:100%;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity}.pwgce-complete-product .pwgce-product-thumbnails>*{flex:0 0 68px;scroll-snap-align:start}.pwgce-complete-product :where(.single_add_to_cart_button,.pwgce-buy-now){min-height:44px;max-width:100%}}

/* Comparison / large tables stay usable instead of widening the page. */
.pwgce-widget :where(.pwgce-compare-scroll,.pwgce-table-scroll,.woocommerce-table){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

@media (max-width:860px){
  .pwgce-cart-live .woocommerce,
  .pwgce-checkout-live form.checkout{grid-template-columns:minmax(0,1fr)!important}
  .pwgce-cart-live .cart_totals,
  .pwgce-checkout-live #order_review{position:static!important;top:auto!important}
}

@media (max-width:640px){
  .pwgce-widget{max-width:100%;overflow-x:clip}
  .pwgce-drawer{width:min(88vw,360px)}
  .pwgce-cart-live .cart_totals,
  .pwgce-checkout-live #order_review{border-radius:14px;padding:16px}
  .pwgce-cart-live .wc-proceed-to-checkout .checkout-button,
  .pwgce-cart-live .coupon .button,
  .pwgce-cart-live .actions>button,
  .pwgce-checkout-live #place_order{min-height:44px;width:100%}
}

@media (max-width:400px){
  .pwgce-shop-product-list .pwgce-shop-products:not(.pwgce-products-list-view){grid-template-columns:1fr!important}
  .pwgce-shop-product-list .pwgce-reference-product-card{border-radius:12px}
  .pwgce-shop-product-list .pwgce-card-info{padding:12px}
}

/* Save for later: focused cart rows. */
.pwgce-save-for-later .pwgce-heading{margin:0 0 8px}.pwgce-save-for-later .pwgce-description{margin:0 0 16px}.pwgce-save-for-later-list{display:grid;gap:10px}.pwgce-save-item{align-items:center;border:1px solid #e2e8f0;border-radius:12px;display:grid;gap:12px;grid-template-columns:64px minmax(0,1fr) auto;min-width:0;padding:12px}.pwgce-save-item>img{border-radius:9px;height:64px;object-fit:cover;width:64px}.pwgce-save-item>div{display:grid;min-width:0}.pwgce-save-item strong,.pwgce-save-item span{overflow-wrap:anywhere}.pwgce-save-item .pwgce-list-toggle{background:#0274ff;border:0;border-radius:9px;color:#fff;cursor:pointer;min-height:42px;padding:10px 14px}.pwgce-save-item .pwgce-list-toggle:disabled{cursor:wait;opacity:.6}
@media(max-width:640px){.pwgce-save-item{grid-template-columns:56px minmax(0,1fr)}.pwgce-save-item>img{height:56px;width:56px}.pwgce-save-item .pwgce-list-toggle{grid-column:1/-1;width:100%}}


/* PWGCE 4.0.1 universal responsive safety */
[data-pwg-widget]{box-sizing:border-box;max-width:100%;min-width:0}
[data-pwg-widget] *,[data-pwg-widget] *::before,[data-pwg-widget] *::after{box-sizing:border-box}
[data-pwg-widget] :where(img,svg,video,canvas,iframe){max-width:100%}
[data-pwg-widget] :where(h1,h2,h3,h4,h5,h6,p,a,span,strong,small,td,th,label){overflow-wrap:anywhere}
[data-pwg-widget] :where(input,select,textarea,button){max-width:100%}
[data-pwg-widget] :where(.pwgce-table-scroll,.pwgce-compare-scroll){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Integrated header / footer do not use the legacy base stylesheet. */
.pwgce-integrated-header[data-pwg-widget="mega-menu"],.pwgce-footer[data-pwg-widget="footer-accordion-columns"]{max-width:100%;min-width:0;width:100%}
.pwgce-integrated-header[data-pwg-widget="mega-menu"] :where(.pwgce-hd-inner,.pwgce-hd-desktop-nav,.pwgce-hd-nav-list,.pwgce-hd-actions,.pwgce-hd-search-panel),
.pwgce-footer[data-pwg-widget="footer-accordion-columns"] :where(.pwgce-footer__inner,.pwgce-footer__main,.pwgce-footer__brand,.pwgce-footer__links-grid,.pwgce-footer__bottom){max-width:100%;min-width:0}

@media(max-width:767px){
  .pwgce-integrated-header[data-pwg-widget="mega-menu"]{overflow-x:clip}
  .pwgce-integrated-header[data-pwg-widget="mega-menu"] .pwgce-hd-inner{gap:8px;min-width:0}
  .pwgce-integrated-header[data-pwg-widget="mega-menu"] :where(.pwgce-hd-menu-button,.pwgce-hd-action-button,.pwgce-hd-search-close){min-height:44px;min-width:44px}
  .pwgce-integrated-header[data-pwg-widget="mega-menu"] :where(.pwgce-hd-drawer,.pwgce-hd-search-panel,.pwgce-hd-cart-drawer){max-width:100vw}
  .pwgce-footer[data-pwg-widget="footer-accordion-columns"] .pwgce-footer__main{grid-template-columns:minmax(0,1fr)!important}
  .pwgce-footer[data-pwg-widget="footer-accordion-columns"] .pwgce-footer__links-grid{grid-template-columns:minmax(0,1fr)!important}
  .pwgce-footer[data-pwg-widget="footer-accordion-columns"] .pwgce-footer__bottom{align-items:flex-start;flex-direction:column;gap:12px}
  .pwgce-footer[data-pwg-widget="footer-accordion-columns"] :where(.pwgce-footer__accordion-toggle,.pwgce-footer__social-link){min-height:44px}
}


/* PWGCE 4.0.10 checkout/order review: scroll naturally with billing details. */
.pwgce-checkout-live form.checkout>.pwgce-order-review-panel{position:static!important;top:auto!important}
.pwgce-checkout-live #order_review,.pwgce-checkout-live #order_review_heading{position:static!important;top:auto!important}
.pwgce-checkout-live .woocommerce-checkout-review-order-table .product-total,
.pwgce-checkout-live .woocommerce-checkout-review-order-table tfoot td{white-space:nowrap}

/* PWGCE 4.0.11 checkout alignment + theme hover safety. */
.pwgce-checkout-live form.checkout{align-items:start!important}
.pwgce-checkout-live #customer_details,.pwgce-checkout-live .pwgce-order-review-panel{align-self:start!important;margin-top:0!important;position:static!important;top:auto!important}
.pwgce-checkout-live .woocommerce-checkout-review-order-table .woocommerce-Price-amount,.pwgce-checkout-live .woocommerce-checkout-review-order-table .woocommerce-Price-currencySymbol{display:inline!important;white-space:nowrap!important}
.pwgce-shop-product-list .pwgce-open-product-filters:hover,.pwgce-shop-product-list .pwgce-open-product-filters:focus,.pwgce-shop-product-list .pwgce-open-product-filters:active{background:#0274ff!important;border-color:#0274ff!important;color:#fff!important}
