/*
 * MCTK Emerald Cyber Luxury — WooCommerce Core Pages UI Sync (v3.7.0)
 * Loaded CONDITIONALLY only on Cart, Checkout, and My Account / Auth pages.
 * Preserves 100% native WordPress, WooCommerce & Flatsome DOM/hooks (zero template overrides).
 */

/* ===== SHARED CONTAINER & TYPOGRAPHY ===== */
body.mctk-wc-emerald .woocommerce{
  font-family:var(--mcx-body);
  color:var(--mcx-ink);
  font-size:14px;
  line-height:1.6;
}
body.mctk-wc-emerald .page-wrapper{
  padding-top:24px;
  padding-bottom:44px;
}
body.mctk-wc-emerald .page-title-inner,
body.mctk-wc-emerald .checkout-page-title{
  background:#fff;
  border-bottom:1px solid var(--mcx-line);
}
body.mctk-wc-emerald .checkout-breadcrumbs a,
body.mctk-wc-emerald .checkout-breadcrumbs .current{
  font-family:var(--mcx-heading);
  font-weight:700;
}
body.mctk-wc-emerald .checkout-breadcrumbs .current{
  color:var(--mcx-green-dark);
}

/* ===== WOOCOMMERCE NOTICES ===== */
body.mctk-wc-emerald .woocommerce-message,
body.mctk-wc-emerald .woocommerce-info,
body.mctk-wc-emerald .woocommerce-error{
  padding:14px 18px;
  margin:0 0 20px;
  border-radius:var(--mcx-radius-md);
  border:1px solid var(--mcx-line);
  background:#fff;
  box-shadow:var(--mcx-shadow-sm);
  font-size:13.5px;
  line-height:1.6;
}
body.mctk-wc-emerald .woocommerce-message{
  border-color:var(--mcx-emerald-200);
  background:var(--mcx-emerald-50);
  color:#065f46;
}
body.mctk-wc-emerald .woocommerce-info{
  border-color:#bae6fd;
  background:#f0f9ff;
  color:#075985;
}
body.mctk-wc-emerald .woocommerce-error{
  border-color:#fecaca;
  background:#fef2f2;
  color:#991b1b;
  list-style:none;
}

/* ===== FORM CONTROLS & BUTTONS (GLOBAL WC CORE) ===== */
body.mctk-wc-emerald .woocommerce form .form-row label{
  display:block;
  margin-bottom:6px;
  font-size:13px;
  font-weight:600;
  color:var(--mcx-ink-2);
}
body.mctk-wc-emerald .woocommerce form .form-row input.input-text,
body.mctk-wc-emerald .woocommerce form .form-row textarea,
body.mctk-wc-emerald .woocommerce form .form-row select{
  min-height:44px;
  padding:10px 14px;
  border:1.5px solid var(--mcx-line-strong);
  border-radius:10px;
  background:#fff;
  color:var(--mcx-ink);
  font-family:var(--mcx-body);
  font-size:14px;
  box-shadow:none;
  transition:border-color .16s,box-shadow .16s;
}
body.mctk-wc-emerald .woocommerce form .form-row input.input-text:focus,
body.mctk-wc-emerald .woocommerce form .form-row textarea:focus,
body.mctk-wc-emerald .woocommerce form .form-row select:focus{
  border-color:var(--mcx-green);
  box-shadow:0 0 0 3px rgba(5,150,105,.16);
  outline:none;
}
body.mctk-wc-emerald .woocommerce .button,
body.mctk-wc-emerald .woocommerce button.button,
body.mctk-wc-emerald .woocommerce a.button,
body.mctk-wc-emerald .woocommerce input.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 20px;
  border-radius:10px;
  border:1.5px solid var(--mcx-green);
  background:linear-gradient(135deg,var(--mcx-green),var(--mcx-green-dark));
  color:#fff;
  font-family:var(--mcx-heading);
  font-size:13px;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
  box-shadow:var(--mcx-shadow-emerald);
  transition:filter .16s,transform .16s,background .16s;
}
body.mctk-wc-emerald .woocommerce .button:hover,
body.mctk-wc-emerald .woocommerce button.button:hover,
body.mctk-wc-emerald .woocommerce a.button:hover{
  filter:brightness(1.06);
  transform:translateY(-1px);
  color:#fff;
}
body.mctk-wc-emerald .woocommerce .button.is-outline,
body.mctk-wc-emerald .woocommerce button[name="update_cart"]{
  background:#fff;
  border-color:var(--mcx-line-strong);
  color:var(--mcx-ink-2);
  box-shadow:none;
}
body.mctk-wc-emerald .woocommerce .button.is-outline:hover,
body.mctk-wc-emerald .woocommerce button[name="update_cart"]:hover{
  border-color:var(--mcx-green);
  background:var(--mcx-emerald-50);
  color:var(--mcx-green-dark);
}

