/* ==========================================================================
   Giỏ hàng · Thanh toán · Tài khoản (shortcode cổ điển của Woo, theme tự vẽ).
   ========================================================================== */
.shop-page { max-width: 1120px; margin-inline: auto; }
.shop-page__title { text-align: center; margin-bottom: var(--s-6); }

/* Thanh bước */
.steps { list-style: none; margin: 0 auto var(--s-6); padding: 0; display: flex; justify-content: center; gap: 0; counter-reset: step; }
.steps li { display: flex; align-items: center; gap: .5em; font-size: var(--t-sm); font-weight: 600; color: var(--c-muted); }
.steps li + li::before { content: ""; width: 48px; height: 2px; background: var(--c-line); margin: 0 var(--s-3); }
.steps span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-surface-3); border: 2px solid var(--c-line); font-size: var(--t-xs); }
.steps .is-current { color: var(--c-maroon-700); }
.steps .is-current span { background: var(--c-maroon-700); border-color: var(--c-maroon-700); color: #fff; }
.steps .is-done { color: var(--c-ink); }
.steps .is-done span { background: var(--c-gold-500); border-color: var(--c-gold-500); color: var(--c-maroon-900); }
.steps .is-done + li::before { background: var(--c-gold-500); }
@media (max-width: 480px) { .steps li + li::before { width: 20px; margin: 0 var(--s-2); } .steps li { font-size: var(--t-xs); } }

/* Thông báo */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
  list-style: none; margin: 0 0 var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm);
  font-size: var(--t-sm); background: var(--c-surface-3); border-left: 3px solid var(--c-gold-500);
}
.woocommerce-error { border-left-color: var(--c-red); background: #fdf1f1; }
.woocommerce-message .button, .woocommerce-info .button { float: right; }

/* Nút chung của Woo trong các trang này */
.shop-page .button, .shop-page button[type="submit"], .shop-page #place_order, .shop-page .checkout-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.6em; border: 1px solid transparent; border-radius: 999px;
  background: var(--c-maroon-700); color: #fff; font-weight: 600; font-size: var(--t-sm); line-height: 1.2; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.shop-page .button:hover, .shop-page #place_order:hover, .shop-page .checkout-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); color: #fff; }
.shop-page .button:disabled, .shop-page button[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.shop-page .checkout-button, .shop-page #place_order { width: 100%; padding: 1em 1.6em; font-size: var(--t-base); background: var(--c-gold-500); color: var(--c-maroon-900); }
.shop-page .checkout-button:hover, .shop-page #place_order:hover { color: var(--c-maroon-900); background: var(--c-gold-300); }

/* --- Giỏ hàng ------------------------------------------------------------- */
.woocommerce-cart .shop-page__content > .woocommerce { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .woocommerce-cart .shop-page__content > .woocommerce { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-6); align-items: start; } }

.woocommerce-cart-form { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; }
table.shop_table.cart { width: 100%; border-collapse: collapse; }
table.shop_table.cart thead { display: none; }
table.shop_table.cart tr.woocommerce-cart-form__cart-item { display: grid; grid-template-columns: 96px 1fr auto; grid-template-areas: "thumb name remove" "thumb price remove" "thumb qty subtotal"; gap: var(--s-1) var(--s-4); padding: var(--s-4); border-bottom: 1px solid var(--c-line); align-items: center; }
table.shop_table.cart td { padding: 0; border: 0; }
.cart .product-thumbnail { grid-area: thumb; }
.cart .product-thumbnail img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--c-line); }
.cart .product-name { grid-area: name; font-weight: 600; }
.cart .product-name a { color: var(--c-ink); }
.cart .product-name .variation { font-size: var(--t-xs); color: var(--c-muted); }
.cart .product-price { grid-area: price; font-size: var(--t-sm); color: var(--c-muted); }
.cart .product-quantity { grid-area: qty; }
.cart .product-subtotal { grid-area: subtotal; font-weight: 700; color: var(--c-red); text-align: right; }
.cart .product-remove { grid-area: remove; text-align: right; }
.cart .product-remove a.remove { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--c-line); color: var(--c-muted) !important; font-size: 18px; line-height: 1; text-decoration: none; }
.cart .product-remove a.remove:hover { background: var(--c-red); border-color: var(--c-red); color: #fff !important; }
.cart .quantity { display: inline-flex; }
.cart .quantity .qty { width: 72px; padding: .5em; text-align: center; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font-size: var(--t-sm); }
table.shop_table.cart tr:last-child td.actions { display: flex; justify-content: flex-end; padding: var(--s-3) var(--s-4); background: var(--c-surface-2); }
.cart td.actions .coupon { display: none; }
.cart td.actions .button { background: var(--c-surface); color: var(--c-maroon-700); border-color: var(--c-line); }

.cart-collaterals .cart_totals { background: var(--c-surface); border: 1px solid var(--c-line); border-top: 3px solid var(--c-gold-500); border-radius: var(--radius-lg); padding: var(--s-5); position: sticky; top: var(--s-4); }
.cart_totals h2 { font-size: var(--t-md); margin-bottom: var(--s-4); }
.cart_totals table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.cart_totals th, .cart_totals td { padding: .7em 0; border: 0; border-bottom: 1px dashed var(--c-line); text-align: left; vertical-align: top; }
.cart_totals td { text-align: right; }
.cart_totals tr.order-total th, .cart_totals tr.order-total td { font-size: var(--t-md); font-weight: 700; color: var(--c-ink); border-bottom: 0; padding-top: var(--s-3); }
.cart_totals tr.order-total .amount { color: var(--c-red); }
.cart_totals .woocommerce-shipping-methods { list-style: none; margin: 0; padding: 0; text-align: left; }
.cart_totals .woocommerce-shipping-destination, .cart_totals .woocommerce-shipping-calculator { display: none; }
.wc-proceed-to-checkout { margin-top: var(--s-4); }
.shop-page .continue-shopping { display: block; text-align: center; margin-top: var(--s-3); font-size: var(--t-sm); }
.cart-note { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--c-line); font-size: var(--t-xs); color: var(--c-muted); line-height: 1.6; }
.cart-note svg { color: var(--c-gold-500); vertical-align: -3px; }

