/* IC header mini cart only. Native WooCommerce fragments remain the data source. */
#header .ct-header-cart > .ct-cart-content {
  --theme-text-color: #1f2937;
  --theme-link-initial-color: #1f2937;
  --theme-link-hover-color: #172b4d;
  --mini-cart-background-color: #fff;
  --mini-cart-divider-color: #e2e8f0;
  --dropdown-top-offset: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  max-height: min(680px, var(--ic-mini-height, calc(100dvh - 100px)));
  padding: 20px;
  inset-inline-start: auto;
  inset-inline-end: 0;
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 12px 32px rgb(23 43 77 / 12%);
  z-index: 30;
}
#header .ct-header-cart[data-ic-cart-ui] > .ct-cart-content {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}
#header .ct-header-cart[data-ic-open="true"] > .ct-cart-content {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
#header .ct-cart-content .ic-mini-cart-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex: none;
  padding-bottom: 12px;
  color: #172b4d;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}
#header .ct-cart-content .ic-mini-cart-close {
  width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
}
#header .ct-cart-content .woocommerce-mini-cart {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#header .ct-cart-content .woocommerce-mini-cart li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px 0;
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #1f2937;
}
#header .ct-cart-content .woocommerce-mini-cart li:last-child { border-bottom: 0; }
#header .ct-cart-content .ct-media-container {
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 4px;
}
#header .ct-cart-content .ct-media-container img { width: 100%; height: 100%; object-fit: contain; }
#header .ct-cart-content .product-data { min-width: 0; }
#header .ct-cart-content .product-title {
  display: block;
  margin: 0;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-transform: none;
}
#header .ct-cart-content .product-title:hover { color: #172b4d; text-decoration: underline; }
#header .ct-cart-content dl.variation {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#header .ct-cart-content dl.variation dt { color: inherit; font-weight: 600; }
#header .ct-cart-content .quantity {
  display: block;
  min-height: 44px;
  margin-top: 4px;
  padding: 12px 48px 10px 0;
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
#header .ct-cart-content .remove {
  position: absolute;
  inset-inline-end: 0;
  top: auto;
  bottom: 16px;
  width: 44px;
  height: 44px;
  padding: 13px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  color: #64748b;
  --theme-icon-size: 15px;
  --theme-icon-color: currentColor;
}
#header .ct-cart-content .remove:hover { color: #172b4d; background: #f1f5f9; }
#header .ct-cart-content .woocommerce-mini-cart__total {
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid #e2e8f0;
  color: #172b4d;
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
}
#header .ct-cart-content .woocommerce-mini-cart__total .amount { font-size: 16px; font-weight: 700; }
#header .ct-cart-content .woocommerce-mini-cart__buttons {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding-top: 16px;
  border-top: 0;
}
#header .ct-cart-content .woocommerce-mini-cart__buttons .button {
  width: 100%;
  min-height: 44px;
  padding: 10px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #172b4d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
  box-shadow: none;
}
#header .ct-cart-content .woocommerce-mini-cart__buttons .checkout {
  border-color: var(--ic-navy, #243c5a);
  background: var(--ic-navy, #243c5a);
  color: #fff;
}
#header .ct-cart-content .woocommerce-mini-cart__empty-message { color: #64748b; padding: 16px 0; margin: 0; font-size: 14px; }
#header .ct-header-cart :is(a, button):focus-visible { outline: 2px solid #172b4d; outline-offset: 2px; }

/* Classic Cart page only: no Checkout, product or site-wide button changes. */
body.woocommerce-cart .ct-woocommerce-cart-form { gap: 36px; }
body.woocommerce-cart .woocommerce-cart-form .cart_item > td {
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}
body.woocommerce-cart .woocommerce-cart-form .product-name > a { font-size: 15px; font-weight: 600; line-height: 1.5; color: #1f2937; }
body.woocommerce-cart .woocommerce-cart-form .product-name dl.variation { margin-top: 8px; color: #64748b; font-size: 13px; line-height: 1.5; }
body.woocommerce-cart .woocommerce-cart-form .product-name .price { margin-top: 10px; font-size: 15px; font-weight: 600; color: #1f2937; }
body.woocommerce-cart .woocommerce-cart-form .product-thumbnail { width: 112px; padding-inline-end: 18px; }
body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img { width: 94px; height: 94px; object-fit: contain; background: #fff; }
body.woocommerce-cart .woocommerce-cart-form .product-subtotal { text-align: right; font-size: 15px; font-weight: 600; white-space: nowrap; }
body.woocommerce-cart .woocommerce-cart-form td.product-quantity { width: 126px; min-width: 126px; }
body.woocommerce-cart .woocommerce-cart-form td.product-remove { width: 56px; padding-inline-start: 12px; }
body.woocommerce-cart .woocommerce-cart-form .remove { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 12px; color: #64748b; --theme-icon-size: 15px; }
body.woocommerce-cart .woocommerce-cart-form .quantity { --quantity-height: 44px; --quantity-width: 120px; width: 120px; flex: 0 0 120px; }
body.woocommerce-cart .woocommerce-cart-form input.qty { height: 44px; min-height: 44px; font-size: 15px; }
body.woocommerce-cart .woocommerce-cart-form .quantity :is(.ct-increase,.ct-decrease) { top: 0; width: 40px; height: 44px; min-height: 44px; }
body.woocommerce-cart .woocommerce-cart-form .quantity .ct-increase { inset-inline-end: 0; }
body.woocommerce-cart .woocommerce-cart-form .quantity .ct-decrease { inset-inline-start: 0; }
body.woocommerce-cart .woocommerce-cart-form .product-mobile-actions { gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
body.woocommerce-cart .woocommerce-cart-form .product-mobile-actions .amount { font-size: 14px; font-weight: 600; white-space: nowrap; }
body.woocommerce-cart .woocommerce-cart-form .actions { padding-top: 22px; }
body.woocommerce-cart .cart_totals {
  padding: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #1f2937;
  background: #f8fafc;
}
body.woocommerce-cart .cart_totals h2 { margin-bottom: 14px; color: #172b4d; font-size: 18px; font-weight: 650; }
body.woocommerce-cart .cart_totals .shop_table :is(th,td) { padding-block: 16px; font-size: 15px; }
body.woocommerce-cart .cart_totals .woocommerce-shipping-totals td { border-block: 1px solid #e2e8f0; padding-block: 20px; }
body.woocommerce-cart .cart_totals .order-total :is(th,td) { padding-top: 20px; color: #172b4d; font-size: 17px; font-weight: 700; }
body.woocommerce-cart .cart_totals .shipping-calculator-button { text-decoration: underline; text-underline-offset: 3px; }
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; padding-bottom: 2px; }
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout > * { margin-top: 0; margin-bottom: 0; width: 100%; }
body.woocommerce-cart .cart_totals .checkout-button { min-height: 48px; margin: 0; width: 100%; font-size: 14px; background: var(--ic-navy, #243c5a); color: #fff; }
/* Only the outer SDK mount is sized/spaced; PayPal renders its own button. */
body.woocommerce-cart .cart_totals #ppc-button-ppcp-gateway-v6 { width: 100%; min-height: 44px; }
@media (max-width: 999px) {
  body.woocommerce-cart .ct-woocommerce-cart-form { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  body.woocommerce-cart .cart_totals { position: static; }
  body.woocommerce-cart .woocommerce-cart-form .product-name { max-width: none; }
}
@media (max-width: 689px) {
  body.woocommerce-cart .woocommerce-cart-form .product-thumbnail { width: 94px; padding-inline-end: 14px; }
  body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img { width: 80px; height: 80px; }
  body.woocommerce-cart .woocommerce-cart-form .product-name > a { font-size: 14px; }
  body.woocommerce-cart .woocommerce-cart-form .cart_item > td { padding-block: 22px; }
  body.woocommerce-cart .cart_totals { padding: 24px 20px; }
  body.woocommerce-cart .woocommerce-cart-form .product-mobile-actions .remove { margin-inline-start: auto; }
}
@media (max-width: 359px) {
  #header .ct-header-cart > .ct-cart-content { padding: 18px; }
  #header .ct-cart-content .woocommerce-mini-cart__buttons { grid-template-columns: 1fr; }
  #header .ct-cart-content .woocommerce-mini-cart__buttons > .button { grid-column: 1; }
}
