/* Side cart: same cream/red palette as the storefront. */
.mfp-wrap:has(#cart-popup) .mfp-content {
  width: min(420px, 100%) !important;
  height: 100%;
  max-height: 100dvh;
  background: #fffaf1 !important;
  opacity: 1 !important;
  box-shadow: -12px 0 40px #38120b24;
}

.mfp-wrap #cart-popup {
  height: 100%;
  min-height: 100%;
  background: #fffaf1;
  color: #483426;
}

.mfp-wrap #cart-popup .cart-popup-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0 !important;
}

#cart-popup .cart-popup-title {
  flex: 0 0 auto;
  padding: 25px 60px 20px 24px;
  border-bottom: 1px solid #e9dbc1;
  text-align: left;
}

#cart-popup .cart-popup-title h4 {
  width: auto;
  margin: 0;
  color: #db070f;
  font-weight:700;
  font-size:27px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}

#cart-popup .cart-popup-title .is-divider {
  display: none;
}

#cart-popup .cart-popup-title::after {
  content: 'Kiểm tra sản phẩm trước khi thanh toán';
  display: block;
  margin-top: 7px;
  color: #8a715b;
  font-size: 12px;
  line-height: 1.5;
}

#cart-popup .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 20px 24px 24px;
  overflow: hidden;
}

#cart-popup .woocommerce-mini-cart {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0 3px 0 0;
  scrollbar-width: thin;
  scrollbar-color: #d2b98b #fffaf1;
}

#cart-popup .woocommerce-mini-cart>li {
  position: relative;
  min-height: 112px;
  margin: 0 0 12px;
  padding: 14px 39px 14px 94px;
  border: 1px solid #ecdfc8;
  border-radius: 11px;
  background: #fffdf8;
}

#cart-popup .woocommerce-mini-cart>li>a:not(.remove) {
  display: block;
  padding: 0;
  color: #442e22;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

#cart-popup .woocommerce-mini-cart>li img {
  position: absolute;
  top: 13px;
  left: 12px;
  width: 68px;
  max-width: 68px;
  height: 82px;
  margin: 0;
  padding: 0;
  border: 1px solid #f0e7d7;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
}

#cart-popup .woocommerce-mini-cart .quantity {
  display: block;
  margin-top: 8px;
  color: #95795f;
  font-size: 13px;
  font-weight: 400;
}

#cart-popup .woocommerce-mini-cart .quantity .amount {
  color: #db070f;
  font-size: 14px;
  font-weight: 700;
}

#cart-popup .woocommerce-mini-cart a.remove {
  position: absolute;
  top: 9px;
  right: 8px;
  left: auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #f6ecd9;
  color: #a37b5c !important;
  font-size: 20px;
  line-height: 1;
}

#cart-popup .woocommerce-mini-cart a.remove:hover {
  background: #db070f;
  color: #fff !important;
}

#cart-popup .woocommerce-mini-cart .variation {
  padding: 0;
  border: 0;
  font-size: 12px;
}

#cart-popup .woocommerce-mini-cart__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  margin: 6px 0 0;
  padding: 18px 0;
  border-top: 1px solid #e3d2b4;
  border-bottom: 0;
  text-align: left;
}

#cart-popup .woocommerce-mini-cart__total strong {
  color: #61462f;
  font-size: 14px;
  font-weight: 600;
}

#cart-popup .woocommerce-mini-cart__total .amount {
  color: #db070f;
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}

#cart-popup .woocommerce-mini-cart__buttons {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

#cart-popup .woocommerce-mini-cart__buttons a.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #ddc7a0;
  border-radius: 9px;
  background: #f8ecd4;
  color: #794326;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

#cart-popup .woocommerce-mini-cart__buttons a.checkout {
  border-color: #db070f;
  background: #db070f;
  color: #fff;
}

#cart-popup .woocommerce-mini-cart__buttons a:hover {
  filter: brightness(.96);
}

#cart-popup .woocommerce-mini-cart__buttons a::after {
  display: none;
}

#cart-popup .woocommerce-mini-cart__empty-message {
  margin: auto 0;
  padding: 60px 10px;
  color: #84674d;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}

#cart-popup .cart-sidebar-content:empty {
  display: none;
}

.mfp-wrap:has(#cart-popup) .mfp-close {
  top: 15px;
  right: 16px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1e3cc !important;
  color: #a52624 !important;
  mix-blend-mode: normal;
  opacity: 1;
}

body:has(.mfp-wrap #cart-popup) #arcontactus,
body:has(.mfp-wrap #cart-popup) .cpanel-action {
  visibility: hidden !important;
  pointer-events: none !important;
}

#cart-popup a:focus-visible {
  outline: 2px solid #b48b42;
  outline-offset: 3px;
}

@media(max-width:480px) {
  #cart-popup .cart-popup-title {
    padding-left: 18px
  }

  #cart-popup .widget_shopping_cart_content {
    padding: 16px 18px 20px
  }

  #cart-popup .woocommerce-mini-cart__total .amount {
    font-size: 20px
  }
}

#cart-popup .woocommerce-mini-cart__buttons a.checkout {
  background-color: #db070f !important;
  color: #fff !important;
}

#cart-popup .woocommerce-mini-cart .quantity {
  opacity: 1;
}