/* ==========================================================================
   GIALOP.VN — Bộ lọc lốp 6 ô dùng chung (template-parts/shared/tire-finder.php)
   Tự co: 6 ô một hàng trên màn rộng, 3 × 2 trên tablet, 2 × 3 rồi 1 cột trên mobile.
   ========================================================================== */

.gl-tf {
	--gl-tf-gap: 12px;
	display: block;
	width: 100%;
	margin: 0;
	text-align: left;
}

.gl-tf__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: var(--gl-tf-gap);
}

.gl-tf__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin: 0;
}

.gl-tf__label {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .02em;
	color: var(--gl-navy, #1C3767);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gl-tf select {
	width: 100%;
	min-width: 0;
	height: 46px;
	padding: 0 34px 0 12px;
	border: 1px solid var(--gl-line, #e3e6ec);
	border-radius: var(--gl-radius-sm, 10px);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231C3767' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	color: var(--gl-text, #1a1a1a);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	text-overflow: ellipsis;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.gl-tf select:hover:not(:disabled) {
	border-color: #b9c2d3;
}

.gl-tf select:focus {
	outline: none;
	border-color: var(--gl-navy, #1C3767);
	box-shadow: 0 0 0 3px rgba(28, 55, 103, .14);
}

.gl-tf select:disabled {
	background-color: #f4f6f9;
	color: var(--gl-muted, #6b7280);
	cursor: not-allowed;
}

.gl-tf.is-loading select[data-tf-level] {
	cursor: progress;
}

/* Gợi ý cỡ lốp theo xe ------------------------------------------------------ */
.gl-tf__note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	font-size: 13px;
	color: var(--gl-muted, #6b7280);
}

.gl-tf__note[hidden] {
	display: none;
}

.gl-tf__note-title {
	font-weight: 600;
	color: var(--gl-text, #1a1a1a);
}

.gl-tf .gl-tf__chip {
	display: inline-flex;
	align-items: center;
	width: auto;
	height: auto;
	min-height: 32px;
	padding: 4px 12px;
	border: 1px solid var(--gl-line, #e3e6ec);
	border-radius: 999px;
	background: #fff;
	color: var(--gl-navy, #1C3767);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.gl-tf .gl-tf__chip:hover {
	border-color: var(--gl-navy, #1C3767);
}

.gl-tf .gl-tf__chip.is-active {
	border-color: var(--gl-navy, #1C3767);
	background: var(--gl-navy, #1C3767);
	color: #fff;
}

/* Chân bộ lọc --------------------------------------------------------------- */
.gl-tf__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin-top: 16px;
}

.gl-tf__help {
	margin: 0;
	font-size: 13px;
	color: var(--gl-muted, #6b7280);
}

.gl-tf__help a {
	color: var(--gl-navy, #1C3767);
	font-weight: 600;
	text-decoration: underline;
}

.gl-tf .gl-tf__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	height: auto;
	min-height: 48px;
	margin-left: auto;
	padding: 0 28px;
	border: 0;
	border-radius: var(--gl-radius-sm, 10px);
	background: var(--gl-yellow, #f5c842);
	color: var(--gl-navy-d, #152A4F);
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease;
}

.gl-tf .gl-tf__submit:hover {
	background: var(--gl-yellow-d, #e0b32e);
}

.gl-tf .gl-tf__submit:active {
	transform: translateY(1px);
}

.gl-tf .gl-tf__submit svg {
	flex: none;
}

/* Thẻ đứng riêng (trang chưa có khung bộ lọc) ------------------------------- */
.gl-tf-card {
	position: relative;
	z-index: 2;
	padding: 24px;
	border: 1px solid var(--gl-line, #e3e6ec);
	border-radius: var(--gl-radius-lg, 16px);
	background: #fff;
	box-shadow: var(--gl-shadow-md, 0 8px 28px rgba(21, 42, 79, .12));
}

.gl-tf-card__title {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 800;
	color: var(--gl-navy, #1C3767);
}

.gl-tf-card__desc {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--gl-muted, #6b7280);
}

.gl-tf-section {
	padding: 32px 0;
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
	.gl-tf__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.gl-tf__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gl-tf .gl-tf__submit {
		width: 100%;
		margin-left: 0;
	}

	.gl-tf-card {
		padding: 18px 16px;
	}
}

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

	.gl-tf__label {
		white-space: normal;
	}
}

/* ==========================================================================
   Ghép vào khung bộ lọc có sẵn của từng trang
   ========================================================================== */

/* Danh mục Lốp xe: ô tìm nhanh ở trên, bộ lọc 6 ô + nút Tìm lốp (màu navy như thiết kế). */
.gl-filter__vehicle {
	padding: 16px 0;
}

.gl-filter__vehicle .gl-tf .gl-tf__foot {
	margin-top: 12px;
}

.gl-filter__vehicle .gl-tf .gl-tf__submit {
	background: var(--gl-navy, #1C3767);
	color: #fff;
}

.gl-filter__vehicle .gl-tf .gl-tf__submit:hover {
	background: var(--gl-navy-d, #152A4F);
}

/* Trang từng hãng lốp: hàng dưới còn Dòng lốp · Nhu cầu · Tìm lốp. */
.pb-finder__vehicle {
	margin-bottom: 12px;
}

.pb-finder__vehicle + .pb-finder__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

/* Hàng thanh lý: hàng dưới còn Hãng lốp · DOT · Mức giá · Tìm lốp. */
.tl-finder__vehicle {
	margin-bottom: 12px;
}

.tl-finder__vehicle + .tl-finder__row {
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

@media (max-width: 900px) {
	.pb-finder__vehicle + .pb-finder__grid,
	.tl-finder__vehicle + .tl-finder__row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.pb-finder__vehicle + .pb-finder__grid,
	.tl-finder__vehicle + .tl-finder__row {
		grid-template-columns: 1fr;
	}
}

/* Shortcode [gia_lop_vehicle_finder] chèn trong nội dung (hero trang chủ dùng .gl-hero-finder trong core/theme.css). */
.imta-vf .gl-tf {
	padding-top: 14px;
}

.imta-vf .gl-tf__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.imta-vf .gl-tf .gl-tf__submit {
	width: 100%;
	margin-left: 0;
}

@media (max-width: 420px) {
	.imta-vf .gl-tf__grid {
		grid-template-columns: 1fr;
	}
}
