/* =========================================================
   MOTIV — WooCommerce Styles
   Cart / Checkout / Thank You
   
   Chỉ override style — KHÔNG can thiệp logic.
   ========================================================= */

/* =========================================================
   1. CSS TOKENS
   ========================================================= */
:root {
  --mova-paper: #f6f5f0;
  --mova-ink: #151515;
  --mova-acid: #d7ff3f;
  --mova-muted: rgba(0, 0, 0, .55);
  --mova-border: rgba(0, 0, 0, .12);
}

/* =========================================================
   2. PAGE WRAPPER (Cart / Checkout / Thank You)
   ========================================================= */
.woo-page {
  background: var(--mova-paper);
  color: var(--mova-ink);
  min-height: 60vh;
  font-family: "DM Sans", system-ui, sans-serif;
}

.woo-page .eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--mova-muted);
  margin: 0 0 1rem;
}

.woo-page-title {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.06em;
}

.woo-page-sub {
  max-width: 36rem;
  margin: 1.25rem auto 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--mova-muted);
}

.woo-thankyou-page .motiv-thankyou-status,
.woo-thankyou-page .motiv-thankyou-summary,
.woo-thankyou-page .motiv-thankyou-totals,
.woo-thankyou-page .motiv-thankyou-shipping,
.woo-thankyou-page .motiv-thankyou-billing,
.woo-thankyou-page .motiv-thankyou-additional {
  max-width: 900px !important;
  margin: 0 auto 2rem !important;
  padding: 2rem !important;
  background: #fff !important;
  border: 1px solid var(--mova-border) !important;
}

.woo-thankyou-page .motiv-thankyou-cta {
  max-width: 900px;
  margin: 3rem auto 0;
  text-align: center;
}

