
/* ==========================================================================
   Tiệm Len Nhà Moon 2.3.56
   Bản sửa dứt điểm theo phản hồi giao diện:
   - Khôi phục gallery sản phẩm dạng hàng ngang dưới ảnh lớn trên desktop.
   - Ẩn bảng mốc giá sỉ dư thừa nhưng giữ thanh tiến độ giá sỉ.
   - Chống chồng lấn giỏ hàng và mở rộng cột tên sản phẩm.
   - Làm rộng, thoáng phần thông tin đặt hàng; ẩn ghi chú voucher Vườn Nhà Moon.
   - Làm lại trung tâm tài khoản trên desktop/mobile.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) Trang sản phẩm: bỏ khung bảng giá sỉ dư thừa
   -------------------------------------------------------------------------- */
.single-product .summary > .mgkv-wholesale-box,
.single-product .moon-wholesale-details,
.single-product .moon-wholesale-details--embedded,
.single-product .moon-wholesale-tier-summary {
  display:none !important;
}

/* Chỉ giữ phần trạng thái/tiến độ giá sỉ gọn trong thanh mua hàng. */
.single-product .moon-purchase-progress .mgkv-wholesale-live {
  width:100% !important;
  min-width:0 !important;
}
.single-product .moon-purchase-progress .mgkv-wholesale-live > .moon-wholesale-tier-summary {
  display:none !important;
}

/* --------------------------------------------------------------------------
   2) Gallery desktop/tablet: ảnh lớn ở trên, một hàng thumbnail trượt ở dưới
   -------------------------------------------------------------------------- */
@media (min-width:783px) {
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(460px,600px) auto !important;
    gap:12px !important;
    height:auto !important;
    min-height:0 !important;
    overflow:visible !important;
  }

  .single-product .woocommerce div.product div.images.woocommerce-product-gallery > .flex-viewport,
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    grid-column:1 !important;
    grid-row:1 !important;
    width:100% !important;
    height:600px !important;
    min-height:600px !important;
    margin:0 !important;
    border:1px solid var(--moon-line) !important;
    border-radius:20px !important;
    overflow:hidden !important;
    background:#fff !important;
  }

  .single-product .woocommerce div.product div.images.woocommerce-product-gallery > .moon-variation-preview {
    grid-column:1 !important;
    grid-row:2 !important;
    display:grid !important;
    grid-template-columns:38px minmax(0,1fr) 38px !important;
    grid-template-rows:auto !important;
    align-items:center !important;
    gap:8px !important;
    width:100% !important;
    height:auto !important;
    min-height:104px !important;
    margin:0 !important;
    padding:8px !important;
    border:1px solid var(--moon-line) !important;
    border-radius:16px !important;
    background:#fffaf6 !important;
    overflow:hidden !important;
  }

  .single-product .moon-variation-preview__viewport {
    width:100% !important;
    height:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    scroll-snap-type:x mandatory !important;
    scrollbar-width:none !important;
  }
  .single-product .moon-variation-preview__viewport::-webkit-scrollbar {
    display:none !important;
  }

  .single-product .moon-variation-preview__track {
    display:grid !important;
    grid-auto-flow:column !important;
    grid-auto-columns:minmax(86px,104px) !important;
    gap:8px !important;
    width:max-content !important;
    min-width:100% !important;
    height:auto !important;
  }

  .single-product .moon-variation-preview__item {
    display:grid !important;
    grid-template-rows:66px 17px !important;
    align-items:center !important;
    gap:3px !important;
    width:100% !important;
    min-width:0 !important;
    height:94px !important;
    flex:none !important;
    padding:5px !important;
    border-radius:11px !important;
    scroll-snap-align:start !important;
  }

  .single-product .moon-variation-preview__item img {
    display:block !important;
    width:100% !important;
    height:66px !important;
    object-fit:contain !important;
    border-radius:8px !important;
    background:#fff !important;
  }

  .single-product .moon-variation-preview__item span {
    height:17px !important;
    font-size:9.5px !important;
    line-height:17px !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .single-product .moon-variation-preview__arrow {
    display:grid !important;
    place-items:center !important;
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
    padding:0 !important;
    border-radius:50% !important;
    background:#fff !important;
    box-shadow:0 4px 12px rgba(72,49,38,.09) !important;
    font-size:24px !important;
    line-height:1 !important;
  }
}

@media (min-width:783px) and (max-width:1080px) {
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery {
    position:static !important;
    grid-template-rows:500px auto !important;
  }
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery > .flex-viewport,
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    height:500px !important;
    min-height:500px !important;
  }
  .single-product .woocommerce div.product div.images.woocommerce-product-gallery > .moon-variation-preview {
    width:100% !important;
    height:auto !important;
    min-height:94px !important;
  }
  .single-product .moon-variation-preview__track {
    grid-auto-columns:minmax(78px,92px) !important;
  }
  .single-product .moon-variation-preview__item {
    grid-template-rows:58px 16px !important;
    height:84px !important;
  }
  .single-product .moon-variation-preview__item img {
    height:58px !important;
  }
}

/* --------------------------------------------------------------------------
   3) Giỏ hàng desktop: không chồng lấn, ảnh rõ, tên sản phẩm đủ rộng
   -------------------------------------------------------------------------- */
