/**
 * WooCommerce cart / checkout / my-account — branding overlay only.
 * Layout, tables, columns, and stacking: WooCommerce core CSS.
 * Rank Ray — https://rankray.com
 */

body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account {
  --jc-wc-ink: #111111;
  --jc-wc-muted: var(--jc-color-text);
}

/* Fixed site header (100px) — clear content below nav */
body.woocommerce-cart .jc-shop,
body.woocommerce-checkout .jc-shop,
body.woocommerce-account .jc-shop {
  padding-top: calc(var(--jc-header-h, 100px) + 2rem);
  padding-bottom: 3rem;
}

body.woocommerce-cart .jc-shop__inner,
body.woocommerce-checkout .jc-shop__inner,
body.woocommerce-account .jc-shop__inner {
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  max-width: 100%;
  overflow-x: clip;
}

body.woocommerce-cart .jc-shop__inner > .jc-crumbs,
body.woocommerce-checkout .jc-shop__inner > .jc-crumbs,
body.woocommerce-account .jc-shop__inner > .jc-crumbs {
  margin: 0 0 1.25rem;
  color: var(--jc-wc-muted);
}

/* Theme page headings (PHP hooks — not layout) */
body.woocommerce-cart .jc-cart-head,
body.woocommerce-checkout .jc-checkout-head,
body.woocommerce-account .jc-account__hero {
  margin: 0 0 1.5rem;
}

body.woocommerce-cart .jc-cart-head__kicker,
body.woocommerce-checkout .jc-checkout-head__kicker,
body.woocommerce-account .jc-account__kicker {
  margin: 0 0 0.4rem;
  color: var(--jc-wc-muted);
}

body.woocommerce-cart .jc-cart-head__title,
body.woocommerce-checkout .jc-checkout-head__title,
body.woocommerce-account .jc-account__title {
  margin: 0;
  color: var(--jc-wc-ink);
}

body.woocommerce-cart .jc-cart-head__count {
  margin: 0.45rem 0 0;
  color: var(--jc-wc-muted);
}

body.woocommerce-cart .jc-cart-head__shop {
  color: var(--jc-color-primary);
  font-weight: 600;
  text-decoration: none;
}

/* Primary action buttons — brand purple only */
body.woocommerce-cart a.button.alt,
body.woocommerce-checkout a.button.alt,
body.woocommerce-account a.button.alt,
body.woocommerce-cart button.button.alt,
body.woocommerce-checkout button.button.alt,
body.woocommerce-account button.button.alt,
body.woocommerce-cart .checkout-button,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
body.woocommerce-checkout #place_order,
body.woocommerce-account .woocommerce-Button:not(.show-password-input),
body.woocommerce-account button[type="submit"]:not(.show-password-input),
body.woocommerce-account button.button:not(.show-password-input) {
  background: var(--jc-color-primary) !important;
  color: #fff !important;
}

body.woocommerce-cart a.button.alt:hover,
body.woocommerce-checkout a.button.alt:hover,
body.woocommerce-account a.button.alt:hover,
body.woocommerce-cart button.button.alt:hover,
body.woocommerce-checkout button.button.alt:hover,
body.woocommerce-account button.button.alt:hover,
body.woocommerce-cart .checkout-button:hover,
body.woocommerce-checkout #place_order:hover,
body.woocommerce-account .woocommerce-Button:hover,
body.woocommerce-account button[type="submit"]:hover {
  background: var(--jc-color-primary-hover) !important;
}

/* View-order intro marks — no yellow browser/Woo highlight */
body.woocommerce-view-order .woocommerce-MyAccount-content > p mark,
body.woocommerce-account mark.order-number,
body.woocommerce-account mark.order-date,
body.woocommerce-account mark.order-status {
  padding: 0;
  background: transparent !important;
  color: #111 !important;
  font-weight: 700;
}

/* Order details table — View order + order-received (Woo native table) */
body.woocommerce-account table.woocommerce-table--order-details,
body.woocommerce-checkout table.woocommerce-table--order-details,
.woocommerce-order-details table.woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
}

body.woocommerce-account table.woocommerce-table--order-details th,
body.woocommerce-account table.woocommerce-table--order-details td,
body.woocommerce-checkout table.woocommerce-table--order-details th,
body.woocommerce-checkout table.woocommerce-table--order-details td,
.woocommerce-order-details table.woocommerce-table--order-details th,
.woocommerce-order-details table.woocommerce-table--order-details td {
  padding: 0.75rem 1rem;
  vertical-align: top;
}

body.woocommerce-account table.woocommerce-table--order-details .product-name,
body.woocommerce-account table.woocommerce-table--order-details th:first-child,
body.woocommerce-account table.woocommerce-table--order-details td:first-child,
body.woocommerce-checkout table.woocommerce-table--order-details .product-name,
body.woocommerce-checkout table.woocommerce-table--order-details th:first-child,
body.woocommerce-checkout table.woocommerce-table--order-details td:first-child,
.woocommerce-order-details table.woocommerce-table--order-details .product-name,
.woocommerce-order-details table.woocommerce-table--order-details th:first-child,
.woocommerce-order-details table.woocommerce-table--order-details td:first-child {
  text-align: left;
}

body.woocommerce-account table.woocommerce-table--order-details .product-total,
body.woocommerce-account table.woocommerce-table--order-details th:last-child,
body.woocommerce-account table.woocommerce-table--order-details td:last-child,
body.woocommerce-checkout table.woocommerce-table--order-details .product-total,
body.woocommerce-checkout table.woocommerce-table--order-details th:last-child,
body.woocommerce-checkout table.woocommerce-table--order-details td:last-child,
.woocommerce-order-details table.woocommerce-table--order-details .product-total,
.woocommerce-order-details table.woocommerce-table--order-details th:last-child,
.woocommerce-order-details table.woocommerce-table--order-details td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* View order — product row (thumb left, details right) */
body.woocommerce-account table.woocommerce-table--order-details td.product-name,
body.woocommerce-checkout table.woocommerce-table--order-details td.product-name,
.woocommerce-order-details table.woocommerce-table--order-details td.product-name {
  min-width: 12rem;
}

.jc-wc-order-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.jc-wc-order-item__media {
  flex: 0 0 64px;
  width: 64px;
}

.jc-wc-order-item__thumb {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}

.jc-wc-order-item__content {
  flex: 1;
  min-width: 0;
}

