/* Native WooCommerce presentation only. Load after cuda-professional-site.
 * Keep Woodmart's register tabs, responsive tables, field visibility and
 * payment-provider controls under their existing handlers. */

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page {
  --commerce-field-border: #bca99b;
  --commerce-focus: #986a78;
  --commerce-error: #a73c3c;
  background: var(--paper, #fbf7f2);
  color: var(--ink, #463d38);
  padding-block: 54px 76px;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page > .cuda-wrap > article > h1 {
  margin-bottom: 32px;
  font-family: CudaDisplay, Poppins, sans-serif;
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .01em;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce {
  font-size: 14px;
  line-height: 1.75;
  --wd-form-brd-radius: 8px;
  --wd-form-brd-color: var(--commerce-field-border);
  --wd-form-brd-color-focus: var(--commerce-focus);
  --wd-form-bg: #fff;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page :is(.woocommerce-billing-fields, .woocommerce-additional-fields, .woocommerce-shipping-fields, .checkout-order-review, .cart_totals) > :is(h2, h3),
body.cuda-professional-preview.woocommerce-account .cuda-native-page .wd-login-title {
  margin: 0 0 22px;
  color: var(--ink, #463d38);
  font-family: Poppins, Arial, sans-serif;
  font-size: clamp(20px, 2.1vw, 25px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.025em;
  text-transform: none;
}

/* White, rectangular fields remain visually distinct from action buttons.
 * Explicit types exclude hidden fields, honeypots outside form rows, and OTP UI. */
body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .form-row {
  margin-bottom: 20px;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .form-row > label {
  margin-bottom: 7px;
  color: var(--ink, #463d38);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .form-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="search"], select:not(.select2-hidden-accessible), textarea),
body.cuda-professional-preview.woocommerce-cart .cuda-native-page .coupon input.input-text {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid var(--commerce-field-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #463d38);
  box-shadow: none;
  font-family: Poppins, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  text-align: start;
  text-transform: none;
  transition: border-color .18s, background-color .18s;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .form-row textarea {
  min-height: 132px;
  resize: vertical;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .form-row :is(input, textarea)::placeholder,
body.cuda-professional-preview.woocommerce-cart .cuda-native-page .coupon input::placeholder {
  color: #827168;
  opacity: 1;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.form-row input:not([type="hidden"]), .form-row select, .form-row textarea, .coupon input):focus {
  border-color: var(--commerce-focus);
  outline: 2px solid var(--commerce-focus);
  outline-offset: 2px;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--commerce-focus);
  flex-shrink: 0;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(input, select, textarea):disabled {
  background-color: #f1ece7;
  color: #756961;
  cursor: not-allowed;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .password-input input {
  padding-inline-end: 48px;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(button.show-password-input, .show-password-input) {
  background: transparent;
  color: #77535f;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

/* Select2 is still responsible for opening, searching and choosing a country. */
body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .select2-container .select2-selection--single {
  min-height: 50px;
  border: 1px solid var(--commerce-field-border);
  border-radius: 8px;
  background: #fff;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
  padding-inline: 15px 35px;
  color: var(--ink, #463d38);
  font-size: 15px;
  line-height: 48px;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
  height: 48px;
  inset-inline-end: 10px;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.select2-container--focus, .select2-container--open) .select2-selection--single {
  border-color: var(--commerce-focus);
  outline: 2px solid var(--commerce-focus);
  outline-offset: 2px;
}

/* Only Woo action classes receive capsule styling; payment/OTP dialogs and
 * field accessories retain their native control dimensions and visibility. */
body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(a.button, button.button, input.button, .checkout-button, .woocommerce-Button, .wd-switch-to-register) {
  min-height: 48px;
  padding: 12px 25px;
  border: 1px solid #caa4b0;
  border-radius: 999px;
  background: #efd7e0;
  color: #694a52;
  box-shadow: none;
  font-family: Poppins, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: normal;
  transition: background-color .18s, border-color .18s;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(a.button, button.button, input.button, .checkout-button, .woocommerce-Button, .wd-switch-to-register):hover:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
  border-color: #b98f9d;
  background: #e7c3d0;
  color: #5b3f47;
  box-shadow: none;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(a, button, input[type="submit"], input[type="checkbox"], input[type="radio"]):focus-visible {
  outline: 2px solid var(--commerce-focus);
  outline-offset: 3px;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.button, .woocommerce-Button):is(:disabled, .disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Notices keep their status distinctions, links and native icon positions. */
body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) {
  margin-bottom: 24px;
  border: 1px solid #d8c8bb;
  border-inline-start-width: 3px;
  border-radius: 8px;
  background: #f5ece5;
  color: #51463f;
  font-size: 13px;
  line-height: 1.8;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .woocommerce-message {
  border-color: #a6b39f;
  background: #f1f4ed;
  color: #40503a;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .woocommerce-error {
  border-color: #bc6969;
  background: #fff1f0;
  color: #8b3030;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper, .lost_password) a:not(.button) {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .woocommerce-invalid :is(input.input-text, select, textarea, .select2-selection--single),
body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .form-row [aria-invalid="true"] {
  border-color: var(--commerce-error);
}

/* Cart: retain native responsive data-title cells and update/quantity actions. */
body.cuda-professional-preview.woocommerce-cart .cuda-native-page .woocommerce-cart-form,
body.cuda-professional-preview.woocommerce-cart .cuda-native-page .cart_totals,
body.cuda-professional-preview.woocommerce-checkout .cuda-native-page .checkout-order-review,
body.cuda-professional-preview.woocommerce-account .cuda-native-page .wd-registration-page {
  padding: 28px;
  border: 1px solid var(--line, #eaded4);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce table.shop_table {
  width: 100%;
  margin-bottom: 22px;
  border-color: var(--line, #eaded4);
  border-radius: 0;
  background: transparent;
  font-size: 13px;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce table.shop_table :is(th, td) {
  padding-block: 16px;
  border-color: var(--line, #eaded4);
  color: var(--ink, #463d38);
  line-height: 1.65;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce table.shop_table th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .015em;
  text-transform: none;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce table.shop_table .product-name {
  overflow-wrap: anywhere;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce table.shop_table .amount {
  white-space: nowrap;
  color: inherit;
}

body.cuda-professional-preview.woocommerce-cart .cuda-native-page .woocommerce-cart-form .product-thumbnail img {
  width: 76px;
  max-width: 76px;
  height: auto;
}

body.cuda-professional-preview.woocommerce-cart .cuda-native-page .woocommerce .quantity input.qty {
  width: 56px;
  min-height: 44px;
  padding: 8px 3px;
  border-color: var(--commerce-field-border);
  border-radius: 0;
  background: #fff;
  color: var(--ink, #463d38);
  font-size: 15px;
  text-align: center;
}

body.cuda-professional-preview.woocommerce-cart .cuda-native-page .woocommerce .quantity :is(.plus, .minus) {
  min-width: 32px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--commerce-field-border);
  border-radius: 6px;
  background: #f5ece5;
  color: var(--ink, #463d38);
  box-shadow: none;
}

body.cuda-professional-preview.woocommerce-cart .cuda-native-page .coupon input.input-text {
  width: min(100%, 220px);
}

body.cuda-professional-preview.woocommerce-cart .cuda-native-page .wc-proceed-to-checkout {
  padding-top: 18px;
}

body.cuda-professional-preview.woocommerce-cart .cuda-native-page :is(.cart-empty, .wd-empty-block-text, .return-to-shop) {
  margin-bottom: 22px;
}

body.cuda-professional-preview.woocommerce-cart .cuda-native-page .cart-empty {
  color: var(--ink, #463d38);
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.45;
}

/* Checkout: keep the native customer/payment columns and AJAX replacement.
 * Do not apply hero typography to legal documents or the BLIK modal's h1. */
body.cuda-professional-preview.woocommerce-checkout .cuda-native-page form.checkout > :is(.customer-details, .checkout-order-review) {
  min-width: 0;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page .woocommerce-additional-fields {
  margin-top: 30px;
}

body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout) .cuda-native-page .order-total :is(th, td) {
  font-size: 17px;
  font-weight: 600;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment {
  border-radius: 0;
  background: transparent;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment .wc_payment_methods {
  padding: 0;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--line, #eaded4);
  list-style: none;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment .wc_payment_methods > li {
  padding-block: 14px;
  margin: 0;
  border-top: 1px solid var(--line, #eaded4);
  line-height: 1.75;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment .wc_payment_methods > li > label {
  color: var(--ink, #463d38);
  font-size: 13px;
  font-weight: 500;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment .payment_box {
  padding: 18px;
  margin-top: 14px;
  border: 1px solid var(--line, #eaded4);
  border-radius: 8px;
  background: #faf4ee;
  color: #62544d;
  font-size: 13px;
  line-height: 1.8;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment .payment_box::before {
  border-bottom-color: #faf4ee;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment .place-order {
  padding: 0;
  margin-bottom: 0;
}

/* Woodmart styles this action by ID, so its brand colors need the same scope. */
body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment #place_order {
  width: 100%;
  margin-top: 20px;
  min-height: 54px;
  padding: 12px 25px;
  border: 1px solid #caa4b0;
  border-radius: 999px;
  background: #efd7e0;
  color: #694a52;
  box-shadow: none;
  font-family: Poppins, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0;
  text-transform: none;
}

body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment #place_order:hover:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
  border-color: #b98f9d;
  background: #e7c3d0;
  color: #5b3f47;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper, .registration-info) {
  color: var(--muted, #756961);
  font-size: 13px;
  line-height: 1.85;
}

body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper, .registration-info) p {
  margin-bottom: 14px;
}

/* Account/login: Woodmart owns .col-register visibility and the tab switch.
 * No display, order or grid-column overrides are applied to these panels. */
body.cuda-professional-preview.woocommerce-account .cuda-native-page :is(form.woocommerce-form-login, form.woocommerce-form-register, form.woocommerce-ResetPassword, form.woocommerce-EditAccountForm) {
  margin: 0;
  border-color: var(--line, #eaded4);
  box-shadow: none;
}

body.cuda-professional-preview.woocommerce-account .cuda-native-page .login-form-footer {
  gap: 12px 20px;
  margin-top: 20px;
  font-size: 12px;
}

body.cuda-professional-preview.woocommerce-account .cuda-native-page .woocommerce-MyAccount-navigation a {
  border-radius: 8px;
  color: var(--ink, #463d38);
  font-size: 13px;
}

body.cuda-professional-preview.woocommerce-account .cuda-native-page .woocommerce-MyAccount-navigation :is(.is-active > a, a:hover) {
  background: var(--blush, #f3dce3);
  color: #694a52;
}

body.cuda-professional-preview.woocommerce-account .cuda-native-page .woocommerce-MyAccount-content {
  min-width: 0;
  color: var(--ink, #463d38);
}

body.cuda-professional-preview.woocommerce-account .cuda-native-page .woocommerce-MyAccount-content > p {
  margin-bottom: 20px;
}

body.cuda-professional-preview.woocommerce-account .cuda-native-page .woocommerce-MyAccount-content address {
  padding: 20px;
  border: 1px solid var(--line, #eaded4);
  border-radius: 8px;
  background: #fff;
  line-height: 1.85;
}

@media (max-width: 1024px) {
  body.cuda-professional-preview.woocommerce-cart .cuda-native-page .woocommerce-cart-form,
  body.cuda-professional-preview.woocommerce-cart .cuda-native-page .cart_totals,
  body.cuda-professional-preview.woocommerce-checkout .cuda-native-page .checkout-order-review,
  body.cuda-professional-preview.woocommerce-account .cuda-native-page .wd-registration-page {
    padding: 22px;
  }
}

@media (max-width: 600px) {
  body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page {
    padding-block: 34px 48px;
  }

  body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page > .cuda-wrap {
    width: calc(100% - 32px);
  }

  body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page > .cuda-wrap > article > h1 {
    margin-bottom: 26px;
  }

  body.cuda-professional-preview.woocommerce-cart .cuda-native-page .woocommerce-cart-form,
  body.cuda-professional-preview.woocommerce-cart .cuda-native-page .cart_totals,
  body.cuda-professional-preview.woocommerce-checkout .cuda-native-page .checkout-order-review,
  body.cuda-professional-preview.woocommerce-account .cuda-native-page .wd-registration-page {
    padding: 20px 16px;
  }

  body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .form-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="search"], select:not(.select2-hidden-accessible), textarea),
  body.cuda-professional-preview.woocommerce-cart .cuda-native-page .coupon input.input-text,
  body.cuda-professional-preview:is(.woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce .select2-selection__rendered {
    font-size: 16px;
  }

  body.cuda-professional-preview.woocommerce-cart .cuda-native-page .coupon input.input-text {
    width: 100%;
    max-width: none;
  }

  body.cuda-professional-preview.woocommerce-checkout .cuda-native-page #payment .payment_box {
    padding: 15px;
  }

  body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce table.shop_table {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.cuda-professional-preview:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .cuda-native-page .woocommerce :is(.form-row input, .form-row textarea, .form-row select, .button, .woocommerce-Button, .wd-switch-to-register) {
    transition: none;
  }
}
