/* XanderGlasses VN Checkout v1.7 — checkout/thank-you only */
:root{
  --xco-blue:#4169e1;
  --xco-blue-dark:#3157c9;
  --xco-ink:#151922;
  --xco-text:#343a46;
  --xco-muted:#6c7482;
  --xco-line:#dfe3ea;
  --xco-soft:#f7f8fa;
  --xco-danger:#b42318;
  --xco-danger-bg:#fff4f2;
}
html,body{margin:0;padding:0;background:#fff}
body.xander-vn-checkout-v2,body.xander-vn-checkout-v2 *{box-sizing:border-box}
body.xander-vn-checkout-v2{min-width:0;color:var(--xco-ink);font-family:"Inter",Arial,sans-serif;font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
body.xander-vn-checkout-v2 h1,body.xander-vn-checkout-v2 h2,body.xander-vn-checkout-v2 h3,body.xander-vn-checkout-v2 h4{font-family:"Be Vietnam Pro","Inter",sans-serif;color:var(--xco-ink)}
body.xander-vn-checkout-v2 a{color:inherit}

/* Focused header */
.xco-header{border-bottom:1px solid var(--xco-line);background:#fff}
.xco-header__inner{width:min(1180px,calc(100% - 48px));height:72px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:20px}
.xco-logo{display:flex;align-items:center}
.xco-logo img{display:block;width:146px;height:auto}
.xco-back{display:inline-flex;align-items:center;gap:7px;text-decoration:none;color:var(--xco-muted);font-size:14px;font-weight:500}
.xco-back:hover{color:var(--xco-blue)}

.xco-main{padding:46px 0 68px}
.xco-container{width:min(1180px,calc(100% - 48px));margin:0 auto}
.xco-intro{max-width:690px;margin:0 0 34px}
.xco-kicker{margin:0 0 10px;color:var(--xco-blue);font-size:12px;font-weight:700;letter-spacing:.11em}
.xco-intro h1{margin:0 0 10px;font-size:clamp(30px,3.7vw,42px);line-height:1.18;letter-spacing:-.025em}
.xco-intro>p:last-child{max-width:630px;margin:0;color:var(--xco-muted);font-size:15.5px}

/* Woo notice cleanup */
.xco-shell .woocommerce-notices-wrapper:empty,.xco-shell .woocommerce-form-coupon-toggle,.xco-shell form.checkout_coupon,.xco-shell .woocommerce-form-login-toggle,.xco-shell .woocommerce-privacy-policy-text,.xco-shell .woocommerce-terms-and-conditions-wrapper{display:none!important}
.xco-shell .woocommerce-error,.xco-shell .woocommerce-message,.xco-shell .woocommerce-info{margin:0 0 24px!important;padding:13px 15px!important;border:1px solid var(--xco-line)!important;border-left:3px solid var(--xco-blue)!important;background:#fff!important;color:var(--xco-text)!important;border-radius:4px!important;box-shadow:none!important;font-size:14px!important;list-style:none!important}
.xco-shell .woocommerce-error{border-left-color:var(--xco-danger)!important;background:var(--xco-danger-bg)!important;color:var(--xco-danger)!important}

/* 2-column checkout */
.xco-shell form.checkout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(360px,430px)!important;gap:68px!important;align-items:start!important;margin:0!important;width:100%!important}
.xco-shell form.checkout>.col2-set{grid-column:1;display:block!important;width:100%!important;float:none!important;margin:0!important;padding:0!important}
.xco-shell form.checkout>#order_review_heading{display:none!important}
.xco-shell form.checkout>#order_review{grid-column:2;align-self:start;position:sticky;top:24px;width:100%!important;float:none!important;margin:0!important;padding:26px!important;background:var(--xco-soft)!important;border:1px solid var(--xco-line)!important;border-radius:6px!important;box-shadow:none!important}
.xco-shell form.checkout>#order_review:before{content:"Tóm tắt đơn hàng";display:block;margin:0 0 17px;padding:0 0 15px;border-bottom:1px solid var(--xco-line);font-family:"Be Vietnam Pro","Inter",sans-serif;font-size:18px;font-weight:600;color:var(--xco-ink)}

/* Left form */
.xco-shell .woocommerce .col2-set .col-1,.xco-shell .woocommerce .col2-set .col-2{float:none!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
.xco-shell .woocommerce-shipping-fields,.xco-shell #ship-to-different-address{display:none!important}
.xco-shell .woocommerce-billing-fields>h3{display:block!important;margin:0 0 24px!important;font-size:20px!important;line-height:1.3!important;font-weight:600!important}
.xco-shell .woocommerce-additional-fields>h3{display:none!important}
.xco-shell .woocommerce-billing-fields__field-wrapper{display:flex!important;flex-direction:column!important}
#billing_first_name_field{order:1}
#billing_phone_field{order:2}
#billing_email_field{order:3}
#billing_address_1_field{order:4}
#billing_city_field{order:5}
.xco-shell .woocommerce-additional-fields{margin-top:4px}

.xco-shell .form-row{display:block!important;width:100%!important;margin:0 0 18px!important;padding:0!important}
.xco-shell .form-row label{display:block!important;margin:0 0 7px!important;color:var(--xco-text)!important;font-family:"Inter",sans-serif!important;font-size:13.5px!important;font-weight:600!important;line-height:1.4!important}
.xco-shell .form-row label .optional{color:#8b93a0!important;font-size:12.5px!important;font-weight:400!important}
.xco-shell abbr.required{color:var(--xco-danger)!important;text-decoration:none!important;border:0!important}
.xco-shell .input-text,.xco-shell select,.xco-shell textarea,.xco-shell .select2-selection{width:100%!important;min-height:52px!important;margin:0!important;padding:12px 14px!important;border:1px solid #c9ced8!important;border-radius:5px!important;background:#fff!important;color:var(--xco-ink)!important;font-family:"Inter",sans-serif!important;font-size:15px!important;line-height:1.45!important;box-shadow:none!important;outline:0!important}
.xco-shell textarea.input-text,.xco-shell textarea{min-height:92px!important;resize:vertical!important}
.xco-shell .input-text:focus,.xco-shell select:focus,.xco-shell textarea:focus,.xco-shell .select2-container--focus .select2-selection{border-color:var(--xco-blue)!important;box-shadow:0 0 0 3px rgba(65,105,225,.10)!important}
.xco-shell .input-text::placeholder,.xco-shell textarea::placeholder{color:#9aa1ad!important;opacity:1!important}
.xco-shell #billing_country_field{display:none!important}
.xco-shell .select2-container{width:100%!important}

/* Inline field errors */
.xander-field-error{display:block;margin:6px 0 0;color:var(--xco-danger);font-size:12.5px;line-height:1.4}
.xco-shell .woocommerce-invalid .input-text,.xco-shell .woocommerce-invalid select,.xco-shell .xander-has-error .input-text{border-color:#e37b72!important;box-shadow:0 0 0 2px rgba(180,35,24,.07)!important}

/* Order review */
.xco-shell table.shop_table{width:100%!important;margin:0 0 19px!important;border:0!important;border-collapse:collapse!important;background:transparent!important}
.xco-shell table.shop_table thead{display:none!important}
.xco-shell table.shop_table th,.xco-shell table.shop_table td{padding:14px 0!important;border:0!important;border-bottom:1px solid var(--xco-line)!important;background:transparent!important;color:var(--xco-text)!important;font-size:14px!important;vertical-align:middle!important}
.xco-shell table.shop_table .product-name{padding-right:12px!important}
.xco-shell .xander-checkout-product-wrap{display:flex!important;align-items:center!important;gap:12px!important}
.xco-shell .xander-checkout-product-img{display:block!important;width:70px!important;height:70px!important;object-fit:contain!important;flex:0 0 70px!important;padding:4px!important;background:#fff!important;border:1px solid var(--xco-line)!important;border-radius:4px!important}
.xco-shell .xander-checkout-product-meta{min-width:0;display:flex!important;flex-direction:column!important;gap:3px!important}
.xco-shell .xander-checkout-product-name{font-family:"Be Vietnam Pro","Inter",sans-serif!important;font-size:14.5px!important;font-weight:600!important;color:var(--xco-ink)!important}
.xco-shell dl.variation{margin:5px 0 0!important;font-size:12.5px!important;color:var(--xco-muted)!important}
.xco-shell dl.variation dt,.xco-shell dl.variation dd{display:inline!important;float:none!important;margin:0 4px 0 0!important;padding:0!important}
.xco-shell strong.product-quantity{display:none!important}
.xco-shell table.shop_table .product-total,.xco-shell table.shop_table th.product-total{display:table-cell!important;text-align:right!important;white-space:nowrap!important;font-weight:600!important;color:var(--xco-ink)!important}
.xco-shell table.shop_table tfoot{display:table-row-group!important}
.xco-shell table.shop_table tfoot tr th,.xco-shell table.shop_table tfoot tr td{display:table-cell!important;padding:10px 0!important;border-bottom:0!important}
.xco-shell table.shop_table tfoot tr th{color:var(--xco-muted)!important;font-weight:500!important;text-align:left!important}
.xco-shell table.shop_table tfoot tr td{text-align:right!important;font-weight:600!important;color:var(--xco-ink)!important}
.xco-shell table.shop_table tfoot .order-total th,.xco-shell table.shop_table tfoot .order-total td{padding-top:15px!important;border-top:1px solid var(--xco-line)!important;font-family:"Be Vietnam Pro","Inter",sans-serif!important;font-size:16px!important;color:var(--xco-ink)!important}
.xco-shell table.shop_table tfoot .order-total td{font-size:19px!important;color:var(--xco-blue)!important}

/* Payment area + CTA */
.xco-shell #payment{margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important}
.xco-shell #payment ul.payment_methods{display:none!important}
.xco-shell #payment .form-row.place-order{margin:0!important;padding:0!important}
.xco-shell #place_order{width:100%!important;min-height:54px!important;margin:6px 0 0!important;padding:13px 20px!important;border:0!important;border-radius:5px!important;background:var(--xco-blue)!important;color:#fff!important;font-family:"Inter",sans-serif!important;font-size:15.5px!important;font-weight:700!important;letter-spacing:0!important;box-shadow:none!important;cursor:pointer!important}
.xco-shell #place_order:hover,.xco-shell #place_order:focus{background:var(--xco-blue-dark)!important}

/* Trust copy from existing Woo hook */
.xander-checkout-reassurance{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.xander-checkout-reassurance__alert,.xander-checkout-reassurance__highlight{display:flex;align-items:flex-start;gap:9px;padding:10px 0;border-radius:0;background:transparent!important;border:0!important;color:var(--xco-text)!important;font-size:12.8px!important;line-height:1.45}
.xander-checkout-reassurance__alert{border-top:1px solid var(--xco-line)!important;padding-top:15px}
.xander-checkout-reassurance__highlight{color:#244aaf!important;font-weight:600!important}
.xander-checkout-reassurance__alert svg,.xander-checkout-reassurance__highlight svg{width:16px!important;height:16px!important;flex:0 0 16px;margin-top:2px}
.xander-checkout-trust-list{list-style:none!important;margin:2px 0 0!important;padding:12px 0 0!important;border-top:1px solid var(--xco-line);display:grid!important;gap:7px!important}
.xander-checkout-trust-list li{display:flex!important;align-items:center!important;gap:7px!important;color:var(--xco-muted)!important;font-size:12.5px!important}
.xander-checkout-trust-list li svg{width:14px!important;height:14px!important}

/* Mobile order preview */
.xco-mobile-summary{display:none}

/* Compact footer */
.xco-footer{border-top:1px solid var(--xco-line);background:#fff}
.xco-footer__inner{width:min(1180px,calc(100% - 48px));min-height:64px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--xco-muted);font-size:12.5px}
.xco-footer a{text-decoration:none}
.xco-footer a:hover{color:var(--xco-blue)}

/* Thank-you */
.xco-shell .woocommerce-order{max-width:none!important}
.xander-thankyou-wrapper{max-width:860px;margin:0 auto;font-family:"Inter",sans-serif;color:var(--xco-ink)}
.xander-thankyou-header{max-width:720px;margin:0 0 38px;text-align:left}
.xander-thankyou-status{display:inline-flex;align-items:center;gap:8px;margin:0 0 15px;color:var(--xco-blue);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.xander-thankyou-status__mark{display:inline-grid;place-items:center;width:26px;height:26px;border:1px solid rgba(65,105,225,.35);border-radius:4px;font-size:15px}
.xander-thankyou-title{margin:0 0 13px;font-family:"Be Vietnam Pro","Inter",sans-serif;font-size:clamp(29px,4vw,40px);line-height:1.2;letter-spacing:-.025em;color:var(--xco-ink)}
.xander-thankyou-desc{max-width:680px;margin:0;color:var(--xco-muted);font-size:15.5px;line-height:1.65}
.xander-thankyou-trial{margin:22px 0 0;padding:12px 0;border-top:1px solid var(--xco-line);border-bottom:1px solid var(--xco-line);color:#244aaf;font-size:14px;font-weight:600}
.xander-thankyou-section{border-top:1px solid var(--xco-line);padding:27px 0 0;margin-top:30px}
.xander-thankyou-section h2{margin:0 0 20px;font-size:18px;font-weight:600}
.xander-order-meta{display:flex;flex-wrap:wrap;gap:10px 28px;margin:0 0 22px;color:var(--xco-muted);font-size:13.5px}
.xander-order-meta strong{color:var(--xco-ink);font-weight:600}
.xander-order-items{display:grid;gap:14px}
.xander-order-item{display:grid;grid-template-columns:76px minmax(0,1fr) auto;align-items:center;gap:14px;padding:0 0 14px;border-bottom:1px solid var(--xco-line)}
.xander-order-item-img{width:76px;height:76px;border:1px solid var(--xco-line);border-radius:4px;background:#fff;overflow:hidden}
.xander-order-item-img img{width:100%;height:100%;object-fit:contain;display:block}
.xander-order-item-name{font-family:"Be Vietnam Pro","Inter",sans-serif;font-size:15px;font-weight:600;color:var(--xco-ink)}
.xander-order-item-variation{margin-top:4px;color:var(--xco-muted);font-size:12.5px}
.xander-order-item-total{font-weight:600;white-space:nowrap;color:var(--xco-ink)}
.xander-order-total{display:flex;justify-content:space-between;align-items:baseline;gap:20px;padding:17px 0 0;font-family:"Be Vietnam Pro","Inter",sans-serif}
.xander-order-total-label{font-size:15px;font-weight:600}
.xander-order-total-value{font-size:21px;font-weight:700;color:var(--xco-blue)}
.xander-customer-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 32px}
.xander-customer-field{min-width:0}
.xander-customer-label{display:block;margin:0 0 4px;color:var(--xco-muted);font-size:12.5px}
.xander-customer-value{display:block;color:var(--xco-ink);font-size:14px;font-weight:500;overflow-wrap:anywhere}
.xander-thankyou-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:30px}
.xander-thankyou-actions a{display:inline-flex;min-height:44px;align-items:center;justify-content:center;padding:10px 16px;border:1px solid var(--xco-line);border-radius:4px;text-decoration:none;font-size:13.5px;font-weight:600}
.xander-thankyou-actions .is-primary{border-color:var(--xco-blue);background:var(--xco-blue);color:#fff}

/* Preserve WooCommerce hooks without duplicating the custom order/customer sections. */
.xander-thankyou-wrapper>.woocommerce-order-details,
.xander-thankyou-wrapper>.woocommerce-customer-details{display:none!important}

@media(max-width:900px){
  .xco-header__inner,.xco-container,.xco-footer__inner{width:min(100% - 32px,720px)}
  .xco-main{padding:30px 0 48px}
  .xco-intro{margin-bottom:22px}
  .xco-shell form.checkout{grid-template-columns:1fr!important;gap:28px!important}
  .xco-shell form.checkout>.col2-set{grid-column:1;grid-row:1}
  .xco-shell form.checkout>#order_review{grid-column:1;grid-row:2;position:static;padding:20px!important}
  .xco-mobile-summary{display:block;margin:0 0 24px;padding:18px;background:var(--xco-soft);border:1px solid var(--xco-line);border-radius:5px}
  .xco-mobile-summary__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--xco-line);font-size:13px;color:var(--xco-muted)}
  .xco-mobile-summary__head strong{font-family:"Be Vietnam Pro","Inter",sans-serif;color:var(--xco-blue);font-size:16px}
  .xco-mobile-product{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:11px}
  .xco-mobile-product__image img{display:block;width:62px;height:62px;object-fit:contain;border:1px solid var(--xco-line);border-radius:4px;background:#fff}
  .xco-mobile-product__copy strong{display:block;font-family:"Be Vietnam Pro","Inter",sans-serif;font-size:13.5px}
  .xco-mobile-product__copy dl.variation{margin:3px 0 0;font-size:11.5px;color:var(--xco-muted)}
  .xco-mobile-product__price{font-size:13px;font-weight:600;white-space:nowrap}
  /* Product information is already shown above the form on mobile; keep CTA after the form. */
  .xco-shell #order_review table.shop_table{display:none!important}
  .xco-shell form.checkout>#order_review:before{content:"Xác nhận đặt hàng"}
}

@media(max-width:600px){
  .xco-header__inner{height:62px}
  .xco-logo img{width:128px}
  .xco-back{font-size:12.5px}
  .xco-intro h1{font-size:28px}
  .xco-intro>p:last-child{font-size:14px}
  .xco-shell .input-text,.xco-shell select,.xco-shell textarea{font-size:16px!important;min-height:52px!important}
  .xco-shell form.checkout>#order_review{padding:18px 16px!important}
  .xco-footer__inner{min-height:72px;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px}
  .xco-mobile-product{grid-template-columns:56px minmax(0,1fr)}
  .xco-mobile-product__image img{width:56px;height:56px}
  .xco-mobile-product__price{grid-column:2;margin-top:3px}
  .xander-thankyou-header{margin-bottom:28px}
  .xander-customer-grid{grid-template-columns:1fr;gap:14px}
  .xander-order-item{grid-template-columns:62px minmax(0,1fr);gap:11px}
  .xander-order-item-img{width:62px;height:62px}
  .xander-order-item-total{grid-column:2;margin-top:2px}
  .xander-order-total{padding-top:14px}
  .xander-thankyou-actions{display:grid;grid-template-columns:1fr}
  .xander-thankyou-actions a{width:100%}
}


/* v1.8 session/no-price compatibility */
.xco-shell .woocommerce-error .wc-backward{
  margin-left:6px!important;
  color:inherit!important;
  font-weight:600!important;
}
.xco-shell .woocommerce-error::before,
.xco-shell .woocommerce-message::before,
.xco-shell .woocommerce-info::before{
  display:none!important;
}
.xco-mobile-summary__head{
  margin-bottom:14px!important;
}
.xco-mobile-product__price{
  display:none!important;
}
@media(max-width:900px){
  .xco-shell form.checkout>.col2-set{grid-row:1!important}
  .xco-shell form.checkout>#order_review{grid-row:2!important}
}