/* ===== 1. CART PAGE (/gio-hang/) ===== */
body.woocommerce-cart.mctk-wc-emerald .woocommerce-cart-form,
body.woocommerce-cart.mctk-wc-emerald .cart-sidebar,
body.woocommerce-cart.mctk-wc-emerald .cart_totals{
  background:#fff;
  border:1px solid var(--mcx-line);
  border-radius:var(--mcx-radius-lg);
  padding:22px;
  box-shadow:var(--mcx-shadow-sm);
}
body.woocommerce-cart.mctk-wc-emerald .cart-sidebar .cart_totals{
  border:0;
  padding:0;
  box-shadow:none;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart{
  border:0;
  margin-bottom:0;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart thead th{
  padding:11px 10px;
  border-bottom:2px solid var(--mcx-line);
  background:var(--mcx-canvas);
  font-family:var(--mcx-heading);
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--mcx-muted);
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart tbody td{
  padding:16px 10px;
  border-bottom:1px solid var(--mcx-soft);
  vertical-align:middle;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart .product-thumbnail img{
  width:64px;
  height:64px;
  object-fit:contain;
  border-radius:10px;
  border:1px solid var(--mcx-line);
  background:var(--mcx-canvas);
  padding:4px;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart .product-name a{
  font-family:var(--mcx-heading);
  font-weight:700;
  font-size:14.5px;
  color:var(--mcx-ink);
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart .product-name a:hover{
  color:var(--mcx-green);
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart dl.variation{
  margin:6px 0 0;
  padding:8px 10px;
  border-radius:8px;
  background:var(--mcx-emerald-50);
  border:1px solid var(--mcx-emerald-100);
  font-size:12px;
  color:#065f46;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart dl.variation dt{
  font-weight:700;
  margin-right:4px;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart dl.variation dd,
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart dl.variation dd p{
  margin:0;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart .product-price,
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart .product-subtotal{
  font-family:var(--mcx-heading);
  font-weight:700;
  color:var(--mcx-green-dark);
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart a.remove{
  display:inline-grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:50%;
  border:1px solid var(--mcx-line);
  color:var(--mcx-subtle);
  font-size:16px;
  line-height:1;
}
body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart a.remove:hover{
  background:#fef2f2;
  border-color:#fca5a5;
  color:#dc2626;
}
body.woocommerce-cart.mctk-wc-emerald .cart_totals h2,
body.woocommerce-cart.mctk-wc-emerald .cart_totals th.product-name{
  font-family:var(--mcx-heading);
  font-size:16px;
  font-weight:800;
  color:var(--mcx-ink);
}
body.woocommerce-cart.mctk-wc-emerald .wc-proceed-to-checkout .checkout-button{
  width:100%;
  min-height:48px;
  font-size:14.5px;
}
body.woocommerce-cart.mctk-wc-emerald .cart-empty.woocommerce-info{
  max-width:640px;
  margin:18px auto 14px;
  text-align:center;
  padding:28px 20px;
  background:#fff;
  border:1px solid var(--mcx-line);
  color:var(--mcx-ink);
  font-weight:600;
}
body.woocommerce-cart.mctk-wc-emerald .return-to-shop{
  text-align:center;
  margin-bottom:24px;
}

/* ===== 2. MY ACCOUNT & ORDERS (/tai-khoan/, /tai-khoan/orders/) ===== */
body.woocommerce-account.mctk-wc-emerald .my-account-header{
  background:linear-gradient(135deg,#022c22 0%,#0f172a 65%,#064e3b 100%);
  color:#fff;
  padding:26px 0;
  margin-bottom:24px;
}
body.woocommerce-account.mctk-wc-emerald .my-account-header h1,
body.woocommerce-account.mctk-wc-emerald .my-account-header .uppercase{
  color:#fff;
  font-family:var(--mcx-heading);
  letter-spacing:-.02em;
  text-transform:none;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation,
body.woocommerce-account.mctk-wc-emerald .my-account-nav{
  background:#fff;
  border:1px solid var(--mcx-line);
  border-radius:var(--mcx-radius-lg);
  padding:14px;
  box-shadow:var(--mcx-shadow-sm);
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation ul,
body.woocommerce-account.mctk-wc-emerald ul.dashboard-links,
body.woocommerce-account.mctk-wc-emerald .my-account-nav{
  list-style:none;
  margin:0;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation li,
body.woocommerce-account.mctk-wc-emerald .my-account-nav li{
  margin:0 0 4px;
  border:0;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation li a,
body.woocommerce-account.mctk-wc-emerald .my-account-nav li a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:11px 14px;
  border-radius:10px;
  border:1px solid transparent;
  font-family:var(--mcx-heading);
  font-size:13.5px;
  font-weight:600;
  color:var(--mcx-ink-2);
  transition:background .15s,color .15s,border-color .15s;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation li a:hover,
body.woocommerce-account.mctk-wc-emerald .my-account-nav li a:hover{
  background:var(--mcx-emerald-50);
  color:var(--mcx-green-dark);
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation li.is-active a,
body.woocommerce-account.mctk-wc-emerald .my-account-nav li.is-active a{
  background:var(--mcx-emerald-50);
  border-color:var(--mcx-emerald-200);
  color:var(--mcx-green-dark);
  font-weight:700;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-content{
  background:#fff;
  border:1px solid var(--mcx-line);
  border-radius:var(--mcx-radius-lg);
  padding:24px;
  box-shadow:var(--mcx-shadow-sm);
}
body.woocommerce-account.mctk-wc-emerald table.woocommerce-orders-table,
body.woocommerce-account.mctk-wc-emerald table.woocommerce-table--order-details{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--mcx-line);
  border-radius:var(--mcx-radius-md);
  overflow:hidden;
}
body.woocommerce-account.mctk-wc-emerald table.woocommerce-orders-table thead th,
body.woocommerce-account.mctk-wc-emerald table.woocommerce-table--order-details thead th{
  padding:12px 14px;
  background:var(--mcx-canvas);
  border-bottom:1px solid var(--mcx-line);
  font-family:var(--mcx-heading);
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  color:var(--mcx-muted);
}
body.woocommerce-account.mctk-wc-emerald table.woocommerce-orders-table tbody td,
body.woocommerce-account.mctk-wc-emerald table.woocommerce-table--order-details tbody td,
body.woocommerce-account.mctk-wc-emerald table.woocommerce-table--order-details tfoot th,
body.woocommerce-account.mctk-wc-emerald table.woocommerce-table--order-details tfoot td{
  padding:13px 14px;
  border-bottom:1px solid var(--mcx-soft);
  vertical-align:middle;
}
body.woocommerce-account.mctk-wc-emerald table.woocommerce-orders-table tbody tr:hover{
  background:#f8fafc;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-orders-table__cell-order-number a{
  font-family:var(--mcx-heading);
  font-weight:800;
  color:var(--mcx-green-dark);
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-orders-table__cell-order-status{
  font-weight:600;
  color:#065f46;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-orders-table__cell-order-actions .button{
  min-height:34px;
  padding:6px 13px;
  font-size:12px;
  border-radius:8px;
}

/* ===== 3. LOGIN / REGISTER / LOST PASSWORD AUTH FORMS (FLATSOME + WC NATIVE DOM) ===== */
body.woocommerce-account.mctk-wc-emerald .account-container{
  max-width:1040px;
  margin:0 auto;
}
body.woocommerce-account.mctk-wc-emerald #customer_login,
body.woocommerce-account.mctk-wc-emerald #customer_login.u-columns.col2-set,
body.woocommerce-account.mctk-wc-emerald #customer_login.col2-set.row{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:24px!important;
  max-width:980px!important;
  margin:14px auto 32px!important;
  width:100%!important;
}
body.woocommerce-account.mctk-wc-emerald #customer_login::before,
body.woocommerce-account.mctk-wc-emerald #customer_login::after{
  display:none!important;
  content:none!important;
}
body.woocommerce-account.mctk-wc-emerald #customer_login .u-column1,
body.woocommerce-account.mctk-wc-emerald #customer_login .u-column2,
body.woocommerce-account.mctk-wc-emerald #customer_login .col-1,
body.woocommerce-account.mctk-wc-emerald #customer_login .col-2{
  width:100%!important;
  max-width:none!important;
  flex:none!important;
  float:none!important;
  margin:0!important;
  padding:28px!important;
  border:1px solid var(--mcx-line)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:var(--mcx-shadow-sm)!important;
}
body.woocommerce-account.mctk-wc-emerald #customer_login .col-inner,
body.woocommerce-account.mctk-wc-emerald #customer_login .account-login-inner,
body.woocommerce-account.mctk-wc-emerald #customer_login .account-register-inner{
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
}
body.woocommerce-account.mctk-wc-emerald #customer_login h2,
body.woocommerce-account.mctk-wc-emerald #customer_login h3,
body.woocommerce-account.mctk-wc-emerald .woocommerce-form-login + h2,
body.woocommerce-account.mctk-wc-emerald .account-login-inner h3{
  font-family:var(--mcx-heading)!important;
  font-size:21px!important;
  font-weight:800!important;
  letter-spacing:-.02em!important;
  text-transform:none!important;
  color:var(--mcx-ink)!important;
  margin:0 0 18px!important;
  padding-bottom:12px!important;
  border-bottom:1px solid var(--mcx-soft)!important;
}
body.woocommerce-account.mctk-wc-emerald form.woocommerce-form-login,
body.woocommerce-account.mctk-wc-emerald form.woocommerce-form-register,
body.woocommerce-account.mctk-wc-emerald form.woocommerce-ResetPassword{
  border:0;
  padding:0;
  margin:0;
}
/* Centered single card when registration is disabled */
body.woocommerce-account.mctk-wc-emerald .woocommerce > form.woocommerce-form-login,
body.woocommerce-account.mctk-wc-emerald .woocommerce > form.woocommerce-ResetPassword{
  max-width:500px;
  margin:16px auto 28px;
  padding:28px;
  border:1px solid var(--mcx-line);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--mcx-shadow-sm);
}
body.woocommerce-account.mctk-wc-emerald form.woocommerce-form-login .woocommerce-form-login__submit,
body.woocommerce-account.mctk-wc-emerald form.woocommerce-form-register .woocommerce-form-register__submit,
body.woocommerce-account.mctk-wc-emerald form.woocommerce-ResetPassword button[type="submit"]{
  width:100%;
  min-height:46px;
  margin-top:8px;
  font-size:14px;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-LostPassword{
  margin-top:14px;
  text-align:center;
}
body.woocommerce-account.mctk-wc-emerald .woocommerce-LostPassword a{
  color:var(--mcx-green-dark);
  font-weight:600;
  font-size:13px;
}

/* Flatsome Login Popup Sync */
#login-form-popup .account-login-inner{
  padding:26px;
  border-radius:16px;
  font-family:var(--mcx-body);
}
#login-form-popup .account-login-inner input.input-text{
  min-height:44px;
  border-radius:10px;
  border:1.5px solid var(--mcx-line-strong);
}
#login-form-popup .account-login-inner button.button{
  width:100%;
  min-height:46px;
  border-radius:10px;
  background:linear-gradient(135deg,var(--mcx-green),var(--mcx-green-dark));
  border-color:var(--mcx-green);
}

/* ===== 4. CHECKOUT HARMONIZATION (/thanh-toan/) ===== */
body.woocommerce-checkout.mctk-wc-emerald .mctkq3-banner{
  border-color:var(--mcx-emerald-200);
  background:var(--mcx-emerald-50);
  color:#065f46;
  border-radius:14px;
}
body.woocommerce-checkout.mctk-wc-emerald .mctkq3-steps{
  border-color:var(--mcx-line);
  border-radius:14px;
}
body.woocommerce-checkout.mctk-wc-emerald .mctkq3-steps li.is-active{
  color:var(--mcx-green-dark);
}
body.woocommerce-checkout.mctk-wc-emerald .mctkq3-steps li.is-active .mctkq3-step-num{
  background:var(--mcx-green);
  border-color:var(--mcx-green);
}
body.woocommerce-checkout.mctk-wc-emerald #place_order{
  background:linear-gradient(135deg,var(--mcx-green),var(--mcx-green-dark))!important;
  border-radius:11px!important;
  font-family:var(--mcx-heading);
}

/* ===== RESPONSIVE ===== */
@media(max-width:849px){
  body.woocommerce-account.mctk-wc-emerald #customer_login,
  body.woocommerce-account.mctk-wc-emerald #customer_login.u-columns.col2-set,
  body.woocommerce-account.mctk-wc-emerald #customer_login.col2-set.row{
    grid-template-columns:1fr!important;
    gap:16px!important;
  }
  body.woocommerce-cart.mctk-wc-emerald .woocommerce-cart-form,
  body.woocommerce-cart.mctk-wc-emerald .cart-sidebar,
  body.woocommerce-cart.mctk-wc-emerald .cart_totals,
  body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-content,
  body.woocommerce-account.mctk-wc-emerald #customer_login .u-column1,
  body.woocommerce-account.mctk-wc-emerald #customer_login .u-column2,
  body.woocommerce-account.mctk-wc-emerald #customer_login .col-1,
  body.woocommerce-account.mctk-wc-emerald #customer_login .col-2{
    padding:16px!important;
    border-radius:14px!important;
  }
}

/* v4.0.0 — Cart / Account / Orders mobile polish */
@media(max-width:767px){
  body.mctk-wc-emerald .page-wrapper{padding-top:14px;padding-bottom:28px}
  body.woocommerce-cart.mctk-wc-emerald table.shop_table.cart .product-thumbnail img{width:52px;height:52px}
  body.woocommerce-cart.mctk-wc-emerald .wc-proceed-to-checkout .checkout-button{position:sticky;bottom:calc(10px + env(safe-area-inset-bottom,0px));z-index:5}
  body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation ul,
  body.woocommerce-account.mctk-wc-emerald .my-account-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation li,
  body.woocommerce-account.mctk-wc-emerald .my-account-nav li{flex:0 0 auto;margin:0}
  body.woocommerce-account.mctk-wc-emerald .woocommerce-MyAccount-navigation li a,
  body.woocommerce-account.mctk-wc-emerald .my-account-nav li a{white-space:nowrap;padding:9px 12px}
  body.woocommerce-account.mctk-wc-emerald table.woocommerce-orders-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  body.woocommerce-account.mctk-wc-emerald #customer_login h2,
  body.woocommerce-account.mctk-wc-emerald #customer_login h3{font-size:18px!important}
  body.mctk-wc-emerald .woocommerce-cart-form,
  body.mctk-wc-emerald .woocommerce-MyAccount-content,
  body.mctk-wc-emerald .cart-sidebar{max-width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