.jc-wc-order-item__content > a {
  font-weight: 600;
  color: var(--jc-wc-ink, #111);
  text-decoration: none;
}

.jc-wc-order-item__content > a:hover {
  color: var(--jc-color-primary, #0504aa);
}

.jc-wc-order-item__content .product-quantity {
  font-weight: 500;
  color: var(--jc-wc-muted, #6b7280);
}

body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--jc-wc-muted, #6b7280);
}

body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta li,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta li,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta li {
  margin: 0 0 0.35rem;
  padding: 0;
  list-style: none;
  line-height: 1.45;
}

/* Woo wraps attribute values in <p> — keep "Colour: Black" on one line */
body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta .wc-item-meta-label,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta .wc-item-meta-label,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta .wc-item-meta-label,
body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta dt,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta dt,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta dt {
  display: inline !important;
  float: none !important;
  clear: none !important;
  margin: 0 0.2em 0 0 !important;
  font-weight: 600;
  color: #374151;
}

body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta li p,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta li p,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta li p,
body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta dd,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta dd,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta dd {
  display: inline !important;
  margin: 0 !important;
}

body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta dl,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta dl,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta dl {
  margin: 0;
}

/* Engraving thumb rows — label then image on next line */
body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta li:has(img),
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta li:has(img),
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta li:has(img) {
  display: block;
}

body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta li:has(img) p,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta li:has(img) p,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta li:has(img) p {
  display: block !important;
  margin-top: 0.25rem !important;
}

body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta .jc-order-meta-art__img,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta .jc-order-meta-art__img,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta .jc-order-meta-art__img,
body.woocommerce-account table.woocommerce-table--order-details .wc-item-meta .jc-order-laser__img,
body.woocommerce-checkout table.woocommerce-table--order-details .wc-item-meta .jc-order-laser__img,
.woocommerce-order-details table.woocommerce-table--order-details .wc-item-meta .jc-order-laser__img {
  display: block;
  max-width: 48px !important;
  width: 48px;
  height: auto;
  margin-top: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
}

body.woocommerce-account table.woocommerce-table--order-details td.product-total,
body.woocommerce-checkout table.woocommerce-table--order-details td.product-total,
.woocommerce-order-details table.woocommerce-table--order-details td.product-total {
  font-weight: 600;
  vertical-align: top;
  padding-top: 1rem;
}

@media (max-width: 520px) {
  body.woocommerce-account table.woocommerce-table--order-details,
  body.woocommerce-checkout table.woocommerce-table--order-details,
  .woocommerce-order-details table.woocommerce-table--order-details {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .jc-wc-order-item {
    gap: 0.75rem;
  }

  .jc-wc-order-item__media {
    flex-basis: 52px;
    width: 52px;
  }

  .jc-wc-order-item__thumb {
    width: 52px;
    height: 52px;
  }
}

/* Section headers — soft divider (not heavy Woo default) */
body.woocommerce-account .woocommerce-order-details__title,
body.woocommerce-account .woocommerce-column__title,
body.woocommerce-checkout .woocommerce-order-details__title,
body.woocommerce-checkout .woocommerce-column__title,
.woocommerce-order-details .woocommerce-order-details__title,
.woocommerce-customer-details .woocommerce-column__title,
.woocommerce-customer-details > h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--jc-wc-ink);
}

/* WooCommerce wrapper typography */
body.woocommerce-account .woocommerce,
body.woocommerce-checkout .woocommerce,
body.woocommerce-account .woocommerce-MyAccount-content,
body.woocommerce-checkout .woocommerce-order {
  font-family: var(--jc-font-sans, "Montserrat", sans-serif);
  color: var(--jc-wc-ink);
}

body.woocommerce-account .woocommerce table.shop_table th,
body.woocommerce-account .woocommerce table.shop_table td,
body.woocommerce-checkout .woocommerce table.shop_table th,
body.woocommerce-checkout .woocommerce table.shop_table td,
.woocommerce-order-details table.woocommerce-table--order-details th,
.woocommerce-order-details table.woocommerce-table--order-details td,
.woocommerce-customer-details address,
.woocommerce-Address address {
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.6;
  font-style: normal;
  color: var(--jc-wc-ink);
}

/* Account/cart/checkout notices: never override Woo core layout (icon + padding). */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-error,
body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-error {
  display: block;
  position: relative;
  flex-wrap: unset;
  gap: unset;
  align-items: unset;
  padding: 1em 2em 1em 3.5em;
  margin: 0 0 2em;
  list-style: none outside;
}

/* Logged-out account — hide nav */
body.woocommerce-account.jc-account-page--auth .woocommerce-MyAccount-navigation {
  display: none;
}

/* My Account — nav + content float shell (Woo core) */
body.woocommerce-account .jc-account__shell {
  display: flow-root;
}

body.woocommerce-account .jc-account__hero {
  margin-bottom: 1.5rem;
}

body.woocommerce-account .woocommerce-MyAccount-content > p {
  margin: 0 0 1.25rem;
  line-height: 1.55;
  color: var(--jc-wc-ink);
}

/* Addresses list */
body.woocommerce-account .woocommerce-Addresses {
  width: 100%;
  clear: both;
}

body.woocommerce-account .woocommerce-Addresses::after,
body.woocommerce-account .woocommerce-Address::after {
  content: "";
  display: table;
  clear: both;
}

body.woocommerce-account .woocommerce-Address {
  box-sizing: border-box;
  margin: 0 0 1.25rem;
  padding: 1.15rem 1.25rem 1.2rem;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

body.woocommerce-account .woocommerce-Address-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}

body.woocommerce-account .woocommerce-Address-title h3 {
  float: none;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--jc-wc-ink);
}

body.woocommerce-account .woocommerce-Address-title .edit {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 2.25rem;
  padding: 0.4rem 0.95rem;
  border: 0;
  border-radius: 2px;
  background: var(--jc-color-primary) !important;
  color: #fff !important;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

body.woocommerce-account .woocommerce-Address-title .edit:hover {
  background: var(--jc-color-primary-hover) !important;
  color: #fff !important;
}

body.woocommerce-account .woocommerce-Address address {
  margin: 0;
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--jc-wc-ink);
}

@media (max-width: 768px) {
  body.woocommerce-account .woocommerce-Address-title {
    flex-direction: column;
    align-items: flex-start;
  }

  body.woocommerce-account .woocommerce-Address-title .edit {
    width: 100%;
    justify-content: center;
  }
}

/* Edit account — clean form (native Woo field structure) */
body.woocommerce-account form.woocommerce-EditAccountForm,
body.woocommerce-account form.edit-account {
  max-width: 40rem;
}

body.woocommerce-account .woocommerce-EditAccountForm .form-row,
body.woocommerce-account form.edit-account .form-row {
  margin: 0 0 1.1rem;
  padding: 0;
  float: none;
  width: 100%;
}

body.woocommerce-account .woocommerce-EditAccountForm .form-row-first,
body.woocommerce-account form.edit-account .form-row-first {
  width: 48%;
  float: left;
  clear: left;
}

body.woocommerce-account .woocommerce-EditAccountForm .form-row-last,
body.woocommerce-account form.edit-account .form-row-last {
  width: 48%;
  float: right;
  clear: right;
}

body.woocommerce-account .woocommerce-EditAccountForm .form-row-wide,
body.woocommerce-account form.edit-account .form-row-wide {
  clear: both;
  float: none;
  width: 100%;
}

body.woocommerce-account .woocommerce-EditAccountForm .clear,
body.woocommerce-account form.edit-account .clear {
  display: none;
}

body.woocommerce-account .woocommerce-EditAccountForm label,
body.woocommerce-account form.edit-account label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--jc-wc-ink);
}

body.woocommerce-account .woocommerce-EditAccountForm label .required,
body.woocommerce-account form.edit-account label .required {
  color: #b42318;
  text-decoration: none;
}

body.woocommerce-account .woocommerce-EditAccountForm input.input-text,
body.woocommerce-account .woocommerce-EditAccountForm input[type="email"],
body.woocommerce-account .woocommerce-EditAccountForm input[type="password"],
body.woocommerce-account .woocommerce-EditAccountForm input[type="text"],
body.woocommerce-account form.edit-account input.input-text,
body.woocommerce-account form.edit-account input[type="email"],
body.woocommerce-account form.edit-account input[type="password"],
body.woocommerce-account form.edit-account input[type="text"] {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--jc-wc-ink);
  box-sizing: border-box;
}