@media (min-width:1180px) {
  .woocommerce-cart .moon-woocommerce-main > .moon-container {
    width:min(calc(100% - 56px),1320px) !important;
    max-width:none !important;
  }

  .woocommerce-cart .moon-content-card {
    padding:32px !important;
    overflow:visible !important;
  }

  .woocommerce-cart .woocommerce {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 344px !important;
    gap:28px !important;
    align-items:start !important;
  }

  .woocommerce-cart form.woocommerce-cart-form,
  .woocommerce-cart .cart-collaterals {
    min-width:0 !important;
    width:100% !important;
    margin:0 !important;
    float:none !important;
  }

  .woocommerce-cart table.shop_table.cart {
    width:100% !important;
    table-layout:fixed !important;
    margin:0 !important;
  }

  .woocommerce-cart table.shop_table.cart th,
  .woocommerce-cart table.shop_table.cart td {
    box-sizing:border-box !important;
    vertical-align:middle !important;
  }

  .woocommerce-cart table.shop_table.cart .product-remove {
    width:42px !important;
    padding-left:10px !important;
    padding-right:6px !important;
    text-align:center !important;
  }

  .woocommerce-cart table.shop_table.cart .product-thumbnail {
    width:112px !important;
    padding-left:8px !important;
    padding-right:12px !important;
  }

  .woocommerce-cart table.shop_table.cart .product-thumbnail img {
    width:90px !important;
    height:90px !important;
    max-width:90px !important;
    object-fit:contain !important;
    border:1px solid var(--moon-line) !important;
    border-radius:12px !important;
    background:#fff !important;
  }

  .woocommerce-cart table.shop_table.cart .product-name {
    width:auto !important;
    min-width:230px !important;
    padding-left:6px !important;
    padding-right:16px !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-name a {
    display:block !important;
    font-size:14px !important;
    line-height:1.45 !important;
    font-weight:750 !important;
  }

  .woocommerce-cart table.shop_table.cart .product-price {
    width:105px !important;
    white-space:nowrap !important;
  }

  .woocommerce-cart table.shop_table.cart .product-quantity {
    width:112px !important;
  }

  .woocommerce-cart table.shop_table.cart .product-subtotal {
    width:120px !important;
    white-space:nowrap !important;
  }

  .woocommerce-cart table.shop_table.cart .quantity {
    width:84px !important;
    min-width:84px !important;
  }

  .woocommerce-cart .cart-collaterals {
    position:relative !important;
    z-index:1 !important;
  }

  .woocommerce-cart .cart-collaterals .cart_totals {
    position:sticky !important;
    top:122px !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
    box-sizing:border-box !important;
  }
}

/* Tablet/laptop hẹp: xếp tổng giỏ xuống dưới để tuyệt đối không đè bảng. */
@media (min-width:783px) and (max-width:1179px) {
  .woocommerce-cart .moon-woocommerce-main > .moon-container {
    width:min(calc(100% - 36px),1060px) !important;
  }

  .woocommerce-cart .moon-content-card {
    padding:24px !important;
  }

  .woocommerce-cart .woocommerce {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:22px !important;
  }

  .woocommerce-cart form.woocommerce-cart-form,
  .woocommerce-cart .cart-collaterals {
    grid-column:1 !important;
    width:100% !important;
    min-width:0 !important;
    float:none !important;
    margin:0 !important;
  }

  .woocommerce-cart .cart-collaterals .cart_totals {
    position:static !important;
    width:100% !important;
    max-width:520px !important;
    margin-left:auto !important;
    float:none !important;
  }

  .woocommerce-cart table.shop_table.cart .product-thumbnail {
    width:96px !important;
  }
  .woocommerce-cart table.shop_table.cart .product-thumbnail img {
    width:76px !important;
    height:76px !important;
  }
  .woocommerce-cart table.shop_table.cart .product-name {
    min-width:210px !important;
  }
}

/* --------------------------------------------------------------------------
   4) Checkout: cột nhập thông tin rộng, thoáng và dễ đọc
   -------------------------------------------------------------------------- */
@media (min-width:1180px) {
  .woocommerce-checkout .moon-woocommerce-main > .moon-container {
    width:min(calc(100% - 56px),1320px) !important;
    max-width:none !important;
  }

  .woocommerce-checkout .moon-content-card {
    padding:32px 34px 38px !important;
    overflow:visible !important;
  }

  .woocommerce-checkout form.checkout {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 430px !important;
    grid-template-rows:auto 1fr !important;
    gap:16px 34px !important;
    align-items:start !important;
  }

  .woocommerce-checkout form.checkout #customer_details {
    grid-column:1 !important;
    grid-row:1 / span 2 !important;
    display:block !important;
    min-width:0 !important;
    width:100% !important;
  }

  .woocommerce-checkout form.checkout #customer_details > .col-1,
  .woocommerce-checkout form.checkout #customer_details > .col-2,
  .woocommerce-checkout form.checkout #customer_details .woocommerce-billing-fields,
  .woocommerce-checkout form.checkout #customer_details .woocommerce-shipping-fields,
  .woocommerce-checkout form.checkout #customer_details .woocommerce-additional-fields {
    float:none !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .woocommerce-checkout form.checkout #order_review_heading {
    grid-column:2 !important;
    grid-row:1 !important;
  }

  .woocommerce-checkout form.checkout #order_review {
    grid-column:2 !important;
    grid-row:2 !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }
}

@media (min-width:783px) {
  .woocommerce-checkout .woocommerce-billing-fields,
  .woocommerce-checkout .woocommerce-shipping-fields,
  .woocommerce-checkout .woocommerce-additional-fields {
    padding:24px !important;
    margin:0 0 18px !important;
    border:1px solid var(--moon-line) !important;
    border-radius:20px !important;
    background:#fff !important;
  }

  .woocommerce-checkout .woocommerce-billing-fields > h3,
  .woocommerce-checkout .woocommerce-shipping-fields > h3,
  .woocommerce-checkout .woocommerce-additional-fields > h3 {
    margin:0 0 18px !important;
    font-size:23px !important;
    line-height:1.3 !important;
  }

  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:15px 16px !important;
  }

  .woocommerce-checkout #customer_details .form-row {
    float:none !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
  }

  .woocommerce-checkout #billing_country_field,
  .woocommerce-checkout #billing_address_1_field,
  .woocommerce-checkout #billing_address_2_field,
  .woocommerce-checkout #billing_company_field,
  .woocommerce-checkout #shipping_country_field,
  .woocommerce-checkout #shipping_address_1_field,
  .woocommerce-checkout #shipping_address_2_field,
  .woocommerce-checkout #shipping_company_field,
  .woocommerce-checkout #order_comments_field,
  .woocommerce-checkout #customer_details .form-row-wide {
    grid-column:1 / -1 !important;
  }

  .woocommerce-checkout #customer_details label {
    display:block !important;
    margin:0 0 6px !important;
    font-size:13.5px !important;
    line-height:1.35 !important;
    font-weight:700 !important;
  }

  .woocommerce-checkout #customer_details input.input-text,
  .woocommerce-checkout #customer_details select,
  .woocommerce-checkout #customer_details textarea,
  .woocommerce-checkout #customer_details .select2-container .select2-selection--single {
    width:100% !important;
    min-height:48px !important;
    padding:11px 13px !important;
    font-size:14px !important;
    line-height:1.4 !important;
    border-radius:12px !important;
    box-sizing:border-box !important;
  }

  .woocommerce-checkout #customer_details textarea {
    min-height:112px !important;
    resize:vertical !important;
  }

  .woocommerce-checkout #customer_details .select2-container {
    width:100% !important;
  }

  .woocommerce-checkout #customer_details .select2-selection__rendered {
    line-height:25px !important;
  }

  .woocommerce-checkout #customer_details .select2-selection__arrow {
    height:46px !important;
  }
}

/* Laptop/tablet hẹp: xếp phần đơn hàng xuống dưới thay vì bó cột nhập thông tin. */
@media (min-width:783px) and (max-width:1179px) {
  .woocommerce-checkout .moon-woocommerce-main > .moon-container {
    width:min(calc(100% - 36px),1040px) !important;
  }

  .woocommerce-checkout .moon-content-card {
    padding:24px !important;
  }

  .woocommerce-checkout form.checkout {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:auto !important;
    gap:20px !important;
  }

  .woocommerce-checkout form.checkout #customer_details,
  .woocommerce-checkout form.checkout #order_review_heading,
  .woocommerce-checkout form.checkout #order_review {
    grid-column:1 !important;
    grid-row:auto !important;
    width:100% !important;
    min-width:0 !important;
  }

  .woocommerce-checkout form.checkout #order_review {
    position:static !important;
    max-width:none !important;
  }
}