.cart-empty { text-align: center; padding: var(--s-7) var(--s-4); background: var(--c-surface); border: 1px dashed var(--c-line); border-radius: var(--radius-lg); font-size: var(--t-md); color: var(--c-muted); }
.return-to-shop { text-align: center; margin-top: var(--s-4); }

/* --- Thanh toán ----------------------------------------------------------- */
form.checkout { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { form.checkout { grid-template-columns: minmax(0, 1fr) 400px; gap: var(--s-6); align-items: start; } }
form.checkout #customer_details { display: grid; gap: var(--s-4); }
form.checkout .col-1, form.checkout .col-2 { width: auto; float: none; }
form.checkout .col-2:empty { display: none; }
.woocommerce-billing-fields, .woocommerce-additional-fields, .woocommerce-shipping-fields { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--s-5); }
.woocommerce-billing-fields h3, .woocommerce-additional-fields h3, .woocommerce-shipping-fields h3 { font-size: var(--t-md); margin-bottom: var(--s-4); padding-bottom: var(--s-2); border-bottom: 2px solid var(--c-gold-300); }
.woocommerce-billing-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper { display: grid; gap: var(--s-3); }
@media (min-width: 560px) { .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr 1fr; } .form-row-wide, #billing_address_1_field, #billing_email_field, #billing_phone_field { grid-column: 1 / -1; } }
#billing_country_field { display: none !important; }
.form-row { margin: 0; float: none; width: auto; }
.form-row label { display: block; font-size: var(--t-xs); font-weight: 600; color: var(--c-body); margin-bottom: .35em; }
.form-row label .required { color: var(--c-red); text-decoration: none; }
.form-row .optional { color: var(--c-muted); font-weight: 400; }
.form-row .input-text, .form-row select, .form-row textarea, .select2-container--default .select2-selection--single {
  width: 100%; padding: .7em .9em; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; font-size: var(--t-sm); height: auto; min-height: 44px;
}
.select2-container--default .select2-selection--single { display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 1.4; color: var(--c-ink); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
.form-row .input-text:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--c-gold-500); outline: 0; box-shadow: 0 0 0 3px rgba(201,162,39,.2); }
.form-row.woocommerce-invalid .input-text { border-color: var(--c-red); }
.form-row textarea { min-height: 90px; resize: vertical; }
#ship-to-different-address { font-size: var(--t-sm); }

