/* =========================================================
   TaroSports v2 - Giỏ hàng, thanh toán, combo tiết kiệm
   ========================================================= */

/* ---------- Khung chung giỏ hàng / thanh toán ---------- */
.tr-gh-title
{
	margin: 0 0 20px;
	font-size: 28px;
	font-weight: 800;
	color: var(--tr-navy);
	text-transform: uppercase;
}

.tr-gh-title span
{
	font-size: 16px;
	font-weight: 600;
	color: var(--tr-muted);
	text-transform: none;
}

.tr-gh-layout
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 24px;
	align-items: start;
	padding-bottom: 56px;
}

#tr-cart-wrap.is-loading
{
	opacity: .6;
	pointer-events: none;
	transition: opacity .2s;
}

/* ---------- Danh sách dòng giỏ ---------- */
.tr-gh-list
{
	padding: 8px 20px;
}

.tr-gh-list__head,
.tr-gh-row
{
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) 140px 120px 40px;
	gap: 16px;
	align-items: center;
}

.tr-gh-list__head
{
	padding: 12px 0;
	border-bottom: 1px solid var(--tr-line);
	font-size: 13px;
	font-weight: 700;
	color: var(--tr-muted);
	text-transform: uppercase;
}

.tr-gh-list__head span:first-child
{
	grid-column: 1 / 3;
}

.tr-gh-list__head span:nth-child(3)
{
	text-align: right;
}

.tr-gh-row
{
	padding: 18px 0;
	border-bottom: 1px solid var(--tr-line);
}

.tr-gh-row__img
{
	display: block;
	width: 96px;
	height: 96px;
	border: 1px solid var(--tr-line);
	border-radius: var(--tr-radius-sm);
	overflow: hidden;
	background: #fff;
}

.tr-gh-row__img img
{
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tr-gh-row__name
{
	display: block;
	font-weight: 700;
	color: var(--tr-navy);
	line-height: 1.35;
}

.tr-gh-row__name:hover
{
	color: var(--tr-blue);
}

.tr-gh-row__attr
{
	margin-top: 4px;
	font-size: 14px;
	color: var(--tr-muted);
}

.tr-gh-row__tag
{
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	padding: 2px 8px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	color: var(--tr-muted);
	background: var(--tr-bg-soft);
}

.tr-gh-row__tag.is-ok
{
	color: var(--tr-green);
	background: var(--tr-green-50);
}

.tr-gh-row__tag .tr-i
{
	width: 14px;
	height: 14px;
}

.tr-gh-row__price
{
	margin-top: 6px;
}

.tr-gh-row__price .tr-price__now
{
	font-size: 16px;
}

.tr-gh-row__qty .tr-qty button
{
	width: 36px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tr-gh-row__qty .tr-qty .tr-i
{
	width: 16px;
	height: 16px;
}

.tr-gh-row__qty .tr-qty input
{
	width: 48px;
	height: 38px;
}

.tr-gh-row__total
{
	font-weight: 800;
	color: var(--tr-navy);
	text-align: right;
}

.tr-gh-row__del
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid transparent;
	border-radius: 50%;
	background: none;
	color: var(--tr-muted);
	cursor: pointer;
}

.tr-gh-row__del:hover
{
	color: var(--tr-red);
	border-color: var(--tr-red-50);
	background: var(--tr-red-50);
}

.tr-gh-row__del .tr-i
{
	width: 18px;
	height: 18px;
}

.tr-gh-list__foot
{
	padding: 8px 0;
}

.tr-gh-list__foot .tr-i
{
	width: 16px;
	height: 16px;
}

/* ---------- Tóm tắt đơn ---------- */
.tr-gh-side
{
	position: sticky;
	top: 76px;
	display: grid;
	gap: 16px;
}

.tr-gh-sum
{
	padding: 20px;
}

.tr-gh-sum__title
{
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 800;
	color: var(--tr-navy);
	text-transform: uppercase;
}

.tr-gh-sum__rows
{
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid var(--tr-line);
}

.tr-gh-sum__rows > div
{
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	font-size: 15px;
}

.tr-gh-sum__rows dt
{
	color: var(--tr-muted);
}

.tr-gh-sum__rows dd
{
	margin: 0;
	font-weight: 700;
	color: var(--tr-navy);
	text-align: right;
}

.tr-gh-sum__total
{
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 16px 0;
	font-weight: 700;
	color: var(--tr-navy);
}

.tr-gh-sum__total b
{
	font-size: 24px;
	font-weight: 800;
	color: var(--tr-red);
}

.tr-gh-side .tr-commit
{
	grid-template-columns: 1fr;
}

.tr-gh-side .tr-commit__item
{
	padding: 12px 16px;
}

.tr-gh-side .tr-commit__item + .tr-commit__item
{
	border-left: 0;
	border-top: 1px solid var(--tr-line);
}

.tr-gh-side .tr-commit__item .tr-i,
.tr-gh-side .tr-commit__item img
{
	width: 30px;
	height: 30px;
	flex: none;
}

/* ---------- Thanh tiến độ freeship ---------- */
.tr-gh-ship
{
	padding: 12px 14px;
	border-radius: var(--tr-radius-sm);
	background: var(--tr-blue-50);
	margin-bottom: 4px;
}

.tr-gh-ship__txt
{
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--tr-navy);
}

