/* Empty cart state (cart page) */
.cart-page:has(.cart-empty-state) {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 1.5rem;
}

.cart-page .cart-empty-state {
  text-align: center;
  padding: 40px 16px 48px;
}

.cart-page .cart-empty-state .empty-icon {
  font-size: 44px;
  display: inline-flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff7f0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.cart-page .cart-empty-state .empty-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2a231d;
}

.cart-page .cart-empty-state .empty-sub {
  font-size: 13px;
  color: #7b6a59;
  margin-bottom: 18px;
}

.cart-page .cart-empty-state .btn-shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: #2f2b26;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.cart-page .cart-empty-state .btn-shop:hover {
  background: #26221e;
}


/* Trang giỏ hàng - theo file tham chiếu cart.html */
body.cart-page-body {
  background: #F5F0E8;
}

:root {
  --cream: #F5F0E8;
  --warm-white: #FDFAF4;
  --sand: #E8DDD0;
  --deep-sage: #3D5445;
  --warm-black: #1C1A17;
  --muted: #8A8070;
  --gold: #C9A96E;
  --danger: #C0392B;
  --cart-muted: #8A8070;
}

/* Breadcrumb */
/* Wrapper để breadcrumb cùng width với danh sách giỏ hàng */
.breadcrumb-wrap {
  margin: 0 auto;
  padding: 0 2rem;
}

.breadcrumb {
  padding: 1rem;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  background: var(--warm-white);
  border-bottom: 1px solid var(--sand);
  margin-top: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.breadcrumb::-webkit-scrollbar {
  display: none;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--terracotta);
}

.breadcrumb span {
  color: var(--warm-black);
}

.bc-sep {
  opacity: 0.4;
}

/* Mobile top bar (Shopee style) */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--terracotta);
  padding: 0 16px;
  height: 52px;
  align-items: center;
  gap: 12px;
}

.mob-back {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.mob-title {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

/* Layout chính */
.cart-page {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  column-gap: 10px;
  row-gap: 10px;
  align-items: start;
  padding: 0 2rem;
  margin-bottom: 2rem;
}

.cart-left {
  grid-column: 1;
  grid-row: 1;
}

.cart-page-summary {
  grid-column: 2;
  grid-row: 1 / -1;
}

.suggestion-section {
  margin-top: 12px;
}

.sugg-header {
  background: var(--warm-white);
  border: 1px solid var(--sand);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 14px 18px;
}

.sugg-title {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sugg-list {
  background: var(--warm-white);
  border: 1px solid var(--sand);
  border-top: 1px solid var(--sand);
  border-radius: 0 0 10px 10px;
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sugg-list::-webkit-scrollbar {
  display: none;
}

.sugg-card {
  flex: 0 0 140px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.sugg-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(135deg, #E8DDD0, #D4C4B0);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.sugg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sugg-name {
  font-size: 12px;
  line-height: 1.35;
  color: var(--warm-black);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(12px * 1.35 * 2);
}

.sugg-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--terracotta);
}

@media (max-width: 640px) {
  .sugg-header {
    padding: 12px 14px;
  }

  .sugg-list {
    padding: 14px;
  }

  .sugg-card {
    flex-basis: 120px;
  }
}

/* Nhóm shop */
.shop-group {
  background: var(--warm-white);
  border: 1px solid var(--sand);
  margin-bottom: 12px;
  overflow: hidden;
}

.shop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--sand);
  background: var(--cream);
}

.shop-icon {
  font-size: 16px;
}

.shop-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.shop-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--terracotta);
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Item giỏ hàng */
.cart-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sand);
  transition: background 0.2s;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item:hover {
  background: #FDFAF4;
}

.item-img {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--sand);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-attrs {
  display: block;
  margin-bottom: 6px;
}

/* Make variation attrs smaller than name but slightly prominent */
.item-attrs dt,
.item-attrs dd {
  font-weight: 600;
}

.item-attrs dt {
  color: #6b5b4a;
}

.item-attrs dd {
  color: #2a231d;
}

.item-attrs dl.variation {
  margin: 0;
}

.item-attrs dt,
.item-attrs dd {
  margin: 0;
  display: inline;
}

.item-attrs dd p {
  margin: 0;
}

.item-deposit-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--terracotta);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.item-promo-list {
  margin-top: 6px;
}

.item-promo-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 3px;
  font-size: 12px;
  color: #6b5b4a;
}

.item-promo-icon {
  flex-shrink: 0;
  line-height: 1.3;
}

.item-promo-text {
  line-height: 1.35;
}