body.woocommerce-account .woocommerce-EditAccountForm input:focus,
body.woocommerce-account form.edit-account input:focus {
  outline: 2px solid color-mix(in srgb, var(--jc-color-primary) 22%, transparent);
  border-color: var(--jc-color-primary);
}

body.woocommerce-account .woocommerce-EditAccountForm em,
body.woocommerce-account form.edit-account em {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-style: normal;
  line-height: 1.45;
  color: var(--jc-wc-muted);
}

body.woocommerce-account .woocommerce-EditAccountForm fieldset,
body.woocommerce-account form.edit-account fieldset {
  margin: 1.5rem 0 0;
  padding: 1.15rem 1.25rem 0.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fafafa;
}

body.woocommerce-account .woocommerce-EditAccountForm fieldset legend,
body.woocommerce-account form.edit-account fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--jc-wc-ink);
}

body.woocommerce-account .woocommerce-EditAccountForm fieldset .form-row,
body.woocommerce-account form.edit-account fieldset .form-row {
  float: none;
  width: 100%;
}

body.woocommerce-account .woocommerce-EditAccountForm button[type="submit"],
body.woocommerce-account form.edit-account button[type="submit"] {
  clear: both;
  margin-top: 1.35rem;
  min-height: 2.65rem;
  padding: 0.65rem 1.4rem;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

@media (max-width: 640px) {
  body.woocommerce-account .woocommerce-EditAccountForm .form-row-first,
  body.woocommerce-account .woocommerce-EditAccountForm .form-row-last,
  body.woocommerce-account form.edit-account .form-row-first,
  body.woocommerce-account form.edit-account .form-row-last {
    width: 100%;
    float: none;
  }
}

/* Password visibility — cart/checkout use theme icon; account uses Woo core only */
body.woocommerce-cart .password-input,
body.woocommerce-checkout .password-input,
body.woocommerce-account .password-input {
  display: block;
  position: relative;
}

body.woocommerce-cart .password-input .input-text,
body.woocommerce-checkout .password-input .input-text,
body.woocommerce-account .password-input .input-text,
body.woocommerce-account .password-input input[type="password"],
body.woocommerce-account .password-input input[type="text"] {
  padding-right: 2.85rem;
}

body.woocommerce-account .password-input input::-ms-reveal,
body.woocommerce-account .password-input input::-ms-clear {
  display: none;
}

body.woocommerce-cart button.show-password-input,
body.woocommerce-checkout button.show-password-input {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  box-shadow: none;
  color: var(--jc-wc-muted);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transform: translateY(-50%);
}

body.woocommerce-account button.show-password-input {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--jc-wc-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

body.woocommerce-cart button.show-password-input:hover,
body.woocommerce-checkout button.show-password-input:hover,
body.woocommerce-account button.show-password-input:hover {
  background: #f3f4f6 !important;
  color: var(--jc-wc-ink);
}

/* Theme-drawn icon — cart/checkout only (Woo core draws its own on account) */
body.woocommerce-cart button.show-password-input::after,
body.woocommerce-checkout button.show-password-input::after {
  content: "";
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.woocommerce-account button.show-password-input::after {
  content: none;
  display: none;
}

body.woocommerce-cart button.show-password-input.display-password::after,
body.woocommerce-checkout button.show-password-input.display-password::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 10.6A3 3 0 0012 15a3 3 0 002.4-4.4'/%3E%3Cpath d='M9.9 5.1A10.8 10.8 0 0112 5c6.5 0 10 7 10 7a18 18 0 01-3.2 3.9'/%3E%3Cpath d='M6.1 6.1C3.7 8 2 12 2 12s3.5 7 10 7a10.4 10.4 0 004.4-1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 10.6A3 3 0 0012 15a3 3 0 002.4-4.4'/%3E%3Cpath d='M9.9 5.1A10.8 10.8 0 0112 5c6.5 0 10 7 10 7a18 18 0 01-3.2 3.9'/%3E%3Cpath d='M6.1 6.1C3.7 8 2 12 2 12s3.5 7 10 7a10.4 10.4 0 004.4-1'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Cart page: table, coupon row, actions, totals, mobile ─── */
/* Never flex `td.actions` — it breaks WooCommerce table column widths. */

body.woocommerce-cart table.shop_table.cart {
  width: 100%;
}

body.woocommerce-cart table.shop_table.cart th.product-remove,
body.woocommerce-cart table.shop_table.cart td.product-remove {
  width: 2.75rem;
  max-width: 2.75rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  text-align: center;
}

body.woocommerce-cart table.shop_table.cart th.product-thumbnail,
body.woocommerce-cart table.shop_table.cart td.product-thumbnail {
  width: 5rem;
}

body.woocommerce-cart table.shop_table.cart td {
  vertical-align: top;
}

body.woocommerce-cart table.shop_table.cart .product-name .wc-item-meta,
body.woocommerce-cart table.shop_table.cart dl.variation {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--jc-wc-muted);
}

body.woocommerce-cart table.shop_table.cart .wc-item-meta li {
  margin: 0 0 0.25rem;
}

body.woocommerce-cart .woocommerce-cart-form td.actions {
  display: table-cell;
  vertical-align: middle;
  padding: 1rem;
  text-align: left;
}

body.woocommerce-cart .woocommerce-cart-form td.actions::before,
body.woocommerce-cart .woocommerce-cart-form td.actions::after {
  content: " ";
  display: table;
}

body.woocommerce-cart .woocommerce-cart-form td.actions::after {
  clear: both;
}

body.woocommerce-cart .woocommerce-cart-form .coupon {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  float: left;
  max-width: calc(100% - 11rem);
  margin: 0;
}

body.woocommerce-cart .woocommerce-cart-form .coupon label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.woocommerce-cart .woocommerce-cart-form .coupon #coupon_code,
body.woocommerce-cart .woocommerce-cart-form .coupon .input-text {
  flex: 1 1 10rem;
  min-width: 0;
  width: auto;
  height: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: 0.9375rem;
  line-height: normal;
  color: var(--jc-wc-ink);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

body.woocommerce-cart .woocommerce-cart-form .coupon #coupon_code:focus {
  outline: 2px solid color-mix(in srgb, var(--jc-color-primary) 22%, transparent);
  border-color: var(--jc-color-primary);
}

body.woocommerce-cart .woocommerce-cart-form .coupon button[name="apply_coupon"],
body.woocommerce-cart .woocommerce-cart-form .coupon .button,
body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"] {
  flex: 0 0 auto;
  height: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 1rem;
  border: 0;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.35;
  box-sizing: border-box;
  background: var(--jc-color-primary) !important;
  color: #fff !important;
  font-weight: 600;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"] {
  float: right;
}

body.woocommerce-cart .woocommerce-cart-form .coupon button[name="apply_coupon"]:hover,
body.woocommerce-cart .woocommerce-cart-form .coupon .button:hover,
body.woocommerce-cart .woocommerce-cart-form .coupon button[name="apply_coupon"]:focus-visible,
body.woocommerce-cart .woocommerce-cart-form .coupon .button:focus-visible,
body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"]:hover:not(:disabled),
body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"]:focus-visible:not(:disabled) {
  background: var(--jc-color-primary-hover) !important;
  color: #fff !important;
}

