/* ==========================================================
   Trang "Giỏ hàng" (WooCommerce page id 7, slug `cart`) - override
   woocommerce/cart/cart.php + cart-totals.php + proceed-to-checkout-button.php +
   cart-empty.php (xem docs/ke-hoach-chuyen-wordpress.md Phase 7).

   Tái dùng ĐÚNG tỷ lệ/màu đã xác nhận từ thanh-toan.html (`.checkout-col-left`/
   `.checkout-col-right` - 732px/708px, nền `--romar-teal-pale`), NHƯNG bảng
   sản phẩm bên trong giữ NGUYÊN cấu trúc <table> chuẩn Woo (không dựng lại
   thành thẻ tròn tự chế của thanh-toan.js) - trang "Giỏ hàng" độc lập chưa có
   tham chiếu Figma riêng, xem comment đầu woocommerce/cart/cart.php.
   Dùng lại --romar-teal-dark/--romar-teal/--romar-teal-pale/--romar-bg-soft
   đã có sẵn trong style.css :root.
   ========================================================== */

.romar-cart-page{
  min-height:calc(100vh - 108px);
}

/* ---------- Bố cục 2 cột (full-bleed, không container-xl - cùng tiền lệ
   .checkout-layout) ---------- */
.romar-cart-layout{
  display:flex;
  align-items:flex-start;
  flex-wrap:wrap;
}
.romar-cart-col{ box-sizing:border-box; }
.romar-cart-col-left{
  width:50.83%; /* 732/1440 - tính theo % để 2 cột không rớt dòng khi có thanh cuộn */
  max-width:100%;
  padding:80px 40px 80px 120px;
  background:#FFFFFF;
}
.romar-cart-col-right{
  width:49.17%; /* 708/1440 */
  max-width:100%;
  min-height:100%;
  background:var(--romar-teal-pale);
  padding:80px 120px 80px 40px;
}
.romar-cart-col-right-inner{ width:100%; max-width:566px; }

@media (max-width:1439.98px){
  .romar-cart-col-left, .romar-cart-col-right{ width:100%; padding:48px 24px; }
  .romar-cart-col-right-inner{ max-width:566px; margin:0 auto; }
}

.romar-cart-title{
  margin:0 0 32px;
  font-family:'Anuphan', sans-serif;
  font-weight:700;
  font-size:36px;
  color:var(--romar-teal-dark);
}

