/* Cart, checkout and order-received pages in the Cleopatra look.
   Same palette as the landing page (style.css); WooCommerce's block markup. */

body.woocommerce-checkout,
body.cleo-shop {
  --cleo-deep: #0f3b32;
  --cleo-teal: #1d6e58;
  --cleo-ink: #16312a;
  --cleo-ink-soft: #5d6b66;
  --cleo-ivory: #f8f5ee;
  --cleo-line: rgba(15, 59, 50, .14);
  --cleo-gold: #d49a26;
  --cleo-gold-hi: #ffd36e;
  --cleo-berry: #d63a4f;
  background: var(--cleo-ivory);
  color: var(--cleo-ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.woocommerce-checkout :where(h1, h2, h3, p, a, button, input, select, textarea, label, span, div),
body.cleo-shop :where(h1, h2, h3, p, a, button, input, select, textarea, label, span, div) {
  font-family: inherit;
}

/* ---------- Header: deep green bar, gold logo ---------- */
body.woocommerce-checkout header.wp-block-template-part,
body.cleo-shop header.wp-block-template-part {
  background: var(--cleo-deep);
}
body.woocommerce-checkout header.wp-block-template-part > *,
body.cleo-shop header.wp-block-template-part > * { background: transparent; }
.cleo-co-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; }
.cleo-co-logo svg { width: 36px; height: 36px; }
.cleo-co-logo span {
  font-family: "Jost", "Poppins", sans-serif;
  font-size: 1rem;
  letter-spacing: .38em;
  background: linear-gradient(90deg, #d9b25a, #ffe39a 50%, #d9b25a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.woocommerce-checkout header.wp-block-template-part .wp-block-site-title,
body.cleo-shop header.wp-block-template-part .wp-block-site-title { margin: 0; }
body.woocommerce-checkout header.wp-block-template-part a,
body.cleo-shop header.wp-block-template-part a,
body.woocommerce-checkout header.wp-block-template-part .wc-block-mini-cart__button,
body.cleo-shop header.wp-block-template-part .wc-block-mini-cart__button { color: var(--cleo-gold-hi); }
body.woocommerce-checkout header.wp-block-template-part svg:not(.cleo-co-logo svg),
body.cleo-shop header.wp-block-template-part svg:not(.cleo-co-logo svg) { fill: currentColor; color: var(--cleo-gold-hi); }
body.woocommerce-checkout header.wp-block-template-part .wc-block-mini-cart__badge,
body.cleo-shop header.wp-block-template-part .wc-block-mini-cart__badge { background: var(--cleo-gold-hi); color: var(--cleo-deep); }

/* Theme footer links (Blog, Events, Patterns…) aren't part of this shop */
body.woocommerce-checkout footer.wp-block-template-part,
body.cleo-shop footer.wp-block-template-part { display: none; }

/* ---------- Layout and section cards ---------- */
body.woocommerce-checkout main,
body.cleo-shop main { padding-top: 28px; padding-bottom: 56px; }
.wc-block-checkout__main .wc-block-components-checkout-step {
  margin: 0 0 16px;
  padding: 22px 20px 20px;
  border: 1px solid var(--cleo-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px -22px rgba(15, 59, 50, .35);
}
.wc-block-checkout__main .wc-block-components-checkout-step::after { display: none !important; }
.wc-block-components-checkout-step__heading { margin-bottom: 14px !important; }
.wc-block-components-checkout-step__title,
.wc-block-components-title,
body.cleo-shop h1, body.cleo-shop h2 {
  color: var(--cleo-deep) !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  letter-spacing: 0;
}
.wc-block-components-checkout-step__description,
.wc-block-checkout__guest-checkout-notice,
.wc-block-components-checkout-step__description p { color: var(--cleo-ink-soft); font-size: .85rem; }
.wc-block-components-checkout-step__container { padding-left: 0 !important; }
.wc-block-checkout__main .wc-block-components-checkout-step__heading-content { color: var(--cleo-teal); }

/* One address only: the shipping address is used for billing */
.wc-block-checkout__use-address-for-billing { display: none !important; }

/* ---------- Inputs ---------- */
.wc-block-components-text-input input,
.wc-blocks-components-select__select,
.wc-block-components-textarea,
.wc-block-components-combobox .components-combobox-control input {
  border: 1.5px solid rgba(15, 59, 50, .2) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--cleo-ink) !important;
  box-shadow: none !important;
}
.wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus,
.wc-block-components-textarea:focus {
  border-color: var(--cleo-teal) !important;
  box-shadow: 0 0 0 3px rgba(255, 211, 110, .45) !important;
  outline: none !important;
}
.wc-block-components-text-input label,
.wc-blocks-components-select__label { color: var(--cleo-ink-soft) !important; }
.wc-block-components-text-input.has-error input,
.wc-blocks-components-select.has-error .wc-blocks-components-select__select { border-color: var(--cleo-berry) !important; }
.wc-block-components-validation-error { color: var(--cleo-berry); }

/* Country is fixed to Malaysia: show it as locked, not as a dropdown */
.wc-block-components-country-input .wc-blocks-components-select__select {
  pointer-events: none;
  background: var(--cleo-ivory) !important;
  border-style: dashed !important;
}
.wc-block-components-country-input .wc-blocks-components-select__expand { display: none; }

/* ---------- Checkboxes and radio cards ---------- */
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
  background: var(--cleo-deep);
  border-color: var(--cleo-deep);
}
.wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: #fff; }
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
  border-radius: 14px !important;
  box-shadow: inset 0 0 0 1.5px rgba(15, 59, 50, .16) !important;
  margin-bottom: 10px;
}
.wc-block-components-radio-control--highlight-checked::after { display: none !important; }
.wc-block-components-radio-control__option-checked,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  background: #fffaee !important;
  box-shadow: inset 0 0 0 2px var(--cleo-gold), 0 0 0 4px rgba(255, 211, 110, .3) !important;
}
.wc-block-components-radio-control__input { border-color: rgba(15, 59, 50, .35) !important; }
.wc-block-components-radio-control__input:checked { border-color: var(--cleo-deep) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--cleo-deep) !important; }
.wc-block-components-radio-control__label { font-weight: 600; color: var(--cleo-ink); }
.wc-block-components-radio-control__secondary-label { font-weight: 700; color: var(--cleo-teal); }