/* Cart and Checkout use native Woo blocks and their responsive controls. */
:is(.woo-cart-page,.woo-checkout-page) {
  --commerce-gutter: clamp(20px,4vw,48px);
  margin: 0;
  padding: 0;
}
:is(.woo-cart-page,.woo-checkout-page) .motiv-commerce-head,
:is(.woo-cart-page,.woo-checkout-page) > .wp-block-woocommerce-store-notices {
  max-width: calc(var(--wp--style--global--wide-size,1600px) + 2 * var(--commerce-gutter));
  margin-inline: auto;
  padding-inline: var(--commerce-gutter);
  box-sizing: border-box;
}
:is(.woo-cart-page,.woo-checkout-page) .motiv-commerce-head { padding-block: clamp(40px,5vw,72px) 40px; }
.motiv-commerce-head .eyebrow { margin: 0 0 16px; font-size: 11px; font-weight: 500; letter-spacing: .18em; }
.motiv-commerce-head .woo-page-title { font-size: clamp(3rem,5.5vw,6rem); line-height: 1.05; font-weight: 400; letter-spacing: -.065em; }
.motiv-commerce-intro { margin: 20px 0 0; font-size: 16px; line-height: 1.7; color: var(--mova-muted); }
:is(.motiv-cart-content,.motiv-checkout-content) {
  max-width: calc(var(--wp--style--global--wide-size,1600px) + 2 * var(--commerce-gutter));
  padding: 0 var(--commerce-gutter) clamp(64px,6vw,100px);
  margin: 0 auto;
  box-sizing: border-box;
}
:is(.motiv-cart-content,.motiv-checkout-content) > :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) { max-width: none; margin: 0; padding: 0; font-size: 16px; }
:is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-cart,.wc-block-checkout) { gap: clamp(32px,4vw,72px); align-items: flex-start; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-main { min-width: 0; padding-inline-end: 0; }
:is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-cart__sidebar,.wc-block-checkout__sidebar) {
  background: rgba(255,255,255,.35); border: 1px solid var(--mova-border); padding: clamp(20px,2.2vw,36px); box-sizing: border-box;
}
@media(min-width:1000px) {
  :is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-cart,.wc-block-checkout) { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,400px); }
  :is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-components-main,.wc-block-components-sidebar) { width: 100%; }
  :is(.woo-cart-page,.woo-checkout-page) .wc-block-components-sidebar { position: sticky; top: 120px; }
}
:is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-cart__totals-title,.wc-block-components-checkout-step__title,.wc-block-components-order-summary__title-text) {
  font-family: var(--wp--preset--font-family--display); font-size: 24px; font-weight: 400; line-height: 1.25; letter-spacing: -.04em; text-transform: none;
}
.woo-cart-page .wc-block-cart__totals-title { padding: 0 0 24px; text-align: start; }
.woo-checkout-page .wc-block-components-checkout-step { padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--mova-border); }
.woo-checkout-page .wc-block-components-checkout-step__heading { margin-bottom: 20px; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-product-name { font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: -.02em; text-decoration: none; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-product-metadata { font-size: 13px; color: var(--mova-muted); line-height: 1.6; }
.woo-cart-page table.wc-block-cart-items .wc-block-cart-items__header th { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding-block: 0 20px; }
.woo-cart-page table.wc-block-cart-items .wc-block-cart-items__row td { padding-block: 28px; border-color: var(--mova-border); }
.woo-cart-page table.wc-block-cart-items .wc-block-cart-item__image { width: 128px; padding-inline-end: 24px; }
.woo-cart-page .wc-block-cart-item__image img { aspect-ratio: 4/5; object-fit: cover; background: #e4e3dc; }
.woo-cart-page .wc-block-cart-item__remove-link { font-size: 12px; color: var(--mova-muted); text-underline-offset: 4px; min-height: 32px; }
.woo-cart-page .wc-block-components-quantity-selector { border-radius: 0; border-color: var(--mova-border); height: 44px; margin-top: 12px; }
.woo-cart-page .wc-block-components-quantity-selector input { font-size: 14px; background: transparent; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-item { padding: 18px 0; font-size: 15px; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-wrapper { padding: 0; border-color: var(--mova-border); }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-footer-item { font-size: 22px; padding-top: 24px; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-coupon-link { font-size: 14px; padding-block: 18px; text-transform: none; letter-spacing: 0; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-button:not(.is-link) {
  min-height: 52px; border: 1px solid var(--mova-ink); border-radius: 0; padding: 14px 24px; background: var(--mova-ink); color: var(--mova-paper); box-shadow: none;
  font: 500 11px/1.4 var(--wp--preset--font-family--body); text-transform: uppercase; letter-spacing: .12em;
}
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-button:not(.is-link):hover:not(:disabled) { background: var(--mova-acid); border-color: var(--mova-acid); color: var(--mova-ink); }
:is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-components-text-input input,.wc-blocks-components-select__select,.wc-block-components-textarea) {
  border-radius: 0; border-color: var(--mova-border); background: var(--mova-paper); font-size: 16px; color: var(--mova-ink); min-height: 56px;
}
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-text-input label { color: var(--mova-muted); font-size: 15px; letter-spacing: 0; text-transform: none; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-text-input.is-active input { padding-top: 24px; padding-bottom: 8px; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-text-input.is-active label { display: block; }
:is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-components-checkbox__label,.wc-block-components-radio-control__label) { font-size: 14px; line-height: 1.6; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-radio-control-accordion-option { border-radius: 0; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-order-summary-item { padding-block: 20px; }
.woo-checkout-page .wc-block-components-order-summary-item__image img { aspect-ratio: 4/5; object-fit: cover; border-radius: 0; }
.woo-checkout-page .wc-block-components-order-summary-item__quantity { background: var(--mova-ink); color: var(--mova-paper); border-color: var(--mova-paper); box-shadow: none; }
:is(.woo-cart-page,.woo-checkout-page) :is(button,a,input,select,textarea):focus-visible { outline: 2px solid var(--mova-ink); outline-offset: 3px; }
.woo-cart-page .wp-block-woocommerce-empty-cart-block > h2 { font-size: clamp(28px,3vw,40px); letter-spacing: -.04em; font-weight: 400; }
.woo-cart-page .wp-block-woocommerce-empty-cart-block { border-top: 1px solid var(--mova-border); padding-top: 40px; }
@media(max-width:999px) {
  :is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-cart,.wc-block-checkout) { display: flex; flex-direction: column; }
  :is(.woo-cart-page,.woo-checkout-page) :is(.wc-block-components-main,.wc-block-components-sidebar) { width: 100%; position: static; }
}
@media(max-width:600px) {
  .motiv-commerce-head .woo-page-title { font-size: 48px; }
  .motiv-commerce-intro { font-size: 15px; }
  .woo-cart-page table.wc-block-cart-items .wc-block-cart-item__image { width: 88px; padding-inline-end: 16px; }
  .woo-cart-page .wc-block-components-product-name { font-size: 16px; }
  .woo-checkout-page .wc-block-components-checkout-step__title { font-size: 22px; }
  .woo-checkout-page .wc-block-checkout__actions .wc-block-components-button { width: 100%; }
}
/* Woo renders an outer block and a second layout wrapper with the same class. */
.woo-checkout-page .motiv-checkout-content > .wp-block-woocommerce-checkout { display: block; }
.woo-checkout-page .wc-block-components-sidebar-layout.wc-block-checkout { width: 100%; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-form .wc-block-components-text-input input,
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-text-input input {
  background: var(--mova-paper); border-radius: 0; border-color: var(--mova-border); font-size: 16px; min-height: 56px;
}
.woo-checkout-page .wc-block-components-checkout-order-summary__content { border: 0; border-radius: 0; }
.woo-checkout-page .wc-block-components-order-summary__title { font-size: 24px; font-weight: 400; letter-spacing: -.04em; }
.woo-checkout-page .wc-block-components-form .wc-block-components-text-input.is-active input { padding-top: 24px; padding-bottom: 8px; }
.woo-cart-page table.wc-block-cart-items .wc-block-components-product-name { font-size: 18px; font-weight: 500; }
.woo-cart-page .wc-block-components-totals-coupon .wc-block-components-text-input input { background: var(--mova-paper); border-radius: 0; }
.woo-checkout-page .wc-block-components-checkout-order-summary__title { padding: 0 0 20px; }
@media(max-width:600px) {
  .woo-cart-page table.wc-block-cart-items .wc-block-components-product-name { font-size: 16px; }
}
.woo-checkout-page .wp-block-woocommerce-checkout-order-summary-block { border: 0; border-radius: 0; }
.woo-checkout-page .wc-block-components-order-summary { padding-inline: 0; }
.woo-checkout-page .wc-block-components-checkout-order-summary__title { padding-inline: 0; }
/* A quiet empty state, followed by real WooCommerce recommendations. */
.woo-cart-page .wc-block-cart__empty-cart__title.with-empty-cart-icon::before { display: none; }
.woo-cart-page .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title { margin: 24px 0 56px; }
.woo-cart-page .wp-block-woocommerce-empty-cart-block > .wp-block-separator { display: none; }
.woo-cart-page .wc-block-grid__products { gap: 24px; margin: 32px 0 0; }
.woo-cart-page .wc-block-grid__product { border: 0; text-align: start; flex: 1 1 0; min-width: 0; max-width: none; padding: 0; }
.woo-cart-page .wc-block-grid__product-image img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.woo-cart-page .wc-block-grid__product-title { font-size: 17px; font-weight: 500; margin: 16px 0 8px; }
.woo-cart-page .wc-block-grid__product-price { font-size: 14px; }
.woo-cart-page .wc-block-grid__product-add-to-cart .wp-block-button__link { border-radius: 0; font-size: 11px; font-weight: 500; padding: 14px 20px; letter-spacing: .1em; text-transform: uppercase; }
@media(max-width:600px) {
  .woo-cart-page .wc-block-grid__products { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 16px; }
  .woo-cart-page .wc-block-grid.has-4-columns .wc-block-grid__product { max-width: none; width: 100%; }
  .woo-cart-page .wc-block-grid__product-title { font-size: 15px; }
}
.woo-cart-page .wc-block-grid .wc-block-grid__products { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }
.woo-cart-page .wc-block-grid.has-4-columns .wc-block-grid__products .wc-block-grid__product { width: 100%; max-width: none; margin: 0; padding: 0; }
@media(max-width:780px) { .woo-cart-page .wc-block-grid .wc-block-grid__products { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 16px; } }

/* Cart row actions and the coupon disclosure share the theme's control sizes. */
.woo-cart-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-height: 44px; margin: 12px 0 0 12px; padding: 0;
  border: 1px solid var(--mova-border); background: transparent; color: var(--mova-ink);
  border-radius: 0; vertical-align: top; cursor: pointer;
}
.woo-cart-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link svg { width: 20px; height: 20px; fill: currentColor; }
.woo-cart-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover:not(:disabled) { color: #a12c2c; border-color: #a12c2c; background: rgba(161,44,44,.04); }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-sidebar .wc-block-components-totals-coupon { padding: 0; margin: 0; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-sidebar .wc-block-components-totals-coupon .wc-block-components-panel__button {
  display: flex; align-items: center; width: 100%; min-height: 54px; box-sizing: border-box;
  position: relative; padding-block: 16px; padding-inline: 0 32px; margin: 0;
  border: 0; border-bottom: 1px solid var(--mova-border);
  font-size: 15px; font-weight: 500; line-height: 1.5; letter-spacing: 0;
}
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-coupon .wc-block-components-panel__button-icon { inset-inline-end: 0; inset-inline-start: auto; width: 20px; height: 20px; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-coupon .wc-block-components-panel__button:hover { color: var(--mova-ink); background: rgba(0,0,0,.025); }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-sidebar .wc-block-components-totals-coupon__form {
  display: grid; grid-template-columns: minmax(0,1fr) 96px; gap: 10px; margin: 16px 0 20px; align-items: start;
}
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-coupon__form .wc-block-components-text-input { min-width: 0; margin: 0; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-coupon__form .wc-block-components-text-input input { height: 56px; background: var(--mova-paper); }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-coupon__form .wc-block-components-button { height: 56px; min-height: 56px; margin: 0; padding: 12px; }
:is(.woo-cart-page,.woo-checkout-page) .wc-block-components-totals-coupon__form .wc-block-components-button:disabled { opacity: .45; cursor: not-allowed; }

.woo-cart-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link[hidden] { display: none; }

/* Order confirmation keeps WooCommerce's real status, totals and addresses. */
main.woo-thankyou-page {
  max-width: 1296px; margin: 0 auto; padding: clamp(44px,5vw,80px) clamp(20px,4vw,48px) clamp(64px,6vw,100px);
  box-sizing: border-box; font-size: 16px;
}
main.woo-thankyou-page > * { max-width: none; }
main.woo-thankyou-page .motiv-confirmation-eyebrow { text-align: center; margin: 0 0 20px; font-size: 11px; font-weight: 500; letter-spacing: .18em; }
.woo-thankyou-page .wc-block-order-confirmation-status { text-align: center; margin: 0 0 40px; padding-bottom: 40px; border-bottom: 1px solid var(--mova-border); }
.woo-thankyou-page .wc-block-order-confirmation-status h1 { margin: 0; font-size: clamp(40px,5vw,76px); line-height: 1.1; font-weight: 400; letter-spacing: -.065em; }
.woo-thankyou-page .wc-block-order-confirmation-status p { font-size: 17px; line-height: 1.7; color: var(--mova-muted); margin: 20px auto 0; max-width: 760px; }
.woo-thankyou-page .wc-block-order-confirmation-summary { margin: 0 0 48px; }
.woo-thankyou-page .wc-block-order-confirmation-summary-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 24px; padding: 28px; margin: 0; background: rgba(255,255,255,.35); border: 1px solid var(--mova-border); }
.woo-thankyou-page .wc-block-order-confirmation-summary-list-item { padding: 0; margin: 0; min-width: 0; border: 0; list-style: none; }
.woo-thankyou-page .wc-block-order-confirmation-summary-list-item__key { display: block; font-size: 10px; font-weight: 500; line-height: 1.5; text-transform: uppercase; letter-spacing: .12em; color: var(--mova-muted); margin-bottom: 10px; }
.woo-thankyou-page .wc-block-order-confirmation-summary-list-item__value { display: block; font-size: 16px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.woo-thankyou-page :is(.wc-block-order-confirmation-totals-wrapper,.wc-block-order-confirmation-downloads-wrapper,.wc-block-order-confirmation-additional-fields-wrapper) { margin: 0 0 36px; }
.woo-thankyou-page :is(.wc-block-order-confirmation-totals-wrapper,.wc-block-order-confirmation-address-wrapper,.wc-block-order-confirmation-downloads-wrapper,.wc-block-order-confirmation-additional-fields-wrapper) h2 { font-size: 26px !important; font-weight: 400; line-height: 1.3; letter-spacing: -.04em; margin: 0 0 20px; }
.woo-thankyou-page .wc-block-order-confirmation-totals { border: 1px solid var(--mova-border); border-radius: 0; background: rgba(255,255,255,.35); padding: 8px 28px; }
.woo-thankyou-page table.wc-block-order-confirmation-totals__table { border: 0; border-collapse: collapse; border-radius: 0; margin: 0; font-size: 16px; }
.woo-thankyou-page table.wc-block-order-confirmation-totals__table :is(th,td) { padding: 20px 0; border: 0; border-bottom: 1px solid var(--mova-border); font-weight: 400; vertical-align: top; }
.woo-thankyou-page table.wc-block-order-confirmation-totals__table thead th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mova-muted); }
.woo-thankyou-page table.wc-block-order-confirmation-totals__table :is(th,td):last-child { text-align: end; padding-inline-start: 20px; }
.woo-thankyou-page table.wc-block-order-confirmation-totals__table tfoot tr:last-child :is(th,td) { border-bottom: 0; font-size: 22px; font-weight: 500; }
.woo-thankyou-page .wc-block-order-confirmation-totals__product a { text-decoration: none; font-weight: 500; }
.woo-thankyou-page .wc-block-order-confirmation-totals__product a:hover { text-decoration: underline; text-underline-offset: 4px; }
.woo-thankyou-page .wc-block-order-confirmation-address-wrapper { gap: 24px; margin: 40px 0 0; }
.woo-thankyou-page :is(.wc-block-order-confirmation-shipping-wrapper,.wc-block-order-confirmation-billing-wrapper) { height: 100%; padding: 28px; background: rgba(255,255,255,.35); border: 1px solid var(--mova-border); box-sizing: border-box; }
.woo-thankyou-page :is(.wc-block-order-confirmation-shipping-address,.wc-block-order-confirmation-billing-address) { border: 0; border-radius: 0; padding: 0; font-size: 15px; line-height: 1.8; }
.woo-thankyou-page address { font-style: normal; }
.woo-thankyou-page :is(.woocommerce-customer-details--phone,.woocommerce-customer-details--email) { margin: 12px 0 0; color: var(--mova-muted); overflow-wrap: anywhere; }
.woo-thankyou-page .wc-block-order-confirmation-additional-information { margin-top: 36px; font-size: 15px; line-height: 1.8; }
@media(max-width:1000px) { .woo-thankyou-page .wc-block-order-confirmation-summary-list { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) {
  .woo-thankyou-page .wc-block-order-confirmation-summary-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 16px; padding: 20px; }
  .woo-thankyou-page .wc-block-order-confirmation-summary-list-item:last-child { grid-column: 1/-1; }
  .woo-thankyou-page .wc-block-order-confirmation-summary-list-item__value { font-size: 15px; }
  .woo-thankyou-page .wc-block-order-confirmation-status { padding-bottom: 28px; margin-bottom: 28px; }
  .woo-thankyou-page .wc-block-order-confirmation-status p { font-size: 15px; }
  .woo-thankyou-page .wc-block-order-confirmation-totals { padding: 4px 20px; }
  .woo-thankyou-page :is(.wc-block-order-confirmation-shipping-wrapper,.wc-block-order-confirmation-billing-wrapper) { padding: 20px; }
}
.woo-thankyou-page .wc-block-order-confirmation-summary .wc-block-order-confirmation-summary-list-item { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
