/* =========================================================
   Hẻm Camera — Cart & Checkout
   Brand: đỏ #cc0000 · Lexend · bo góc 8px
   Prefix: .hem-  (scoped, không đụng mini-cart & FAB)
   ========================================================= */
:root {
	--hem-red: #cc0000;
	--hem-red-dark: #a30000;
	--hem-radius: 8px;
	--hem-border: #e6e6e6;
	--hem-text: #1a1a1a;
	--hem-muted: #777;
	--hem-zalo: #0068ff;
	--hem-fb: #0084ff;
}

.hem-cart-wrap,
.hem-checkout-wrap {
	font-family: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--hem-text);
	max-width: 1080px;
	margin: 0 auto;
}

/* ---------- CART ---------- */
.hem-cart-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 22px;
}
.hem-cart-item {
	position: relative;
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 12px 40px 12px 12px;
	border: 1px solid var(--hem-border);
	border-radius: var(--hem-radius);
	background: #fff;
	transition: opacity .2s ease;
}
.hem-cart-item.is-removing { opacity: .4; pointer-events: none; }
.hem-cart-item__thumb { flex: 0 0 84px; width: 84px; }
.hem-cart-item__thumb img {
	width: 84px; height: 84px;
	object-fit: cover;
	border-radius: var(--hem-radius);
	display: block;
}
.hem-cart-item__info {
	flex: 1; min-width: 0;
	display: flex; flex-direction: column; gap: 6px;
}
.hem-cart-item__name { font-weight: 600; font-size: 15px; line-height: 1.35; }
.hem-cart-item__name a { color: var(--hem-text); text-decoration: none; }
.hem-cart-item__name a:hover { color: var(--hem-red); }
.hem-cart-item__price { color: var(--hem-muted); font-size: 14px; }
.hem-cart-item__controls {
	display: flex; align-items: center; gap: 14px;
	flex-wrap: wrap; margin-top: 2px;
}
.hem-qty--locked {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 36px; padding: 0 8px;
	border: 1px solid var(--hem-border); border-radius: var(--hem-radius);
	font-weight: 600; background: #fafafa;
}
.hem-qty--editable {
	display: inline-flex; align-items: center;
	border: 1px solid var(--hem-border); border-radius: var(--hem-radius);
	overflow: hidden;
}
.hem-qty--editable.is-loading { opacity: .5; pointer-events: none; }
.hem-qty__btn {
	width: 36px; height: 36px; border: 0; background: #f5f5f5;
	font-size: 18px; line-height: 1; cursor: pointer; color: var(--hem-text);
}
.hem-qty__btn:hover { background: #ececec; }
.hem-qty__input {
	width: 46px; height: 36px; text-align: center;
	border: 0; border-left: 1px solid var(--hem-border); border-right: 1px solid var(--hem-border);
	font-family: inherit; font-size: 15px; background: #fff; color: var(--hem-text);
}
.hem-cart-item__subtotal {
	font-weight: 700; color: var(--hem-red); font-size: 15px;
	margin-left: auto;
}
.hem-cart-item__remove {
	position: absolute; top: 10px; right: 10px;
	width: 28px; height: 28px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; background: #f2f2f2; color: #999;
	text-decoration: none; font-size: 18px; line-height: 1;
	transition: .15s ease;
}
.hem-cart-item__remove:hover { background: var(--hem-red); color: #fff; }

/* ---------- CART SUMMARY ---------- */
.hem-cart-summary {
	border: 1px solid var(--hem-border); border-radius: var(--hem-radius);
	padding: 18px; background: #fff;
	max-width: 420px; margin-left: auto;
}
.hem-cart-summary__row { display: flex; justify-content: space-between; align-items: center; }
.hem-cart-summary__total { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.hem-cart-summary__amount { color: var(--hem-red); font-weight: 700; font-size: 20px; }

/* ---------- BUTTONS ---------- */
.hem-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
	padding: 12px 18px; border-radius: var(--hem-radius);
	border: 0; cursor: pointer; text-decoration: none; text-align: center;
	transition: .15s ease;
}
.hem-btn--primary { background: var(--hem-red); color: #fff; width: 100%; }
.hem-btn--primary:hover { background: var(--hem-red-dark); color: #fff; }
.hem-btn--lg { padding: 15px 18px; font-size: 16px; width: 100%; }
.hem-btn--zalo { background: var(--hem-zalo); color: #fff; }
.hem-btn--zalo:hover { filter: brightness(.92); color: #fff; }
.hem-btn--fb { background: var(--hem-fb); color: #fff; }
.hem-btn--fb:hover { filter: brightness(.92); color: #fff; }

.hem-cart-contact { margin-top: 14px; text-align: center; }
.hem-cart-contact__label { display: block; font-size: 13px; color: var(--hem-muted); margin-bottom: 8px; }
.hem-cart-contact__btns { display: flex; gap: 10px; }
.hem-cart-contact__btns .hem-btn { flex: 1; }

/* ---------- CHECKOUT ---------- */
.hem-checkout-grid {
	display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start;
}
.hem-checkout-heading {
	font-size: 17px; font-weight: 600; margin: 0 0 14px;
	padding-bottom: 8px; border-bottom: 2px solid var(--hem-red);
}
.hem-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.hem-field label { font-size: 14px; font-weight: 500; }
.hem-req { color: var(--hem-red); }
.hem-input {
	width: 100%; padding: 11px 12px; box-sizing: border-box;
	border: 1px solid var(--hem-border); border-radius: var(--hem-radius);
	font-family: inherit; font-size: 15px; background: #fff; color: var(--hem-text);
}
.hem-input:focus {
	outline: none; border-color: var(--hem-red);
	box-shadow: 0 0 0 3px rgba(204, 0, 0, .12);
}
.hem-textarea { resize: vertical; min-height: 70px; }
.hem-checkout-error { color: var(--hem-red); font-size: 13px; margin: 6px 0 0; }

.hem-order-summary {
	border: 1px solid var(--hem-border); border-radius: var(--hem-radius);
	padding: 14px; background: #fafafa; margin-bottom: 16px;
}
.hem-order-line {
	display: flex; justify-content: space-between; gap: 12px;
	padding: 8px 0; border-bottom: 1px dashed var(--hem-border); font-size: 14px;
}
.hem-order-line:last-child { border-bottom: 0; }
.hem-order-line__qty { color: var(--hem-muted); }
.hem-order-line__amt { white-space: nowrap; font-weight: 600; }
.hem-order-line--total { font-size: 16px; font-weight: 700; padding-top: 12px; }
.hem-order-line--total .hem-order-line__amt { color: var(--hem-red); }

.hem-checkout-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.hem-msg-preview {
	border: 1px solid var(--hem-border); border-radius: var(--hem-radius);
	padding: 12px; background: #fff;
}
.hem-msg-preview__head {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 8px; font-size: 13px; color: var(--hem-muted);
}
.hem-copy-btn {
	border: 1px solid var(--hem-red); color: var(--hem-red); background: #fff;
	border-radius: var(--hem-radius); padding: 5px 12px;
	font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.hem-copy-btn:hover { background: var(--hem-red); color: #fff; }
.hem-msg-preview__text {
	width: 100%; box-sizing: border-box;
	border: 1px solid var(--hem-border); border-radius: var(--hem-radius);
	padding: 10px; font-family: inherit; font-size: 13px; line-height: 1.5;
	color: var(--hem-text); background: #fafafa; resize: vertical;
}
.hem-msg-preview__hint { font-size: 13px; color: #0a7a28; margin: 8px 0 0; min-height: 18px; }

.hem-checkout-empty { text-align: center; padding: 40px 16px; }
.hem-checkout-empty p { margin-bottom: 16px; color: var(--hem-muted); }
.hem-checkout-empty .hem-btn { width: auto; display: inline-flex; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
	.hem-checkout-grid { grid-template-columns: 1fr; }
	.hem-cart-summary { max-width: none; }
	.hem-cart-item { flex-wrap: wrap; padding-right: 40px; }
	.hem-cart-item__thumb { flex: 0 0 64px; width: 64px; }
	.hem-cart-item__thumb img { width: 64px; height: 64px; }
	.hem-cart-item__controls { width: 100%; }
	.hem-cart-item__subtotal { margin-left: auto; }
}
