/* Commerce presentation only. No cart, checkout or account behaviour overrides. */
body.b2bp-modern-commerce {
  --b2bp-commerce-edge: #e8e0d5;
  --b2bp-commerce-tint: #f5f0e8;
  --b2bp-commerce-shadow: 0 8px 24px rgb(70 53 32 / 5%);
}
/* Product cards, catalogue tools and the two main product surfaces. */
body.b2bp-modern-commerce .woocommerce ul.products li.product,
body.b2bp-modern-commerce ul.products li.product,
body.b2bp-modern-commerce .b2bp-catalog-search,
body.b2bp-modern-commerce .b2bp-shop-filters,
body.b2bp-modern-commerce.single-product div.product > .woocommerce-product-gallery,
body.b2bp-modern-commerce.single-product div.product > .summary.entry-summary {
  border: 1px solid var(--b2bp-commerce-edge) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--b2bp-commerce-shadow) !important;
}
body.b2bp-modern-commerce:not(.tax-product_brand) .woocommerce-products-header {
  padding: clamp(22px, 3vw, 36px);
  margin-bottom: 24px;
  border: 1px solid var(--b2bp-commerce-edge);
  border-radius: 16px;
  background: linear-gradient(120deg, #efe6d8, #fbfaf8 85%);
  box-shadow: var(--b2bp-commerce-shadow);
}
body.b2bp-modern-commerce:not(.tax-product_brand) .woocommerce-products-header .page-title { margin: 0; }
body.b2bp-modern-commerce.single-product div.product .woocommerce-tabs .woocommerce-Tabs-panel {
  padding: clamp(20px, 3vw, 30px) !important;
  border: 1px solid var(--b2bp-commerce-edge) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--b2bp-commerce-shadow);
}
/* Logged-in account: separate navigation and endpoint-content cards. */
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-entry-content {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-entry-content > .woocommerce {
  gap: 24px !important;
}
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-navigation,
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-content {
  padding: clamp(20px, 3vw, 30px) !important;
  border: 1px solid var(--b2bp-commerce-edge) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--b2bp-commerce-shadow) !important;
}
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-navigation { padding: 14px !important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-navigation a { border-radius: 10px; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-navigation .is-active a {
  background: var(--b2bp-commerce-tint) !important;
  color: var(--b2bp-text) !important;
  font-weight: 700;
}
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Addresses .woocommerce-Address,
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-customer-details address {
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid var(--b2bp-commerce-edge);
  border-radius: 12px;
  background: #fbfaf8;
  line-height: 1.75;
}
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-content fieldset {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--b2bp-commerce-edge);
  border-radius: 12px;
}
/* Classic WooCommerce and Cart/Checkout Blocks share the same card finish. */
body.b2bp-modern-commerce.woocommerce-cart .woocommerce-cart-form,
body.b2bp-modern-commerce.woocommerce-cart .cart_totals,
body.b2bp-modern-commerce.woocommerce-checkout form.checkout .col2-set,
body.b2bp-modern-commerce.woocommerce-checkout #order_review,
body.b2bp-modern-commerce.woocommerce-checkout .woocommerce-order,
body.b2bp-modern-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-main,
body.b2bp-modern-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-sidebar {
  padding: clamp(20px, 3vw, 30px) !important;
  border: 1px solid var(--b2bp-commerce-edge) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--b2bp-commerce-shadow) !important;
}
body.b2bp-modern-commerce table.shop_table {
  border-color: var(--b2bp-commerce-edge);
  border-radius: 12px;
  border-spacing: 0;
}
body.b2bp-modern-commerce table.shop_table th {
  background: #f8f6f4;
  font-weight: 600;
}
body.b2bp-modern-commerce table.shop_table :is(td, th) { border-color: var(--b2bp-commerce-edge); }
body.b2bp-modern-commerce.woocommerce-checkout #payment {
  border-radius: 12px;
  background: #f8f6f4;
}
/* Keep quantity controls, payment widgets and third-party fields untouched. */
body.b2bp-modern-commerce .woocommerce-MyAccount-content form :is(input.input-text, textarea, select),
body.b2bp-modern-commerce form.checkout :is(input.input-text, textarea, select) {
  border: 1px solid #dcd5c9;
  border-radius: 10px;
  background: #fff;
  color: var(--b2bp-text);
  min-height: 44px;
}
body.b2bp-modern-commerce .woocommerce-MyAccount-content form :is(input.input-text, textarea, select):focus-visible,
body.b2bp-modern-commerce form.checkout :is(input.input-text, textarea, select):focus-visible {
  outline: 2px solid var(--b2bp-primary);
  outline-offset: 2px;
}
body.b2bp-modern-commerce .woocommerce-MyAccount-content label,
body.b2bp-modern-commerce form.checkout label { line-height: 1.5; }
@media (max-width: 980px) {
  body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-navigation { margin-bottom: 18px !important; }
}
@media (max-width: 600px) {
  body.b2bp-modern-commerce:not(.tax-product_brand) .woocommerce-products-header { padding: 20px; }
  body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-content,
  body.b2bp-modern-commerce.woocommerce-cart .woocommerce-cart-form,
  body.b2bp-modern-commerce.woocommerce-cart .cart_totals,
  body.b2bp-modern-commerce.woocommerce-checkout form.checkout .col2-set,
  body.b2bp-modern-commerce.woocommerce-checkout #order_review,
  body.b2bp-modern-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-main,
  body.b2bp-modern-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-sidebar { padding: 18px !important; }
}

