:root {
  --hcl-teal: #006d77;
  --hcl-deep: #174e52;
  --hcl-gold: #d89a3d;
  --hcl-gold-soft: #f3c360;
  --hcl-ivory: #f8f4ee;
  --hcl-coral: #e87a5d;
  --hcl-yellow: #e5e252;
  --hcl-ink: #2d3135;
  --hcl-line: rgba(23, 78, 82, .14);
}

body.hcl-brand-checkout {
  --content-vertical-spacing: 0px;
  background: linear-gradient(145deg, #f8f4ee 0%, #fffdf9 48%, #f0e7d9 100%);
}

body.hcl-brand-checkout .site-main {
  padding-top: 0 !important;
}

body.hcl-brand-checkout div.woocommerce {
  display: block !important;
  width: min(1180px, calc(100% - 48px)) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 54px 0 86px;
  color: var(--hcl-ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.hcl-checkout-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 30px;
}

.hcl-kicker {
  margin: 0 0 9px;
  color: var(--hcl-gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
}

.hcl-checkout-intro h1 {
  margin: 0;
  color: var(--hcl-deep);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(30px, 3.3vw, 42px);
  line-height: 1.35;
}

.hcl-secure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--hcl-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #667274;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.hcl-secure span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--hcl-yellow);
  color: var(--hcl-deep);
}

body.hcl-brand-checkout form.checkout.woocommerce-checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr) !important;
  gap: 24px !important;
  align-items: start !important;
}

body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-customer-details,
body.hcl-brand-checkout form.checkout.woocommerce-checkout #customer_details {
  order: initial !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 28px !important;
  border: 1px solid var(--hcl-line) !important;
  border-radius: 25px !important;
  background: rgba(255, 255, 255, .9) !important;
  box-shadow: 0 18px 48px rgba(45, 49, 53, .065) !important;
}

body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-customer-details #customer_details {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-order-review,
body.hcl-brand-checkout form.checkout.woocommerce-checkout #order_review {
  order: initial !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 28px !important;
  border: 1px solid var(--hcl-line) !important;
  border-radius: 25px !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 18px 48px rgba(45, 49, 53, .075) !important;
}

body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-order-review {
  position: sticky;
  top: 20px;
}

body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-order-review #order_review {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.hcl-brand-checkout .woocommerce-billing-fields h3,
body.hcl-brand-checkout #order_review_heading {
  margin: 0 0 22px !important;
  color: var(--hcl-deep);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 24px;
  line-height: 1.45;
}

body.hcl-brand-checkout #order_review_heading {
  display: block !important;
}

body.hcl-brand-checkout .form-row {
  margin-bottom: 16px !important;
}

body.hcl-brand-checkout .form-row label {
  margin-bottom: 7px;
  color: #485456;
  font-size: 13px;
  font-weight: 800;
}

body.hcl-brand-checkout input.input-text,
body.hcl-brand-checkout textarea.input-text,
body.hcl-brand-checkout select {
  min-height: 49px !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(23, 78, 82, .18) !important;
  border-radius: 11px !important;
  background-color: #fffefc !important;
  color: var(--hcl-ink) !important;
  box-shadow: none !important;
}

body.hcl-brand-checkout input.input-text:focus,
body.hcl-brand-checkout textarea.input-text:focus,
body.hcl-brand-checkout select:focus {
  border-color: var(--hcl-teal) !important;
  box-shadow: 0 0 0 3px rgba(0, 109, 119, .09) !important;
}

body.hcl-brand-checkout .woocommerce-additional-fields {
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--hcl-line);
}

body.hcl-brand-checkout .woocommerce-additional-fields h3 {
  color: var(--hcl-deep);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 19px;
}

body.hcl-brand-checkout #order_review table.shop_table {
  margin: 0 0 18px !important;
  border: 0 !important;
  border-collapse: collapse !important;
  background: transparent !important;
}

body.hcl-brand-checkout #order_review table.shop_table th,
body.hcl-brand-checkout #order_review table.shop_table td {
  padding: 13px 0 !important;
  border-color: var(--hcl-line) !important;
  color: #566264;
  font-size: 13px;
}

body.hcl-brand-checkout #order_review table.shop_table .order-total th,
body.hcl-brand-checkout #order_review table.shop_table .order-total td {
  color: var(--hcl-deep);
  font-size: 16px;
}

body.hcl-brand-checkout #order_review table.shop_table .order-total .amount {
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 28px;
}

.hcl-course-summary {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid rgba(216, 154, 61, .25);
  border-radius: 18px;
  background: #fbf5e9;
}

.hcl-course-summary__top {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.hcl-course-summary__top img {
  width: 74px;
  aspect-ratio: 4 / 5;
  border: 4px solid #fff;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(45, 49, 53, .12);
}

.hcl-course-summary__top span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3e7cd;
  color: #9a6723;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.hcl-course-summary__top h2 {
  margin: 8px 0 0;
  color: var(--hcl-deep);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 20px;
  line-height: 1.4;
}

.hcl-course-summary ul {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #586466;
  font-size: 12px;
  line-height: 1.6;
}