.item-attr,
.item-attrs dt,
.item-attrs dd {
  font-size: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  letter-spacing: 0.02em;
}

.item-attrs {
  font-size: 12px;
  color: #8b6a4a;
  /* nâu sáng */
}

/* attrs are rendered as a single text line now */

.item-price-col {
  width: 140px;
  text-align: center;
  flex-shrink: 0;
}

.item-price-orig {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
  display: block;
}

.item-price {
  font-size: 16px;
  color: var(--terracotta);
  font-weight: 500;
  white-space: nowrap;
}

.item-qty-col {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--sand);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.qty-ctrl .qty-btn {
  width: 30px;
  height: 30px;
  background: var(--cream);
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--warm-black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qty-ctrl .qty-btn:hover {
  background: var(--sand);
}

.qty-ctrl .qty-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.qty-ctrl .qty-num {
  width: 36px;
  text-align: center;
  font-size: 14px;
  border: none;
  outline: none;
  font-family: inherit;
  background: #fff;
  color: var(--warm-black);
}

.item-del-col {
  width: 40px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.del-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  transition: color 0.2s;
  line-height: 1;
}

.del-btn:hover {
  color: var(--danger);
}

/* Nút xóa góc phải item (mobile) */
.item-trash {
  display: none;
  position: absolute;
  top: 10px;
  right: 5px;
  background: none;
  border: none;
  font-size: 17px;
  cursor: pointer;
  color: var(--danger);
  line-height: 1;
  padding: 2px;
  transition: transform 0.2s, color 0.2s;
  z-index: 2;
}

.item-trash:hover {
  transform: scale(1.15);
}

/* Block giá + số lượng mobile — chỉ hiện trên mobile */
.item-price-mobile {
  display: none;
}

/* Hàng mã giảm giá */
.promo-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 20px;
  background: var(--warm-white);
  border: 1px solid var(--sand);
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-bottom: 4px;
}

.summary-totals-wrap .summary-row .promo-form {
  padding: 6px 0;
}

.summary-totals-wrap .summary-row .promo-input {
  background: #fff;
}

.discount-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.amz-coupons.amz-coupons-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amz-coupon-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  background: #e8f4ff;
  border: 1px solid rgba(40, 120, 200, 0.16);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.03);
  max-width: 100%;
}

.amz-coupon-code {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a231d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.amz-coupon-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 36, 36, 0.22);
  background: #f7fbff;
  color: #f21c1c;
  font-size: 14px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}

.amz-coupon-remove:hover {
  transform: scale(1.05);
  background: #dff0ff;
  border-color: rgba(40, 120, 200, 0.35);
  color: #1e4f86;
}

.amz-coupon-remove:active {
  transform: scale(0.98);
}

.promo-icon-lbl {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  white-space: nowrap;
}

.promo-input {
  flex: 1;
  padding: 8px 16px;
  border: 1px solid var(--sand);
  border-radius: 3px 0 0 3px;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  background: var(--cream);
  letter-spacing: 0.04em;
  transition: border-color 0.2s;
}

.promo-input:focus {
  border-color: var(--terracotta);
}

.promo-apply {
  padding: 10px 18px;
  background: var(--warm-black);
  color: var(--cream);
  border: none;
  border-radius: 0 3px 3px 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
}

.promo-apply:hover {
  background: var(--terracotta);
}

/* Khối tóm tắt bên phải */
.cart-page-summary {
  position: sticky;
  top: 3.5rem;
  background: var(--warm-white);
  border: 1px solid var(--sand);
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}

.cart-page-summary .summary-head {
  background: var(--cream);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--sand);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 18px;
  font-weight: 400;
}

.cart-page-summary .summary-body {
  padding: 0.5rem 1rem;
}

.cart-page-summary .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--muted);
}

.cart-page-summary .summary-row.total {
  font-size: 15px;
  color: var(--warm-black);
  font-weight: 500;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--sand);
}

.cart-page-summary .summary-row .val {
  color: var(--warm-black);
}

.cart-page-summary .summary-row.total .val {
  font-size: 22px;
  color: var(--terracotta);
  font-weight: 600;
}

.cart-page-summary .summary-row .discount-val {
  color: var(--deep-sage);
}

.cart-page-summary .summary-row .free-ship {
  color: var(--deep-sage);
  font-size: 12px;
}

.cart-page-summary .summary-divider {
  height: 1px;
  background: var(--sand);
  margin: 14px 0;
}

/* Địa chỉ */
.addr-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px dashed var(--sand);
  cursor: pointer;
  transition: border-color 0.2s;
}