/* Ghi chú policy voucher được đánh dấu bởi JS hoặc plugin. */
.woocommerce-checkout .moon-checkout-garden-policy-note,
.woocommerce-checkout .mgmg-checkout-policy-note,
.woocommerce-checkout .mgmg-voucher-policy-note,
.woocommerce-checkout [data-garden-voucher-policy] {
  display:none !important;
}

/* --------------------------------------------------------------------------
   5) Trung tâm tài khoản: bố cục rõ ràng trên desktop
   -------------------------------------------------------------------------- */
@media (min-width:783px) {
  body.woocommerce-account.moon-account-logged-in .moon-account-main {
    padding:34px 0 70px !important;
    background:#f8f5f2 !important;
  }

  body.woocommerce-account.moon-account-logged-in .moon-account-main > .moon-container {
    width:min(calc(100% - 48px),1260px) !important;
    max-width:none !important;
  }

  body.woocommerce-account.moon-account-logged-in .moon-account-wrap {
    width:100% !important;
    max-width:none !important;
    padding:24px !important;
    border:1px solid #eee7e2 !important;
    border-radius:24px !important;
    background:#fff !important;
    box-shadow:0 14px 38px rgba(70,47,36,.055) !important;
    overflow:visible !important;
  }

  body.woocommerce-account.moon-account-logged-in .moon-account-wrap > .woocommerce {
    display:grid !important;
    grid-template-columns:270px minmax(0,1fr) !important;
    grid-template-areas:"account-nav account-content" !important;
    gap:28px !important;
    align-items:start !important;
    width:100% !important;
    min-width:0 !important;
  }

  body.woocommerce-account.moon-account-logged-in .moon-account-wrap .woocommerce-MyAccount-navigation {
    grid-area:account-nav !important;
    position:sticky !important;
    top:118px !important;
    float:none !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    border:1px solid #ebe4df !important;
    border-radius:18px !important;
    background:#fff !important;
    box-shadow:0 10px 28px rgba(72,48,36,.055) !important;
    overflow:hidden !important;
  }

  body.admin-bar.woocommerce-account.moon-account-logged-in .moon-account-wrap .woocommerce-MyAccount-navigation {
    top:150px !important;
  }

  body.woocommerce-account.moon-account-logged-in .moon-account-wrap .woocommerce-MyAccount-content {
    grid-area:account-content !important;
    float:none !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
  }

  body.woocommerce-account .moon-account-profile {
    display:grid !important;
    grid-template-columns:62px minmax(0,1fr) !important;
    align-items:center !important;
    gap:13px !important;
    padding:18px !important;
  }

  body.woocommerce-account .moon-account-profile__avatar,
  body.woocommerce-account .moon-account-profile__identity {
    min-width:0 !important;
  }

  body.woocommerce-account .moon-account-profile__avatar img {
    width:62px !important;
    height:62px !important;
    border-radius:16px !important;
    object-fit:cover !important;
  }

  body.woocommerce-account .moon-account-profile__identity {
    display:flex !important;
    flex-direction:column !important;
    gap:3px !important;
  }

  body.woocommerce-account .moon-account-profile__identity strong,
  body.woocommerce-account .moon-account-profile__identity span {
    display:block !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  body.woocommerce-account .moon-account-menu {
    display:block !important;
    padding:8px !important;
    margin:0 !important;
    border:0 !important;
    background:#fff !important;
  }

  body.woocommerce-account .moon-account-menu li,
  body.woocommerce-account .moon-account-menu a {
    width:100% !important;
    min-width:0 !important;
  }

  body.woocommerce-account .moon-account-menu a {
    display:grid !important;
    grid-template-columns:24px minmax(0,1fr) 18px !important;
    align-items:center !important;
    gap:10px !important;
    min-height:46px !important;
    padding:10px 11px !important;
    border:0 !important;
    border-radius:11px !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-account .moon-account-menu__label {
    min-width:0 !important;
    font-size:12px !important;
    line-height:1.25 !important;
    white-space:normal !important;
  }

  body.woocommerce-account .moon-account-menu__chevron {
    display:block !important;
    text-align:right !important;
  }

  body.woocommerce-account .moon-account-dashboard {
    width:100% !important;
    max-width:none !important;
    gap:16px !important;
  }

  body.woocommerce-account .moon-account-welcome {
    padding:22px 24px !important;
  }

  body.woocommerce-account .moon-account-status-grid {
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  }

  body.woocommerce-account .moon-account-quick-grid {
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses,
  body.woocommerce-account .woocommerce-MyAccount-content .col2-set.woocommerce-Addresses {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:18px !important;
    width:100% !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses::before,
  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses::after {
    display:none !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address,
  body.woocommerce-account .woocommerce-MyAccount-content .col-1,
  body.woocommerce-account .woocommerce-MyAccount-content .col-2 {
    float:none !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address {
    min-height:210px !important;
    padding:22px !important;
    border:1px solid #ece5e0 !important;
    border-radius:17px !important;
    background:#fff !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title {
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:16px !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
    max-width:70% !important;
    font-size:19px !important;
    line-height:1.3 !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address address {
    font-size:13px !important;
    line-height:1.7 !important;
  }
}


/* Tạm ẩn các khối giao diện do plugin Vườn Nhà Moon chèn vào khu vực tài khoản.
   Dữ liệu và endpoint vẫn được giữ nguyên phía hệ thống. */
body.woocommerce-account .woocommerce-MyAccount-content [class*="mgmg-"],
body.woocommerce-account .woocommerce-MyAccount-content [class*="garden-"],
body.woocommerce-account .woocommerce-MyAccount-content [class*="len-xu"],
body.woocommerce-account .woocommerce-MyAccount-content [class*="lenxu"] {
  display:none !important;
}

/* Thẻ chương trình khách hàng thân thiết – khung chờ nội dung sau. */
.moon-account-loyalty {
  position:relative;
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  min-height:112px;
  padding:20px 22px;
  border:1px solid #eadfd7;
  border-radius:18px;
  background:
    radial-gradient(circle at 92% 12%,rgba(255,255,255,.75),transparent 31%),
    linear-gradient(135deg,#fff6ed,#ffead9);
  box-shadow:0 9px 24px rgba(78,49,34,.045);
  overflow:hidden;
}

.moon-account-loyalty__icon {
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  border-radius:18px;
  color:#fff;
  background:linear-gradient(135deg,var(--moon-orange),var(--moon-orange-deep));
  box-shadow:0 9px 20px rgba(229,118,60,.2);
}

.moon-account-loyalty__icon .moon-account-svg {
  width:30px;
  height:30px;
}

.moon-account-loyalty__copy {
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:4px;
}

.moon-account-loyalty__copy small {
  color:#a06443;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.moon-account-loyalty__copy strong {
  color:#4b382e;
  font-size:18px;
  line-height:1.3;
}

.moon-account-loyalty__copy span {
  color:#846f63;
  font-size:12px;
  line-height:1.5;
}

.moon-account-loyalty__status {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:8px 12px;
  border:1px solid #efcfba;
  border-radius:999px;
  color:#a65d37;
  background:rgba(255,255,255,.72);
  font-size:10.5px;
  font-weight:800;
  white-space:nowrap;
}

/* --------------------------------------------------------------------------
   6) Trung tâm tài khoản mobile: tràn bề ngang hợp lý, giảm viền trống
   -------------------------------------------------------------------------- */
@media (max-width:782px) {
  body.woocommerce-account .moon-account-main {
    padding:0 0 30px !important;
    background:#f7f4f1 !important;
  }

  body.woocommerce-account .moon-account-main > .moon-container {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.woocommerce-account .moon-account-wrap {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 7px 24px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    overflow:visible !important;
  }

  body.woocommerce-account .moon-account-wrap > .moon-page-header,
  body.woocommerce-account .moon-account-wrap > h1.entry-title,
  body.woocommerce-account .moon-account-wrap > h1 {
    display:none !important;
  }

  body.woocommerce-account .moon-account-wrap > .woocommerce {
    display:block !important;
    width:100% !important;
    margin:0 !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation.moon-account-nav {
    position:static !important;
    float:none !important;
    width:calc(100% + 14px) !important;
    max-width:none !important;
    margin:0 -7px 8px !important;
    border:0 !important;
    border-radius:0 0 17px 17px !important;
    background:#fff !important;
    box-shadow:0 6px 18px rgba(69,45,34,.055) !important;
    overflow:hidden !important;
  }

  body.woocommerce-account .moon-account-profile {
    display:grid !important;
    grid-template-columns:56px minmax(0,1fr) !important;
    gap:12px !important;
    min-height:88px !important;
    padding:14px 13px !important;
    border-radius:0 !important;
  }

  body.woocommerce-account .moon-account-profile__avatar img {
    width:56px !important;
    height:56px !important;
    border-radius:14px !important;
  }

  body.woocommerce-account .moon-account-profile__identity {
    min-width:0 !important;
  }

  body.woocommerce-account .moon-account-profile__identity strong,
  body.woocommerce-account .moon-account-profile__identity span {
    display:block !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  body.woocommerce-account .moon-account-menu {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:2px !important;
    width:100% !important;
    padding:6px 5px 8px !important;
    margin:0 !important;
  }

  body.woocommerce-account .moon-account-menu li {
    min-width:0 !important;
  }

  body.woocommerce-account .moon-account-menu a {
    display:flex !important;
    min-height:64px !important;
    padding:7px 2px !important;
    border:0 !important;
    border-radius:11px !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:5px !important;
    text-align:center !important;
  }

  body.woocommerce-account .moon-account-menu__label {
    width:100% !important;
    max-width:100% !important;
    font-size:9.2px !important;
    line-height:1.18 !important;
    white-space:normal !important;
    display:-webkit-box !important;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden !important;
  }

  body.woocommerce-account .moon-account-menu__chevron {
    display:none !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content {
    float:none !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.woocommerce-account .moon-account-dashboard {
    width:100% !important;
    max-width:none !important;
    gap:8px !important;
  }

  body.woocommerce-account .moon-account-welcome,
  body.woocommerce-account .moon-account-completion,
  body.woocommerce-account .moon-account-panel,
  body.woocommerce-account .moon-account-loyalty {
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-account .moon-account-welcome {
    padding:13px 14px !important;
    border-radius:13px !important;
  }

  body.woocommerce-account .moon-account-welcome h1 {
    margin:2px 0 4px !important;
    font-size:17px !important;
    line-height:1.25 !important;
  }

  body.woocommerce-account .moon-account-welcome p {
    margin:0 !important;
    font-size:10.8px !important;
    line-height:1.45 !important;
  }

  body.woocommerce-account .moon-account-completion {
    padding:10px 11px !important;
    border-radius:12px !important;
  }

  body.woocommerce-account .moon-account-panel {
    border-radius:13px !important;
  }

  body.woocommerce-account .moon-account-panel__head {
    min-height:50px !important;
    padding:10px 12px !important;
  }

  body.woocommerce-account .moon-account-panel__head h2 {
    font-size:13.5px !important;
  }

  body.woocommerce-account .moon-account-status-grid {
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    padding:10px 1px 12px !important;
  }

  body.woocommerce-account .moon-account-status {
    min-width:0 !important;
    padding:4px 0 !important;
  }

  body.woocommerce-account .moon-account-status strong {
    font-size:7.9px !important;
    line-height:1.2 !important;
  }

  body.woocommerce-account .moon-account-loyalty {
    grid-template-columns:44px minmax(0,1fr) !important;
    gap:10px !important;
    min-height:86px !important;
    padding:12px !important;
    border-radius:13px !important;
  }

  body.woocommerce-account .moon-account-loyalty__icon {
    width:44px !important;
    height:44px !important;
    border-radius:13px !important;
  }

  body.woocommerce-account .moon-account-loyalty__icon .moon-account-svg {
    width:23px !important;
    height:23px !important;
  }

  body.woocommerce-account .moon-account-loyalty__copy small {
    font-size:8px !important;
  }

  body.woocommerce-account .moon-account-loyalty__copy strong {
    font-size:12px !important;
  }

  body.woocommerce-account .moon-account-loyalty__copy span {
    font-size:9.3px !important;
    line-height:1.35 !important;
  }

  body.woocommerce-account .moon-account-loyalty__status {
    grid-column:1 / -1 !important;
    justify-self:stretch !important;
    min-height:28px !important;
    padding:5px 9px !important;
    font-size:8.5px !important;
  }

  body.woocommerce-account .moon-account-quick-grid {
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    padding:4px 1px 7px !important;
  }

  body.woocommerce-account .moon-account-quick-grid > a {
    padding:8px 1px !important;
  }

  body.woocommerce-account .moon-account-quick-grid strong {
    font-size:8.9px !important;
  }

  body.woocommerce-account .moon-account-order-list {
    padding:0 10px !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses,
  body.woocommerce-account .woocommerce-MyAccount-content .col2-set.woocommerce-Addresses {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:9px !important;
    width:100% !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address,
  body.woocommerce-account .woocommerce-MyAccount-content .col-1,
  body.woocommerce-account .woocommerce-MyAccount-content .col-2 {
    float:none !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address {
    min-height:0 !important;
    padding:13px !important;
    border-radius:13px !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content form:not(.woocommerce-form-login):not(.woocommerce-form-register) {
    width:100% !important;
    padding:13px !important;
    border-radius:13px !important;
    box-sizing:border-box !important;
  }
}

@media (max-width:390px) {
  body.woocommerce-account .moon-account-wrap {
    padding-left:5px !important;
    padding-right:5px !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation.moon-account-nav {
    width:calc(100% + 10px) !important;
    margin-left:-5px !important;
    margin-right:-5px !important;
  }

  body.woocommerce-account .moon-account-menu__label {
    font-size:8.6px !important;
  }
}

/* ==========================================================================
   2.3.57 — Full-width Cart / Checkout / Account final override
   Yêu cầu: giảm tối đa khoảng trắng hai bên, không bó tên sản phẩm,
   checkout cân đối hơn và tạm ẩn toàn bộ khu vực Voucher Vườn Nhà Moon.
   Đây là lớp CSS cuối cùng, chủ động ghi đè các giới hạn chiều rộng cũ.
   ========================================================================== */

/* Tạm ẩn toàn bộ giao diện voucher của Vườn Nhà Moon trên website.
   Phần xử lý coupon phía WooCommerce không bị xóa, nên có thể mở lại sau. */
.woocommerce-checkout .moon-voucher-wallet,
.woocommerce-checkout [data-moon-voucher-wallet],
.woocommerce-checkout .moon-coupon-notice,
.woocommerce-checkout .moon-checkout-garden-policy-note,
.woocommerce-checkout .mgmg-checkout-policy-note,
.woocommerce-checkout .mgmg-voucher-policy-note,
.woocommerce-checkout [data-garden-voucher-policy] {
  display:none !important;
}

/* Không để các wrapper ngoài bó hẹp Cart / Checkout. */
body.woocommerce-cart .moon-woocommerce-main,
body.woocommerce-checkout .moon-woocommerce-main {
  width:100% !important;
  max-width:none !important;
  padding:18px 0 54px !important;
}

body.woocommerce-cart .moon-woocommerce-main > .moon-container,
body.woocommerce-checkout .moon-woocommerce-main > .moon-container {
  width:100% !important;
  max-width:1600px !important;
  margin:0 auto !important;
  padding:0 12px !important;
  box-sizing:border-box !important;
}

body.woocommerce-cart .moon-content-card,
body.woocommerce-checkout .moon-content-card {
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:22px 24px 30px !important;
  box-sizing:border-box !important;
  overflow:visible !important;
}

/* ---------------- Cart desktop ---------------- */
@media (min-width:1024px) {
  body.woocommerce-cart .woocommerce {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(330px,370px) !important;
    gap:20px !important;
    align-items:start !important;
    width:100% !important;
    max-width:none !important;
  }

  body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper,
  body.woocommerce-cart .woocommerce > .woocommerce-message,
  body.woocommerce-cart .woocommerce > .woocommerce-error {
    grid-column:1 / -1 !important;
  }

  body.woocommerce-cart form.woocommerce-cart-form,
  body.woocommerce-cart .cart-collaterals {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
  }

  body.woocommerce-cart table.shop_table.cart {
    width:100% !important;
    max-width:none !important;
    table-layout:fixed !important;
    margin:0 !important;
  }

  body.woocommerce-cart table.shop_table.cart th,
  body.woocommerce-cart table.shop_table.cart td {
    padding:11px 8px !important;
    box-sizing:border-box !important;
    vertical-align:middle !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-remove {
    width:34px !important;
    min-width:34px !important;
    padding-left:4px !important;
    padding-right:4px !important;
    text-align:center !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-thumbnail {
    width:92px !important;
    min-width:92px !important;
    padding-left:4px !important;
    padding-right:8px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-thumbnail img {
    display:block !important;
    width:74px !important;
    height:74px !important;
    max-width:74px !important;
    margin:0 auto !important;
    object-fit:contain !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-name {
    width:auto !important;
    min-width:220px !important;
    padding-left:8px !important;
    padding-right:10px !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    hyphens:none !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-name,
  body.woocommerce-cart table.shop_table.cart td.product-name a,
  body.woocommerce-cart table.shop_table.cart td.product-name dl,
  body.woocommerce-cart table.shop_table.cart td.product-name dt,
  body.woocommerce-cart table.shop_table.cart td.product-name dd {
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-name a {
    display:block !important;
    width:100% !important;
    font-size:13px !important;
    line-height:1.4 !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-price {
    width:92px !important;
    min-width:92px !important;
    white-space:nowrap !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-quantity {
    width:102px !important;
    min-width:102px !important;
    text-align:center !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-subtotal {
    width:108px !important;
    min-width:108px !important;
    white-space:nowrap !important;
    text-align:right !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals {
    position:sticky !important;
    top:112px !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
    box-sizing:border-box !important;
  }
}

/* Laptop nhỏ: vẫn giữ bảng đủ rộng, đẩy tổng giỏ xuống dưới nếu không còn chỗ. */
@media (min-width:783px) and (max-width:1023px) {
  body.woocommerce-cart .woocommerce {
    display:block !important;
    width:100% !important;
  }

  body.woocommerce-cart form.woocommerce-cart-form,
  body.woocommerce-cart .cart-collaterals {
    width:100% !important;
    max-width:none !important;
    float:none !important;
    margin:0 !important;
  }

  body.woocommerce-cart .cart-collaterals {
    margin-top:18px !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals {
    position:static !important;
    width:100% !important;
    max-width:560px !important;
    margin-left:auto !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-name,
  body.woocommerce-cart table.shop_table.cart td.product-name a {
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
  }
}

/* ---------------- Checkout desktop ---------------- */
@media (min-width:1024px) {
  body.woocommerce-checkout form.checkout {
    display:grid !important;
    grid-template-columns:minmax(420px,.92fr) minmax(500px,1.18fr) !important;
    grid-template-rows:auto 1fr !important;
    gap:12px 22px !important;
    align-items:start !important;
    width:100% !important;
    max-width:none !important;
  }

  body.woocommerce-checkout form.checkout #customer_details {
    grid-column:1 !important;
    grid-row:1 / span 2 !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
  }

  body.woocommerce-checkout form.checkout #order_review_heading {
    grid-column:2 !important;
    grid-row:1 !important;
    width:100% !important;
    margin:0 0 0 !important;
    padding:0 2px !important;
  }

  body.woocommerce-checkout form.checkout #order_review {
    grid-column:2 !important;
    grid-row:2 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-checkout form.checkout #customer_details > .col-1,
  body.woocommerce-checkout form.checkout #customer_details > .col-2,
  body.woocommerce-checkout form.checkout #customer_details .woocommerce-billing-fields,
  body.woocommerce-checkout form.checkout #customer_details .woocommerce-shipping-fields,
  body.woocommerce-checkout form.checkout #customer_details .woocommerce-additional-fields {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    float:none !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields,
  body.woocommerce-checkout .woocommerce-shipping-fields,
  body.woocommerce-checkout .woocommerce-additional-fields {
    padding:18px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  body.woocommerce-checkout #billing_country_field,
  body.woocommerce-checkout #billing_address_1_field,
  body.woocommerce-checkout #billing_address_2_field,
  body.woocommerce-checkout #billing_company_field,
  body.woocommerce-checkout #shipping_country_field,
  body.woocommerce-checkout #shipping_address_1_field,
  body.woocommerce-checkout #shipping_address_2_field,
  body.woocommerce-checkout #shipping_company_field,
  body.woocommerce-checkout #order_comments_field,
  body.woocommerce-checkout #customer_details .form-row-wide {
    grid-column:1 / -1 !important;
  }

  body.woocommerce-checkout #customer_details .form-row,
  body.woocommerce-checkout #customer_details .woocommerce-input-wrapper,
  body.woocommerce-checkout #customer_details .select2-container {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
  }

  body.woocommerce-checkout #order_review .shop_table {
    width:100% !important;
    table-layout:auto !important;
  }

  body.woocommerce-checkout #order_review .shop_table th,
  body.woocommerce-checkout #order_review .shop_table td {
    padding:10px !important;
  }
}

/* Checkout tablet: một cột, không bó form. */
@media (min-width:783px) and (max-width:1023px) {
  body.woocommerce-checkout form.checkout {
    display:block !important;
    width:100% !important;
  }

  body.woocommerce-checkout form.checkout #customer_details,
  body.woocommerce-checkout form.checkout #order_review_heading,
  body.woocommerce-checkout form.checkout #order_review {
    width:100% !important;
    max-width:none !important;
    position:static !important;
  }

  body.woocommerce-checkout form.checkout #order_review_heading {
    margin-top:20px !important;
  }
}

/* ---------------- Mobile Cart / Checkout / Account ---------------- */
@media (max-width:782px) {
  body.woocommerce-cart .moon-woocommerce-main,
  body.woocommerce-checkout .moon-woocommerce-main,
  body.woocommerce-account .moon-account-main {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 0 28px !important;
  }

  body.woocommerce-cart .moon-woocommerce-main > .moon-container,
  body.woocommerce-checkout .moon-woocommerce-main > .moon-container,
  body.woocommerce-account .moon-account-main > .moon-container {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.woocommerce-cart .moon-content-card,
  body.woocommerce-checkout .moon-content-card {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:7px 6px 20px !important;
    border-left:0 !important;
    border-right:0 !important;
    border-radius:0 !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-account .moon-account-wrap {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 4px 20px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  body.woocommerce-account .moon-account-wrap > .moon-page-header,
  body.woocommerce-account .moon-account-wrap > h1.entry-title,
  body.woocommerce-account .moon-account-wrap > h1 {
    display:none !important;
  }

  body.woocommerce-account .moon-account-wrap > .woocommerce,
  body.woocommerce-account .woocommerce-MyAccount-content {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation.moon-account-nav {
    width:calc(100% + 8px) !important;
    max-width:none !important;
    margin:0 -4px 6px !important;
    border-radius:0 0 14px 14px !important;
  }

  body.woocommerce-account .moon-account-dashboard,
  body.woocommerce-account .moon-account-panel,
  body.woocommerce-account .moon-account-welcome,
  body.woocommerce-account .moon-account-completion {
    width:100% !important;
    max-width:none !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-cart table.shop_table.cart tr.cart_item {
    margin-left:0 !important;
    margin-right:0 !important;
  }

  body.woocommerce-checkout form.checkout,
  body.woocommerce-checkout #customer_details,
  body.woocommerce-checkout #order_review_heading,
  body.woocommerce-checkout #order_review {
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
}

/* Điện thoại rất hẹp: chỉ giữ đệm an toàn 3px để không chạm mép màn hình. */
@media (max-width:390px) {
  body.woocommerce-cart .moon-content-card,
  body.woocommerce-checkout .moon-content-card,
  body.woocommerce-account .moon-account-wrap {
    padding-left:3px !important;
    padding-right:3px !important;
  }
}



/* ==========================================================================
   2.3.58 — Layout override theo đúng wrapper của các trang shortcode
   Cart / Checkout / My Account thực tế được bọc bởi:
   article.moon-content-card.moon-prose > .woocommerce
   ========================================================================== */

/* Gỡ giới hạn 760px của .moon-prose cho ba trang WooCommerce. */
body.woocommerce-cart .moon-main > .moon-container,
body.woocommerce-checkout .moon-main > .moon-container,
body.woocommerce-account .moon-main > .moon-container {
  width:calc(100% - 24px) !important;
  max-width:1560px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
  box-sizing:border-box !important;
}

body.woocommerce-cart article.moon-content-card.moon-prose,
body.woocommerce-checkout article.moon-content-card.moon-prose,
body.woocommerce-account article.moon-content-card.moon-prose {
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  box-sizing:border-box !important;
  overflow:visible !important;
}

body.woocommerce-cart article.moon-content-card.moon-prose > *,
body.woocommerce-checkout article.moon-content-card.moon-prose > *,
body.woocommerce-account article.moon-content-card.moon-prose > * {
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}

body.woocommerce-cart article.moon-content-card.moon-prose > .moon-page-header,
body.woocommerce-checkout article.moon-content-card.moon-prose > .moon-page-header,
body.woocommerce-account article.moon-content-card.moon-prose > .moon-page-header {
  margin:0 0 24px !important;
}

/* --------------------------------------------------------------------------
   DESKTOP / WEB — ảnh 1, 2 và 3
   -------------------------------------------------------------------------- */
@media (min-width:1024px) {
  body.woocommerce-cart .moon-main,
  body.woocommerce-checkout .moon-main,
  body.woocommerce-account .moon-main {
    padding:12px 0 54px !important;
  }

  body.woocommerce-cart article.moon-content-card.moon-prose,
  body.woocommerce-checkout article.moon-content-card.moon-prose,
  body.woocommerce-account article.moon-content-card.moon-prose {
    padding:24px 26px 34px !important;
  }

  /* ----- Giỏ hàng: hai block tách biệt, kéo sát hai phía ----- */
  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(350px,390px) !important;
    grid-auto-flow:row !important;
    gap:30px !important;
    align-items:start !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
  }

  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce > .woocommerce-notices-wrapper,
  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce > .woocommerce-message,
  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce > .woocommerce-info,
  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce > .woocommerce-error {
    grid-column:1 / -1 !important;
  }

  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce > form.woocommerce-cart-form {
    grid-column:1 !important;
    grid-row:auto !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
    align-self:start !important;
  }

  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce > .cart-collaterals {
    grid-column:2 !important;
    grid-row:auto !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
    position:relative !important;
    align-self:start !important;
  }

  body.woocommerce-cart table.shop_table.cart {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    table-layout:fixed !important;
    margin:0 !important;
  }

  body.woocommerce-cart table.shop_table.cart th,
  body.woocommerce-cart table.shop_table.cart td {
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
    box-sizing:border-box !important;
    vertical-align:middle !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-remove {
    width:38px !important;
    min-width:38px !important;
    padding-left:5px !important;
    padding-right:5px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-thumbnail {
    width:102px !important;
    min-width:102px !important;
    padding-left:7px !important;
    padding-right:10px !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-thumbnail img {
    display:block !important;
    width:78px !important;
    height:78px !important;
    max-width:78px !important;
    margin:0 auto !important;
    object-fit:contain !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-name {
    width:auto !important;
    min-width:260px !important;
    padding-left:10px !important;
    padding-right:14px !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    hyphens:none !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-name,
  body.woocommerce-cart table.shop_table.cart td.product-name a,
  body.woocommerce-cart table.shop_table.cart td.product-name dl,
  body.woocommerce-cart table.shop_table.cart td.product-name dt,
  body.woocommerce-cart table.shop_table.cart td.product-name dd {
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
  }

  body.woocommerce-cart table.shop_table.cart td.product-name a {
    display:block !important;
    width:auto !important;
    max-width:none !important;
    font-size:14px !important;
    line-height:1.45 !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-price {
    width:100px !important;
    min-width:100px !important;
    white-space:nowrap !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-quantity {
    width:108px !important;
    min-width:108px !important;
    text-align:center !important;
  }

  body.woocommerce-cart table.shop_table.cart .product-subtotal {
    width:116px !important;
    min-width:116px !important;
    white-space:nowrap !important;
    text-align:right !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals {
    position:sticky !important;
    top:112px !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
    box-sizing:border-box !important;
  }

  /* ----- Checkout: form trái rộng, đơn hàng phải; không còn bó giữa ----- */
  body.woocommerce-checkout article.moon-content-card.moon-prose > .woocommerce {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
  }

  body.woocommerce-checkout form.checkout {
    display:grid !important;
    grid-template-columns:minmax(540px,1.12fr) minmax(500px,.88fr) !important;
    grid-template-rows:auto 1fr !important;
    column-gap:30px !important;
    row-gap:10px !important;
    align-items:start !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
  }

  body.woocommerce-checkout form.checkout #customer_details {
    grid-column:1 !important;
    grid-row:1 / span 2 !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
  }

  body.woocommerce-checkout form.checkout #order_review_heading {
    grid-column:2 !important;
    grid-row:1 !important;
    width:100% !important;
    max-width:none !important;
    margin:0 0 4px !important;
    padding:0 2px !important;
  }

  body.woocommerce-checkout form.checkout #order_review {
    grid-column:2 !important;
    grid-row:2 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-checkout #customer_details > .col-1,
  body.woocommerce-checkout #customer_details > .col-2,
  body.woocommerce-checkout #customer_details .woocommerce-billing-fields,
  body.woocommerce-checkout #customer_details .woocommerce-shipping-fields,
  body.woocommerce-checkout #customer_details .woocommerce-additional-fields {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    float:none !important;
    box-sizing:border-box !important;
  }

  /* ----- Tài khoản desktop: menu trái, chi tiết phải ----- */
  body.woocommerce-account article.moon-content-card.moon-prose > .woocommerce {
    display:grid !important;
    grid-template-columns:300px minmax(0,1fr) !important;
    grid-template-areas:"moon-account-menu moon-account-content" !important;
    gap:26px !important;
    align-items:start !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
  }

  body.woocommerce-account article.moon-content-card.moon-prose > .woocommerce > .woocommerce-MyAccount-navigation {
    grid-area:moon-account-menu !important;
    grid-column:1 !important;
    position:sticky !important;
    top:112px !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    float:none !important;
    align-self:start !important;
  }

  body.woocommerce-account article.moon-content-card.moon-prose > .woocommerce > .woocommerce-MyAccount-content {
    grid-area:moon-account-content !important;
    grid-column:2 !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    float:none !important;
    align-self:start !important;
  }

  body.woocommerce-account .moon-account-dashboard,
  body.woocommerce-account .moon-account-dashboard > *,
  body.woocommerce-account .woocommerce-MyAccount-content > * {
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
  }
}

/* Desktop hẹp/laptop: không ép hai cột nếu thiếu chiều ngang. */
@media (min-width:783px) and (max-width:1100px) {
  body.woocommerce-cart article.moon-content-card.moon-prose > .woocommerce {
    grid-template-columns:minmax(0,1fr) 330px !important;
    gap:20px !important;
  }

  body.woocommerce-checkout form.checkout {
    grid-template-columns:minmax(440px,1fr) minmax(390px,.9fr) !important;
    gap:22px !important;
  }

  body.woocommerce-account article.moon-content-card.moon-prose > .woocommerce {
    grid-template-columns:260px minmax(0,1fr) !important;
    gap:20px !important;
  }
}

/* --------------------------------------------------------------------------
   MOBILE — chỉ ảnh cuối: tài khoản full ngang, bỏ khoảng trắng trên và hai bên
   -------------------------------------------------------------------------- */
@media (max-width:782px) {
  body.woocommerce-account .moon-main {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 0 24px !important;
  }

  body.woocommerce-account .moon-main > .moon-container {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.woocommerce-account article.moon-content-card.moon-prose {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 4px 18px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    overflow:visible !important;
  }

  /* Ẩn tiêu đề lớn để menu tài khoản lên ngay sát dưới header. */
  body.woocommerce-account article.moon-content-card.moon-prose > .moon-page-header,
  body.woocommerce-account article.moon-content-card.moon-prose > h1.entry-title,
  body.woocommerce-account article.moon-content-card.moon-prose > h1 {
    display:none !important;
  }

  body.woocommerce-account article.moon-content-card.moon-prose > .woocommerce {
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.woocommerce-account article.moon-content-card.moon-prose > .woocommerce > .woocommerce-MyAccount-navigation,
  body.woocommerce-account article.moon-content-card.moon-prose > .woocommerce > .woocommerce-MyAccount-content {
    position:static !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
    float:none !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation.moon-account-nav {
    width:calc(100% + 8px) !important;
    max-width:none !important;
    margin:0 -4px 6px !important;
    border-radius:0 0 14px 14px !important;
  }

  body.woocommerce-account .moon-account-dashboard,
  body.woocommerce-account .moon-account-dashboard > *,
  body.woocommerce-account .woocommerce-MyAccount-content > * {
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
  }
}

/* Dòng chính sách Voucher Vườn Nhà Moon được JS 2.3.58 đánh dấu. */
body.woocommerce-checkout .moon-checkout-garden-policy-note {
  display:none !important;
}


/* ==========================================================================
   2.3.59 — chỉnh tiếp theo phản hồi mới
   - Cart: rút gọn tiêu đề cột tổng tiền sản phẩm + nới chỗ hiển thị.
   - Account desktop: ép bố cục menu trái / nội dung phải bằng class JS.
   - Account mobile: bỏ sạch mép trắng, nội dung tràn sát hai viền.
   ========================================================================== */

/* Cart desktop: cột subtotal rõ ràng hơn */
@media (min-width:1024px) {
  body.woocommerce-cart table.shop_table.cart th.product-subtotal,
  body.woocommerce-cart table.shop_table.cart td.product-subtotal {
    width:126px !important;
    min-width:126px !important;
    padding-left:8px !important;
    padding-right:8px !important;
    white-space:nowrap !important;
  }

  body.woocommerce-cart table.shop_table.cart th.product-subtotal {
    font-size:12px !important;
    letter-spacing:0 !important;
  }
}

/* Account layout desktop: dùng class do JS gắn, không phụ thuộc body class WooCommerce */
@media (min-width:1024px) {
  .woocommerce.moon-account-layout-ready {
    display:grid !important;
    grid-template-columns:420px minmax(0,1fr) !important;
    gap:28px !important;
    align-items:start !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
  }

  .woocommerce.moon-account-layout-ready > .woocommerce-MyAccount-navigation {
    grid-column:1 !important;
    grid-row:1 !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
    float:none !important;
    position:sticky !important;
    top:112px !important;
    align-self:start !important;
    justify-self:stretch !important;
  }

  .woocommerce.moon-account-layout-ready > .woocommerce-MyAccount-content {
    grid-column:2 !important;
    grid-row:1 !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    float:none !important;
    align-self:start !important;
    justify-self:stretch !important;
  }

  .woocommerce.moon-account-layout-ready > .woocommerce-MyAccount-content > *,
  .woocommerce.moon-account-layout-ready .moon-account-dashboard,
  .woocommerce.moon-account-layout-ready .moon-account-dashboard > * {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
  }

  .woocommerce.moon-account-layout-ready .moon-account-dashboard {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:16px !important;
  }

  .woocommerce.moon-account-layout-ready .moon-account-welcome,
  .woocommerce.moon-account-layout-ready .moon-account-completion,
  .woocommerce.moon-account-layout-ready .moon-account-panel,
  .woocommerce.moon-account-layout-ready .moon-account-loyalty {
    grid-column:1 !important;
  }

  .woocommerce.moon-account-layout-ready .moon-account-welcome {
    padding:22px 24px !important;
  }

  .woocommerce.moon-account-layout-ready .moon-account-nav,
  .woocommerce.moon-account-layout-ready .moon-account-nav * {
    box-sizing:border-box !important;
  }
}

/* Mobile account: tràn sát hai viền, bỏ sạch mép trắng và khoảng đệm thừa */
@media (max-width:782px) {
  body.moon-account-page-ready .moon-main,
  body.moon-account-page-ready .moon-main > .moon-container {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.moon-account-page-ready article.moon-content-card.moon-prose {
    width:100vw !important;
    max-width:none !important;
    margin:0 calc(50% - 50vw) !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    overflow:visible !important;
  }

  body.moon-account-page-ready article.moon-content-card.moon-prose > .woocommerce.moon-account-layout-ready,
  body.moon-account-page-ready article.moon-content-card.moon-prose > .woocommerce {
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.moon-account-page-ready .woocommerce-MyAccount-navigation.moon-account-nav {
    width:100vw !important;
    max-width:none !important;
    margin:0 calc(50% - 50vw) 8px !important;
    border-radius:0 0 14px 14px !important;
  }

  body.moon-account-page-ready .woocommerce-MyAccount-content {
    width:100vw !important;
    max-width:none !important;
    margin:0 calc(50% - 50vw) !important;
    padding:0 0 14px !important;
  }

  body.moon-account-page-ready .woocommerce-MyAccount-content > *,
  body.moon-account-page-ready .moon-account-dashboard,
  body.moon-account-page-ready .moon-account-dashboard > * {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
  }

  body.moon-account-page-ready .moon-account-dashboard {
    padding:0 0 8px !important;
    gap:10px !important;
  }

  body.moon-account-page-ready .moon-account-dashboard > section,
  body.moon-account-page-ready .moon-account-dashboard > div,
  body.moon-account-page-ready .moon-account-dashboard > article {
    border-radius:0 !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  body.moon-account-page-ready .moon-account-welcome,
  body.moon-account-page-ready .moon-account-completion,
  body.moon-account-page-ready .moon-account-panel,
  body.moon-account-page-ready .moon-account-loyalty {
    padding-left:14px !important;
    padding-right:14px !important;
  }

  /* block đầu tiên phải chạm hẳn hai cạnh */
  body.moon-account-page-ready .woocommerce-MyAccount-navigation.moon-account-nav .moon-account-profile,
  body.moon-account-page-ready .woocommerce-MyAccount-navigation.moon-account-nav .moon-account-menu {
    margin-left:0 !important;
    margin-right:0 !important;
  }
}


/* ==========================================================================
   2.3.60 — thêm ảnh SKU/thumbnail ở Chi tiết đơn hàng (My Account > View order)
   ========================================================================== */

body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-table--order-details {
  width:100% !important;
}

body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details th.product-name,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-table--order-details th.product-name,
body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details td.product-name,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-table--order-details td.product-name {
  width:auto !important;
}

body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details td.product-name,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-table--order-details td.product-name {
  vertical-align:middle !important;
}

body.woocommerce-account .moon-order-item-with-thumb {
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}

body.woocommerce-account .moon-order-item-with-thumb__thumb {
  flex:0 0 58px !important;
  width:58px !important;
  height:58px !important;
  min-width:58px !important;
  border-radius:10px !important;
  overflow:hidden !important;
  background:#fff !important;
  border:1px solid rgba(132, 93, 61, 0.14) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

body.woocommerce-account .moon-order-item-with-thumb__thumb img {
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}

body.woocommerce-account .moon-order-item-with-thumb__name {
  min-width:0 !important;
  flex:1 1 auto !important;
  display:block !important;
}

body.woocommerce-account .moon-order-item-with-thumb__name a,
body.woocommerce-account .moon-order-item-with-thumb__name .product-name,
body.woocommerce-account .moon-order-item-with-thumb__name {
  white-space:normal !important;
  word-break:break-word !important;
  line-height:1.45 !important;
}

@media (max-width:782px) {
  body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details th.product-name,
  body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details td.product-name {
    padding-left:12px !important;
    padding-right:8px !important;
  }

  body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details th.product-total,
  body.woocommerce-account .woocommerce-order-details .woocommerce-table--order-details td.product-total {
    padding-left:8px !important;
    padding-right:12px !important;
    white-space:nowrap !important;
  }

  body.woocommerce-account .moon-order-item-with-thumb {
    gap:10px !important;
    align-items:flex-start !important;
  }

  body.woocommerce-account .moon-order-item-with-thumb__thumb {
    flex:0 0 42px !important;
    width:42px !important;
    height:42px !important;
    min-width:42px !important;
    border-radius:8px !important;
  }

  body.woocommerce-account .moon-order-item-with-thumb__name {
    font-size:14px !important;
    line-height:1.4 !important;
  }
}

@media (min-width:783px) {
  body.woocommerce-account .moon-order-item-with-thumb__name {
    font-size:15px !important;
  }
}

/* Select2 keeps the native country/state selects accessible but hidden.
   Checkout field sizing must not turn those controls into 1440px layout boxes. */
.woocommerce-checkout #customer_details select.select2-hidden-accessible {
  position:absolute !important;
  width:1px !important;
  min-width:0 !important;
  max-width:none !important;
  height:1px !important;
  min-height:1px !important;
  margin:-1px !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
  clip:rect(0 0 0 0) !important;
  white-space:nowrap !important;
}