/* The enhanced brand hero already contains the brand title and introduction. */
body.tax-product_brand:has(.b2bp-brand-profile-hero) .woocommerce-products-header {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.tax-product_brand:has(.b2bp-brand-profile-hero) .woocommerce-products-header > .woocommerce-products-header__title {
  display: none;
}

/* Account cards aligned with the information-page design. */
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-MyAccount-content { padding:0!important; border:0!important; background:transparent!important; box-shadow:none!important; min-width:0; }
body.b2bp-modern-commerce.b2bp-account-signed-in :is(.b2bp-orders-intro,.b2bp-order-overview__head,.b2b-company-hero,.b2bp-account-endpoint-hero) { box-sizing:border-box; background:linear-gradient(115deg,#eee5d8,#fbfaf8)!important; border:1px solid var(--b2bp-commerce-edge)!important; border-radius:18px!important; padding:clamp(24px,3vw,42px)!important; margin:0 0 24px!important; box-shadow:0 8px 24px rgba(73,60,43,.04); }
body.b2bp-modern-commerce.b2bp-account-signed-in :is(.b2bp-orders-intro h1,.b2bp-order-overview__head h1,.b2bp-account-endpoint-hero h1,.b2b-company-hero h2) { font-size:clamp(28px,3vw,42px)!important; line-height:1.18!important; letter-spacing:-.025em; margin:12px 0!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in :is(.b2bp-orders-intro p,.b2b-company-hero p) { color:var(--b2bp-muted); line-height:1.75; margin-bottom:0; }
body.b2bp-modern-commerce.b2bp-account-signed-in :is(.b2b-company-card,.b2b-company-panel,.b2bp-order-address-card,.b2bp-order-items-panel,.b2b-account-section,.woocommerce-Address) { box-sizing:border-box; background:#fff!important; border:1px solid var(--b2bp-commerce-edge)!important; border-radius:16px!important; padding:24px!important; box-shadow:0 5px 18px rgba(73,60,43,.035); margin-bottom:20px; min-width:0; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2b-company-grid { gap:18px!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2b-company-card strong { color:var(--b2bp-text); }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2b-company-request-box { background:#f5f0e8!important; border-radius:12px; padding:18px!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Addresses { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Addresses::before,body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Addresses::after { display:none!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Addresses .woocommerce-Address { width:auto!important; float:none!important; margin:0!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Address .woocommerce-Address-title { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-bottom:18px; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Address .woocommerce-Address-title h2 { font-size:24px!important; margin:0!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Address address { font-style:normal; line-height:1.8; overflow-wrap:anywhere; }
body.b2bp-modern-commerce.b2bp-account-signed-in form.woocommerce-EditAccountForm { padding:0!important; border:0!important; background:transparent!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in form.woocommerce-EditAccountForm fieldset { background:#fff; border-radius:16px!important; padding:24px!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in form.woocommerce-EditAccountForm > p:last-child { margin-top:20px; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-address-fields { background:#fff; border:1px solid var(--b2bp-commerce-edge); border-radius:16px; padding:24px; }
body.b2bp-modern-commerce.b2bp-account-signed-in :is(.b2b-account-section h3,.b2b-company-panel h3) { font-size:23px!important; margin-top:0; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-orders-table { width:100%; background:#fff!important; border:1px solid var(--b2bp-commerce-edge)!important; border-radius:16px; border-collapse:separate!important; border-spacing:0 8px!important; padding:12px!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button { display:inline-flex; margin:4px!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-order-fact { border-radius:12px!important; background:#f5f0e8!important; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-order-items-scroll { overflow-x:auto; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-order-address-grid { gap:20px; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-order-address-card address { font-style:normal; }
@media(max-width:760px){
body.b2bp-modern-commerce.b2bp-account-signed-in .woocommerce-Addresses {grid-template-columns:1fr;}
body.b2bp-modern-commerce.b2bp-account-signed-in .b2b-company-grid {grid-template-columns:1fr!important;}
body.b2bp-modern-commerce.b2bp-account-signed-in :is(.b2b-company-card,.b2b-company-panel,.b2b-account-section,.woocommerce-Address,.woocommerce-address-fields){padding:18px!important;}
}

/* Native dashboard content and PDF-plugin invoice action. */
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-account-dashboard-card { background:#fff; border:1px solid var(--b2bp-commerce-edge); border-radius:16px; padding:clamp(20px,3vw,32px); box-shadow:0 5px 18px rgba(73,60,43,.035); line-height:1.8; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-account-dashboard-card p:first-child { margin-top:0; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-account-dashboard-card p:last-child { margin-bottom:0; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-order-overview__head { flex-wrap:wrap; gap:16px; }
body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-view-order-invoice { margin-left:auto; align-self:center; white-space:nowrap; }
@media(max-width:600px){body.b2bp-modern-commerce.b2bp-account-signed-in .b2bp-view-order-invoice { margin-left:0; }}

body.b2bp-modern-commerce .b2bp-order-invoice-panel { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:16px; }
body.b2bp-modern-commerce .b2bp-order-invoice-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:600px){body.b2bp-modern-commerce .b2bp-order-invoice-panel {align-items:flex-start; flex-direction:column;}}