#order_review_heading { display: none; }
#order_review { background: var(--c-surface); border: 1px solid var(--c-line); border-top: 3px solid var(--c-gold-500); border-radius: var(--radius-lg); padding: var(--s-5); position: sticky; top: var(--s-4); }
#order_review::before { content: "Đơn hàng của bạn"; display: block; font-size: var(--t-md); font-weight: 700; color: var(--c-ink); margin-bottom: var(--s-3); }
.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.woocommerce-checkout-review-order-table thead { display: none; }
.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td { padding: .7em 0; border: 0; border-bottom: 1px dashed var(--c-line); text-align: left; vertical-align: top; }
.woocommerce-checkout-review-order-table td.product-total, .woocommerce-checkout-review-order-table tfoot td { text-align: right; }
.woocommerce-checkout-review-order-table .product-quantity { color: var(--c-muted); font-weight: 400; }
.woocommerce-checkout-review-order-table tr.order-total th, .woocommerce-checkout-review-order-table tr.order-total td { font-size: var(--t-md); font-weight: 700; color: var(--c-ink); border-bottom: 0; padding-top: var(--s-3); }
.woocommerce-checkout-review-order-table tr.order-total .amount { color: var(--c-red); }
.woocommerce-checkout-review-order-table .woocommerce-shipping-methods { list-style: none; margin: 0; padding: 0; }

#payment { margin-top: var(--s-4); }
#payment ul.wc_payment_methods { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-2); }
#payment li.wc_payment_method { margin: 0; border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--s-3) var(--s-4); background: var(--c-surface-2); transition: border-color .15s var(--ease); }
#payment li.wc_payment_method:has(input:checked) { border-color: var(--c-maroon-700); background: #fff; box-shadow: 0 0 0 3px rgba(102,12,13,.08); }
#payment li.wc_payment_method > label { display: flex; align-items: center; gap: .6em; font-weight: 600; font-size: var(--t-sm); cursor: pointer; margin: 0; }
#payment input.input-radio { accent-color: var(--c-maroon-700); width: 18px; height: 18px; margin: 0; }
#payment .payment_box { margin: var(--s-2) 0 0 1.8em; font-size: var(--t-xs); color: var(--c-muted); line-height: 1.55; }
#payment .payment_box p:last-child { margin: 0; }
.woocommerce-privacy-policy-text { font-size: var(--t-xs); color: var(--c-muted); margin-bottom: var(--s-3); }
.woocommerce-terms-and-conditions-wrapper { font-size: var(--t-xs); }
.blockUI.blockOverlay { border-radius: var(--radius-lg); }

/* Trang cảm ơn */
.woocommerce-order { max-width: 760px; margin-inline: auto; }
.woocommerce-thankyou-order-received { text-align: center; font-size: var(--t-lg); font-weight: 700; color: var(--c-maroon-700); padding: var(--s-5); background: #fff8ea; border: 1px solid #f0dfb0; border-radius: var(--radius-lg); margin-bottom: var(--s-5); }
ul.order_details { list-style: none; margin: 0 0 var(--s-5); padding: var(--s-4); display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); font-size: var(--t-xs); color: var(--c-muted); }
ul.order_details li { margin: 0; }
ul.order_details strong { display: block; margin-top: .25em; font-size: var(--t-sm); color: var(--c-ink); }
.woocommerce-order h2, .woocommerce-order h3 { font-size: var(--t-md); margin: var(--s-5) 0 var(--s-3); }
.woocommerce-order .shop_table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.woocommerce-order .shop_table th, .woocommerce-order .shop_table td { padding: .6em 0; border-bottom: 1px dashed var(--c-line); text-align: left; }
.woocommerce-order .shop_table td:last-child, .woocommerce-order .shop_table th:last-child { text-align: right; }
.woocommerce-bacs-bank-details { background: var(--c-surface-3); padding: var(--s-4); border-radius: var(--radius); }
.woocommerce-customer-details address { font-style: normal; font-size: var(--t-sm); line-height: 1.7; }

/* --- Tài khoản ------------------------------------------------------------ */
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.woocommerce-MyAccount-navigation li { margin: 0; }
.woocommerce-MyAccount-navigation a { display: inline-block; padding: .5em 1.1em; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); font-size: var(--t-sm); color: var(--c-body); }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--c-maroon-700); border-color: var(--c-maroon-700); color: #fff; }
.woocommerce-MyAccount-content { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--s-5); font-size: var(--t-sm); }
.woocommerce-form-login, .woocommerce-form-register { max-width: 440px; margin-inline: auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--s-5); }
.woocommerce-form-login .form-row, .woocommerce-form-register .form-row { margin-bottom: var(--s-3); }
/* Giỏ trống: một cột, căn giữa */
.woocommerce-cart .shop-page__content > .woocommerce:has(.cart-empty) { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; justify-items: center; }
.woocommerce-cart .cart-empty { width: 100%; }
.woocommerce-cart .return-to-shop { text-align: center; }
