/*
 * EMPOLAS B2B WooCommerce presentation layer.
 * Business rules stay in WooCommerce and EMPOLAS B2B Core; this file only
 * styles native cart, checkout, account and order screens.
 */

.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-inline: 0;
}

.woocommerce .woocommerce-notices-wrapper:empty {
  display: none;
}

/* Native WooCommerce clearfix pseudo-elements become real flex/grid items. */
body.woocommerce-cart .woocommerce::before,
body.woocommerce-cart .woocommerce::after,
body.woocommerce-account .woocommerce::before,
body.woocommerce-account .woocommerce::after,
body.woocommerce-checkout form.checkout.woocommerce-checkout::before,
body.woocommerce-checkout form.checkout.woocommerce-checkout::after {
  display: none;
  content: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem 1rem 3.1rem;
  border: 1px solid var(--empolas-border);
  border-top: 0;
  border-left-width: 4px;
  border-radius: var(--empolas-radius);
  background: #f8fbfd;
  box-shadow: 0 5px 16px rgba(14, 65, 118, 0.05);
  color: var(--empolas-ink);
}

.woocommerce-message {
  border-left-color: var(--empolas-commerce-green, #4daf51);
}

.woocommerce-info {
  border-left-color: var(--empolas-blue);
}

.woocommerce-error {
  border-left-color: var(--empolas-red);
  background: #fff8f8;
}

.woocommerce-message::before {
  color: var(--empolas-commerce-green, #4daf51);
}

.woocommerce-info::before {
  color: var(--empolas-blue);
}

.woocommerce-error::before {
  color: var(--empolas-red);
}

.woocommerce form .form-row {
  margin-bottom: 1rem;
}

.woocommerce form .form-row label {
  margin-bottom: 0.35rem;
  color: var(--empolas-ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
}

.woocommerce form .form-row .required {
  color: var(--empolas-red);
  text-decoration: none;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single,
.woocommerce .select2-container .select2-selection--multiple {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #c8d4df;
  border-radius: max(5px, calc(var(--empolas-radius) - 2px));
  background: #fff;
  color: var(--empolas-ink);
  font-size: 16px;
  box-shadow: 0 1px 2px rgba(14, 65, 118, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.woocommerce form .form-row textarea {
  min-height: 112px;
  resize: vertical;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce .select2-container--focus .select2-selection--single,
.woocommerce .select2-container--open .select2-selection--single,
.woocommerce .select2-container--focus .select2-selection--multiple {
  border-color: var(--empolas-blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(14, 65, 118, 0.13);
}

.woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: 0;
  line-height: 26px;
}

.woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

.woocommerce .quantity .qty {
  width: 74px;
  min-height: 44px;
  padding: 0.45rem 0.5rem;
  border: 1px solid #c8d4df;
  border-radius: max(5px, calc(var(--empolas-radius) - 3px));
  background: #fff;
  color: var(--empolas-ink);
  font-size: 16px;
  text-align: center;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  border-radius: var(--empolas-radius);
  background: var(--empolas-secondary-button-bg, var(--empolas-blue));
  color: var(--empolas-secondary-button-text, #fff);
  font-size: var(--empolas-secondary-button-font-size-desktop, 16px);
  font-weight: var(--empolas-secondary-button-font-weight, 700);
  line-height: 1.2;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background: var(--empolas-secondary-button-hover-bg, #092f56);
  color: var(--empolas-secondary-button-hover-text, #fff);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce .checkout-button,
.woocommerce #place_order,
.woocommerce-account .woocommerce-form-login__submit,
.woocommerce-account .woocommerce-form-register__submit,
.woocommerce-account .woocommerce-EditAccountForm button[type="submit"],
.woocommerce-account .woocommerce-address-fields button[type="submit"],
.woocommerce-account .woocommerce-ResetPassword button[type="submit"] {
  background: var(--empolas-primary-button-bg, var(--empolas-commerce-green, #4daf51));
  color: var(--empolas-primary-button-text, #fff);
  font-size: var(--empolas-primary-button-font-size-desktop, 16px);
  font-weight: var(--empolas-primary-button-font-weight, 700);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce .checkout-button:hover,
.woocommerce #place_order:hover,
.woocommerce-account .woocommerce-form-login__submit:hover,
.woocommerce-account .woocommerce-form-register__submit:hover,
.woocommerce-account .woocommerce-EditAccountForm button[type="submit"]:hover,
.woocommerce-account .woocommerce-address-fields button[type="submit"]:hover,
.woocommerce-account .woocommerce-ResetPassword button[type="submit"]:hover {
  background: var(--empolas-primary-button-hover-bg, #3f9444);
  color: var(--empolas-primary-button-hover-text, #fff);
}

/* Cart */
body.woocommerce-cart .woocommerce {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: 1.5rem 1.75rem;
  align-items: start;
}

body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper,
body.woocommerce-cart .woocommerce > .woocommerce-message,
body.woocommerce-cart .woocommerce > .woocommerce-info,
body.woocommerce-cart .woocommerce > .woocommerce-error,
body.woocommerce-cart .woocommerce > .return-to-shop,
body.woocommerce-cart .woocommerce > .cross-sells {
  grid-column: 1 / -1;
}

body.woocommerce-cart .woocommerce-cart-form {
  grid-column: 1;
  min-width: 0;
}

body.woocommerce-cart .cart-collaterals {
  grid-column: 2;
  width: auto;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
  float: none;
  width: 100%;
  padding: 1.35rem;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: var(--empolas-shadow);
}

body.woocommerce-cart .cart-collaterals .cart_totals h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--empolas-border);
  color: var(--empolas-blue);
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
  text-align: left;
}

body.woocommerce-cart table.shop_table {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--empolas-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(14, 65, 118, 0.06);
}

body.woocommerce-cart table.shop_table thead th {
  padding: 0.85rem 0.8rem;
  border-bottom: 1px solid var(--empolas-border);
  background: #f2f6fa;
  color: var(--empolas-blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: none;
}

body.woocommerce-cart table.shop_table td {
  padding: 0.9rem 0.8rem;
  border-top: 1px solid #e8eef3;
  vertical-align: middle;
}

body.woocommerce-cart table.shop_table tbody tr:first-child td {
  border-top: 0;
}

body.woocommerce-cart td.product-thumbnail {
  width: 76px;
}

body.woocommerce-cart td.product-thumbnail img {
  width: 62px;
  min-width: 62px;
  border: 1px solid #e6edf3;
  border-radius: max(5px, calc(var(--empolas-radius) - 2px));
  background: #fff;
}

body.woocommerce-cart td.product-name a {
  color: var(--empolas-blue);
  font-weight: 700;
  text-decoration: none;
}

body.woocommerce-cart td.product-name a:hover {
  color: var(--empolas-red);
}

body.woocommerce-cart td.product-price,
body.woocommerce-cart td.product-subtotal,
body.woocommerce-cart .cart_totals .amount {
  color: var(--empolas-blue);
  font-weight: 700;
}

body.woocommerce-cart a.remove {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #f2c5c5;
  border-radius: 50%;
  background: #fff8f8;
  color: var(--empolas-red) !important;
  font-size: 1.1rem;
  line-height: 1;
}

body.woocommerce-cart a.remove:hover,
body.woocommerce-cart a.remove:focus-visible {
  border-color: var(--empolas-red);
  background: var(--empolas-red);
  color: #fff !important;
}

body.woocommerce-cart td.actions {
  padding: 1rem;
  background: #f8fafc;
}

body.woocommerce-cart td.actions .coupon {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

body.woocommerce-cart td.actions .coupon .input-text {
  width: min(260px, 100%);
  min-height: 44px;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid #c8d4df;
  border-radius: max(5px, calc(var(--empolas-radius) - 2px));
}

body.woocommerce-cart .cart_totals table.shop_table {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
  padding: 0.75rem 0;
  border-top: 1px solid #e7edf2;
  background: transparent;
}

body.woocommerce-cart .cart_totals table.shop_table tr:first-child th,
body.woocommerce-cart .cart_totals table.shop_table tr:first-child td {
  border-top: 0;
}

body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
  padding-top: 1rem;
  color: var(--empolas-blue);
  font-size: 1.12rem;
}

body.woocommerce-cart .wc-proceed-to-checkout {
  padding: 1rem 0 0;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  width: 100%;
  margin: 0;
  min-height: 54px;
}

body.woocommerce-cart .woocommerce-shipping-methods,
body.woocommerce-checkout .woocommerce-shipping-methods,
body.woocommerce-checkout .wc_payment_methods {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.woocommerce-cart .woocommerce-shipping-methods li,
body.woocommerce-checkout .woocommerce-shipping-methods li {
  margin: 0.45rem 0;
}

/* Checkout */
body.woocommerce-checkout form.checkout.woocommerce-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 0 1.75rem;
  align-items: start;
}

body.woocommerce-checkout form.checkout #customer_details {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: auto;
}

body.woocommerce-checkout form.checkout #order_review_heading {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 0.75rem;
  color: var(--empolas-blue);
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
  text-align: left;
}

body.woocommerce-checkout form.checkout #order_review {
  grid-column: 2;
  grid-row: 2;
  width: auto;
  padding: 1.35rem;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: var(--empolas-shadow);
}

body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
  float: none;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 1.35rem;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(14, 65, 118, 0.05);
}

body.woocommerce-checkout #customer_details h3 {
  margin: 0 0 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--empolas-border);
  color: var(--empolas-blue);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  text-align: left;
}

body.woocommerce-checkout #ship-to-different-address {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  font-size: 1rem;
}

body.woocommerce-checkout #ship-to-different-address label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table {
  margin: 0 0 1.15rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table th,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table td {
  padding: 0.75rem 0;
  border-top: 1px solid #e7edf2;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th {
  border-top: 0;
  color: var(--empolas-blue);
  font-size: 0.88rem;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-total,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
  text-align: right;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table .order-total th,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table .order-total td {
  color: var(--empolas-blue);
  font-size: 1.08rem;
  font-weight: 700;
}

body.woocommerce-checkout #payment {
  border: 1px solid #dce6ee;
  border-radius: var(--empolas-radius);
  background: #f5f8fb;
}

body.woocommerce-checkout #payment ul.payment_methods {
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #dce6ee;
}

body.woocommerce-checkout #payment ul.payment_methods li {
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid #e1e9ef;
}

body.woocommerce-checkout #payment ul.payment_methods li:first-child {
  border-top: 0;
}

body.woocommerce-checkout #payment ul.payment_methods label {
  color: var(--empolas-ink);
  font-weight: 700;
  cursor: pointer;
}

body.woocommerce-checkout #payment div.payment_box {
  margin: 0.65rem 0 0.15rem;
  border-radius: max(5px, calc(var(--empolas-radius) - 2px));
  background: #eaf1f7;
  color: var(--empolas-ink);
  font-size: 0.92rem;
}

body.woocommerce-checkout #payment div.payment_box::before {
  border-bottom-color: #eaf1f7;
}

body.woocommerce-checkout #payment .place-order {
  padding: 1rem;
}

body.woocommerce-checkout #place_order,
body.woocommerce-checkout #place-order {
  width: 100%;
  min-height: 56px;
  margin: 0 0 1.6rem;
  float: none;
}

body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  color: var(--empolas-muted);
  font-size: 0.9rem;
}

