/* =========================
   CHECKOUT / CART – SCOPED
   ========================= */
.cart-site {
  --c-text:#0b1a33;
  --c-muted:#6b7280;
  --c-primary:#0d3b8a;
  --c-primary-2:#082657;
  --c-border:#e5e7eb;
  --c-bg:#f7f8fb;
  --radius:12px;
  --shadow:0 8px 24px rgba(2,6,23,.06);
  color:var(--c-text);
  font-size:16px;
  line-height:1.6;
}

/* Container */
.cart-site .container{width:min(1200px,92vw);margin:0 auto;padding:20px 12px}

/* Breadcrumb */
.cart-site .breadcrumb{margin:6px 0 18px}
.cart-site .breadcrumb__list{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:14px}
.cart-site .breadcrumb__item{color:var(--c-muted);text-decoration:none}
.cart-site .breadcrumb__item:hover{color:var(--c-primary)}
.cart-site .breadcrumb__home{display:inline-flex;gap:6px;align-items:center}
.cart-site .breadcrumb__sep{color:#c4c7cf}

/* Headings */
.cart-site .heading{font-size:20px;font-weight:700;margin:8px 0 14px;color:var(--c-primary-2)}

/* Layout: 2 cột */
.cart-site .checkout-content{display:grid;gap:24px;grid-template-columns:7fr 5fr}
@media (max-width:960px){.cart-site .checkout-content{grid-template-columns:1fr}}

/* Card / Widget khối phải */
.cart-site .checkout-content__widget{background:#fff;border:1px solid var(--c-border);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}
.cart-site .checkout-content__widget--coupon_desc{margin-top:18px}

/* ===== Form bên trái ===== */
.cart-site .checkout-content__form{background:#fff;border:1px solid var(--c-border);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}
.cart-site .checkout-form__payment{margin-top:8px}
.cart-site .checkout-form__info{display:grid;gap:14px}
.cart-site .form__inner{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width:640px){.cart-site .form__inner{grid-template-columns:1fr}}

/* Nhóm địa chỉ */
.cart-site .form-address{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
@media (max-width:860px){.cart-site .form-address{grid-template-columns:1fr}}

/* ========== CONTROL CHUNG (bắt cả trường không có .form__field) ========== */
.cart-site input[type="text"],
.cart-site input[type="email"],
.cart-site input[type="tel"],
.cart-site textarea,
.cart-site select,
.cart-site .form__control{
  width:100%;
  border:1px solid var(--c-border);
  border-radius:10px;
  height:48px;
  line-height:normal;
  padding:12px 16px;
  background:#fff;
  color:var(--c-text);
  transition:border-color .2s, box-shadow .2s, background-color .2s;
  -webkit-appearance:none;
  appearance:none;
  display:block;
  box-sizing:border-box;
  background-clip:padding-box;
  font:inherit;
}
.cart-site textarea{height:auto;min-height:110px;line-height:1.5}
.cart-site input::placeholder,
.cart-site textarea::placeholder{color:#a0a6b2}

/* Mũi tên cho select */
.cart-site select{
  background-image:
    linear-gradient(45deg, transparent 50%, #9aa0a6 50%),
    linear-gradient(135deg, #9aa0a6 50%, transparent 50%),
    linear-gradient(to right, #d1d5db, #d1d5db);
  background-position:
    right 18px center,
    right 12px center,
    right 44px center;
  background-size:5px 5px, 5px 5px, 1px 1.6em;
  background-repeat:no-repeat;
  padding-right:3rem;
}

/* Focus */
.cart-site input:focus,
.cart-site textarea:focus,
.cart-site select:focus{
  outline:none;border-color:var(--c-primary);box-shadow:0 0 0 3px rgba(13,59,138,.1)
}

/* Field wrapper (nếu có) */
.cart-site .form__field{width:100%}

/* Trợ giúp */
.cart-site .help-text{display:block;margin-top:6px;font-size:12px;color:var(--c-muted)}

/* ===== Phương thức thanh toán (radio) ===== */
.cart-site .payment-method{display:grid;gap:10px}
.cart-site .payment-method .field{
  position:relative;display:flex;align-items:center;gap:12px;
  border:1px solid var(--c-border);border-radius:10px;padding:12px 14px;
  cursor:pointer;transition:border-color .2s,background-color .2s
}
.cart-site .payment-method .field:hover{border-color:#cfd3db;background:#fafbff}
.cart-site .payment-method .field input[type="radio"]{position:absolute;inset:0;opacity:0;cursor:pointer}
.cart-site .payment-method .checkmark{width:18px;height:18px;border:2px solid #cbd5e1;border-radius:50%;display:inline-block;flex-shrink:0;position:relative;transition:border-color .2s,background .2s}
.cart-site .payment-method .field input[type="radio"]:checked ~ .checkmark{border-color:var(--c-primary)}
.cart-site .payment-method .checkmark::after{content:"";position:absolute;inset:3px;border-radius:50%;background:transparent;transition:background .2s}
.cart-site .payment-method .field input[type="radio"]:checked ~ .checkmark::after{background:var(--c-primary)}
.cart-site .payment-method .checkmark-border{display:none}
.cart-site .payment-method .content{display:flex;align-items:center;gap:12px}

/* >>> FIX kích thước icon/ảnh trong ô thanh toán (SỬA SELECTOR) <<< */
.cart-site .payment-method .icon img,
.cart-site .payment-method .icon svg,
.cart-site .payment-method .content img,
.cart-site .payment-method .content svg{
  width:48px;height:48px;max-width:100%;object-fit:contain;flex-shrink:0
}
/* Nếu riêng phần .icon cần giữ rule riêng */
.cart-site .payment-method .icon img{width:48px;height:48px;object-fit:contain}
@media (max-width:640px){
  .cart-site .payment-method .icon img,
  .cart-site .payment-method .icon svg,
  .cart-site .payment-method .content img,
  .cart-site .payment-method .content svg{width:40px;height:40px}
}

/* ===== Nút ===== */
.cart-site .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:10px;padding:12px 16px;text-decoration:none;cursor:pointer;border:1px solid transparent;transition:transform .05s ease,background-color .2s,border-color .2s,color .2s;user-select:none}
.cart-site .btn:active{transform:translateY(1px)}
.cart-site .btn--primary{background:var(--c-primary);color:#fff;border-color:var(--c-primary)}
.cart-site .btn--primary:hover{background:var(--c-primary-2);border-color:var(--c-primary-2)}
.cart-site .btn--back{background:#fff;color:var(--c-primary);border-color:var(--c-border)}
.cart-site .btn--back:hover{border-color:#cfd3db;color:var(--c-primary-2)}

/* ===== Khối giỏ hàng bên phải ===== */
.cart-site .cart-list{display:grid;gap:14px;margin-top:6px}

/* Thông báo */
.cart-site .msgOrder{margin:6px 0 10px}
.cart-site .msgOrder_item{font-size:14px;color:#164e63;background:#ecfeff;border:1px solid #bae6fd;border-radius:10px;padding:10px 12px}

/* Item */
.cart-site .cart-item{display:grid;grid-template-columns:84px 1fr;gap:14px;border:1px solid var(--c-border);border-radius:12px;background:#fff;padding:12px}
.cart-site .cart-item .thumbnail{width:84px;height:84px;overflow:hidden;border-radius:10px;background:#f3f4f6}
.cart-site .cart-item .thumbnail img{width:100%;height:100%;object-fit:cover}
.cart-site .cart-item .content{display:grid;gap:8px}
.cart-site .cart-item .top .title a{color:var(--c-text);font-weight:600;text-decoration:none}
.cart-site .cart-item .top .title a:hover{color:var(--c-primary)}
.cart-site .cart-item .bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}

/* Số lượng */
.cart-site .quantity{display:inline-flex;align-items:center;border:1px solid var(--c-border);border-radius:10px;overflow:hidden}
.cart-site .quantity a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;text-decoration:none;color:var(--c-text);background:#f9fafb}
.cart-site .quantity a:hover{background:#eef2ff}
.cart-site .quantity input{width:56px;height:36px;border:0;outline:0;text-align:center;background:#fff;color:var(--c-text);font-weight:600;font-size:15px}

/* Giá */
.cart-site .prices{display:flex;align-items:baseline;gap:8px}
.cart-site .prices del{color:#9ca3af;font-size:14px}
.cart-site .prices ins{color:#0b1a33;text-decoration:none;font-weight:700}

/* Xóa */
.cart-site .remove{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:#ef4444;cursor:pointer}
.cart-site .remove:hover{color:#b91c1c}

/* Điều hướng dưới giỏ */
.cart-site .cart-actions{margin-top:14px;display:flex;justify-content:flex-start}

/* Bảng tổng tiền */
.cart-site .checkout-prices{display:grid;gap:8px;margin-top:8px}
.cart-site .checkout-prices .item{display:flex;justify-content:space-between;align-items:center;border-bottom:1px dashed var(--c-border);padding:8px 0;color:var(--c-text)}
.cart-site .checkout-prices .label{color:var(--c-muted)}
.cart-site .checkout-prices .price{font-weight:600}
.cart-site .checkout-prices .total-price{display:flex;justify-content:space-between;align-items:center;font-size:18px;font-weight:800;padding-top:10px;margin-top:4px}

/* Link trong khối */
.cart-site a{color:var(--c-primary)}
.cart-site a:hover{color:var(--c-primary-2)}

/* Utility */
.cart-site .one-whole{width:100%}
@media (max-width:640px){.cart-site .mobile--one-whole{width:100%}}

/* Form: trạng thái lỗi */
.cart-site .form__field.is-error .form__control{border-color:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.12)}
.cart-site .form__field.is-error .help-text{color:#dc2626}

/* Focus rõ ràng cho bàn phím */
.cart-site .btn:focus,
.cart-site .remove:focus,
.cart-site .payment-method .field:focus-within{
  outline:none;box-shadow:0 0 0 3px rgba(13,59,138,.18);border-color:var(--c-primary)
}

/* WebKit cũ */
@supports (-webkit-appearance:none){
  .cart-site select{line-height:1.2}
}
