/* #414 trang giỏ /dat-hang - giao diện mới (custom/giohang_moi.php). Biến màu/bo góc lấy từ ui2.css. */
.hv-cart{padding:8px 0 32px;color:var(--hv-text)}
.hv-cart .hv-card{border:1px solid var(--hv-line-soft)}
.hv-cart__head{display:flex;align-items:center;gap:10px;margin:4px 0 12px}
.hv-cart__title{margin:0;font-size:22px;font-weight:700;color:var(--hv-ink)}
.hv-cart__badge{padding:3px 10px;border-radius:999px;background:var(--hv-red-soft);color:var(--hv-red);font-size:var(--hv-fs-sm);font-weight:600}
.hv-cart__steps{display:flex;gap:6px;margin:0 0 16px;padding:0;list-style:none;font-size:var(--hv-fs-sm);color:var(--hv-muted);flex-wrap:wrap}
.hv-cart__steps li{display:flex;align-items:center;gap:6px}
.hv-cart__steps li+li:before{content:"";width:24px;height:1px;background:var(--hv-dot);margin-right:2px}
.hv-cart__steps span{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--hv-white);border:1px solid var(--hv-dot);font-weight:600}
.hv-cart__steps .is-done span{background:var(--hv-ink);border-color:var(--hv-ink);color:#fff}
.hv-cart__steps .is-on{color:var(--hv-ink);font-weight:600}
.hv-cart__steps .is-on span{background:var(--hv-red);border-color:var(--hv-red);color:#fff}

.hv-cart__grid{display:grid;gap:var(--hv-gap-lg);align-items:start}
@media (min-width:992px){.hv-cart__grid{grid-template-columns:minmax(0,1fr) 340px}.hv-cart__side{position:sticky;top:calc(var(--hv-header-h) + 16px)}}
.hv-cart__main{display:grid;gap:var(--hv-gap-lg);min-width:0}
.hv-cart__h2{margin:0 0 14px;font-size:var(--hv-fs-title);font-weight:700;color:var(--hv-ink)}

/* danh sách */
.hv-cart__bar{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--hv-line-soft);font-size:15px;color:var(--hv-ink)}
.hv-cart__clear{border:0;background:none;color:var(--hv-muted);font-size:var(--hv-fs-sm);padding:4px 0;cursor:pointer}
.hv-cart__clear:hover{color:var(--hv-red)}
.hv-ci-list{list-style:none;margin:0;padding:0}
.hv-ci{display:grid;grid-template-columns:80px minmax(0,1fr) auto auto;grid-template-areas:"img info qty del";gap:8px 14px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--hv-line-soft)}
[data-mode=gia] .hv-ci{grid-template-columns:80px minmax(0,1fr) auto 120px auto;grid-template-areas:"img info qty sum del"}
.hv-ci__img{grid-area:img;display:block;width:80px;height:80px;border:1px solid var(--hv-line-soft);border-radius:var(--hv-radius-sm);overflow:hidden;background:#fff}
.hv-ci__img img{width:100%;height:100%;object-fit:contain}
.hv-ci__info{grid-area:info;display:flex;flex-direction:column;gap:3px;min-width:0}
.hv-ci__name{color:var(--hv-ink);font-weight:500;line-height:1.35;text-decoration:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hv-ci__name:hover{color:var(--hv-red)}
.hv-ci__sku{font-size:var(--hv-fs-sm);color:var(--hv-muted)}
.hv-ci__price{font-weight:600;color:var(--hv-red)}
.hv-ci__price.is-contact{color:var(--hv-muted);font-weight:500}
.hv-ci__qty{grid-area:qty;display:inline-flex;align-items:center;border:1px solid var(--hv-line);border-radius:999px;overflow:hidden;background:#fff}
.hv-qty__btn{width:34px;height:34px;border:0;background:none;font-size:18px;line-height:1;color:var(--hv-ink);cursor:pointer}
.hv-qty__btn:hover{background:var(--hv-bg)}
.hv-qty__in{width:46px;height:34px;border:0;text-align:center;font-weight:600;color:var(--hv-ink);-moz-appearance:textfield;appearance:textfield;background:transparent}
.hv-qty__in::-webkit-outer-spin-button,.hv-qty__in::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.hv-qty__in:focus{outline:2px solid var(--hv-focus)}
.hv-ci__sum{grid-area:sum;text-align:right;font-weight:700;color:var(--hv-ink)}
.hv-ci__del{grid-area:del;display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:50%;background:none;color:var(--hv-muted);cursor:pointer}
.hv-ci__del:hover{background:var(--hv-red-soft);color:var(--hv-red)}
.hv-cart__more{display:inline-block;padding:12px 16px;color:var(--hv-link);text-decoration:none;font-size:var(--hv-fs)}
.hv-cart__more:hover{text-decoration:underline}

/* biểu mẫu */
.hv-cart__form{padding:16px}
.hv-cart__form .hv-consent{margin:14px 0 0;font-size:var(--hv-fs-sm)}
.hv-cart__msg{margin:12px 0 0;font-size:var(--hv-fs);min-height:0}
.hv-cart__msg:empty{display:none}
.hv-cart__msg.is-bad{color:var(--hv-red)}
.hv-cart__msg.is-ok{color:#1a7f37}
.hv-cart__form .hv-cart__send{margin-top:14px;min-width:220px;min-height:44px;font-size:15px}
.hv-btn.is-loading{opacity:.7;pointer-events:none}

/* tóm tắt */
.hv-cart__sum{padding:16px}
.hv-cart__sum dl{margin:0 0 12px}
.hv-cart__sum dl>div{display:flex;justify-content:space-between;gap:10px;padding:7px 0;font-size:var(--hv-fs)}
.hv-cart__sum dt{font-weight:400;color:var(--hv-muted)}
.hv-cart__sum dd{margin:0;font-weight:600;color:var(--hv-ink);text-align:right}
.hv-cart__total{border-top:1px dashed var(--hv-line);margin-top:4px;padding-top:12px!important}
.hv-cart__total dd{font-size:20px;color:var(--hv-red)}
.hv-cart__note{margin:0 0 12px;font-size:var(--hv-fs-sm);color:var(--hv-muted)}
.hv-cart__sum .hv-cart__send{width:100%;min-height:46px;font-size:16px;font-weight:600}
.hv-cart__perks{list-style:none;margin:14px 0 0;padding:12px 0 0;border-top:1px solid var(--hv-line-soft);font-size:var(--hv-fs-sm);color:var(--hv-text)}
.hv-cart__perks li{position:relative;padding:4px 0 4px 24px}
.hv-cart__perks li:before{content:"";position:absolute;left:2px;top:8px;width:12px;height:7px;border-left:2px solid #1a7f37;border-bottom:2px solid #1a7f37;transform:rotate(-45deg)}
.hv-cart__hot{display:block;margin-top:12px;padding:10px;border-radius:var(--hv-radius-sm);background:var(--hv-bg);text-align:center;color:var(--hv-ink);text-decoration:none;font-size:var(--hv-fs)}
.hv-cart__hot b{color:var(--hv-red)}

/* trống / đã gửi */
.hv-cart__empty,.hv-cart__done{display:none;padding:40px 16px;text-align:center}
.hv-cart__empty svg{color:var(--hv-dot)}
.hv-cart__empty-t{margin:12px 0 6px;font-size:18px;font-weight:600;color:var(--hv-ink)}
.hv-cart__empty-s{margin:0 auto 18px;max-width:520px;color:var(--hv-muted)}
.hv-cart__empty-s a{color:var(--hv-link)}
.hv-cart__done-i{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#e8f5ec;color:#1a7f37}
.hv-cart.is-empty .hv-cart__empty{display:block}
.hv-cart.is-empty .hv-cart__grid,.hv-cart.is-empty .hv-cart__steps,.hv-cart.is-empty .hv-cart__dock,.hv-cart.is-empty .hv-cart__badge{display:none}
.hv-cart.is-sent .hv-cart__done{display:block}
.hv-cart.is-sent .hv-cart__empty{display:none}

/* thanh dưới (điện thoại) */
.hv-cart__dock{display:none}
@media (max-width:991.98px){
	.hv-cart__dock{position:fixed;left:0;right:0;bottom:0;z-index:1030;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -4px 16px rgba(0,0,0,.08)}
	.hv-cart__dock small{display:block;font-size:12px;color:var(--hv-muted)}
	.hv-cart__dock b{font-size:16px;color:var(--hv-red)}
	.hv-cart__dock .hv-btn{min-height:44px;padding:0 22px;font-size:15px;font-weight:600}
	.hv-cart{padding-bottom:84px}
	.hv-cart__sum .hv-cart__send{display:none}
}
@media (max-width:575.98px){
	.hv-cart__title{font-size:19px}
	.hv-cart__steps li+li:before{width:10px}
	.hv-ci,[data-mode=gia] .hv-ci{grid-template-columns:64px minmax(0,1fr) auto;grid-template-areas:"img info del" "img qty sum";padding:12px}
	.hv-ci__img{width:64px;height:64px}
	.hv-ci__qty{justify-self:start}
	.hv-ci__sum{grid-column:3}
	.hv-ci__del{align-self:start}
	.hv-cart__form .hv-cart__send{width:100%}
}
