/* Native WooCommerce block/endpoint presentation; never a transaction substitute.
 * The outer Atomic shell owns header/footer, page heading and content width.
 * Scope intentionally excludes account, catalog, homepage and Elementor editor.
 */
body.cr-commerce-page:is(.woocommerce-cart, .woocommerce-checkout) {
  --cr-commerce-navy: #071d2b;
  --cr-commerce-ink: #10242e;
  --cr-commerce-muted: #334a55;
  --cr-commerce-brass: #c9a95e;
  --cr-commerce-sail: #f8f6f0;
  --cr-commerce-mist: #e9eeec;
  --cr-commerce-line: #a7b5b9;
  --cr-commerce-error: #9d2929;
  --cr-commerce-focus: #087f8c;
  color: var(--cr-commerce-ink);
  background: var(--cr-commerce-sail);
}

body.cr-commerce-page :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout, .woocommerce-order, form#order_review, .woocommerce-notices-wrapper) {
  font-family: Manrope, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cr-commerce-ink);
  --wc-content-bg: #fff;
  --wc-subtext: var(--cr-commerce-muted);
  --wc-green: #276144;
  --wc-red: var(--cr-commerce-error);
  --wc-primary: var(--cr-commerce-navy);
  --wc-primary-text: #fff;
}

body.cr-commerce-page :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) {
  width: 100%;
  max-width: none;
  margin-block: 0 64px;
}

body.cr-commerce-page .cr-native-commerce-content :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout).alignwide {
  margin-inline: 0;
}

body.cr-commerce-page :is(.wc-block-cart, .wc-block-checkout) :is(h2, h3, .wc-block-cart__totals-title),
body.cr-commerce-page :is(.woocommerce-order, form#order_review) :is(h2, h3) {
  color: var(--cr-commerce-navy);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
}

body.cr-commerce-page .wc-block-components-title.wc-block-components-title {
  margin-block-end: 12px;
}

/* Native empty-cart recommendations can be absent while all products are private.
 * Hide only the orphan recommendation heading/separator, not populated results. */