/* ---------- Buttons and links ---------- */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wc-block-components-totals-coupon__button {
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ffdc85, #f2bd45) !important;
  color: #0a2c24 !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 26px -10px rgba(246, 193, 79, .7), inset 0 1px 0 rgba(255, 255, 255, .45) !important;
}
.wc-block-components-checkout-place-order-button { min-height: 58px; font-size: 1.05rem !important; }
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover { filter: brightness(1.03); }
.wc-block-components-checkout-return-to-cart-button,
.wc-block-checkout__terms a,
.wc-block-components-address-form__address_2-toggle,
.wc-block-checkout__add-note .wc-block-components-checkbox__label { color: var(--cleo-teal) !important; }
.wc-block-checkout__terms { color: var(--cleo-ink-soft); font-size: .8rem; }

/* ---------- Order summary ---------- */
.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block {
  border: 1px solid var(--cleo-line) !important;
  border-radius: 20px !important;
  background: #fff;
  box-shadow: 0 16px 36px -24px rgba(15, 59, 50, .4);
  overflow: hidden;
}
.wc-block-components-checkout-order-summary__title-text,
.wc-block-components-order-summary__button-text { color: var(--cleo-deep); font-weight: 800; }
.wc-block-components-order-summary-item__quantity { background: var(--cleo-deep) !important; color: var(--cleo-gold-hi) !important; border: 0 !important; box-shadow: none !important; }
.wc-block-components-order-summary-item__image img { border-radius: 10px; }
.wc-block-components-product-name { color: var(--cleo-deep); font-weight: 700; }
.wc-block-components-product-metadata__description { color: var(--cleo-teal); font-weight: 600; }
.wc-block-components-sale-badge {
  border: 0 !important;
  border-radius: 999px !important;
  background: #fde6e9 !important;
  color: var(--cleo-berry) !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wc-block-components-product-price__regular { color: #8a948f; }
.wc-block-components-totals-item__label { color: var(--cleo-ink-soft); }
.wc-block-components-totals-footer-item { background: #fffaee; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label { color: var(--cleo-deep); font-weight: 800; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--cleo-deep); font-weight: 800; font-size: 1.35rem; }
.wc-block-components-panel__button { color: var(--cleo-teal); font-weight: 600; }
.wc-block-components-panel__button svg { fill: currentColor; }

/* Mobile: summary toggle bar on top of the form */
.wc-block-components-checkout-order-summary__title {
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--cleo-line);
  padding-inline: 14px !important;
}

/* ---------- Notices ---------- */
.wc-block-components-notice-banner.is-error { border-color: var(--cleo-berry); background: #fff5f6; }
.wc-block-components-notice-banner.is-info { border-color: var(--cleo-teal); background: #f3faf7; }

/* ---------- Terms / Privacy pages ---------- */
body.cleo-shop:not(.woocommerce-page) main { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
body.cleo-shop:not(.woocommerce-page) main > * {
  border-radius: 20px;
}
body.cleo-shop:not(.woocommerce-page) .wp-block-post-title {
  color: var(--cleo-deep);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: 0;
}
body.cleo-shop:not(.woocommerce-page) .entry-content {
  padding: 24px 22px 28px;
  border: 1px solid var(--cleo-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px -22px rgba(15, 59, 50, .35);
  font-size: .95rem;
  line-height: 1.7;
  color: var(--cleo-ink);
}
body.cleo-shop:not(.woocommerce-page) .entry-content h2 {
  margin-top: 1.6em;
  color: var(--cleo-deep);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0;
}
body.cleo-shop:not(.woocommerce-page) .entry-content h2:first-of-type { margin-top: 1em; }
body.cleo-shop:not(.woocommerce-page) .entry-content li::marker { color: var(--cleo-gold); }
body.cleo-shop:not(.woocommerce-page) .entry-content strong { color: var(--cleo-deep); }
body.cleo-shop:not(.woocommerce-page) .entry-content .has-small-font-size { color: var(--cleo-ink-soft); }

/* =========================================================================
   Checkout form, TikTok Shop style: one app-width column of white sections
   on a grey page, product card on top of delivery/payment, and a bottom bar
   with the total beside the Place Order button.
   ========================================================================= */
body.cleo-checkout { background: #f1efea; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Top bar: back arrow + centred title, white */
body.cleo-checkout header.wp-block-template-part { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid rgba(15, 59, 50, .08); }
body.cleo-checkout header.wp-block-template-part > .wp-block-group { padding: 0 !important; }
body.cleo-checkout header.wp-block-template-part .alignwide { position: relative; min-height: 52px; padding: 0 12px !important; max-width: 560px; margin: 0 auto; }
body.cleo-checkout header.wp-block-template-part .wp-block-woocommerce-cart-link,
body.cleo-checkout header.wp-block-template-part .wp-block-woocommerce-mini-cart { display: none !important; }
.cleo-co-bar { display: flex; align-items: center; min-height: 52px; }
.cleo-co-back { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -6px; border-radius: 50%; color: var(--cleo-deep) !important; }
body.cleo-checkout header.wp-block-template-part .cleo-co-back svg { width: 24px; height: 24px; fill: none !important; color: var(--cleo-deep) !important; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cleo-co-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 1.05rem; font-weight: 700; color: #161823; }

/* One column, app width; sections stack in TikTok's order */
body.cleo-checkout main { padding: 0 !important; margin-top: 0 !important; }
body.cleo-checkout main .has-global-padding,
body.cleo-checkout main .wp-block-post-content,
body.cleo-checkout main .entry-content { padding-left: 0 !important; padding-right: 0 !important; margin-top: 0 !important; }
body.cleo-checkout .wp-block-woocommerce-checkout { max-width: 560px !important; margin: 0 auto !important; padding: 0 !important; }
body.cleo-checkout .wc-block-components-sidebar-layout {
  display: flex !important; flex-direction: column; flex-wrap: nowrap;
  max-width: 560px; margin: 0 auto !important; padding: 8px 0 0 !important;
}
body.cleo-checkout main > *:first-child, body.cleo-checkout .wp-block-woocommerce-checkout > :first-child { margin-top: 0 !important; }
body.cleo-checkout .wc-block-checkout__main,
body.cleo-checkout .wc-block-checkout__form { display: contents !important; }
body.cleo-checkout .wc-block-checkout__sidebar {
  position: static !important; top: auto !important;
  width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
}
body.cleo-checkout #shipping-fields { order: 1; }
body.cleo-checkout #contact-fields { order: 2; }
body.cleo-checkout .wc-block-checkout__sidebar { order: 3; }
body.cleo-checkout #shipping-option { order: 4; }
body.cleo-checkout #payment-method { order: 5; }
body.cleo-checkout .cleo-sum { order: 4; }
body.cleo-checkout #order-notes { order: 7; }
body.cleo-checkout .wc-block-checkout__terms { order: 8; }
body.cleo-checkout .wc-block-checkout__actions { order: 9; }

/* Sections: flat white strips with a grey gap between */
body.cleo-checkout .wc-block-components-checkout-step,
body.cleo-checkout .wp-block-woocommerce-checkout-order-summary-block {
  margin: 0 0 8px !important;
  padding: 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
body.cleo-checkout .wc-block-components-checkout-step__heading { margin: 0 0 12px !important; }
body.cleo-checkout .wc-block-components-checkout-step__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem !important; font-weight: 700 !important; color: #161823 !important;
}
body.cleo-checkout #shipping-fields .wc-block-components-checkout-step__title::before {
  content: ""; flex: none; width: 20px; height: 20px;
  background: var(--cleo-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%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'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.cleo-checkout .wc-block-components-checkout-step__description { margin-bottom: 10px !important; }

/* Product card: shop name row, then the item */
body.cleo-checkout .wc-block-components-checkout-order-summary__title {
  pointer-events: none;
  margin: 0 0 12px !important; padding: 0 !important;
  border: 0 !important; box-shadow: none !important; background: none !important;
}
body.cleo-checkout .wc-block-components-checkout-order-summary__title-text {
  display: flex; align-items: center; gap: 8px;
  font-size: 0 !important;
}
body.cleo-checkout .wc-block-components-checkout-order-summary__title-text::before {
  content: "C"; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--cleo-deep); color: var(--cleo-gold-hi);
  font: 600 .8rem/1 "Jost", "Poppins", sans-serif;
}
body.cleo-checkout .wc-block-components-checkout-order-summary__title-text::after {
  content: "Cleopatra Beauty Dust";
  font-size: .95rem; font-weight: 700; color: #161823;
}
body.cleo-checkout .wc-block-components-checkout-order-summary__title > :not(.wc-block-components-checkout-order-summary__title-text) { display: none !important; }
body.cleo-checkout .wc-block-components-checkout-order-summary__content { display: block !important; }
body.cleo-checkout .wc-block-components-totals-wrapper { padding: 10px 0 !important; border-color: rgba(15, 59, 50, .08) !important; }
body.cleo-checkout .wc-block-components-totals-wrapper:empty { display: none !important; }
body.cleo-checkout .wp-block-woocommerce-checkout-order-summary-totals-block .wc-block-components-totals-wrapper { padding: 2px 0 !important; border: 0 !important; }
body.cleo-checkout .wp-block-woocommerce-checkout-order-summary-totals-block { padding: 8px 0 !important; border-top: 1px solid rgba(15, 59, 50, .08); }
body.cleo-checkout .wc-block-components-totals-item__description:empty { display: none; }
body.cleo-checkout .wp-block-woocommerce-checkout-order-summary-cart-items-block { padding-top: 0 !important; border-top: 0 !important; }
body.cleo-checkout .wc-block-components-order-summary-item { position: relative; display: flex; gap: 12px; padding: 0 !important; }
body.cleo-checkout .wc-block-components-order-summary-item__image { position: static !important; width: 84px !important; flex: none; }
body.cleo-checkout .wc-block-components-order-summary-item__image img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; background: #f6f3ec; }
/* Quantity shown as "x1" on the right, like TikTok */
body.cleo-checkout .wc-block-components-order-summary-item__quantity {
  position: absolute !important; top: auto !important; bottom: 2px; right: 0; left: auto !important;
  min-width: 0 !important; height: auto !important; padding: 0 !important;
  background: none !important; color: var(--cleo-ink-soft) !important; font-size: .85rem !important; font-weight: 500;
  transform: none !important;
}
body.cleo-checkout .wc-block-components-order-summary-item__quantity > span:first-child { color: var(--cleo-ink-soft) !important; }
body.cleo-checkout .wc-block-components-order-summary-item__quantity > span:first-child::before { content: "x"; }
body.cleo-checkout .wc-block-components-order-summary-item__description { flex: 1; min-width: 0; padding: 0 0 0 0 !important; }
body.cleo-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name { padding-right: 4px; }
body.cleo-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name { font-size: .92rem; font-weight: 600; line-height: 1.35; color: #161823; }
body.cleo-checkout .wc-block-cart-item__prices { margin-top: 6px; }
body.cleo-checkout .wc-block-components-order-summary-item__individual-prices { display: flex; flex-direction: column-reverse; align-items: flex-start; }
body.cleo-checkout .wc-block-components-order-summary-item__individual-prices ins,
body.cleo-checkout .wc-block-components-order-summary-item__individual-prices .wc-block-components-product-price__value.is-discounted { font-size: 1.05rem; font-weight: 800; color: #161823; text-decoration: none; }
body.cleo-checkout .wc-block-components-order-summary-item__individual-prices del { font-size: .8rem; color: #8a948f; }
body.cleo-checkout .wc-block-components-product-metadata { margin-top: 4px; font-size: .8rem; }
body.cleo-checkout .wc-block-components-order-summary-item__total-price { position: absolute; right: 0; bottom: 26px; }
body.cleo-checkout .wc-block-components-order-summary-item__total-price .wc-block-components-product-price { display: none; }
body.cleo-checkout .wc-block-components-sale-badge { font-size: .68rem !important; padding: .2em .6em !important; }
body.cleo-checkout .wc-block-components-totals-item { padding: 3px 0; font-size: .88rem; }
body.cleo-checkout .wc-block-components-totals-footer-item { margin: 0 !important; padding: 4px 0 0 !important; background: none !important; }
body.cleo-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 1rem !important; }

/* Delivery and payment: plain rows, hairline between, gold when chosen */
body.cleo-checkout .wc-block-components-radio-control__option,
body.cleo-checkout .wc-block-components-radio-control-accordion-option {
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(15, 59, 50, .08) !important;
}
body.cleo-checkout .wc-block-components-radio-control > :last-child,
body.cleo-checkout .wc-block-components-radio-control-accordion-option:last-child { border-bottom: 0 !important; }
body.cleo-checkout .wc-block-components-radio-control__option-checked,
body.cleo-checkout .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  background: #fffaee !important;
  box-shadow: inset 3px 0 0 var(--cleo-gold) !important;
}
body.cleo-checkout .wc-block-components-radio-control__label { font-size: .92rem; }

/* Terms: small print above the bar */
body.cleo-checkout .wc-block-checkout__terms { margin: 0 !important; padding: 4px 16px 16px !important; border: 0 !important; font-size: .75rem; }
body.cleo-checkout .wc-block-checkout__terms::before { display: none !important; }

/* Bottom bar: white strip with the total (added by checkout.js), button on the right */
.cleo-co-paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff;
  box-shadow: 0 -6px 18px -10px rgba(15, 59, 50, .35);
  padding-bottom: env(safe-area-inset-bottom);
}
.cleo-co-paybar__inner {
  display: flex; flex-direction: column; justify-content: center;
  max-width: 560px; height: 72px; margin: 0 auto; padding: 0 16px;
}
.cleo-co-paybar__label { font-size: .78rem; font-weight: 600; color: var(--cleo-ink-soft); }
.cleo-co-paybar__value { font-size: 1.25rem; font-weight: 800; color: #161823; line-height: 1.2; }
body.cleo-checkout .wc-block-checkout__actions {
  position: fixed !important; z-index: 61;
  bottom: calc(12px + env(safe-area-inset-bottom));
  right: max(16px, calc((100vw - 560px) / 2 + 16px));
  width: min(58vw, 300px);
  margin: 0 !important; padding: 0 !important;
}
body.cleo-checkout .wc-block-checkout__actions_row { display: block !important; margin: 0 !important; }
/* On phones WooCommerce repeats the order summary above Place Order; ours is already on the page */
body.cleo-checkout .wc-block-checkout__actions > :has(.checkout-order-summary-block-fill-wrapper),
body.cleo-checkout .wc-block-checkout__actions .checkout-order-summary-block-fill-wrapper { display: none !important; }
body.cleo-checkout .wc-block-components-checkout-return-to-cart-button { display: none !important; }
body.cleo-checkout .wc-block-components-checkout-place-order-button {
  width: 100% !important; min-height: 48px !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
}
/* Errors from Place Order show above the bar instead of inside the button area */
body.cleo-checkout .wc-block-checkout__actions .wc-block-components-notices { position: absolute; bottom: calc(100% + 18px); right: 0; width: min(92vw, 528px); }

@media (min-width: 600px) {
  body.cleo-checkout .wc-block-components-sidebar-layout { padding-top: 16px; }
  body.cleo-checkout .wc-block-components-checkout-step,
  body.cleo-checkout .wp-block-woocommerce-checkout-order-summary-block { border-radius: 14px !important; padding: 18px !important; }
}

/* ---------- Shipping address folds into one row (toggled by checkout.js) ---------- */
body.cleo-checkout #shipping-fields .wc-block-components-checkout-step__heading {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  margin: 0 !important; padding-right: 28px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.cleo-checkout #shipping-fields .wc-block-components-checkout-step__heading:focus-visible { outline: 2px solid var(--cleo-teal); outline-offset: 4px; border-radius: 6px; }
/* Chevron on the right: › folded, ⌄ open */
body.cleo-checkout #shipping-fields .wc-block-components-checkout-step__heading::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 18px; height: 18px; margin-top: -9px;
  background: #8a948f;
  -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='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%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='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
body.cleo-checkout.cleo-addr-open #shipping-fields .wc-block-components-checkout-step__heading::after { transform: rotate(90deg); }
body.cleo-checkout.cleo-addr-open #shipping-fields .wc-block-components-checkout-step__heading { margin-bottom: 12px !important; }
/* Empty address: "+" instead of the pin, like TikTok */
body.cleo-checkout:not(.cleo-addr-filled) #shipping-fields .wc-block-components-checkout-step__title::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
/* Filled and folded: name, phone and address under the title */
body.cleo-checkout.cleo-addr-filled:not(.cleo-addr-open) #shipping-fields .wc-block-components-checkout-step__heading::before {
  content: var(--cleo-addr, "");
  order: 1;
  padding-left: 28px;
  white-space: pre-line;
  font-size: .82rem; line-height: 1.45; color: var(--cleo-ink-soft);
}
/* Folded: hide the form and the email section */
body.cleo-checkout:not(.cleo-addr-open) #shipping-fields .wc-block-components-checkout-step__content,
body.cleo-checkout:not(.cleo-addr-open) #contact-fields { display: none !important; }
body.cleo-checkout #contact-fields .wc-block-components-checkout-step__description,
body.cleo-checkout #contact-fields .wc-block-checkout__guest-checkout-notice { display: none !important; }

/* ---------- Compact: payment methods on the first screen ---------- */
body.cleo-checkout .wc-block-components-checkout-step,
body.cleo-checkout .wp-block-woocommerce-checkout-order-summary-block { padding: 14px 16px !important; }
body.cleo-checkout .wc-block-components-checkout-step__heading { margin-bottom: 10px !important; }
body.cleo-checkout .wc-block-components-checkout-step__title { font-size: .95rem !important; }
/* Email sits right under the address: no gap, no extra title weight */
body.cleo-checkout.cleo-addr-open #shipping-fields { margin-bottom: 0 !important; padding-bottom: 4px !important; }
body.cleo-checkout #contact-fields { padding-top: 6px !important; }
/* Product card: shop row, item, coupons. Postage is in Shipping options and the total is in the bottom bar */
body.cleo-checkout .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-totals-block,
body.cleo-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper:has(.wc-block-components-totals-footer-item) { display: none !important; }
body.cleo-checkout .wc-block-components-checkout-order-summary__title { margin-bottom: 10px !important; }
body.cleo-checkout .wc-block-components-order-summary-item__image { width: 72px !important; }
body.cleo-checkout .wc-block-components-order-summary-item__image img { width: 72px; height: 72px; }
body.cleo-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name { font-size: .88rem; line-height: 1.3; }
body.cleo-checkout .wc-block-cart-item__prices { margin-top: 4px; }
body.cleo-checkout .wc-block-components-order-summary-item__individual-prices { flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 6px; }
body.cleo-checkout .wc-block-components-product-metadata { margin-top: 2px; }
body.cleo-checkout .wc-block-components-order-summary-item__total-price { bottom: 22px; }
body.cleo-checkout .wp-block-woocommerce-checkout-order-summary-coupon-form-block { padding: 8px 0 0 !important; margin-top: 10px; border-top: 1px solid rgba(15, 59, 50, .08) !important; border-bottom: 0 !important; }
body.cleo-checkout .wc-block-components-totals-coupon .wc-block-components-panel__button { margin: 0 !important; padding: 4px 0 !important; border: 0 !important; outline: 0; font-size: .85rem; }
body.cleo-checkout .wc-block-components-totals-coupon .wc-block-components-panel__button:focus-visible { outline: 2px solid var(--cleo-teal); outline-offset: 2px; }
/* Delivery and payment rows */
body.cleo-checkout .wc-block-components-radio-control__option { padding-top: 12px !important; padding-bottom: 12px !important; }
body.cleo-checkout .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option { padding-top: 12px !important; padding-bottom: 12px !important; }
body.cleo-checkout .wc-block-components-shipping-rates-control__no-results-notice,
body.cleo-checkout #shipping-option .wc-block-components-notice-banner { margin: 0 !important; padding: 10px 12px !important; font-size: .82rem; }
/* Tighter delivery / payment headings */
body.cleo-checkout #shipping-option .wc-block-components-checkout-step__heading,
body.cleo-checkout #payment-method .wc-block-components-checkout-step__heading { margin-bottom: 6px !important; }
body.cleo-checkout #shipping-option .wc-block-components-checkout-step__content,
body.cleo-checkout #payment-method .wc-block-components-checkout-step__content { margin-top: 0 !important; padding-top: 0 !important; }
body.cleo-checkout #shipping-option .wc-block-components-radio-control,
body.cleo-checkout #payment-method .wc-block-components-radio-control,
body.cleo-checkout #shipping-option .wc-block-components-shipping-rates-control,
body.cleo-checkout #shipping-option .wc-block-components-shipping-rates-control__package { margin: 0 !important; padding-top: 0 !important; }
body.cleo-checkout #shipping-option,
body.cleo-checkout #payment-method { padding-top: 12px !important; padding-bottom: 6px !important; }
body.cleo-checkout #shipping-fields .wc-block-components-checkout-step__heading:focus:not(:focus-visible) { outline: none; }

/* ---------- Address card: no country box, email as its last field ---------- */
/* We only ship within Malaysia; the country stays MY behind the scenes */
body.cleo-checkout #shipping-fields .wc-block-components-address-form__country { display: none !important; }
/* The email section drops its own title and joins the address card */
body.cleo-checkout #contact-fields > legend,
body.cleo-checkout #contact-fields .wc-block-components-checkout-step__heading-container { display: none !important; }
body.cleo-checkout #contact-fields { padding-top: 0 !important; }
body.cleo-checkout #contact-fields .wc-block-components-checkout-step__content,
body.cleo-checkout #contact-fields .wc-block-components-checkout-step__container { margin-top: 0 !important; padding-top: 0 !important; }
/* Same 12px gap above the email as between the address boxes */
body.cleo-checkout.cleo-addr-open #contact-fields { margin-top: -8px !important; }
/* Postal code and City share one row; everything else is full width */
body.cleo-checkout #shipping-fields .wc-block-components-address-form { display: flex !important; flex-wrap: wrap; column-gap: 12px; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form > * { flex: 0 0 100% !important; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form__first_name { order: 1; margin-top: 0 !important; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form__address_1 { order: 2; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form__address_2 { order: 3; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form__postcode { order: 4; flex: 0 0 calc(40% - 6px) !important; min-width: 0; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form__city { order: 5; flex: 0 0 calc(60% - 6px) !important; min-width: 0; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form__state { order: 6; }
body.cleo-checkout #shipping-fields .wc-block-components-address-form__phone { order: 7; }

/* ---------- Order summary (replaces Shipping options) ---------- */
/* One postage rate per area, chosen automatically; the summary shows it */
body.cleo-checkout #shipping-option { display: none !important; }
.cleo-sum { margin: 0 0 8px; padding: 14px 16px 0; background: #fff; overflow: hidden; color: #161823; }
body.cleo-checkout .cleo-sum__title { margin: 0 0 10px !important; font-family: inherit !important; font-size: .95rem !important; font-weight: 700 !important; line-height: 1.3 !important; letter-spacing: normal !important; color: #161823 !important; }
.cleo-sum__row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .88rem; line-height: 1.35; }
.cleo-sum__row > span:last-child { white-space: nowrap; }
.cleo-sum__row { color: var(--cleo-ink-soft); }
.cleo-sum__row--start { font-weight: 600; color: #161823; }
.cleo-sum__row--off > span:last-child { color: var(--cleo-berry); }
.cleo-sum__row--muted > span:last-child { font-weight: 400; color: var(--cleo-ink-soft); }
.cleo-sum__row--total { margin-top: 8px; padding: 10px 0 14px; border-top: 1px solid rgba(15, 59, 50, .1); align-items: baseline; font-size: 1rem; font-weight: 700; color: #161823; }
.cleo-sum__row--total small { margin-left: 4px; font-size: .72rem; font-weight: 400; color: var(--cleo-ink-soft); }
.cleo-sum__saving { margin: 0 -16px; padding: 10px 16px; background: #fdecee; color: var(--cleo-berry); font-size: .82rem; font-weight: 600; }
@media (min-width: 600px) { .cleo-sum { border-radius: 14px; } }