.tr-gh-ship__txt b
{
	color: var(--tr-red);
}

.tr-gh-ship__txt .tr-i
{
	width: 20px;
	height: 20px;
	flex: none;
}

.tr-gh-ship__bar
{
	height: 6px;
	margin-top: 10px;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}

.tr-gh-ship__bar span
{
	display: block;
	height: 100%;
	border-radius: 6px;
	background: var(--tr-blue);
	transition: width .4s;
}

.tr-gh-ship.is-ok
{
	background: var(--tr-green-50);
}

.tr-gh-ship.is-ok .tr-gh-ship__txt,
.tr-gh-ship.is-ok .tr-gh-ship__txt b
{
	color: var(--tr-green);
}

.tr-gh-ship.is-ok .tr-gh-ship__bar span
{
	background: var(--tr-green);
}

/* ---------- Giỏ trống ---------- */
.tr-gh-empty
{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-bottom: 56px;
	padding: 56px 16px;
}

.tr-gh-empty > .tr-i
{
	width: 56px;
	height: 56px;
	color: var(--tr-line);
}

.tr-gh-empty p
{
	margin: 0;
	font-size: 17px;
}

/* ---------- Thanh toán ---------- */
.tr-tt__main
{
	display: grid;
	gap: 24px;
}

.tr-tt__box
{
	padding: 24px;
}

.tr-tt__h
{
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 800;
	color: var(--tr-navy);
	text-transform: uppercase;
}

.tr-tt__step
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--tr-navy);
	color: #fff;
	font-size: 15px;
}

.tr-tt__grid
{
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.tr-tt__field--full
{
	grid-column: 1 / -1;
}

.tr-tt__field label
{
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--tr-navy);
}

.tr-tt__field label b
{
	color: var(--tr-red);
}

.tr-tt__field label span
{
	font-weight: 400;
	color: var(--tr-muted);
}

.tr-tt .tr-input
{
	font-family: inherit;
	font-size: 15px;
}

.tr-tt .tr-input.is-error
{
	border-color: var(--tr-red);
	background: var(--tr-red-50);
}

.tr-tt__check
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	min-height: 44px;
	font-weight: 600;
	color: var(--tr-navy);
	cursor: pointer;
}

.tr-tt__check input
{
	width: 18px;
	height: 18px;
	accent-color: var(--tr-navy);
}

.tr-tt__vat
{
	margin-top: 8px;
	padding: 16px;
	border-radius: var(--tr-radius-sm);
	background: var(--tr-bg-soft);
}

.tr-tt__vat[hidden]
{
	display: none;
}

.tr-tt__pay
{
	display: grid;
	gap: 12px;
}

.tr-tt__opt
{
	position: relative;
	display: block;
	cursor: pointer;
}

.tr-tt__opt input
{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tr-tt__opt-box
{
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 16px 14px 48px;
	border: 1.5px solid var(--tr-line);
	border-radius: var(--tr-radius-sm);
	background: #fff;
	transition: border-color .2s, background .2s;
	position: relative;
}

.tr-tt__opt-box::before
{
	content: '';
	position: absolute;
	left: 16px;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	border: 2px solid #A9B5C6;
	border-radius: 50%;
	background: #fff;
}

.tr-tt__opt input:checked + .tr-tt__opt-box
{
	border-color: var(--tr-navy);
	background: var(--tr-blue-50);
}

.tr-tt__opt input:checked + .tr-tt__opt-box::before
{
	border-color: var(--tr-navy);
	box-shadow: inset 0 0 0 4px #fff;
	background: var(--tr-navy);
}

.tr-tt__opt input:focus-visible + .tr-tt__opt-box
{
	outline: 2px solid var(--tr-blue);
	outline-offset: 2px;
}

.tr-tt__opt-ico
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 48px;
	height: 36px;
	border: 1px solid var(--tr-line);
	border-radius: 6px;
	background: #fff;
	color: var(--tr-navy);
	overflow: hidden;
}

.tr-tt__opt-ico img
{
	max-width: 42px;
	max-height: 30px;
	object-fit: contain;
}