body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"]:disabled,
body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"]:disabled:hover,
body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"]:disabled:focus-visible {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--jc-color-primary) !important;
  color: #fff !important;
}

body.woocommerce-cart .cart-collaterals {
  width: 100%;
  clear: both;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
  box-sizing: border-box;
}

body.woocommerce-cart .cart_totals .shop_table td,
body.woocommerce-cart .cart_totals .shop_table th {
  word-break: break-word;
}

body.woocommerce-cart .cart_totals .woocommerce-shipping-totals,
body.woocommerce-cart .cart_totals tr.shipping,
body.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals,
body.woocommerce-cart .cart_totals #shipping_method,
body.woocommerce-cart .cart_totals .woocommerce-shipping-methods,
body.woocommerce-cart .cart_totals .woocommerce-shipping-destination,
body.woocommerce-cart .cart_totals .woocommerce-shipping-calculator,
body.woocommerce-cart .cart_totals .woocommerce-shipping-contents,
body.woocommerce-cart .shipping-calculator-form,
body.woocommerce-cart .shipping-calculator-button {
  display: none !important;
}

body.woocommerce-cart .wc-proceed-to-checkout {
  padding-top: 0.5rem;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

body.woocommerce-cart .shop_table.cart .product-thumbnail img {
  max-width: 72px;
  height: auto;
}

body.woocommerce-cart .shop_table.cart .quantity {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  vertical-align: middle;
  max-width: 100%;
}

body.woocommerce-cart .shop_table.cart .quantity .qty {
  flex: 0 0 auto;
  min-height: 2.75rem;
  width: 3rem;
  text-align: center;
}

body.woocommerce-cart .shop_table.cart .jc-qty-btn,
body.woocommerce-cart .shop_table.cart .quantity button {
  flex: 0 0 auto;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

body.woocommerce-cart .shop_table.cart .quantity .jc-cart-qty-fixed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f9fafb;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  color: var(--jc-wc-ink);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  body.woocommerce-cart .cart-collaterals .cart_totals {
    width: 100%;
    float: none;
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  body.woocommerce-cart .woocommerce-cart-form .coupon {
    float: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
  }

  body.woocommerce-cart .woocommerce-cart-form .coupon #coupon_code,
  body.woocommerce-cart .woocommerce-cart-form .coupon .input-text,
  body.woocommerce-cart .woocommerce-cart-form .coupon button[name="apply_coupon"],
  body.woocommerce-cart .woocommerce-cart-form .coupon .button,
  body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"] {
    width: 100% !important;
    float: none !important;
    flex: 0 0 auto;
  }

  body.woocommerce-cart .woocommerce-cart-form .coupon button[name="apply_coupon"],
  body.woocommerce-cart .woocommerce-cart-form .coupon .button {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.woocommerce-cart .woocommerce-cart-form td.actions > .button[name="update_cart"] {
    float: none;
    width: 100%;
    margin-top: 0.75rem;
  }

  body.woocommerce-cart .shipping-calculator-form .form-row .input-text,
  body.woocommerce-cart .shipping-calculator-form .form-row select {
    width: 100%;
    box-sizing: border-box;
    min-height: 2.75rem;
  }
}

body.woocommerce-account button.show-password-input svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 auto;
  pointer-events: none;
}

/* Cart laser preview thumb (human-readable meta only) */
body.woocommerce-cart .jc-cart-laser__img {
  display: block;
  max-width: 64px;
  height: auto;
  border: 1px solid #e5e7eb;
}

/* ── Checkout: Shopify-style two-column (forms left, sticky summary right) ─── */

body.woocommerce-checkout .woocommerce-checkout,
body.jc-checkout-page .woocommerce-checkout,
body.woocommerce-checkout form.checkout.woocommerce-checkout,
body.jc-checkout-page form.checkout.woocommerce-checkout {
  width: 100%;
  max-width: 100%;
  float: none !important;
  clear: both;
}

body.woocommerce-checkout form.checkout.woocommerce-checkout,
body.jc-checkout-page form.checkout.woocommerce-checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 1.25rem;
  align-items: start;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

body.jc-checkout-page form.checkout > .woocommerce-NoticeGroup,
body.jc-checkout-page form.checkout > .woocommerce-form-coupon-toggle,
body.jc-checkout-page form.checkout > .checkout_coupon.woocommerce-form-coupon {
  grid-column: 1 / -1;
}

body.jc-checkout-page form.checkout > .checkout_coupon.woocommerce-form-coupon {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

body.jc-checkout-page form.checkout > .checkout_coupon.woocommerce-form-coupon .form-row {
  margin: 0 0 0.4rem !important;
  padding: 0 !important;
}

body.jc-checkout-page form.checkout > .checkout_coupon.woocommerce-form-coupon .form-row-last {
  margin-bottom: 0 !important;
}

body.jc-checkout-page form.checkout .checkout-col-left,
body.jc-checkout-page form.checkout .checkout-col-right,
body.jc-checkout-page form.checkout #customer_details.col2-set,
body.jc-checkout-page form.checkout #order_review,
body.jc-checkout-page form.checkout #order_review_heading,
body.jc-checkout-page form.checkout .jc-checkout-summary {
  float: none !important;
  clear: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

body.jc-checkout-page form.checkout .checkout-col-left {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
  width: 100%;
}

body.jc-checkout-page form.checkout #customer_details.col2-set {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100% !important;
  margin: 0;
}

body.jc-checkout-page form.checkout #customer_details .col-1,
body.jc-checkout-page form.checkout #customer_details .col-2 {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0;
}

body.jc-checkout-page form.checkout .checkout-col-right,
body.jc-checkout-page form.checkout .jc-checkout-summary {
  min-width: 0;
  width: 100% !important;
  max-width: 100%;
}

@media (min-width: 993px) {
  body.woocommerce-checkout form.checkout.woocommerce-checkout,
  body.jc-checkout-page form.checkout.woocommerce-checkout {
    grid-template-columns: 58% 38% !important;
    column-gap: 4% !important;
    row-gap: 1.75rem !important;
    align-items: start !important;
  }

  body.woocommerce-checkout form.checkout .checkout-col-left,
  body.jc-checkout-page form.checkout .checkout-col-left {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }

  body.woocommerce-checkout form.checkout #jc-checkout-shipping,
  body.jc-checkout-page form.checkout #jc-checkout-shipping {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
  }

  body.woocommerce-checkout form.checkout #jc-checkout-payment-stack,
  body.jc-checkout-page form.checkout #jc-checkout-payment-stack {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 100% !important;
  }

  body.woocommerce-checkout form.checkout .checkout-col-right,
  body.woocommerce-checkout form.checkout .jc-checkout-summary,
  body.jc-checkout-page form.checkout .checkout-col-right,
  body.jc-checkout-page form.checkout .jc-checkout-summary {
    grid-column: 2 !important;
    grid-row: 1 / span 3 !important;
    width: 100% !important;
    position: sticky !important;
    top: calc(var(--navh, 100px) + var(--jc-admin-bar, 0px) + 0.75rem) !important;
    align-self: start;
    padding: 24px;
    background: #fbfbfb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
  }
}