body.cr-commerce-page .wp-block-woocommerce-empty-cart-block > h2:last-child:not(.wc-block-cart__empty-cart__title),
body.cr-commerce-page .wp-block-woocommerce-empty-cart-block > hr:has(+ h2:last-child) {
  display: none;
}
body.cr-commerce-page .wc-block-cart__empty-cart__title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  text-transform: uppercase;
}
body.cr-commerce-page .wc-block-cart__empty-cart__title::before {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body.cr-commerce-page .wc-block-components-checkout-step {
  padding-block-end: 32px;
}

body.cr-commerce-page .wc-block-components-checkout-step__description,
body.cr-commerce-page .wc-block-components-product-metadata {
  color: var(--cr-commerce-muted);
  font-size: 14px;
}

body.cr-commerce-page :is(.wc-block-cart-items, .woocommerce-table) {
  border-collapse: collapse;
  border-color: var(--cr-commerce-line);
  background: #fff;
}

body.cr-commerce-page .wc-block-cart-items th {
  padding-block: 16px;
  color: var(--cr-commerce-muted);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.cr-commerce-page .wc-block-cart-items .wc-block-cart-items__row td {
  padding-block: 24px;
  border-color: var(--cr-commerce-line);
}

body.cr-commerce-page .wc-block-components-product-image img,
body.cr-commerce-page .wc-block-cart-item__image img {
  background: var(--cr-commerce-mist);
  border-radius: 0;
  object-fit: contain;
}

body.cr-commerce-page .wc-block-components-product-name {
  color: var(--cr-commerce-navy);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-underline-offset: 4px;
}

body.cr-commerce-page :is(.wc-block-cart__sidebar, .wc-block-checkout__sidebar) {
  background: #fff;
  border-block-start: 4px solid var(--cr-commerce-brass);
  padding: 24px;
  border-radius: 0;
  align-self: start;
}

body.cr-commerce-page .wc-block-components-totals-wrapper,
body.cr-commerce-page .wc-block-components-order-summary-item {
  border-color: var(--cr-commerce-line);
}

body.cr-commerce-page .wc-block-components-totals-footer-item {
  color: var(--cr-commerce-navy);
  font-weight: 700;
  font-size: 20px;
}

body.cr-commerce-page :is(.wc-block-components-button, .wc-block-components-checkout-place-order-button),
body.cr-commerce-page :is(.woocommerce-order, form#order_review) :is(a.button, button.button, input.button) {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 14px 24px;
  border: 1px solid var(--cr-commerce-navy);
  border-radius: 0;
  background: var(--cr-commerce-navy);
  color: #fff;
  font-family: Manrope, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .05em;
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

body.cr-commerce-page .wc-block-components-button:not(:disabled):hover,
body.cr-commerce-page :is(.woocommerce-order, form#order_review) .button:not(:disabled):hover {
  background: #0d2b3a;
  border-color: #0d2b3a;
  color: #fff;
}

body.cr-commerce-page :is(.wc-block-components-button, .wc-block-components-quantity-selector__button):disabled {
  cursor: not-allowed;
  opacity: .55;
}

body.cr-commerce-page .wc-block-components-quantity-selector {
  min-height: 44px;
  width: 136px;
  border: 1px solid var(--cr-commerce-line);
  border-radius: 0;
  background: #fff;
}

body.cr-commerce-page .wc-block-components-quantity-selector :is(input.wc-block-components-quantity-selector__input, button) {
  min-width: 44px;
  min-height: 44px;
  color: var(--cr-commerce-navy);
  font: 600 16px Manrope, sans-serif;
}

body.cr-commerce-page .wc-block-cart-item__remove-link {
  min-height: 44px;
  padding-block: 10px;
  color: var(--cr-commerce-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.cr-commerce-page .wc-block-components-text-input :is(input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password]),
body.cr-commerce-page .wc-block-components-combobox .wc-block-components-combobox-control input,
body.cr-commerce-page .wc-block-components-textarea,
body.cr-commerce-page .wc-block-components-select .wc-block-components-select__select,
body.cr-commerce-page form#order_review :is(input.input-text, select) {
  min-height: 54px;
  border: 1px solid var(--cr-commerce-line);
  border-radius: 0;
  background: #fff;
  color: var(--cr-commerce-ink);
  font-family: Manrope, sans-serif;
  font-size: 16px;
  box-shadow: none;
}

/* Preserve WooCommerce's floating-label offsets and its responsive field grid. */
body.cr-commerce-page .wc-block-components-text-input label,
body.cr-commerce-page .wc-block-components-checkbox__label,
body.cr-commerce-page .wc-block-components-radio-control__label {
  color: var(--cr-commerce-muted);
  font-family: Manrope, sans-serif;
}

body.cr-commerce-page .wc-block-components-checkbox label,
body.cr-commerce-page .wc-block-components-radio-control__option {
  min-height: 44px;
}

body.cr-commerce-page .wc-block-components-radio-control__option {
  border-radius: 0;
}

body.cr-commerce-page .wc-block-components-validation-error {
  color: var(--cr-commerce-error);
  font-size: 14px;
}

body.cr-commerce-page .wc-block-components-text-input.has-error input {
  border-color: var(--cr-commerce-error);
}

body.cr-commerce-page :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout, .woocommerce-order, form#order_review, .woocommerce-notices-wrapper) :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--cr-commerce-focus);
  outline-offset: 3px;
}

body.cr-commerce-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner) {
  border-radius: 0;
  background: #fff;
  border-color: var(--cr-commerce-line);
  border-inline-start: 4px solid var(--cr-commerce-focus);
  color: var(--cr-commerce-ink);
  font-family: Manrope, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body.cr-commerce-page :is(.woocommerce-error, .wc-block-components-notice-banner.is-error) {
  border-inline-start-color: var(--cr-commerce-error);
  background: #fff6f4;
}

body.cr-commerce-page .wc-block-components-notice-banner__dismiss {
  min-width: 44px;
  min-height: 44px;
}

body.cr-commerce-page .wp-block-woocommerce-empty-cart-block {
  max-width: 800px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 72px) 24px;
  background: #fff;
  border-block-start: 4px solid var(--cr-commerce-brass);
  text-align: center;
}

body.cr-commerce-page .woocommerce-order {
  max-width: 1100px;
  margin-inline: auto;
  padding-block-end: 64px;
}

body.cr-commerce-page .woocommerce-thankyou-order-received {
  padding: 24px;
  border-inline-start: 4px solid var(--cr-commerce-brass);
  background: #fff;
  color: var(--cr-commerce-navy);
  font-size: 20px;
}

body.cr-commerce-page .woocommerce-thankyou-order-failed {
  padding: 24px;
  border-inline-start: 4px solid var(--cr-commerce-error);
  background: #fff6f4;
  color: var(--cr-commerce-ink);
}

body.cr-commerce-page .woocommerce ul.order_details {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0 40px;
  padding: 24px;
  background: #fff;
}

body.cr-commerce-page .woocommerce ul.order_details li {
  float: none;
  margin: 0;
  padding-inline-end: 24px;
  border-color: var(--cr-commerce-line);
  font-size: 12px;
  color: var(--cr-commerce-muted);
  overflow-wrap: anywhere;
}

body.cr-commerce-page .woocommerce ul.order_details li strong {
  padding-block-start: 6px;
  color: var(--cr-commerce-navy);
  font-size: 16px;
}

body.cr-commerce-page .woocommerce-order :is(table.shop_table, address),
body.cr-commerce-page form#order_review table.shop_table {
  border: 1px solid var(--cr-commerce-line);
  border-radius: 0;
  background: #fff;
}

body.cr-commerce-page .woocommerce-order table.shop_table :is(td, th),
body.cr-commerce-page form#order_review table.shop_table :is(td, th) {
  padding: 16px;
  border-color: var(--cr-commerce-line);
  overflow-wrap: anywhere;
}

body.cr-commerce-page .woocommerce-customer-details address {
  padding: 24px;
  line-height: 1.8;
}

@media (max-width: 781px) {
  body.cr-commerce-page :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) {
    margin-block-end: 40px;
  }
  body.cr-commerce-page :is(.wc-block-cart__sidebar, .wc-block-checkout__sidebar) {
    padding: 20px;
  }
  body.cr-commerce-page .wc-block-components-checkout-step {
    padding-block-end: 24px;
  }
}

@media (max-width: 480px) {
  body.cr-commerce-page :is(.wc-block-cart__sidebar, .wc-block-checkout__sidebar) {
    padding: 16px;
  }
  body.cr-commerce-page .wc-block-components-product-name {
    font-size: 15px;
  }
  body.cr-commerce-page .woocommerce ul.order_details {
    flex-direction: column;
  }
  body.cr-commerce-page .woocommerce ul.order_details li {
    border-inline-end: 0;
    padding-inline-end: 0;
  }
  body.cr-commerce-page .woocommerce-order table.shop_table :is(td, th) {
    padding: 10px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.cr-commerce-page :is(.wc-block-components-button, .woocommerce-order .button, form#order_review .button) {
    transition: none;
  }
}