.tr-tt__opt-ico .tr-i
{
	width: 22px;
	height: 22px;
}

.tr-tt__opt-txt
{
	display: block;
	min-width: 0;
	align-self: center;
}

.tr-tt__opt-txt b
{
	display: block;
	color: var(--tr-navy);
}

.tr-tt__opt-mo-ta
{
	display: none;
	margin-top: 6px;
	font-size: 14px;
	color: var(--tr-muted);
}

.tr-tt__opt input:checked + .tr-tt__opt-box .tr-tt__opt-mo-ta
{
	display: block;
}

.tr-tt__items
{
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	max-height: 340px;
	overflow-y: auto;
}

.tr-tt__items li
{
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--tr-line);
	font-size: 14px;
}

.tr-tt__items li > b
{
	margin-left: auto;
	white-space: nowrap;
	color: var(--tr-navy);
}

.tr-tt__thumb
{
	position: relative;
	flex: none;
	width: 56px;
	height: 56px;
	border: 1px solid var(--tr-line);
	border-radius: var(--tr-radius-sm);
	background: #fff;
}

.tr-tt__thumb img
{
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: var(--tr-radius-sm);
}

.tr-tt__thumb i
{
	position: absolute;
	top: -8px;
	right: -8px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--tr-navy);
	color: #fff;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.tr-tt__iname
{
	min-width: 0;
	font-weight: 600;
	color: var(--tr-text);
	line-height: 1.35;
}

.tr-tt__iname small
{
	display: block;
	font-weight: 400;
	color: var(--tr-muted);
}

.tr-tt__iname .tr-tt__itag.is-ok
{
	font-weight: 700;
	color: var(--tr-green);
}

.tr-tt__note
{
	margin: 12px 0 0;
	font-size: 14px;
	color: var(--tr-muted);
}

.tr-tt__back
{
	margin-top: 4px;
}

.tr-tt__back .tr-i
{
	width: 16px;
	height: 16px;
}

/* =========================================================
   Combo tiết kiệm (trang chủ)
   ========================================================= */
.tr-combo
{
	display: flex;
	flex-direction: column;
	padding: 36px 20px 20px;
	margin-top: 16px;
}

.tr-combo__nhan
{
	position: absolute;
	top: -16px;
	left: 50%;
	max-width: calc(100% - 32px);
	transform: translateX(-50%) skewX(-12deg);
	padding: 7px 22px;
	background: var(--tr-navy);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	font-style: italic;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border-radius: 4px;
	box-shadow: 4px 4px 0 var(--tr-blue);
}

.tr-combo__nhan span
{
	display: inline-block;
	transform: skewX(12deg);
}

.tr-combo__img
{
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	margin-bottom: 16px;
	overflow: hidden;
	border-radius: var(--tr-radius-sm);
}

.tr-combo__img img
{
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tr-combo__list
{
	flex: 1;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.tr-combo__list li
{
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 3px 0;
	font-size: 15px;
	line-height: 1.4;
}

.tr-combo__list .tr-i
{
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--tr-green);
}

.tr-combo__list a:hover
{
	color: var(--tr-blue);
}

.tr-combo__list em
{
	font-style: normal;
	font-weight: 700;
	color: var(--tr-navy);
}

.tr-combo__mo-ta
{
	margin: -8px 0 12px;
	font-size: 14px;
	color: var(--tr-muted);
}

.tr-combo__lbl
{
	font-size: 14px;
	font-weight: 700;
	color: var(--tr-navy);
}

.tr-combo__gia
{
	margin-bottom: 4px;
}

.tr-combo__gia .tr-price__now
{
	font-size: 26px;
}

.tr-combo__gia .tr-price__old
{
	font-size: 15px;
}

.tr-combo__tk
{
	margin-bottom: 14px;
	font-size: 14px;
	font-weight: 700;
	color: var(--tr-green);
}

/* Modal chọn biến thể combo */
.tr-cbm
{
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	visibility: hidden;
}

.tr-cbm.is-open
{
	visibility: visible;
}

.tr-cbm__bg
{
	position: absolute;
	inset: 0;
	background: rgba(7, 29, 73, .55);
	opacity: 0;
	transition: opacity .2s;
}

.tr-cbm.is-open .tr-cbm__bg
{
	opacity: 1;
}

.tr-cbm__panel
{
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(560px, 100%);
	max-height: calc(100vh - 32px);
	border-radius: var(--tr-radius);
	background: #fff;
	box-shadow: var(--tr-shadow-hover);
	transform: translateY(16px);
	transition: transform .2s;
}

.tr-cbm.is-open .tr-cbm__panel
{
	transform: none;
}

.tr-cbm__head
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--tr-line);
	font-weight: 800;
	color: var(--tr-navy);
	text-transform: uppercase;
}