@media (max-width: 992px) {
  body.woocommerce-checkout form.checkout.woocommerce-checkout,
  body.jc-checkout-page form.checkout.woocommerce-checkout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem;
  }

  /*
   * Mobile stack is enforced by DOM order in form-checkout.php:
   * #customer_details → .checkout-col-right → #jc-checkout-shipping → #jc-checkout-payment-stack
   * Do not use display:contents or flex order — they break payment placement after AJAX.
   */
  body.woocommerce-checkout form.checkout .checkout-col-left,
  body.jc-checkout-page form.checkout .checkout-col-left {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 1.5rem;
  }

  body.woocommerce-checkout form.checkout #customer_details,
  body.woocommerce-checkout form.checkout #customer_details.col2-set,
  body.jc-checkout-page form.checkout #customer_details,
  body.jc-checkout-page form.checkout #customer_details.col2-set {
    width: 100% !important;
  }

  body.woocommerce-checkout form.checkout .checkout-col-right,
  body.woocommerce-checkout form.checkout .jc-checkout-summary,
  body.jc-checkout-page form.checkout .checkout-col-right,
  body.jc-checkout-page form.checkout .jc-checkout-summary {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    top: auto !important;
    padding: 1.15rem 1.1rem 1.15rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
  }

  body.jc-checkout-page #order_review .shop_table tr.cart_item,
  body.jc-checkout-page #order_review .shop_table tfoot tr.cart-subtotal,
  body.jc-checkout-page #order_review .shop_table tfoot tr.shipping-total,
  body.jc-checkout-page #order_review .shop_table tfoot tr.fee,
  body.jc-checkout-page #order_review .shop_table tfoot tr.tax-rate,
  body.jc-checkout-page #order_review .shop_table tfoot tr.tax-total,
  body.jc-checkout-page #order_review .shop_table tfoot tr.cart-discount,
  body.jc-checkout-page #order_review .shop_table tfoot tr.order-total {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  body.woocommerce-checkout form.checkout #jc-checkout-shipping,
  body.jc-checkout-page form.checkout #jc-checkout-shipping {
    width: 100% !important;
  }

  body.woocommerce-checkout form.checkout #jc-checkout-payment-stack,
  body.jc-checkout-page form.checkout #jc-checkout-payment-stack {
    width: 100% !important;
    margin-top: 0.25rem !important;
  }

  body.woocommerce-checkout form.checkout #jc-checkout-payment-methods,
  body.jc-checkout-page form.checkout #jc-checkout-payment-methods {
    margin: 0;
  }

  body.woocommerce-checkout form.checkout #jc-checkout-place-order,
  body.jc-checkout-page form.checkout #jc-checkout-place-order {
    margin-top: 1rem !important;
  }
}

body.jc-checkout-page form.checkout #jc-checkout-payment-stack,
body.woocommerce-checkout form.checkout #jc-checkout-payment-stack {
  box-sizing: border-box;
}

body.jc-checkout-page form.checkout #jc-checkout-payment-stack #jc-checkout-payment-methods,
body.woocommerce-checkout form.checkout #jc-checkout-payment-stack #jc-checkout-payment-methods {
  margin: 0;
}

body.jc-checkout-page form.checkout #jc-checkout-payment-stack #jc-checkout-place-order,
body.woocommerce-checkout form.checkout #jc-checkout-payment-stack #jc-checkout-place-order {
  margin-top: 1rem;
}

body.jc-checkout-page .jc-checkout-section__title {
  margin: 0 0 0.85rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--jc-wc-ink, #111);
}

body.jc-checkout-page .jc-checkout-shipping__package-name {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--jc-wc-muted, #6b7280);
}

body.jc-checkout-page form.checkout #order_review_heading {
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--jc-wc-ink);
}

body.jc-checkout-page form.checkout #order_review.woocommerce-checkout-review-order {
  padding: 0;
  background: transparent;
  border: 0;
}

body.jc-checkout-page form.checkout #order_review .shop_table {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

body.jc-checkout-page form.checkout #order_review .shop_table tbody,
body.jc-checkout-page form.checkout #order_review .shop_table tfoot {
  display: block;
  width: 100%;
}

body.jc-checkout-page form.checkout #order_review .shop_table thead {
  display: none;
}

body.jc-checkout-page form.checkout #order_review .shop_table th,
body.jc-checkout-page form.checkout #order_review .shop_table td {
  padding: 0.65rem 0.85rem;
}

body.woocommerce-checkout form.checkout #payment,
body.jc-checkout-page form.checkout #payment,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment,
body.jc-checkout-page form.checkout .jc-checkout-payment-methods #payment,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment,
body.woocommerce-checkout form.checkout #jc-checkout-payment-stack #payment {
  margin: 0;
  padding: 0;
  background: transparent;
  float: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.jc-checkout-page form.checkout .jc-checkout-summary .woocommerce-form-coupon-toggle,
body.jc-checkout-page form.checkout .jc-checkout-summary .checkout_coupon.woocommerce-form-coupon {
  margin: 0 0 1rem;
}

body.jc-checkout-page form.checkout .jc-checkout-summary .checkout_coupon.woocommerce-form-coupon {
  padding: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

body.woocommerce-checkout form.checkout #payment .wc_payment_methods,
body.jc-checkout-page form.checkout #payment .wc_payment_methods,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .wc_payment_methods,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .wc_payment_methods,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .wc_payment_methods,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .wc_payment_methods {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
}

body.woocommerce-checkout form.checkout #payment .wc_payment_method,
body.jc-checkout-page form.checkout #payment .wc_payment_method,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .wc_payment_method,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .wc_payment_method,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .wc_payment_method,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .wc_payment_method {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: 0.65rem;
  row-gap: 0.55rem;
  align-items: center;
  margin: 0 0 0.55rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  box-sizing: border-box;
}

body.woocommerce-checkout form.checkout #payment .wc_payment_method > input[type="radio"],
body.jc-checkout-page form.checkout #payment .wc_payment_method > input[type="radio"] {
  grid-column: 1;
  grid-row: 1;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  align-self: center;
  accent-color: var(--jc-color-primary, #0504aa);
}

body.woocommerce-checkout form.checkout #payment .wc_payment_method:last-child,
body.jc-checkout-page form.checkout #payment .wc_payment_method:last-child,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .wc_payment_method:last-child,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .wc_payment_method:last-child,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .wc_payment_method:last-child,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .wc_payment_method:last-child {
  margin-bottom: 0;
}

body.woocommerce-checkout form.checkout #payment .wc_payment_method > label,
body.jc-checkout-page form.checkout #payment .wc_payment_method > label,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .wc_payment_method > label,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .wc_payment_method > label,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .wc_payment_method > label,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .wc_payment_method > label {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin: 0;
  min-width: 0;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}

/* Gateway icons (crypto coins, card marks). Do not cap a multi-icon strip at 2.25rem —
   globals.css img { max-width:100%; display:block } was shrinking them to dots. */
body.woocommerce-checkout form.checkout #payment .wc_payment_method > label img,
body.jc-checkout-page form.checkout #payment .wc_payment_method > label img,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .wc_payment_method > label img,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .wc_payment_method > label img,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .wc_payment_method > label img,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .wc_payment_method > label img {
  display: inline-block !important;
  width: auto !important;
  height: 2.5rem !important;
  max-width: none !important;
  max-height: 2.75rem !important;
  margin: 0;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
}

