/* ==========================================================================
   GIALOP.VN — Trang Hàng thanh lý (page-templates/template-clearance.php)
   Prefix tl-. Dùng lại token, .gl-wrap và .gl-btn của theme.css.
   ========================================================================== */

.tl-page {
	--tl-blue: #0b5cb8;
	--tl-blue-d: #0d3561;
	--tl-soft: #f3f6fb;
	--tl-line: #d8e2ef;
	--tl-ink: #10233f;
	color: var(--tl-ink);
}

/* --------------------------------------------------------------------------
   Breadcrumb (giống category.css, trang này không nạp category.css)
   -------------------------------------------------------------------------- */
.gl-crumb { background: var(--gl-cream); border-bottom: 1px solid var(--gl-line); }
.gl-crumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding-block: 13px;
	padding-inline: 0;
	list-style: none;
	font-size: 13px;
	color: var(--gl-muted);
}
.gl-crumb__list a:hover { color: var(--gl-navy); text-decoration: underline; }
.gl-crumb__sep { opacity: .45; }
.gl-crumb__list [aria-current] { color: var(--gl-text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Khung chung
   -------------------------------------------------------------------------- */
.tl-section {
	padding-block: 56px;
}

.tl-section--soft {
	background: var(--tl-soft);
}

.tl-section--navy {
	background: var(--gl-navy);
	color: var(--gl-white);
}

.tl-head {
	max-width: 640px;
	margin: 0 auto 32px;
	text-align: center;
}

.tl-h2 {
	font-size: clamp(24px, 3vw, 30px);
	font-weight: 800;
	text-wrap: balance;
}

.tl-h2--left {
	text-align: left;
}

.tl-lede {
	margin-top: 12px;
	font-size: 15px;
	color: var(--gl-muted);
	text-wrap: pretty;
}

.tl-section--navy .tl-lede {
	color: rgba(255, 255, 255, .78);
}

.tl-step {
	margin-bottom: 6px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tl-blue);
}

.tl-link {
	font-size: 13px;
	font-weight: 700;
	color: var(--tl-blue);
	white-space: nowrap;
}

.tl-link:hover {
	text-decoration: underline;
}

.tl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.tl-actions--center {
	justify-content: center;
}

.tl-page .gl-btn {
	padding: 12px 20px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.tl-page .gl-btn--ghost {
	border-color: rgba(255, 255, 255, .7);
}

/* Hình lốp vẽ bằng CSS khi chưa có ảnh */
.tl-tire {
	display: block;
	width: 76px;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, #7d8189 0 26%, #1f2227 27% 42%, #5b5f66 43% 60%, #1f2227 61% 100%);
	box-shadow: 0 10px 24px rgba(16, 35, 63, .18);
}

.tl-tire--lg {
	width: 150px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.tl-hero {
	padding-block: 56px;
	background: linear-gradient(115deg, var(--tl-blue-d) 0%, #0a4f9c 55%, #0b64c4 100%);
	color: var(--gl-white);
}

.tl-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 40px;
}

.tl-hero__eyebrow {
	margin-bottom: 14px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--gl-yellow);
}

.tl-hero__title {
	font-size: clamp(32px, 4.6vw, 46px);
	font-weight: 800;
}

.tl-hero__desc {
	max-width: 560px;
	margin: 16px 0 28px;
	font-size: 15px;
	line-height: 1.75;
	color: rgba(255, 255, 255, .88);
}

.tl-hero__media {
	display: grid;
	place-items: center;
	width: 260px;
}

.tl-hero__media img {
	max-height: 260px;
	width: auto;
	object-fit: contain;
}

/* --------------------------------------------------------------------------
   Chọn tình trạng
   -------------------------------------------------------------------------- */
.tl-pick__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	max-width: 820px;
	margin-inline: auto;
}

.tl-opt {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	border: 1.5px solid var(--tl-line);
	border-radius: var(--gl-radius);
	background: var(--gl-white);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.tl-opt:hover {
	border-color: var(--tl-blue);
}

.tl-opt.is-active {
	border-color: var(--tl-blue-d);
	background: #eef4ff;
	box-shadow: var(--gl-shadow-md);
}

.tl-opt__mark {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 800;
	color: var(--gl-white);
	background: var(--tl-blue);
}

.tl-opt--used .tl-opt__mark {
	background: var(--gl-green);
}

.tl-opt__body {
	display: grid;
	flex: 1;
	gap: 4px;
	min-width: 0;
}

.tl-opt__name {
	font-size: 15px;
}

.tl-opt__desc {
	font-size: 12px;
	color: var(--gl-muted);
}

.tl-opt__check {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	color: var(--gl-white);
	background: #dfe5ee;
}

.tl-opt.is-active .tl-opt__check {
	background: var(--tl-blue);
}

.tl-pick__note {
	max-width: 820px;
	margin: 14px auto 0;
	padding: 12px 16px;
	border: 1px solid var(--gl-yellow);
	border-radius: var(--gl-radius-sm);
	background: #fff7d9;
	font-size: 13px;
}

/* --------------------------------------------------------------------------
   Bộ lọc
   -------------------------------------------------------------------------- */
.tl-finder {
	padding: 24px;
	border: 1px solid var(--tl-line);
	border-radius: var(--gl-radius-lg);
	background: var(--tl-soft);
	box-shadow: var(--gl-shadow);
}

.tl-finder__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.tl-finder__title {
	font-size: 20px;
	font-weight: 800;
}

.tl-finder__row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
	gap: 10px;
}

.tl-select {
	width: 100%;
	height: 46px;
	padding: 0 34px 0 14px;
	border: 1px solid #c9d4e3;
	border-radius: var(--gl-radius-sm);
	background: var(--gl-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2310233f' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
	font: inherit;
	font-size: 14px;
	color: var(--tl-ink);
	appearance: none;
	cursor: pointer;
}

.tl-select:focus {
	outline: 2px solid var(--tl-blue);
	outline-offset: 1px;
}

.tl-select--sm {
	width: auto;
	height: 40px;
}

.tl-page .tl-finder__submit {
	height: 46px;
	background: var(--tl-blue);
}

.tl-quick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
}

.tl-quick__label {
	font-size: 12px;
	color: var(--gl-muted);
}

.tl-pill {
	padding: 5px 12px;
	border: 1px solid #c9d4e3;
	border-radius: 999px;
	background: var(--gl-white);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.tl-pill:hover,
.tl-pill.is-active {
	border-color: var(--tl-blue);
	color: var(--tl-blue);
}

.tl-pill.is-active {
	background: #eef4ff;
}

/* --------------------------------------------------------------------------
   Kết quả
   -------------------------------------------------------------------------- */
.tl-results__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

.tl-results__desc {
	margin-top: 6px;
	font-size: 13px;
	color: var(--gl-muted);
}

.tl-sort {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 10px;
}

.tl-sort__label {
	font-size: 12px;
	font-weight: 700;
}

.tl-results__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 16px 0 20px;
}

.tl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tl-chips li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--tl-line);
	border-radius: 999px;
	background: var(--gl-white);
	font-size: 12px;
	font-weight: 700;
}