.tr-cbm__close
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--tr-bg-soft);
	color: var(--tr-navy);
	cursor: pointer;
}

.tr-cbm__close .tr-i
{
	width: 18px;
	height: 18px;
}

.tr-cbm__body
{
	padding: 8px 20px;
	overflow-y: auto;
}

.tr-cbm__sp
{
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--tr-line);
}

.tr-cbm__sp:last-child
{
	border-bottom: 0;
}

.tr-cbm__sp > img
{
	flex: none;
	width: 64px;
	height: 64px;
	object-fit: contain;
	border: 1px solid var(--tr-line);
	border-radius: var(--tr-radius-sm);
}

.tr-cbm__sp-ten
{
	font-weight: 700;
	color: var(--tr-navy);
	line-height: 1.35;
}

.tr-cbm__sp-ten small
{
	font-weight: 400;
	color: var(--tr-muted);
}

.tr-cbm__nhom
{
	margin-top: 8px;
}

.tr-cbm__nhom-ten
{
	margin-bottom: 6px;
	font-size: 13px;
	color: var(--tr-muted);
}

.tr-cbm__opts
{
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tr-cbm__opt
{
	min-height: 36px;
	padding: 6px 12px;
	border: 1.5px solid var(--tr-line);
	border-radius: 6px;
	background: #fff;
	color: var(--tr-text);
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
}

.tr-cbm__opt:hover
{
	border-color: var(--tr-blue);
}

.tr-cbm__opt.is-active
{
	border-color: var(--tr-navy);
	background: var(--tr-navy);
	color: #fff;
}

.tr-cbm__nhom.is-error .tr-cbm__nhom-ten
{
	color: var(--tr-red);
	font-weight: 700;
}

.tr-cbm__foot
{
	padding: 14px 20px;
	border-top: 1px solid var(--tr-line);
}

.tr-cbm__loading
{
	padding: 32px 0;
	text-align: center;
	color: var(--tr-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px)
{
	.tr-gh-layout
	{
		grid-template-columns: minmax(0, 1fr) 340px;
	}

	.tr-gh-list__head,
	.tr-gh-row
	{
		grid-template-columns: 80px minmax(0, 1fr) 130px 110px 36px;
		gap: 12px;
	}

	.tr-gh-row__img
	{
		width: 80px;
		height: 80px;
	}
}

@media (max-width: 991px)
{
	.tr-gh-layout
	{
		grid-template-columns: 1fr;
	}

	.tr-gh-side
	{
		position: static;
	}
}

@media (max-width: 767px)
{
	.tr-gh-title
	{
		font-size: 22px;
		margin-bottom: 14px;
	}

	.tr-gh-list
	{
		padding: 4px 14px;
	}

	.tr-gh-list__head
	{
		display: none;
	}

	.tr-gh-row
	{
		grid-template-columns: 72px minmax(0, 1fr) auto;
		grid-template-areas: "img info del" "img qty total";
		gap: 8px 12px;
		padding: 14px 0;
	}

	.tr-gh-row__img
	{
		grid-area: img;
		align-self: start;
		width: 72px;
		height: 72px;
	}

	.tr-gh-row__info
	{
		grid-area: info;
	}

	.tr-gh-row__qty
	{
		grid-area: qty;
	}

	.tr-gh-row__total
	{
		grid-area: total;
		justify-self: end;
		align-self: center;
	}

	.tr-gh-row__del
	{
		grid-area: del;
		align-self: start;
		justify-self: end;
		width: 32px;
		height: 32px;
	}

	.tr-gh-row__qty .tr-qty button
	{
		width: 34px;
		height: 34px;
	}

	.tr-gh-row__qty .tr-qty input
	{
		width: 42px;
		height: 34px;
	}

	.tr-gh-sum,
	.tr-tt__box
	{
		padding: 16px;
	}

	.tr-tt__grid
	{
		grid-template-columns: 1fr;
	}

	.tr-gh-layout
	{
		gap: 16px;
		padding-bottom: 40px;
	}

	.tr-tt__main
	{
		gap: 16px;
	}

	.tr-combo__gia .tr-price__now
	{
		font-size: 22px;
	}
}

/* Nút dạng button dùng font chung */
.tr-tt button.tr-btn,
.tr-combo button.tr-btn,
.tr-cbm button.tr-btn
{
	font-family: inherit;
}

/* Combo: 1 cột trên điện thoại để đủ chỗ cho danh sách sản phẩm */
@media (max-width: 767px)
{
	.tr-grid.tr-combos
	{
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.tr-combo
	{
		padding: 32px 16px 16px;
	}
}