/* ---------- Bảng sản phẩm (giữ nguyên <table> chuẩn Woo, chỉ restyle) ---------- */
.romar-cart-table{
  width:100%;
  border-collapse:collapse;
  font-family:'Anuphan', sans-serif;
}
.romar-cart-table thead th{
  text-align:left;
  padding:0 8px 16px;
  border-bottom:1px solid var(--romar-teal-pale);
  font-weight:600;
  font-size:14px;
  color:var(--romar-teal-dark);
  text-transform:uppercase;
}
.romar-cart-table thead th.product-remove,
.romar-cart-table thead th.product-thumbnail{ width:1%; }
.romar-cart-table tbody td{
  padding:20px 8px;
  border-bottom:1px solid #EFEFEF;
  vertical-align:middle;
  font-size:16px;
  color:#1a1a1a;
}
.romar-cart-table .product-remove a.remove{
  display:flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:50%;
  background:#F2F2F2;
  color:var(--romar-teal-dark) !important;
  font-size:18px;
  line-height:1;
  text-decoration:none !important;
}
.romar-cart-table .product-remove a.remove:hover{
  background:var(--romar-teal-dark);
  color:#FFFFFF !important;
}
.romar-cart-table .product-thumbnail img{
  width:72px;
  height:72px;
  border-radius:50%;
  object-fit:cover;
  background:#D9D9D9;
}
.romar-cart-table .product-name a{
  color:var(--romar-teal-dark);
  font-weight:600;
  text-decoration:none;
}
.romar-cart-table .product-name a:hover{ text-decoration:underline; }
.romar-cart-table .product-name dl.variation{ margin:6px 0 0; font-size:13px; color:#666; }
.romar-cart-table .product-price{ font-weight:600; white-space:nowrap; }
.romar-cart-table .product-subtotal{ font-weight:700; color:var(--romar-teal-dark); white-space:nowrap; }

/* Ô số lượng (woocommerce_quantity_input() mặc định - giữ nguyên input, chỉ
   restyle) - dùng lại quy ước "ẩn spinner number input" đã dùng ở pdp.css. */
.romar-cart-table .quantity{ display:inline-flex; }
.romar-cart-table .quantity .qty{
  width:64px;
  height:42px;
  border:1px solid var(--romar-teal-pale);
  border-radius:5px;
  text-align:center;
  font-family:'Anuphan', sans-serif;
  font-weight:600;
  font-size:16px;
  color:var(--romar-teal-dark);
}
.romar-cart-table .quantity .qty:focus{ outline:none; border-color:var(--romar-teal-dark); }
.romar-cart-table .quantity input[type="number"]::-webkit-inner-spin-button,
.romar-cart-table .quantity input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.romar-cart-table .quantity input[type="number"]{ -moz-appearance:textfield; }

/* Hàng "actions" (mã giảm giá + nút cập nhật giỏ hàng) */
.romar-cart-table .actions{ padding-top:28px; }
.romar-cart-table .coupon{
  display:inline-flex;
  gap:10px;
  margin-right:16px;
  margin-bottom:12px;
  vertical-align:middle;
}
.romar-cart-table .coupon .input-text{
  height:44px;
  border:1px solid var(--romar-teal-pale);
  border-radius:22px;
  padding:0 20px;
  font-family:'Anuphan', sans-serif;
  font-size:15px;
  color:var(--romar-teal-dark);
}
.romar-cart-table .coupon .input-text:focus{ outline:none; border-color:var(--romar-teal-dark); }
.romar-cart-table .actions .button{
  height:44px;
  padding:0 24px;
  border:none;
  border-radius:22px;
  background:var(--romar-teal);
  color:#FFFFFF;
  font-family:'Anuphan', sans-serif;
  font-weight:600;
  font-size:15px;
  cursor:pointer;
}
.romar-cart-table .actions .button:hover{ background:var(--romar-green-deep); }
.romar-cart-table .actions .button:disabled{ opacity:.5; cursor:default; }

/* ---------- Cột phải: "Tóm tắt đơn hàng" ---------- */
.romar-cart-collaterals{ font-family:'Anuphan', sans-serif; }
.woocommerce .romar-cart-collaterals .cart_totals{ float:none; width:100%; } /* bỏ float/48% mặc định của WooCommerce */
.romar-cart-totals-title{
  margin:0 0 24px;
  font-weight:700;
  font-size:28px;
  color:#FFFFFF;
}
.romar-cart-totals-table{
  width:100%;
  border-collapse:collapse;
}
.romar-cart-totals-table tr{ display:flex; justify-content:space-between; gap:16px; }
.romar-cart-totals-table th,
.romar-cart-totals-table td{
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.3);
  font-weight:400;
  font-size:18px;
  color:#FFFFFF;
  text-align:right;
}
.romar-cart-totals-table th{ text-align:left; font-weight:400; }
.romar-cart-totals-table tr.order-total th,
.romar-cart-totals-table tr.order-total td{
  border-bottom:none;
  font-weight:700;
  font-size:24px;
}
.romar-cart-totals-table .woocommerce-Price-amount{ color:inherit; }

.romar-cart-proceed{ margin-top:24px; }
/* !important cần thiết - class Woo core `.button.alt` (2 class, đặc hiệu cao
   hơn 1 class `.romar-cart-checkout-btn`) đặt `background` tím
   `var(--wc-primary,#720eec)` mặc định, không phải lỗi CSS của theme. */
.romar-cart-checkout-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:64px;
  border-radius:32px;
  background:var(--romar-teal-dark) !important;
  color:#FFFFFF !important;
  font-family:'Anuphan', sans-serif;
  font-weight:600;
  font-size:20px;
  text-decoration:none !important;
  box-sizing:border-box;
}
.romar-cart-checkout-btn:hover{ background:#08414c !important; }

/* Gợi ý cross-sell (rỗng trong phần lớn trường hợp demo hiện tại - chưa gán
   sản phẩm cross-sell nào, xem docs/ke-hoach-chuyen-wordpress.md) - restyle
   nhẹ cho khớp nền teal nếu sau này có dữ liệu, không viết lại markup/logic. */
.romar-cart-collaterals .cross-sells{ margin-bottom:32px; color:#FFFFFF; }
.romar-cart-collaterals .cross-sells h2{ font-size:22px; margin-bottom:16px; }
.romar-cart-collaterals .cross-sells ul.products{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  list-style:none;
  margin:0;
  padding:0;
}
.romar-cart-collaterals .cross-sells a{ color:#FFFFFF; }

/* ---------- Giỏ hàng rỗng ---------- */
.romar-cart-empty{
  max-width:600px;
  margin:80px auto;
  padding:0 24px;
  text-align:center;
  font-family:'Anuphan', sans-serif;
  color:var(--romar-teal-dark);
}
.romar-cart-empty p.cart-empty{
  font-size:20px;
  margin-bottom:24px;
}
.romar-cart-empty .return-to-shop{ margin-top:24px; }
.romar-cart-empty .romar-cart-checkout-btn{
  display:inline-flex;
  width:auto;
  padding:0 32px;
}