body.woocommerce-checkout form.checkout #payment .payment_box,
body.jc-checkout-page form.checkout #payment .payment_box,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .payment_box,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .payment_box,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .payment_box,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .payment_box {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid #eef0f3;
  border-radius: 6px;
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  overflow-wrap: anywhere;
}

body.woocommerce-checkout form.checkout #payment .payment_box img,
body.jc-checkout-page form.checkout #payment .payment_box img,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .payment_box img,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .payment_box img,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .payment_box img,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .payment_box img {
  display: inline-block !important;
  width: auto !important;
  height: 1.5rem !important;
  max-width: none !important;
  max-height: 1.75rem !important;
  margin: 0 0.35rem 0.35rem 0;
  flex: 0 0 auto;
  vertical-align: middle;
  object-fit: contain;
}

body.woocommerce-checkout form.checkout #payment .payment_box p:has(img),
body.woocommerce-checkout form.checkout #payment .payment_box div:has(> img):not(.paygatedottocryptogateway-coin-select),
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .payment_box p:has(img),
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .payment_box div:has(> img):not(.paygatedottocryptogateway-coin-select),
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .payment_box p:has(img),
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .payment_box div:has(> img):not(.paygatedottocryptogateway-coin-select),
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .payment_box p:has(img),
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .payment_box div:has(> img):not(.paygatedottocryptogateway-coin-select),
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .payment_box p:has(img),
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .payment_box div:has(> img):not(.paygatedottocryptogateway-coin-select) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

body.jc-checkout-page form.checkout .jc-checkout-payment #payment .paygatedottocryptogateway-coin-select,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .paygatedottocryptogateway-coin-select,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .paygatedottocryptogateway-coin-select,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .paygatedottocryptogateway-coin-select {
  display: block;
  width: 100%;
  max-width: 100%;
}

body.jc-checkout-page form.checkout .jc-checkout-payment #payment .paygatedottocryptogateway-coin-select > p,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .paygatedottocryptogateway-coin-select > p,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .paygatedottocryptogateway-coin-select > p,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .paygatedottocryptogateway-coin-select > p {
  display: block;
  width: 100%;
}

body.jc-checkout-page form.checkout .jc-checkout-payment #payment .paygatedottocryptogateway-coin-option,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .paygatedottocryptogateway-coin-option,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .paygatedottocryptogateway-coin-option,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .paygatedottocryptogateway-coin-option {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.woocommerce-checkout form.checkout #payment .payment_box::before,
body.jc-checkout-page form.checkout #payment .payment_box::before,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .payment_box::before,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .payment_box::before,
body.jc-checkout-page form.checkout #jc-checkout-payment-methods #payment .payment_box::before,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .payment_box::before {
  display: none;
}

body.woocommerce-checkout form.checkout #payment .place-order,
body.jc-checkout-page form.checkout #payment .place-order,
body.jc-checkout-page form.checkout .jc-checkout-payment #payment .place-order,
body.jc-checkout-page form.checkout #jc-checkout-payment #payment .place-order,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #payment .place-order,
body.jc-checkout-page form.checkout #jc-checkout-place-order .place-order {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 1rem;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100%;
  margin: 1rem 0 0;
  padding: 0;
  box-sizing: border-box;
}

body.woocommerce-checkout form.checkout #payment #place_order,
body.jc-checkout-page form.checkout #payment #place_order,
body.jc-checkout-page form.checkout .jc-checkout-payment #place_order,
body.jc-checkout-page form.checkout #jc-checkout-payment #place_order,
body.jc-checkout-page form.checkout #jc-checkout-payment-stack #place_order,
body.jc-checkout-page form.checkout #jc-checkout-place-order #place_order {
  float: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  flex: 0 0 auto;
  min-height: 3rem;
  margin: 0 !important;
  padding: 0.85rem 1.25rem;
  box-sizing: border-box;
}

/* ── Phase A: shipping rate cards (checkout + cart) ─── */

body.jc-checkout-page #order_review .shop_table tfoot tr.cart-subtotal,
body.jc-checkout-page #order_review .shop_table tfoot tr.shipping-total,
body.jc-checkout-page #order_review .shop_table tfoot tr.fee,
body.jc-checkout-page #order_review .shop_table tfoot tr.tax-rate,
body.jc-checkout-page #order_review .shop_table tfoot tr.tax-total,
body.jc-checkout-page #order_review .shop_table tfoot tr.cart-discount,
body.jc-checkout-page #order_review .shop_table tfoot tr.order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-top: 1px solid #eef0f3;
  box-sizing: border-box;
}

body.jc-checkout-page #order_review .shop_table tfoot tr.cart-subtotal th,
body.jc-checkout-page #order_review .shop_table tfoot tr.shipping-total th,
body.jc-checkout-page #order_review .shop_table tfoot tr.fee th,
body.jc-checkout-page #order_review .shop_table tfoot tr.tax-rate th,
body.jc-checkout-page #order_review .shop_table tfoot tr.tax-total th,
body.jc-checkout-page #order_review .shop_table tfoot tr.cart-discount th,
body.jc-checkout-page #order_review .shop_table tfoot tr.order-total th,
body.jc-checkout-page #order_review .shop_table tfoot tr.cart-subtotal td,
body.jc-checkout-page #order_review .shop_table tfoot tr.shipping-total td,
body.jc-checkout-page #order_review .shop_table tfoot tr.fee td,
body.jc-checkout-page #order_review .shop_table tfoot tr.tax-rate td,
body.jc-checkout-page #order_review .shop_table tfoot tr.tax-total td,
body.jc-checkout-page #order_review .shop_table tfoot tr.cart-discount td,
body.jc-checkout-page #order_review .shop_table tfoot tr.order-total td {
  display: block;
  float: none !important;
  width: auto !important;
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

body.jc-checkout-page #order_review .shop_table tfoot tr th {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-weight: 600;
}

body.jc-checkout-page #order_review .shop_table tfoot tr td {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body.jc-checkout-page #order_review .shop_table tfoot tr td .woocommerce-Price-amount,
body.jc-checkout-page #order_review .shop_table tr.cart_item td.product-total .woocommerce-Price-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.jc-checkout-page #order_review .shop_table tfoot tr.order-total {
  padding: 0.8rem 0.85rem;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
}

body.jc-checkout-page #order_review .shop_table tfoot tr.order-total th,
body.jc-checkout-page #order_review .shop_table tfoot tr.order-total td {
  font-size: 1rem;
  font-weight: 700;
}

.jc-shipping-rate-cards,
#shipping_method.woocommerce-shipping-methods,
#jc-shipping_method.woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

.jc-shipping-rate-card,
#shipping_method.woocommerce-shipping-methods > li,
#jc-shipping_method.woocommerce-shipping-methods > li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 !important;
  padding: 0.85rem 1rem !important;
  list-style: none;
  width: 100%;
  min-height: 2.75rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.jc-shipping-rate-card input[type="radio"],
#shipping_method.woocommerce-shipping-methods > li > input[type="radio"],
#jc-shipping_method.woocommerce-shipping-methods > li > input[type="radio"] {
  flex: 0 0 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--jc-color-primary, #0504aa);
}