.hcl-course-summary li {
  position: relative;
  padding-left: 21px;
}

.hcl-course-summary li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: .05em;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 5px;
  background: var(--hcl-yellow);
  color: var(--hcl-deep);
  font-size: 9px;
  font-weight: 900;
}

.hcl-course-summary__deadline,
.hcl-course-summary__installment {
  margin: 13px 0 0;
  padding: 11px 12px;
  border-radius: 10px;
  color: #6d5540;
  font-size: 11px;
  line-height: 1.65;
}

.hcl-course-summary__deadline { background: #f7e7e1; }
.hcl-course-summary__installment { background: #edf1f8; color: #465c7a; }

body.hcl-brand-checkout #payment {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.hcl-brand-checkout #payment ul.payment_methods {
  padding: 0 !important;
  border: 0 !important;
}

body.hcl-brand-checkout #payment ul.payment_methods > li {
  margin: 0 0 10px !important;
  padding: 13px 14px !important;
  border: 1px solid var(--hcl-line) !important;
  border-radius: 13px !important;
  background: #fffefc !important;
}

body.hcl-brand-checkout #payment ul.payment_methods > li > label {
  color: #435052;
  font-size: 13px;
  font-weight: 850;
}

body.hcl-brand-checkout #payment .payment_box {
  margin: 13px 0 0 !important;
  padding: 15px !important;
  border-radius: 11px !important;
  background: var(--hcl-ivory) !important;
}

body.hcl-brand-checkout #payment .payment_box::before { display: none !important; }

.hcl-course-consents {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
  padding: 17px 0 0;
  border-top: 1px solid var(--hcl-line);
}

/* Woomp moves the visible order button into #placeOrderWrap and hides the
   native WooCommerce place-order row. The companion script moves this block
   with that button; this fallback keeps it visible if the wrapper is absent. */
body.hcl-course-a-checkout #payment div.form-row.place-order.hcl-place-order-with-consents {
  display: block !important;
}

#placeOrderWrap .hcl-course-consents,
.hcl-course-consents--visible {
  width: 100%;
  margin: 0 0 14px !important;
  padding: 16px !important;
  border: 1px solid rgba(0, 109, 119, .18) !important;
  border-radius: 14px;
  background: #fffaf1;
  box-sizing: border-box;
}

.hcl-course-consents label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #566264;
  font-size: 12px;
  line-height: 1.7;
  cursor: pointer;
}

.hcl-course-consents input {
  width: 17px !important;
  height: 17px !important;
  margin: 2px 0 0 !important;
  accent-color: var(--hcl-teal);
}

.hcl-course-consents strong { color: var(--hcl-deep); }

body.hcl-brand-checkout #payment div.form-row.place-order {
  padding: 18px 0 0 !important;
}

body.hcl-brand-checkout #place_order {
  float: none !important;
  width: 100% !important;
  min-height: 57px !important;
  margin: 8px 0 0 !important;
  border-radius: 999px !important;
  background: var(--hcl-teal) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-shadow: 0 13px 28px rgba(0, 109, 119, .24) !important;
}

body.hcl-brand-checkout #place_order:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 109, 119, .3) !important;
}

body.hcl-brand-checkout .woocommerce-privacy-policy-text {
  color: #7b8587;
  font-size: 11px;
  line-height: 1.65;
}

.hcl-course-fallback-image {
  display: block;
  width: 80px;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  object-fit: cover;
}

body.hcl-brand-checkout .woocommerce-error,
body.hcl-brand-checkout .woocommerce-message,
body.hcl-brand-checkout .woocommerce-info {
  border-radius: 13px;
}

@media (max-width: 920px) {
  body.hcl-brand-checkout div.woocommerce {
    width: min(760px, calc(100% - 34px)) !important;
    padding: 38px 0 68px;
  }

  body.hcl-brand-checkout form.checkout.woocommerce-checkout {
    grid-template-columns: 1fr !important;
  }

  body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-order-review,
  body.hcl-brand-checkout form.checkout.woocommerce-checkout #order_review {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-customer-details,
  body.hcl-brand-checkout form.checkout.woocommerce-checkout #customer_details {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-order-review {
    position: static;
  }
}

@media (max-width: 560px) {
  body.hcl-brand-checkout div.woocommerce {
    width: calc(100% - 26px) !important;
    padding: 28px 0 52px;
  }

  .hcl-checkout-intro {
    display: block;
    margin-bottom: 21px;
  }

  .hcl-checkout-intro h1 { font-size: 28px; }
  .hcl-secure { margin-top: 15px; }

  body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-customer-details,
  body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-order-review,
  body.hcl-brand-checkout form.checkout.woocommerce-checkout #customer_details,
  body.hcl-brand-checkout form.checkout.woocommerce-checkout #order_review {
    padding: 21px !important;
    border-radius: 20px !important;
  }

  body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-customer-details #customer_details,
  body.hcl-brand-checkout form.checkout.woocommerce-checkout > .ct-order-review #order_review {
    padding: 0 !important;
  }
}