body.woocommerce-checkout .woocommerce-form-login,
body.woocommerce-checkout .checkout_coupon {
  margin: 0 0 1.25rem;
  padding: 1.15rem;
  border: 1px solid var(--empolas-border);
  border-radius: var(--empolas-radius);
  background: #fff;
}

/* My Account and order details */
/*
 * WooCommerce and account extensions may inject extra direct children before
 * the navigation. A grid with automatic placement can then put navigation and
 * content into different rows. Flex ordering keeps the native two-column
 * account layout stable while allowing notices and extension panels to remain
 * full width above it.
 */
body.woocommerce-account .woocommerce {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

body.woocommerce-account .woocommerce > :not(.woocommerce-MyAccount-navigation):not(.woocommerce-MyAccount-content) {
  flex: 0 0 100%;
  width: 100%;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
  order: 10;
  flex: 0 0 clamp(220px, 22vw, 250px);
  float: none;
  width: auto;
  overflow: hidden;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(14, 65, 118, 0.05);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li + li {
  border-top: 1px solid #e6edf3;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 0.82rem 1rem;
  color: var(--empolas-blue);
  font-weight: 600;
  text-decoration: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
  background: #eef4f9;
  color: var(--empolas-red);
}

body.woocommerce-account .woocommerce-MyAccount-content {
  order: 11;
  flex: 1 1 680px;
  float: none;
  width: auto;
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(14, 65, 118, 0.05);
}

body.woocommerce-account .woocommerce-MyAccount-content > :first-child {
  margin-top: 0;
}

body.woocommerce-account .woocommerce form.login,
body.woocommerce-account .woocommerce form.register,
body.woocommerce-account .woocommerce form.woocommerce-ResetPassword,
body.woocommerce-account .woocommerce .woocommerce-form-login {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: var(--empolas-shadow);
}

body.woocommerce-account .woocommerce .u-columns.col2-set {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

body.woocommerce-account .woocommerce .u-columns.col2-set::before,
body.woocommerce-account .woocommerce .u-columns.col2-set::after {
  display: none;
}

body.woocommerce-account .woocommerce .u-column1,
body.woocommerce-account .woocommerce .u-column2 {
  float: none;
  width: auto;
}

body.woocommerce-account table.shop_table,
.woocommerce-order-details table.shop_table,
.woocommerce-customer-details address {
  overflow: hidden;
  border: 1px solid var(--empolas-border);
  border-radius: var(--empolas-radius);
  background: #fff;
}

.woocommerce-order-details,
.woocommerce-customer-details,
.woocommerce-order-overview {
  margin-bottom: 1.5rem;
}

.woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  padding: 0;
}

.woocommerce-order-overview li {
  min-width: 0;
  margin: 0 !important;
  padding: 0.85rem 1rem !important;
  border: 1px solid var(--empolas-border) !important;
  border-radius: var(--empolas-radius);
  background: #f7fafc;
}

/* Block-based checkout/cart fallback styling. */
.wc-block-cart,
.wc-block-checkout {
  --wp--preset--color--contrast: var(--empolas-ink);
}

.wc-block-components-sidebar,
.wc-block-components-order-summary,
.wc-block-checkout__payment-method,
.wc-block-components-totals-wrapper {
  border-color: var(--empolas-border) !important;
  border-radius: var(--empolas-radius);
}

.wc-block-components-button:not(.is-link) {
  border-radius: var(--empolas-radius);
  background: var(--empolas-primary-button-bg, var(--empolas-commerce-green, #4daf51));
  color: var(--empolas-primary-button-text, #fff);
  font-weight: var(--empolas-primary-button-font-weight, 700);
}

@media (max-width: 980px) {
  body.woocommerce-cart .woocommerce,
  body.woocommerce-checkout form.checkout.woocommerce-checkout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-cart .woocommerce-cart-form,
  body.woocommerce-cart .cart-collaterals,
  body.woocommerce-checkout form.checkout #customer_details,
  body.woocommerce-checkout form.checkout #order_review_heading,
  body.woocommerce-checkout form.checkout #order_review {
    grid-column: 1;
    grid-row: auto;
  }

  body.woocommerce-cart .cart-collaterals {
    margin-top: 0;
  }
}

@media (max-width: 782px) {
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce #respond input#submit {
    font-size: var(--empolas-secondary-button-font-size-mobile, 15px);
  }

  .woocommerce a.button.alt,
  .woocommerce button.button.alt,
  .woocommerce input.button.alt,
  .woocommerce .checkout-button,
  .woocommerce #place_order,
  .woocommerce-account .woocommerce-form-login__submit,
  .woocommerce-account .woocommerce-form-register__submit,
  .woocommerce-account .woocommerce-EditAccountForm button[type="submit"],
  .woocommerce-account .woocommerce-address-fields button[type="submit"],
  .woocommerce-account .woocommerce-ResetPassword button[type="submit"] {
    font-size: var(--empolas-primary-button-font-size-mobile, 15px);
  }

  body.woocommerce-account .woocommerce .u-columns.col2-set {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce-MyAccount-content {
    flex: 0 0 100%;
    width: 100%;
  }

  body.woocommerce-cart table.shop_table_responsive thead {
    display: none;
  }

  body.woocommerce-cart table.shop_table_responsive,
  body.woocommerce-cart table.shop_table_responsive tbody,
  body.woocommerce-cart table.shop_table_responsive tr,
  body.woocommerce-cart table.shop_table_responsive td {
    display: block;
    width: 100%;
  }

  body.woocommerce-cart table.shop_table_responsive tr.cart_item {
    position: relative;
    margin: 0;
    padding: 0.8rem;
    border-bottom: 1px solid var(--empolas-border);
  }

  body.woocommerce-cart table.shop_table_responsive td {
    min-height: 0;
    padding: 0.45rem 0;
    border: 0;
    text-align: right !important;
  }

  body.woocommerce-cart table.shop_table_responsive td::before {
    color: var(--empolas-muted);
    font-size: 0.82rem;
    font-weight: 600;
  }

  body.woocommerce-cart table.shop_table_responsive td.product-remove {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: auto;
    padding: 0;
  }

  body.woocommerce-cart table.shop_table_responsive td.product-thumbnail {
    display: none;
  }

  body.woocommerce-cart table.shop_table_responsive td.product-name {
    padding-right: 2.7rem;
    text-align: left !important;
  }

  body.woocommerce-cart table.shop_table_responsive td.product-name::before,
  body.woocommerce-cart table.shop_table_responsive td.product-remove::before {
    display: none;
  }

  body.woocommerce-cart td.actions .coupon {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-cart td.actions .coupon .input-text,
  body.woocommerce-cart td.actions .coupon button,
  body.woocommerce-cart td.actions > button {
    width: 100%;
  }

  body.woocommerce-cart td.actions > button {
    margin-top: 0.6rem;
  }

  body.woocommerce-checkout #customer_details .col-1,
  body.woocommerce-checkout #customer_details .col-2,
  body.woocommerce-checkout form.checkout #order_review,
  body.woocommerce-account .woocommerce-MyAccount-content {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce form .form-row input.input-text,
  .woocommerce form .form-row textarea,
  .woocommerce form .form-row select {
    transition: none;
  }
}

/* 0.4.5 — compact single-column cart and automatic quantity updates. */
body.woocommerce-cart .woocommerce {
  display: block;
}

body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cart-collaterals {
  width: 100%;
  max-width: none;
}

body.woocommerce-cart .cart-collaterals {
  margin-top: 1rem;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
  gap: 1rem 1.5rem;
  align-items: center;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(14, 65, 118, 0.05);
}

body.woocommerce-cart .cart-collaterals .cart_totals h2,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr:not(.order-total) {
  display: none;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table {
  grid-column: 1;
  width: 100%;
  margin: 0;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total {
  display: table-row;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total th,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total td {
  width: auto;
  padding: 0;
  border: 0;
  color: var(--empolas-blue);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  font-weight: 700;
  vertical-align: middle;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total th {
  text-align: left;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total td {
  text-align: right;
}

body.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout {
  grid-column: 2;
  padding: 0;
}

body.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout a.checkout-button {
  min-height: 52px;
}

/* Keep the native update action available to WooCommerce, but update quantities by AJAX. */
body.woocommerce-cart button[name="update_cart"] {
  display: none !important;
}

body.woocommerce-cart .woocommerce-cart-form.is-updating {
  position: relative;
  opacity: 0.68;
  pointer-events: none;
}

body.woocommerce-cart .woocommerce-cart-form.is-updating::after {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(14, 65, 118, 0.18);
  border-top-color: var(--empolas-blue);
  border-radius: 50%;
  content: "";
  animation: empolas-cart-spin 700ms linear infinite;
}

@keyframes empolas-cart-spin {
  to { transform: rotate(360deg); }
}

/* Remove action: a simple red cross, without a circular button treatment. */
body.woocommerce-cart a.remove {
  display: inline-block;
  width: auto;
  height: auto;
  padding: 0.15rem 0.3rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--empolas-red) !important;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

body.woocommerce-cart a.remove:hover,
body.woocommerce-cart a.remove:focus-visible {
  border: 0;
  background: transparent;
  color: #991b1b !important;
}

body.woocommerce-cart a.remove:focus-visible {
  outline: 2px solid var(--empolas-red);
  outline-offset: 3px;
}

/* Product metadata / promotion details in cart and checkout. */
body.woocommerce-cart td.product-name dl.variation,
body.woocommerce-checkout td.product-name dl.variation,
.woocommerce-order-details td.product-name dl.variation {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.18rem 0.45rem;
  margin: 0.42rem 0 0;
  color: var(--empolas-muted);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.35;
}

body.woocommerce-cart td.product-name dl.variation dt,
body.woocommerce-checkout td.product-name dl.variation dt,
.woocommerce-order-details td.product-name dl.variation dt {
  margin: 0;
  color: var(--empolas-blue);
  font-weight: 600;
}

body.woocommerce-cart td.product-name dl.variation dd,
body.woocommerce-checkout td.product-name dl.variation dd,
.woocommerce-order-details td.product-name dl.variation dd,
body.woocommerce-cart td.product-name dl.variation p,
body.woocommerce-checkout td.product-name dl.variation p,
.woocommerce-order-details td.product-name dl.variation p {
  margin: 0;
  color: var(--empolas-muted);
  font-size: inherit;
  font-weight: 400;
}

.wc-block-components-product-details {
  color: var(--empolas-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.wc-block-components-product-details__name {
  color: var(--empolas-blue);
  font-weight: 600;
}

/* Coupon remains available, but is visually secondary. */
body.woocommerce-cart td.actions .coupon button[name="apply_coupon"] {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--empolas-blue);
  background: #fff;
  color: var(--empolas-blue);
  font-size: 0.9rem;
  font-weight: 600;
}

body.woocommerce-cart td.actions .coupon button[name="apply_coupon"]:hover,
body.woocommerce-cart td.actions .coupon button[name="apply_coupon"]:focus-visible {
  border-color: #092f56;
  background: #eef4f9;
  color: #092f56;
}

/* Blue labels in cart and checkout, including the block checkout fallback. */
body.woocommerce-cart label,
body.woocommerce-checkout form .form-row label,
body.woocommerce-checkout #payment ul.payment_methods label,
body.woocommerce-checkout .woocommerce-shipping-methods label,
.wc-block-checkout .wc-block-components-text-input label,
.wc-block-checkout .wc-block-components-checkbox__label,
.wc-block-checkout .wc-block-components-radio-control__label,
.wc-block-cart .wc-block-components-quantity-selector__input {
  color: var(--empolas-blue);
}

@media (max-width: 782px) {
  body.woocommerce-cart .cart-collaterals .cart_totals {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table,
  body.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout {
    grid-column: 1;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total th,
  body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total td {
    display: table-cell;
    width: auto;
  }

  body.woocommerce-cart td.product-name dl.variation,
  body.woocommerce-checkout td.product-name dl.variation,
  .woocommerce-order-details td.product-name dl.variation {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.woocommerce-cart .woocommerce-cart-form.is-updating::after {
    animation: none;
  }
}


/* 0.4.7 — compact Czech B2B checkout layout. */
/* Direct order-attribution web components are invisible form helpers, not grid rows. */
body.woocommerce-checkout form.checkout.woocommerce-checkout > wc-order-attribution-inputs {
  display: none;
}

body.woocommerce-checkout form.checkout.woocommerce-checkout {
  gap: 1.75rem;
}

body.woocommerce-checkout form.checkout #customer_details {
  grid-column: 1;
  grid-row: 1;
}

body.woocommerce-checkout form.checkout > #order_review_heading,
body.woocommerce-checkout form.checkout > #order_review {
  grid-column: 2;
}

body.woocommerce-checkout form.checkout > #order_review_heading {
  grid-row: 1;
  align-self: start;
}

body.woocommerce-checkout form.checkout > #order_review {
  grid-row: 1;
  align-self: start;
  margin-top: 3.2rem;
}

body.woocommerce-checkout .empolas-checkout-review-column {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 0;
}

body.woocommerce-checkout .empolas-checkout-review-column #order_review_heading {
  margin: 0 0 0.75rem;
}

body.woocommerce-checkout .empolas-checkout-review-column #order_review {
  width: 100%;
}

@media (min-width: 1024px) {
  body.woocommerce-checkout .empolas-checkout-review-column {
    position: static;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  body.woocommerce-checkout .empolas-checkout-review-column.is-sticky {
    position: sticky;
    top: calc(var(--empolas-sticky-header-offset, 112px) + 1rem);
  }
}

body.woocommerce-checkout .empolas-country-hidden,
body.woocommerce-checkout #billing_country_field,
body.woocommerce-checkout #shipping_country_field {
  display: none !important;
}

body.woocommerce-checkout #billing_company_field,
body.woocommerce-checkout #shipping_company_field {
  clear: both;
}

@media (min-width: 783px) {
  body.woocommerce-checkout #billing_city_field,
  body.woocommerce-checkout #shipping_city_field,
  body.woocommerce-checkout #billing_phone_field {
    float: left;
    clear: left;
    width: 48%;
  }

  body.woocommerce-checkout #billing_postcode_field,
  body.woocommerce-checkout #shipping_postcode_field,
  body.woocommerce-checkout #billing_email_field {
    float: right;
    clear: right;
    width: 48%;
  }
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper::after,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper::after {
  display: table;
  clear: both;
  content: "";
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table .order-total th,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table .order-total td,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total th,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table .order-total td {
  font-weight: 700;
}

@media (max-width: 1023px) {
  body.woocommerce-checkout .empolas-checkout-review-column {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 782px) {
  body.woocommerce-checkout .empolas-checkout-review-column {
    grid-column: 1;
    grid-row: auto;
  }

  body.woocommerce-checkout form.checkout > #order_review_heading,
  body.woocommerce-checkout form.checkout > #order_review {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0;
  }
}

/* 0.4.8 — compact account actions and EMPOLAS B2B Core presentation. */
body.woocommerce-account .woocommerce-MyAccount-content a.button,
body.woocommerce-account .woocommerce-MyAccount-content button.button,
body.woocommerce-account .woocommerce-MyAccount-content input.button,
body.woocommerce-account .woocommerce-MyAccount-content .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  margin: 0.15rem 0.2rem 0.15rem 0;
  padding: 0.42rem 0.68rem;
  border: 1px solid rgba(14, 65, 118, 0.35);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  color: var(--empolas-blue);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

body.woocommerce-account .woocommerce-MyAccount-content a.button:hover,
body.woocommerce-account .woocommerce-MyAccount-content button.button:hover,
body.woocommerce-account .woocommerce-MyAccount-content input.button:hover,
body.woocommerce-account .woocommerce-MyAccount-content .button:hover,
body.woocommerce-account .woocommerce-MyAccount-content a.button:focus-visible,
body.woocommerce-account .woocommerce-MyAccount-content button.button:focus-visible,
body.woocommerce-account .woocommerce-MyAccount-content input.button:focus-visible,
body.woocommerce-account .woocommerce-MyAccount-content .button:focus-visible {
  border-color: var(--empolas-blue);
  background: #eef4f9;
  color: var(--empolas-blue);
}

/* Form-saving actions stay comfortably sized; only contextual actions are compact. */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-EditAccountForm button[type="submit"],
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-address-fields button[type="submit"],
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-ResetPassword button[type="submit"] {
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-color: transparent;
  background: var(--empolas-primary-button-bg, var(--empolas-commerce-green, #4daf51));
  color: var(--empolas-primary-button-text, #fff);
  font-size: 0.94rem;
  font-weight: 600;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-EditAccountForm button[type="submit"]:hover,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-address-fields button[type="submit"]:hover,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-ResetPassword button[type="submit"]:hover {
  border-color: transparent;
  background: var(--empolas-primary-button-hover-bg, #3f9444);
  color: var(--empolas-primary-button-hover-text, #fff);
}

body.woocommerce-account table.woocommerce-orders-table {
  table-layout: auto;
}

body.woocommerce-account table.woocommerce-orders-table th,
body.woocommerce-account table.woocommerce-orders-table td {
  padding: 0.72rem 0.65rem;
  vertical-align: middle;
}

body.woocommerce-account table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
  min-width: 175px;
  white-space: normal;
}

body.woocommerce-account table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
  vertical-align: middle;
}

body.woocommerce-account table.woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
  color: var(--empolas-blue);
  font-weight: 600;
}

body.woocommerce-account table.woocommerce-orders-table tr.woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status,
body.woocommerce-account table.woocommerce-orders-table tr.woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status {
  color: #287c2d;
}

body.woocommerce-account table.woocommerce-orders-table tr.woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
body.woocommerce-account table.woocommerce-orders-table tr.woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status {
  color: var(--empolas-red);
}

body.woocommerce-account table.woocommerce-orders-table tr.woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status,
body.woocommerce-account table.woocommerce-orders-table tr.woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status {
  color: #8a5a00;
}

/* Native WooCommerce address cards. */
body.woocommerce-account .woocommerce-Addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

body.woocommerce-account .woocommerce-Addresses::before,
body.woocommerce-account .woocommerce-Addresses::after {
  display: none;
  content: none;
}

body.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--empolas-border);
  border-radius: var(--empolas-radius);
  background: #f9fbfd;
}

body.woocommerce-account .woocommerce-Address-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

body.woocommerce-account .woocommerce-Address-title h2,
body.woocommerce-account .woocommerce-Address-title h3 {
  margin: 0;
  color: var(--empolas-blue);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}

body.woocommerce-account .woocommerce-Address-title .edit {
  flex: 0 0 auto;
  color: var(--empolas-blue);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

body.woocommerce-account .woocommerce-Address address,
body.woocommerce-account .woocommerce-customer-details address {
  font-style: normal;
  line-height: 1.6;
}

/* Presentation hooks for the address book and repeat-order panels supplied by EMPOLAS B2B Core. */
body.woocommerce-account :is(.empolas-b2b-addresses, .empolas-b2b-address-list, .empolas-b2b-address-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

body.woocommerce-account :is(.empolas-b2b-address-card, .empolas-b2b-address-item) {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--empolas-border);
  border-radius: var(--empolas-radius);
  background: #f9fbfd;
}

body.woocommerce-account :is(.empolas-b2b-address-badge, .empolas-b2b-badge, .empolas-b2b-status-badge) {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #eaf3eb;
  color: #287c2d;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.15;
}

body.woocommerce-account :is(.empolas-b2b-repeat-order, .empolas-b2b-repeat-order-preflight, .empolas-b2b-repeat-preflight, .empolas-b2b-order-preflight) {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--empolas-border);
  border-radius: var(--empolas-radius);
  background: #f9fbfd;
}

body.woocommerce-account :is(.empolas-b2b-repeat-order, .empolas-b2b-repeat-order-preflight, .empolas-b2b-repeat-preflight, .empolas-b2b-order-preflight) table {
  margin: 0.75rem 0;
  background: #fff;
}

body.woocommerce-account :is(.empolas-b2b-repeat-order, .empolas-b2b-repeat-order-preflight, .empolas-b2b-repeat-preflight, .empolas-b2b-order-preflight) :is(.is-warning, .has-price-change) {
  background: #fff8e7;
}

body.woocommerce-account :is(.empolas-b2b-repeat-order, .empolas-b2b-repeat-order-preflight, .empolas-b2b-repeat-preflight, .empolas-b2b-order-preflight) :is(.is-unavailable, .is-error) {
  background: #fff3f3;
}

/* Promotion and free-line metadata remain visible but visually secondary. */
:is(body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-account) .empolas-b2b-promo-free {
  display: inline-flex;
  align-items: center;
  margin-left: 0.3rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #eaf6eb;
  color: #287c2d;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  vertical-align: middle;
}

body.woocommerce-cart td.product-name dl.variation .variation-Akce,
body.woocommerce-checkout td.product-name dl.variation .variation-Akce,
.woocommerce-order-details td.product-name dl.variation .variation-Akce {
  color: #287c2d;
}

body.woocommerce-cart td.product-name dl.variation .variation-Dodalhobonusu,
body.woocommerce-checkout td.product-name dl.variation .variation-Dodalhobonusu,
.woocommerce-order-details td.product-name dl.variation .variation-Dodalhobonusu {
  color: var(--empolas-muted);
}

/* Checkout assistance appears after — never above — the final order button. */
body.woocommerce-checkout #payment .place-order .empolas-checkout-help {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  clear: both;
  width: 100%;
  margin: 0;
  padding: 1rem;
  border: 1px solid #dce6ee;
  border-radius: var(--empolas-radius);
  background: #fff;
  color: var(--empolas-ink);
  text-align: left;
}

body.woocommerce-checkout .empolas-checkout-help__media {
  align-self: center;
}

body.woocommerce-checkout .empolas-checkout-help__media img {
  display: block;
  width: 84px;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.woocommerce-checkout .empolas-checkout-help__heading {
  margin: 0 0 0.3rem;
  color: var(--empolas-blue);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}

body.woocommerce-checkout .empolas-checkout-help__text,
body.woocommerce-checkout .empolas-checkout-help__phone,
body.woocommerce-checkout .empolas-checkout-help__hours {
  margin: 0;
}

body.woocommerce-checkout .empolas-checkout-help__text {
  color: var(--empolas-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

body.woocommerce-checkout .empolas-checkout-help__phone {
  margin-top: 0.35rem;
}

body.woocommerce-checkout .empolas-checkout-help__phone a {
  color: var(--empolas-blue);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

body.woocommerce-checkout .empolas-checkout-help__phone a:hover,
body.woocommerce-checkout .empolas-checkout-help__phone a:focus-visible {
  color: var(--empolas-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.woocommerce-checkout .empolas-checkout-help__hours {
  margin-top: 0.1rem;
  color: var(--empolas-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 782px) {
  body.woocommerce-account table.woocommerce-orders-table,
  body.woocommerce-account table.woocommerce-orders-table tbody,
  body.woocommerce-account table.woocommerce-orders-table tr,
  body.woocommerce-account table.woocommerce-orders-table td {
    display: block;
    width: 100%;
  }

  body.woocommerce-account table.woocommerce-orders-table thead {
    display: none;
  }

  body.woocommerce-account table.woocommerce-orders-table tr {
    margin: 0 0 0.9rem;
    padding: 0.45rem 0.8rem;
    overflow: hidden;
    border: 1px solid var(--empolas-border);
    border-radius: var(--empolas-radius);
    background: #fff;
  }

  body.woocommerce-account table.woocommerce-orders-table td {
    display: grid;
    grid-template-columns: minmax(112px, 40%) minmax(0, 1fr);
    gap: 0.75rem;
    min-width: 0;
    padding: 0.55rem 0;
    border: 0;
    border-bottom: 1px solid #e7edf2;
    text-align: right !important;
  }

  body.woocommerce-account table.woocommerce-orders-table td::before {
    float: none;
    width: auto;
    color: var(--empolas-blue);
    font-weight: 600;
    text-align: left;
  }

  body.woocommerce-account table.woocommerce-orders-table td:last-child {
    border-bottom: 0;
  }

  body.woocommerce-account table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.4rem;
    min-width: 0;
    padding-top: 0.7rem;
    text-align: left !important;
  }

  body.woocommerce-account table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions::before {
    display: none;
  }

  body.woocommerce-account table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
    margin: 0;
  }

  body.woocommerce-account .woocommerce-Addresses,
  body.woocommerce-account :is(.empolas-b2b-addresses, .empolas-b2b-address-list, .empolas-b2b-address-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-checkout #payment .place-order .empolas-checkout-help {
    grid-template-columns: 70px minmax(0, 1fr);
    padding: 0.85rem;
  }

  body.woocommerce-checkout .empolas-checkout-help__media img {
    width: 70px;
  }
}

@media (max-width: 460px) {
  body.woocommerce-checkout #payment .place-order .empolas-checkout-help {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0.7rem;
  }

  body.woocommerce-checkout .empolas-checkout-help__media img {
    width: 58px;
  }

  body.woocommerce-checkout .empolas-checkout-help__heading {
    font-size: 0.94rem;
  }

  body.woocommerce-checkout .empolas-checkout-help__phone a {
    font-size: 0.94rem;
  }
}


/* Saved delivery-address selector provided by EMPOLAS B2B Core 0.12.2+. */
body.woocommerce-checkout .empolas-b2b-checkout-addresses {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #dce6ee;
  border-left: 4px solid var(--empolas-blue);
  border-radius: var(--empolas-radius);
  background: #f8fbfd;
}

body.woocommerce-checkout .empolas-b2b-checkout-addresses .form-row {
  margin-bottom: 0.75rem;
}

body.woocommerce-checkout .empolas-b2b-checkout-addresses .form-row:last-child {
  margin-bottom: 0;
}

body.woocommerce-checkout .empolas-b2b-checkout-addresses > .form-row:first-child > label {
  color: var(--empolas-blue);
  font-size: 0.98rem;
  font-weight: 600;
}

body.woocommerce-checkout .empolas-b2b-checkout-addresses select,
body.woocommerce-checkout #empolas-b2b-checkout-address {
  background-color: #fff;
}

body.woocommerce-checkout .empolas-b2b-checkout-addresses .empolas-b2b-save-address {
  padding: 0.7rem 0.8rem;
  border-radius: max(5px, calc(var(--empolas-radius) - 2px));
  background: #eef4f9;
}

body.woocommerce-checkout .empolas-b2b-checkout-addresses .empolas-b2b-save-address label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
}

body.woocommerce-checkout .empolas-b2b-checkout-addresses .empolas-b2b-save-address input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

@media (max-width: 782px) {
  body.woocommerce-account table.woocommerce-orders-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* 0.4.9 — actual EMPOLAS B2B delivery-address table markup. */
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table {
  display: table;
  width: 100%;
  margin: 0 0 2rem;
  overflow: hidden;
  border: 1px solid var(--empolas-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--empolas-radius);
  background: #fff;
  table-layout: fixed;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table thead {
  display: table-header-group;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table tbody {
  display: table-row-group;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table tr {
  display: table-row;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table th,
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td {
  display: table-cell;
  padding: 0.9rem 0.85rem;
  border: 0;
  border-bottom: 1px solid #e5edf4;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table th {
  background: #f1f6fa;
  color: var(--empolas-blue);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table tbody tr:last-child td {
  border-bottom: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table tbody tr:hover td {
  background: #fbfdff;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table th:nth-child(1),
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td:nth-child(1) {
  width: 44%;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table th:nth-child(2),
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td:nth-child(2) {
  width: 20%;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table th:nth-child(3),
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td:nth-child(3) {
  width: 16%;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table th:nth-child(4),
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td:nth-child(4) {
  width: 20%;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td:first-child strong,
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td:first-child b {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--empolas-blue);
  font-weight: 600;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.is-default-address,
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.is-last-used-address {
  color: var(--empolas-blue);
  font-size: 0.86rem;
  font-weight: 600;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions {
  white-space: normal;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions > * {
  margin: 0 0.3rem 0.35rem 0;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions form {
  display: inline-block;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions :is(a, button, input[type="submit"]) {
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 32px;
  padding: 0.35rem 0.58rem;
  font-size: 0.78rem;
  line-height: 1.15;
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions .is-destructive-action {
  border-color: rgba(198, 22, 24, 0.32);
  color: var(--empolas-red);
}

body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions .is-destructive-action:hover,
body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions .is-destructive-action:focus-visible {
  border-color: var(--empolas-red);
  background: #fff4f4;
  color: var(--empolas-red);
}

@media (max-width: 900px) {
  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table,
  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table tbody,
  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table tr,
  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td {
    display: block;
    width: 100%;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table thead {
    display: none;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table tr {
    margin-bottom: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--empolas-border);
    border-radius: var(--empolas-radius);
    background: #fff;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td {
    display: grid;
    grid-template-columns: minmax(90px, 32%) minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid #e5edf4;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td::before {
    content: attr(data-label);
    color: var(--empolas-blue);
    font-size: 0.78rem;
    font-weight: 600;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td:last-child {
    border-bottom: 0;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions {
    display: grid;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions > :not(:first-child) {
    margin-top: 0.25rem;
  }
}

@media (max-width: 520px) {
  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.22rem;
  }

  body.woocommerce-account .woocommerce-MyAccount-content table.empolas-account-address-table td.empolas-account-address-actions :is(a, button, input[type="submit"]) {
    width: 100%;
  }
}


/* 0.4.11 — mobile width normalization for theme and WooCommerce screens. */
@media (max-width: 782px) {
  .site-main,
  .site-container.content-container,
  .site-container.woocommerce-container,
  .content-container > article,
  .content-container .entry-header,
  .content-container .entry-content,
  .woocommerce,
  .woocommerce form,
  .wc-block-cart,
  .wc-block-checkout {
    min-width: 0;
    max-width: 100%;
  }

  .woocommerce-cart .entry-content,
  .woocommerce-checkout .entry-content,
  .woocommerce-account .entry-content {
    width: 100%;
    margin-inline: 0;
  }

  .content-container .alignwide,
  .content-container .alignfull {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    transform: none;
  }

  body.woocommerce-checkout #place_order,
  body.woocommerce-checkout #place-order {
    margin-bottom: 1.25rem;
  }
}

/* 0.4.13 — corrected single-product selectors and stronger layout. */
body.single-product.woocommerce .woocommerce-container > div.product {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  column-gap: clamp(2rem, 4vw, 4.5rem);
  row-gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

body.single-product.woocommerce .woocommerce-container > div.product::before,
body.single-product.woocommerce .woocommerce-container > div.product::after {
  display: none;
  content: none;
}

body.single-product.woocommerce .woocommerce-container > div.product > .woocommerce-product-gallery,
body.single-product.woocommerce .woocommerce-container > div.product > .summary {
  width: 100%;
  min-width: 0;
  margin: 0;
  float: none;
}

body.single-product.woocommerce .woocommerce-container > div.product > .woocommerce-product-gallery {
  max-width: 360px;
  justify-self: start;
}

body.single-product.woocommerce .woocommerce-container > div.product > .woocommerce-tabs,
body.single-product.woocommerce .woocommerce-container > div.product > .related {
  width: 100%;
  grid-column: 1 / -1;
}

body.single-product.woocommerce div.product .product_title {
  margin: 0 0 0.75rem;
  color: var(--empolas-blue);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.18;
  text-align: left;
}

body.single-product.woocommerce div.product .woocommerce-product-details__short-description {
  margin: 1rem 0 1.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid #dce6ef;
  border-left: 4px solid var(--empolas-blue);
  border-radius: 0 var(--empolas-radius) var(--empolas-radius) 0;
  background: #f6f9fc;
  color: #263748;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.7;
}

body.single-product.woocommerce div.product .woocommerce-product-details__short-description > :first-child {
  margin-top: 0;
}

body.single-product.woocommerce div.product .woocommerce-product-details__short-description > :last-child {
  margin-bottom: 0;
}

body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
  margin: 0;
}

body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image {
  overflow: hidden;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
}

body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: auto;
}

body.single-product.woocommerce div.product div.images .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.7rem;
}

body.single-product.woocommerce div.product div.images .flex-control-thumbs li {
  width: auto;
  float: none;
  overflow: hidden;
  border: 1px solid var(--empolas-border);
  border-radius: max(5px, calc(var(--empolas-radius) - 3px));
  background: #fff;
}

body.single-product.woocommerce .woocommerce-tabs {
  clear: both;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.4rem;
  overflow: visible;
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #f2f6fa;
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs::before,
body.single-product.woocommerce .woocommerce-tabs ul.tabs::after,
body.single-product.woocommerce .woocommerce-tabs ul.tabs li::before,
body.single-product.woocommerce .woocommerce-tabs ul.tabs li::after {
  display: none;
  border: 0;
  box-shadow: none;
  content: none;
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs li {
  flex: 0 1 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--empolas-radius);
  background: transparent;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs li a {
  display: block;
  min-height: 44px;
  padding: 0.72rem 1rem;
  color: var(--empolas-muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs li:hover,
body.single-product.woocommerce .woocommerce-tabs ul.tabs li:focus-within {
  background: rgba(255, 255, 255, 0.72);
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs li.active {
  background: #fff;
  box-shadow: 0 4px 14px rgba(14, 65, 118, 0.10);
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs li.active a {
  color: var(--empolas-blue);
}

body.single-product.woocommerce .woocommerce-tabs ul.tabs li a:focus-visible {
  border-radius: max(5px, calc(var(--empolas-radius) - 2px));
  outline: 3px solid rgba(14, 65, 118, 0.2);
  outline-offset: -3px;
}

body.single-product.woocommerce .woocommerce-tabs .panel {
  margin: 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--empolas-border);
  border-radius: calc(var(--empolas-radius) + 2px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(14, 65, 118, 0.05);
}

/* Hide only WooCommerce's duplicated tab headings; keep headings inside product content. */
body.single-product.woocommerce #tab-description > h2:first-child,
body.single-product.woocommerce #tab-additional_information > h2:first-child,
body.single-product.woocommerce #tab-reviews .woocommerce-Reviews-title {
  display: none;
}

body.single-product.woocommerce .woocommerce-tabs .panel > :first-child {
  margin-top: 0;
}

body.single-product.woocommerce .woocommerce-tabs .panel > :last-child {
  margin-bottom: 0;
}

@media (max-width: 782px) {
  body.single-product.woocommerce .woocommerce-container > div.product {
    display: block;
  }

  body.single-product.woocommerce .woocommerce-container > div.product > .woocommerce-product-gallery {
    max-width: 420px;
    margin: 0 auto 1.5rem;
  }

  body.single-product.woocommerce div.product .product_title {
    font-size: clamp(1.7rem, 8vw, 2.1rem);
  }

  body.single-product.woocommerce div.product .woocommerce-product-details__short-description {
    padding: 0.9rem 0.95rem;
  }

  body.single-product.woocommerce .woocommerce-tabs {
    padding-top: 1.25rem;
  }

  body.single-product.woocommerce .woocommerce-tabs ul.tabs li {
    flex: 1 1 140px;
    text-align: center;
  }

  body.single-product.woocommerce .woocommerce-tabs ul.tabs li a {
    white-space: normal;
  }
}