.tl-chips svg {
	color: var(--gl-green);
}

.tl-results__count {
	font-size: 13px;
	color: var(--gl-muted);
}

.tl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.tl-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--tl-line);
	border-radius: var(--gl-radius);
	background: var(--gl-white);
	transition: box-shadow .15s ease, transform .15s ease;
}

.tl-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--gl-shadow-md);
}

.tl-card__media {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 5 / 3.4;
	background: #eef1f5;
}

.tl-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tl-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--gl-white);
	background: var(--gl-red);
}

.tl-card__badge--used {
	background: var(--gl-green);
}

.tl-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	padding: 16px;
}

.tl-card__name {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.35;
}

.tl-card__name a:hover {
	color: var(--tl-blue);
}

.tl-card__meta,
.tl-card__stock {
	font-size: 12px;
	color: var(--gl-muted);
}

.tl-card__price {
	margin-top: 8px;
	font-size: 18px;
	font-weight: 800;
	color: var(--tl-blue);
}

.tl-card__price del {
	margin-left: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--gl-muted);
}

.tl-card__more {
	margin-top: auto;
	padding-top: 10px;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--tl-blue-d);
}

.tl-card__more:hover {
	color: var(--tl-blue);
}

.tl-empty {
	padding: 36px 20px;
	border: 1px dashed #c9d4e3;
	border-radius: var(--gl-radius);
	background: var(--gl-white);
	text-align: center;
	color: var(--gl-muted);
}

.tl-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 28px;
}

.tl-pager .page-numbers {
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--tl-line);
	border-radius: var(--gl-radius-sm);
	background: var(--gl-white);
	font-size: 14px;
	font-weight: 700;
}

.tl-pager .page-numbers.current {
	border-color: var(--tl-blue-d);
	background: var(--tl-blue-d);
	color: var(--gl-white);
}

.tl-band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 28px;
	padding: 20px 24px;
	border-radius: var(--gl-radius);
	background: var(--gl-navy);
	color: var(--gl-white);
}

.tl-band__title {
	font-size: 16px;
	font-weight: 800;
}

.tl-band__desc {
	margin-top: 4px;
	font-size: 12px;
	color: rgba(255, 255, 255, .8);
}