.jc-shipping-rate-card label,
#shipping_method.woocommerce-shipping-methods > li > label,
#jc-shipping_method.woocommerce-shipping-methods > li > label {
  flex: 1 1 auto;
  display: block;
  min-width: 0;
  width: auto !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
  font-weight: 400;
  line-height: 1.4;
}

.jc-shipping-rate-card.is-selected,
#shipping_method.woocommerce-shipping-methods > li:has(> input:checked),
#jc-shipping_method.woocommerce-shipping-methods > li:has(> input:checked) {
  border-color: var(--jc-color-primary, #0504aa);
  background: color-mix(in srgb, var(--jc-color-primary, #0504aa) 5%, #fff);
  box-shadow: none;
}

.jc-shipping-card__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.jc-shipping-card__main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}

body.jc-checkout-page .jc-checkout-main .jc-shipping-card__inner {
  align-items: center;
}

body.jc-checkout-page .jc-checkout-main .jc-shipping-card__title {
  white-space: normal;
  overflow-wrap: break-word;
}

.jc-shipping-card__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--jc-wc-ink, #111);
}

.jc-shipping-card__eta {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.35;
  white-space: nowrap;
}

.jc-shipping-card__price {
  flex: 0 0 auto;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--jc-wc-ink, #111);
  white-space: nowrap;
  text-align: right;
}

.jc-shipping-card__price .woocommerce-Price-amount {
  font-weight: inherit;
}

.jc-shipping-card__price--free {
  color: #047857;
}

@media (max-width: 640px) {
  body.woocommerce-checkout form.checkout #jc-checkout-shipping,
  body.jc-checkout-page form.checkout #jc-checkout-shipping,
  body.jc-checkout-page .jc-checkout-shipping__methods {
    overflow: visible;
    max-width: 100%;
  }

  /* Cart totals hide must never suppress checkout carrier radios (~390px). */
  body.woocommerce-checkout #jc-checkout-shipping .jc-shipping-rate-cards,
  body.jc-checkout-page #jc-checkout-shipping .jc-shipping-rate-cards,
  body.woocommerce-checkout #jc-checkout-shipping #jc-shipping_method,
  body.jc-checkout-page #jc-checkout-shipping #jc-shipping_method,
  body.woocommerce-checkout #jc-checkout-shipping #jc-shipping_method > li,
  body.jc-checkout-page #jc-checkout-shipping #jc-shipping_method > li {
    display: flex !important;
    visibility: visible !important;
  }

  .jc-shipping-rate-cards,
  #shipping_method.woocommerce-shipping-methods,
  #jc-shipping_method.woocommerce-shipping-methods {
    overflow: visible;
  }

  .jc-shipping-rate-card,
  #shipping_method.woocommerce-shipping-methods > li,
  #jc-shipping_method.woocommerce-shipping-methods > li {
    align-items: flex-start;
  }

  .jc-shipping-card__inner {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .jc-shipping-card__eta {
    white-space: normal;
  }

  .jc-shipping-card__price {
    white-space: normal;
    text-align: left;
  }
}

body.jc-checkout-shipping-loading .jc-shipping-rate-cards,
body.jc-checkout-shipping-loading #shipping_method.woocommerce-shipping-methods,
body.jc-checkout-shipping-loading #jc-shipping_method.woocommerce-shipping-methods {
  opacity: 0.55;
  pointer-events: none;
}

.jc-checkout-shipping-skeleton {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.55rem;
  width: 100%;
}

.jc-checkout-shipping-skeleton[hidden] {
  display: none;
}

.jc-shipping-skeleton-card {
  height: 4.25rem;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef0f3 25%, #f8f9fb 50%, #eef0f3 75%);
  background-size: 200% 100%;
  animation: jc-shipping-shimmer 1.1s ease-in-out infinite;
}

@keyframes jc-shipping-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Phase A: checkout order review line items ─── */

body.jc-checkout-page #order_review .shop_table tr.cart_item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.85rem;
  border-bottom: 1px solid #eef0f3;
}

body.jc-checkout-page #order_review .shop_table tr.cart_item td {
  padding: 0;
  border: 0;
  vertical-align: top;
}

body.jc-checkout-page #order_review .shop_table tr.cart_item td.product-name {
  grid-column: 1;
  width: 100% !important;
}

body.jc-checkout-page #order_review .shop_table tr.cart_item td.product-total {
  display: block !important;
  visibility: visible !important;
  grid-column: 2;
  width: auto !important;
  min-width: 4.5rem;
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  align-self: start;
  padding-top: 0.15rem;
}

body.jc-checkout-page .jc-checkout-line {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

body.jc-checkout-page .jc-checkout-line__media {
  position: relative;
  flex: 0 0 3.125rem;
  width: 3.125rem;
}

body.jc-checkout-page .jc-checkout-line__thumb {
  display: block;
  width: 3.125rem;
  height: 3.125rem;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

body.jc-checkout-page .jc-checkout-line__qty-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--jc-color-primary, #0504aa);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

body.jc-checkout-page .jc-checkout-line__body {
  flex: 1;
  min-width: 0;
}

body.jc-checkout-page .jc-checkout-line__title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
  color: var(--jc-wc-ink, #111);
}

body.jc-checkout-page .jc-checkout-line__qty {
  display: none;
}

body.jc-checkout-page #order_review .shop_table .cart_item .variation,
body.jc-checkout-page #order_review .shop_table .cart_item dl.variation,
body.jc-checkout-page #order_review .shop_table .cart_item .wc-item-meta {
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--jc-wc-muted, #6b7280);
}

body.jc-checkout-page #order_review .shop_table .cart_item dl.variation {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.35em;
  row-gap: 0.15rem;
}

body.jc-checkout-page #order_review .shop_table .cart_item .wc-item-meta li,
body.jc-checkout-page #order_review .shop_table .cart_item dl.variation dt,
body.jc-checkout-page #order_review .shop_table .cart_item dl.variation dd {
  margin: 0;
}

body.jc-checkout-page #order_review .shop_table .cart_item dl.variation dt {
  margin-inline-end: 0.25em;
}

body.jc-checkout-page #order_review .shop_table .cart_item .wc-item-meta .wc-item-meta-label {
  margin-inline-end: 0.35em;
}

body.jc-checkout-page #order_review .shop_table .cart_item dl.variation dd {
  margin-inline-end: 0.75em;
}

body.jc-checkout-page #order_review .shop_table .cart_item dl.variation dd p {
  display: inline;
  margin: 0;
}

body.jc-checkout-page #order_review .shop_table .cart_item .product-quantity {
  display: none;
}

body.jc-checkout-page #order_review .shop_table .cart_item .wc-item-meta .jc-cart-laser__img,
body.jc-checkout-page #order_review .shop_table .cart_item .wc-item-meta img {
  display: block;
  max-width: 2.5rem;
  height: auto;
  margin-top: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

/* ── Phase A: trust strip (never share a row with Place order) ─── */

body.woocommerce-checkout form.checkout #payment .jc-checkout-trust,
body.jc-checkout-page form.checkout #payment .jc-checkout-trust,
.jc-checkout-trust {
  display: block !important;
  float: none !important;
  clear: both !important;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid #e5e7eb;
  box-sizing: border-box;
}