.addr-row:hover {
  border-color: var(--terracotta);
}

.addr-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.addr-text {
  flex: 1;
}

.addr-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
}

.addr-detail {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* --- Payment block (match design) --- */
.amz-pay-heading {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cart-muted);
  margin: 0 0 10px;
}

.payment-row {
  display: flex;
  gap: 8px;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.pay-opt {
  flex: 1;
  min-width: 88px;
  padding: 10px 8px;
  text-align: center;
  border: 1.5px solid var(--sand);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.2s;
  background: #fff;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.pay-opt .pay-icon {
  font-size: 18px;
  display: block;
  margin-bottom: 3px;
}

.pay-opt.active {
  border-color: var(--terracotta);
  background: #FFF3ED;
  color: var(--terracotta);
}

.pay-opt:hover:not(.active) {
  border-color: var(--muted);
  color: var(--warm-black);
}

.amz-deposit-cod-note {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid rgba(40, 120, 200, 0.18);
  background: #e8f4ff;
  padding: 12px 14px;
}

.amz-deposit-cod-note-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e4f86;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.amz-deposit-cod-note-desc {
  font-size: 12px;
  color: #2b6cb0;
  line-height: 1.5;
}

.vat-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 14px;
  cursor: pointer;
}

.vat-note input {
  accent-color: var(--terracotta);
  cursor: pointer;
}

/* Hide Woo default checkout review table + payment list (keep place order button working) */
.amz-cart-checkout #order_review .woocommerce-checkout-review-order-table,
.amz-cart-checkout #order_review table.shop_table {
  display: none !important;
}

.amz-cart-checkout #payment ul.payment_methods,
.amz-cart-checkout #payment .payment_box {
  display: none !important;
}

.amz-cart-checkout #payment .place-order {
  margin: 0;
  padding: 0;
}

/* Ensure Woo privacy policy text never shows on this template */
body.cart-page-body .woocommerce-privacy-policy-text,
body.cart-page-body .woocommerce-privacy-policy-link {
  display: none !important;
}

/* Nút đặt hàng (Woo button is filtered) */
.amz-cart-checkout button#place_order,
.amz-cart-checkout .button.alt,
.amz-cart-checkout button.button,
.amz-cart-checkout input#place_order {
  width: 100%;
  padding: 0.6rem;
  background: var(--terracotta) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
}

.amz-cart-checkout .checkout-icon {
  font-size: 18px;
  line-height: 1;
}

.amz-cart-checkout .checkout-text {
  line-height: 1;
}

.amz-cart-checkout button#place_order:hover,
.amz-cart-checkout .button.alt:hover,
.amz-cart-checkout button.button:hover,
.amz-cart-checkout input#place_order:hover {
  background: #A85D3A !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(196, 113, 74, 0.38);
}

/* Loading per cart item (when qty changes / remove) */
.cart-item.is-loading {
  pointer-events: none;
}

.cart-item.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: rgba(253, 250, 244, 0.65);
  z-index: 5;
}

.cart-item.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(28, 26, 23, 0.20);
  border-top-color: rgba(28, 26, 23, 0.70);
  animation: amzSpin 0.9s linear infinite;
  z-index: 6;
}

@keyframes amzSpin {
  to {
    transform: rotate(360deg);
  }
}

.summary-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 0.04em;
}

/* Mobile bottom bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1300;
  background: #fff;
  border-top: 1px solid var(--sand);
  padding: 6px 16px;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mbb-left {
  flex: 0 0 50%;
  width: 50%;
  display: flex;
  flex-direction: column;
}

.mbb-label {
  font-size: 11px;
  color: var(--muted);
}

.mbb-total {
  font-size: 20px;
  color: var(--terracotta);
  font-weight: 600;
}

.mbb-checkout {
  flex: 0 0 calc(50% - 10px);
  width: calc(50% - 10px);
  padding: 13px 16px;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  text-align: center;
}

.mbb-checkout:hover {
  background: #A85D3A;
}

/* Popup địa chỉ */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(28, 26, 23, 0.55);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup-overlay.open {
  display: flex;
}

.addr-popup {
  background: var(--warm-white);
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: cart-pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Deposit popup */
#amzDepositPopup .addr-popup {
  max-width: 560px;
}

.amz-deposit-popup-desc {
  font-size: 14px;
  color: #4b3a2b;
  line-height: 1.5;
}