/* --------------------------------------------------------------------------
   Giới thiệu
   -------------------------------------------------------------------------- */
.tl-info__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	align-items: start;
	gap: 48px;
}

.tl-info__title {
	font-size: clamp(22px, 2.6vw, 28px);
	font-weight: 800;
}

.tl-info__title:not(:first-child) {
	margin-top: 28px;
}

.tl-info__desc {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.8;
	color: rgba(255, 255, 255, .88);
}

.tl-check {
	padding: 24px;
	border-radius: var(--gl-radius);
	background: #eaf2ff;
	color: var(--tl-ink);
}

.tl-check__title {
	margin-bottom: 8px;
	font-size: 17px;
	font-weight: 800;
}

.tl-check__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tl-check__list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 0;
	border-bottom: 1px solid #c9d8ee;
	font-size: 13px;
	font-weight: 700;
}

.tl-check__list svg {
	flex-shrink: 0;
	color: var(--gl-green);
}

/* --------------------------------------------------------------------------
   Hãng & kích thước
   -------------------------------------------------------------------------- */
.tl-links__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.tl-links__card {
	padding: 28px 24px;
	border: 1px solid var(--tl-line);
	border-radius: var(--gl-radius);
	background: var(--gl-white);
}

.tl-links__title {
	margin-bottom: 14px;
	font-size: 16px;
	font-weight: 800;
}

.tl-links__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tl-tag {
	padding: 7px 12px;
	border-radius: 6px;
	background: #eef2f7;
	font-size: 12px;
	font-weight: 700;
	transition: background-color .15s ease, color .15s ease;
}

.tl-tag:hover {
	background: var(--tl-blue-d);
	color: var(--gl-white);
}

/* --------------------------------------------------------------------------
   Kiến thức liên quan
   -------------------------------------------------------------------------- */
.tl-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.tl-post {
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: var(--gl-radius);
	background: rgba(255, 255, 255, .07);
}

.tl-post__media {
	display: block;
	aspect-ratio: 16 / 7;
	background: linear-gradient(135deg, #dfe9f6 0%, #93b6e0 100%);
}

.tl-post__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tl-post__body {
	padding: 16px;
}

.tl-post__title {
	font-size: 15px;
	font-weight: 800;
}

.tl-post__excerpt {
	margin-top: 8px;
	font-size: 12px;
	color: rgba(255, 255, 255, .8);
}

.tl-post__more {
	display: inline-block;
	margin-top: 12px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--gl-yellow);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.tl-faq__list {
	max-width: 760px;
	margin-inline: auto;
}

.tl-faq__item {
	border-bottom: 1px solid var(--tl-line);
}

.tl-faq__q {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 0;
	font-size: 15px;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.tl-faq__q::-webkit-details-marker {
	display: none;
}

.tl-faq__q::before {
	content: "";
	flex-shrink: 0;
	border-block: 5px solid transparent;
	border-left: 7px solid currentColor;
	transition: transform .15s ease;
}

.tl-faq__item[open] .tl-faq__q::before {
	transform: rotate(90deg);
}

.tl-faq__a {
	padding: 0 0 16px 17px;
	font-size: 14px;
	color: var(--gl-muted);
}

/* --------------------------------------------------------------------------
   CTA cuối
   -------------------------------------------------------------------------- */
.tl-cta {
	background: var(--gl-navy-d);
	color: var(--gl-white);
	text-align: center;
}

.tl-cta__title {
	font-size: clamp(20px, 2.4vw, 24px);
	font-weight: 800;
}

.tl-cta__desc {
	margin: 10px 0 22px;
	font-size: 14px;
	color: rgba(255, 255, 255, .8);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.tl-finder__row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tl-finder__submit {
		grid-column: 1 / -1;
	}

	.tl-info__inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.tl-posts__grid {
		grid-template-columns: 1fr;
		max-width: 520px;
		margin-inline: auto;
	}
}

@media (max-width: 720px) {
	.tl-section,
	.tl-hero {
		padding-block: 40px;
	}

	.tl-hero__inner {
		grid-template-columns: 1fr;
	}

	.tl-hero__media {
		display: none;
	}

	.tl-pick__grid,
	.tl-links__grid {
		grid-template-columns: 1fr;
	}

	.tl-finder {
		padding: 18px;
	}

	.tl-finder__head,
	.tl-results__head {
		flex-direction: column;
		align-items: flex-start;
	}

	.tl-band {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 420px) {
	.tl-finder__row {
		grid-template-columns: 1fr;
	}

	.tl-grid {
		grid-template-columns: 1fr;
	}

	.tl-actions .gl-btn {
		flex: 1;
	}
}