body.woocommerce-checkout form.checkout #payment .jc-checkout-trust__list,
body.jc-checkout-page form.checkout #payment .jc-checkout-trust__list,
.jc-checkout-trust__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jc-checkout-trust__item {
  position: relative;
  min-width: 0;
  max-width: 100%;
  padding-left: 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 600;
  color: #374151;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.jc-checkout-trust__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--jc-color-primary, #0504aa);
  transform: translateY(-50%);
}

@media (min-width: 640px) {
  body.woocommerce-checkout form.checkout #payment .jc-checkout-trust__list,
  body.jc-checkout-page form.checkout #payment .jc-checkout-trust__list,
  .jc-checkout-trust__list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    align-items: start;
  }
}

/* Sale pair: muted regular + red strikethrough, sale price as the live figure.
   Do not rely on Woo's yellow <ins> highlight or red text alone. */
.woocommerce del,
.woocommerce .price del,
.jc-shop del,
.jc-cart-suggest__price del {
  color: #4b5563;
  opacity: 1;
  font-weight: 500;
  text-decoration: line-through;
  text-decoration-color: #dc2626;
  text-decoration-thickness: 0.12em;
  text-decoration-skip-ink: none;
}

.woocommerce ins,
.woocommerce .price ins,
.jc-shop ins,
.jc-cart-suggest__price ins {
  background: none;
  padding: 0;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

/* ── Checkout lock: fields, terms, Place order, trust (mobile-first) ─── */

body.woocommerce-checkout form.checkout .form-row,
body.jc-checkout-page form.checkout .form-row {
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  box-sizing: border-box;
}

body.woocommerce-checkout form.checkout .form-row-first,
body.woocommerce-checkout form.checkout .form-row-last,
body.jc-checkout-page form.checkout .form-row-first,
body.jc-checkout-page form.checkout .form-row-last {
  float: none !important;
  width: 100% !important;
  overflow: visible;
}

@media (min-width: 640px) {
  body.woocommerce-checkout form.checkout #customer_details .form-row-first,
  body.woocommerce-checkout form.checkout #customer_details .form-row-last,
  body.jc-checkout-page form.checkout #customer_details .form-row-first,
  body.jc-checkout-page form.checkout #customer_details .form-row-last {
    width: calc(50% - 0.5rem) !important;
    display: inline-block;
    vertical-align: top;
  }

  body.woocommerce-checkout form.checkout #customer_details .form-row-first,
  body.jc-checkout-page form.checkout #customer_details .form-row-first {
    margin-right: 1rem;
  }
}

body.woocommerce-checkout form.checkout .form-row label,
body.jc-checkout-page form.checkout .form-row label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--jc-wc-ink, #111);
}

body.woocommerce-checkout form.checkout .form-row .input-text,
body.woocommerce-checkout form.checkout .form-row select,
body.woocommerce-checkout form.checkout .form-row textarea,
body.jc-checkout-page form.checkout .form-row .input-text,
body.jc-checkout-page form.checkout .form-row select,
body.jc-checkout-page form.checkout .form-row textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  font-size: 1rem;
  line-height: 1.4;
}

/* Country + town/city + county selects — prevent mobile viewport overflow. */
body.woocommerce-checkout form.checkout .select2-container,
body.jc-checkout-page form.checkout .select2-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body.woocommerce-checkout form.checkout .select2-selection--single,
body.jc-checkout-page form.checkout .select2-selection--single {
  min-height: 2.75rem;
  border-radius: 8px;
  border-color: #d1d5db;
}

body.woocommerce-checkout form.checkout select.jc-checkout-city-select,
body.jc-checkout-page form.checkout select.jc-checkout-city-select {
  appearance: auto;
}

body.woocommerce-checkout form.checkout .form-row textarea,
body.jc-checkout-page form.checkout .form-row textarea {
  min-height: 5.5rem;
  resize: vertical;
}

body.woocommerce-checkout form.checkout #payment .woocommerce-privacy-policy-text,
body.woocommerce-checkout form.checkout #payment .woocommerce-terms-and-conditions-wrapper,
body.woocommerce-checkout form.checkout #payment .form-row.terms,
body.woocommerce-checkout form.checkout #payment .form-row.validate-required,
body.jc-checkout-page form.checkout #payment .woocommerce-privacy-policy-text,
body.jc-checkout-page form.checkout #payment .woocommerce-terms-and-conditions-wrapper,
body.jc-checkout-page form.checkout #payment .form-row.terms {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
}

body.woocommerce-checkout form.checkout #payment .woocommerce-privacy-policy-text,
body.jc-checkout-page form.checkout #payment .woocommerce-privacy-policy-text {
  max-width: 65ch;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--jc-wc-muted, #6b7280);
}

body.woocommerce-checkout form.checkout #payment .woocommerce-terms-and-conditions-wrapper,
body.jc-checkout-page form.checkout #payment .woocommerce-terms-and-conditions-wrapper {
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
}

body.woocommerce-checkout form.checkout #payment .woocommerce-form__label-for-checkbox,
body.jc-checkout-page form.checkout #payment .woocommerce-form__label-for-checkbox {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.65rem;
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

body.woocommerce-checkout form.checkout #payment .woocommerce-terms-and-conditions-checkbox-text,
body.jc-checkout-page form.checkout #payment .woocommerce-terms-and-conditions-checkbox-text {
  display: block !important;
  float: none !important;
  flex: 0 1 auto;
  min-width: 0;
  width: auto !important;
  max-width: none;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

body.woocommerce-checkout form.checkout #payment .woocommerce-form__label-for-checkbox .required,
body.jc-checkout-page form.checkout #payment .woocommerce-form__label-for-checkbox .required {
  float: none !important;
  position: static;
  margin: 0;
  align-self: center;
}

body.woocommerce-checkout form.checkout #payment .woocommerce-form__input-checkbox,
body.woocommerce-checkout form.checkout #payment .woocommerce-form__label-for-checkbox input[type="checkbox"],
body.jc-checkout-page form.checkout #payment .woocommerce-form__input-checkbox,
body.jc-checkout-page form.checkout #payment .woocommerce-form__label-for-checkbox input[type="checkbox"] {
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  margin: 0 !important;
  align-self: center;
  accent-color: var(--jc-color-primary, #0504aa);
}

body.woocommerce-checkout form.checkout #payment:after,
body.jc-checkout-page form.checkout #payment:after,
body.woocommerce-checkout form.checkout #payment .place-order:after,
body.jc-checkout-page form.checkout #payment .place-order:after {
  content: "";
  display: block;
  clear: both;
  height: 0;
}

@media (max-width: 639px) {
  body.woocommerce-checkout form.checkout #payment .jc-checkout-trust__list,
  body.jc-checkout-page form.checkout #payment .jc-checkout-trust__list,
  .jc-checkout-trust__list {
    grid-template-columns: 1fr;
  }
}

/* Keep Place order + trust above the WhatsApp / Telegram dock. */
body.woocommerce-checkout .jc-shop,
body.jc-checkout-page .jc-shop {
  padding-bottom: max(8.5rem, calc(env(safe-area-inset-bottom, 0px) + 7.5rem));
}

body.woocommerce-checkout form.checkout #payment #place_order,
body.jc-checkout-page form.checkout #payment #place_order {
  border-radius: 8px;
}

@media (max-width: 375px) {
  body.woocommerce-checkout form.checkout #payment #place_order,
  body.jc-checkout-page form.checkout #payment #place_order {
    min-height: 3rem;
    font-size: 0.9375rem;
  }
}