.amz-deposit-popup-amount {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.amz-deposit-amount {
  font-size: 18px;
  color: #111;
}

.amz-deposit-qr,
.amz-deposit-bank {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.amz-deposit-qr-title,
.amz-deposit-bank-title {
  font-weight: 700;
  margin-bottom: 8px;
}

#amzDepositQrImg {
  max-width: 260px;
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  display: block;
}

.amz-deposit-bank-lines {
  white-space: pre-line;
  font-size: 14px;
  color: #2f2a25;
}

.amz-deposit-bank-note {
  margin-top: 8px;
  font-size: 13px;
  color: #8b6a4a;
  line-height: 1.45;
}

.amz-deposit-popup-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@keyframes cart-pop-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--sand);
}

.popup-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 400;
}

.popup-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.popup-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-label .amz-required {
  color: var(--terracotta);
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.2em;
  letter-spacing: 0;
  text-transform: none;
}

.form-input {
  padding: 10px 14px;
  border: 1.5px solid var(--sand);
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  color: var(--warm-black);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--terracotta);
}

.form-input.form-input--required {
  border-color: var(--terracotta);
}

.form-input.form-input--required:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 2px rgba(180, 93, 58, 0.18);
}

.popup-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 10px;
}

.btn-popup-cancel {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--sand);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--muted);
}

.btn-popup-save {
  flex: 2;
  padding: 12px;
  border: none;
  border-radius: 4px;
  background: var(--terracotta);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

#add_payment_method #payment,
.woocommerce-cart #payment,
.woocommerce-checkout #payment {
  background: transparent;
}

#add_payment_method #payment,
.woocommerce-cart #payment,
.woocommerce-checkout #payment .form-row {
  display: block !important;
  padding: 0.3rem 0 0 !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .cart-page {
    padding: 24px 1.5rem 80px;
    gap: 20px;
    grid-template-columns: 1fr 320px;
  }
}

@media (max-width: 768px) {
  body.cart-page-body #main-header {
    display: none;
  }

  .mobile-topbar {
    display: flex;
  }

  .breadcrumb {
    padding: 8px 1rem;
  }

  .breadcrumb-wrap {
    padding: 0;
    max-width: none;
  }

  .mobile-bottom-bar {
    display: flex;
  }

  .cart-page {
    grid-template-columns: 1fr;
    padding: 0 0 16px;
    gap: 8px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  #content-wrap {
    padding-top: 0 !important;
  }

  .cart-left {
    width: 100%;
  }

  .cart-page-summary {
    width: 100%;
  }

  .cart-page-summary {
    position: static;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0;
  }

  /* Mobile: address block is moved by JS (avoid display:contents layout issues) */
  .summary-addr-wrap {
    width: 100%;
    background: var(--warm-white);
    padding: 14px 16px;
    border-bottom: 8px solid var(--cream);
  }

  .summary-addr-wrap .addr-row {
    border: none;
    padding: 0;
    background: none;
    width: 100%;
  }

  .shop-group {
    border-left: none;
    border-right: none;
    border-radius: 0;
    margin-bottom: 8px;
  }

  .shop-row {
    padding: 10px 16px;
  }

  .cart-item {
    padding: 14px 16px;
    gap: 12px;
    align-items: flex-start;
  }

  .item-price-col,
  .item-qty-col,
  .item-del-col {
    display: none !important;
  }

  .item-trash {
    display: block;
  }

  .item-info {
    flex: 1;
    min-width: 0;
    width: 0;
    overflow: hidden;
    padding-right: 32px;
  }

  .item-price-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 8px;
  }

  .item-price-mobile .price {
    font-size: 16px;
    color: var(--terracotta);
    font-weight: 500;
    white-space: nowrap;
  }

  .item-price-mobile .orig {
    font-size: 11px;
    color: var(--muted);
    text-decoration: line-through;
    margin-left: 6px;
    white-space: nowrap;
  }

  .qty-ctrl {
    position: absolute;
    right: 10px;
    bottom: 10px;
  }

  .promo-row {
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 12px 16px;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 8px;
  }

  .promo-icon-lbl {
    width: 100%;
    margin-right: 0;
  }

  .cart-page-summary .summary-head {
    display: none;
  }

  /* Mobile: hide desktop place order button (use bottom bar instead) */
  .amz-cart-checkout #place_order,
  .amz-cart-checkout button#place_order,
  .amz-cart-checkout input#place_order,
  .amz-cart-checkout .btn-checkout {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .addr-popup {
    border-radius: 12px 12px 0 0;
    margin: auto 0 0;
  }

  .popup-overlay {
    align-items: flex-end;
    padding: 0;
  }
}