/* [tour_list] – bộ lọc & danh sách tour */
.ctl-filter, .ctl-list {
	--ctl-brand: var(--hg-primary);
	--ctl-button: var(--hg-button);
	--ctl-text: var(--hg-text);
	--ctl-accent: var(--green-natural);
	--ctl-muted: color-mix(in srgb, var(--ctl-text) 70%, #fff);
	--ctl-border: color-mix(in srgb, var(--ctl-text) 22%, #fff);
	--ctl-line: color-mix(in srgb, var(--ctl-text) 12%, #fff);
	--ctl-soft: color-mix(in srgb, var(--ctl-brand) 10%, #fff);
	--ctl-shadow: 0 4px 20px color-mix(in srgb, var(--ctl-text) 8%, transparent);
	--ctl-shadow-hover: 0 10px 28px color-mix(in srgb, var(--ctl-text) 14%, transparent);
	--ctl-radius: 16px;
	color: var(--ctl-text);
}
.ctl-list .screen-reader-text, 
.ctl-filter .screen-reader-text { 
    position: absolute !important; 
    width: 1px; 
    height: 1px; 
    overflow: hidden; 
    clip: rect(0 0 0 0); 
}
/* Máy tính: cột bộ lọc dính theo khi cuộn trang */
@media (min-width: 850px) {
	.ctl-layout-side {
		position: sticky;
		top: var(--ctl-sticky-top, 110px);
	}
	.ctl-layout-side .ctl-filter-panel {
		max-height: calc(100vh - var(--ctl-sticky-top, 110px) - 20px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.admin-bar .ctl-layout-side { top: calc(var(--ctl-sticky-top, 110px) + 32px); }
	.admin-bar .ctl-layout-side .ctl-filter-panel { max-height: calc(100vh - var(--ctl-sticky-top, 110px) - 52px); }
}

/* ===================== Bố cục: bộ lọc trái + danh sách phải ===================== */
.ctl-layout { 
    display: grid; 
    grid-template-columns: 260px minmax(0, 1fr); 
    gap: 28px; 
    align-items: start; 
}
.ctl-layout.no-filter { 
    grid-template-columns: minmax(0, 1fr); 
}
@media (max-width: 849px) { 
    .ctl-layout { 
        grid-template-columns: minmax(0, 1fr); gap: 0; 
    } 
}

/* ===================== Bộ lọc ===================== */
.ctl-filter-panel { 
    background: #fff; 
    border-radius: var(--ctl-radius); 
    box-shadow: var(--ctl-shadow); 
    padding: 20px 22px; 
    margin: 0; 
}
.ctl-filter-group + .ctl-filter-group { 
    border-top: 1px solid var(--ctl-line); 
    margin-top: 16px; 
    padding-top: 16px; 
}
.ctl-filter-title { 
    margin: 0 0 10px; 
    font-size: 20px; 
    font-weight: 600; 
    line-height: 1.4; 
    color: var(--ctl-text); 
}

.ctl-search { 
    position: relative; 
    display: block; 
    margin: 0; 
}
.ctl-search svg { 
    position: absolute; 
    left: 12px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #B3B3B3; 
    pointer-events: none; 
}
.ctl-filter .ctl-search input[type="search"] { 
    width: 100%; 
    height: 42px; 
    margin: 0; 
    padding: 0 12px 0 38px; 
    font-size: 14px; 
    border: 1px solid var(--ctl-border); 
    border-radius: 12px; 
    box-shadow: none; 
    background: #fff; 
    color: var(--ctl-text); 
}
.ctl-filter .ctl-search input[type="search"]::placeholder{
    color: #B3B3B3;
    font-size: 14px;
    font-weight: 400;
}
.ctl-filter .ctl-search input[type="search"]:focus { 
    border-color: var(--ctl-brand); 
    box-shadow: 0 0 0 3px var(--ctl-soft); 
    outline: none; 
}

.ctl-check { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin: 0; 
    padding: 5px 0; 
    font-size: 14px; 
    font-weight: 400; 
    line-height: 1.35; 
    color: var(--ctl-muted); 
    cursor: pointer; 
}
.ctl-check:hover { 
    color: var(--ctl-text); 
}
.ctl-filter .ctl-check input[type="checkbox"] { 
    -webkit-appearance: checkbox; 
    appearance: auto; 
    flex: none; 
    width: 18px; 
    height: 18px; 
    margin: 0; 
    padding: 0; 
    border: 0; 
    border-radius: 4px;
    background: none; 
    box-shadow: none; 
    accent-color: var(--ctl-brand); 
    cursor: pointer; 
}
.ctl-filter .ctl-check input:checked{
    border-radius: 4px;
}
.ctl-filter .ctl-check input[type="checkbox"]::before, 
.ctl-filter .ctl-check input[type="checkbox"]::after { 
    content: none; 
    display: none; 
}
.ctl-check input:checked + span { 
    color: var(--ctl-text); 
}
.ctl-check.depth-1 { 
    padding-left: 24px; 
}
.ctl-check.depth-2 { 
    padding-left: 48px; 
}

.ctl-filter .ctl-filter-reset { 
    display: block; 
    width: 100%; 
    margin: 16px 0 0; 
    padding: 8px; 
    background: transparent !important; 
    border: 1px solid var(--ctl-line); 
    border-radius: 8px; 
    color: var(--ctl-muted) !important; 
    font-size: 16px; 
    font-weight: 500; 
    text-transform: none; 
    letter-spacing: 0; 
    min-height: 0; 
    line-height: 1.4; 
    cursor: pointer; 
}
.ctl-filter .ctl-filter-reset:hover {
    border-color: var(--ctl-brand); 
    color: var(--ctl-brand) !important; 
}

/* Các phần chỉ dùng trên điện thoại – ẩn trên máy tính */
.ctl-fab, .ctl-backdrop, .ctl-sheet-head, .ctl-sheet-foot { display: none; }
.ctl-filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ctl-button); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.ctl-filter-count[hidden] { display: none; }

/* ===================== Điện thoại: nút "Lọc" nổi + bottom sheet ===================== */
@media (max-width: 849px) {
	/* Nút "Lọc" nổi giữa đáy màn hình, luôn hiện khi kéo trang */
	.ctl-filter .ctl-fab { 
	    position: fixed; 
	    left: 50%; 
	    bottom: 20px; 
	    z-index: 990; 
	    display: inline-flex; 
	    align-items: center; 
	    gap: 8px; 
	    margin: 0; 
	    padding: 16px 40px; 
	    min-height: 0; 
	    transform: translateX(-50%); 
	    background: #fff !important; 
	    border: 0 !important; 
	    border-radius: 999px; 
	    box-shadow: var(--ctl-shadow-hover) !important; 
	    color: var(--ctl-text) !important; 
	    font-size: 18px; 
	    font-weight: 600; 
	    line-height: 1.2; 
	    text-transform: none; 
	    letter-spacing: 0; 
	    cursor: pointer; 
	}
	.ctl-fab .ctl-icon { 
	    width: 20px; 
	    height: 20px; 
	}
	.ctl-filter.is-open .ctl-fab { visibility: hidden; }

	/* Nền mờ phía sau */
	.ctl-backdrop { 
	    position: fixed; 
	    inset: 0; 
	    z-index: 998; 
	    display: block; 
	    background: color-mix(in srgb, var(--ctl-text) 45%, transparent); 
	    opacity: 0; 
	    transition: opacity .25s; 
	}
	.ctl-backdrop[hidden] { display: none; }
	.ctl-filter.is-open .ctl-backdrop { opacity: 1; }

	/* Khung bộ lọc trượt lên từ dưới */
	.ctl-filter-panel { 
	    position: fixed; 
	    left: 0; 
	    right: 0; 
	    bottom: 0; 
	    z-index: 999; 
	    display: flex; 
	    flex-direction: column; 
	    max-height: 85vh; 
	    max-height: 85dvh; 
	    padding: 0; 
	    border-radius: 16px 16px 0 0; 
	    transform: translateY(105%); 
	    transition: transform .3s ease; 
	    visibility: hidden; 
	}
	.ctl-filter.is-open .ctl-filter-panel { 
	    transform: translateY(0); 
	    visibility: visible; 
	}

	.ctl-sheet-head { 
	    position: relative; 
	    display: block; 
	    flex: none; 
	    padding: 10px 20px 12px; 
	    text-align: center; 
	    border-bottom: 1px solid var(--ctl-line); 
	}
	.ctl-sheet-handle { 
	    display: block; 
	    width: 40px; 
	    height: 4px; 
	    margin: 0 auto 10px; 
	    border-radius: 2px; 
	    background: var(--ctl-border);
	}
	.ctl-sheet-title { 
	    margin: 0; 
	    font-size: 17px; 
	    font-weight: 600; 
	    color: var(--ctl-text); 
	}
	.ctl-filter .ctl-sheet-close { 
	    position: absolute; 
	    right: 12px; 
	    top: 18px; 
	    display: inline-flex; 
	    align-items: center; 
	    justify-content: center; 
	    width: 32px; 
	    height: 32px; 
	    min-height: 0; 
	    margin: 0; 
	    padding: 0; 
	    border: 0 !important; 
	    border-radius: 50%; 
	    background: var(--ctl-soft) !important; 
	    color: var(--ctl-text) !important; 
	    box-shadow: none !important; 
	    cursor: pointer; 
	}
	.ctl-sheet-close .ctl-icon { 
	    width: 18px; 
	    height: 18px; 
	}

	.ctl-sheet-body { 
	    flex: 1 1 auto; 
	    overflow-y: auto; 
	    -webkit-overflow-scrolling: touch; 
	    overscroll-behavior: contain; 
	    padding: 16px 20px; 
	}
	.ctl-sheet-body .ctl-filter-reset { display: none; }

	.ctl-sheet-foot { 
	    display: flex; 
	    flex: none; 
	    gap: 12px; 
	    padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); 
	    border-top: 1px solid var(--ctl-line); 
	    background: #fff; 
	}
	.ctl-filter .ctl-sheet-reset, 
	.ctl-filter .ctl-sheet-apply { 
	    flex: 1; 
	    margin: 0; 
	    padding: 12px; 
	    min-height: 0; 
	    border-radius: 999px; 
	    font-size: 15px; 
	    font-weight: 600; 
	    line-height: 1.2; 
	    text-transform: none; 
	    letter-spacing: 0; 
	    cursor: pointer; 
	}
	.ctl-filter .ctl-sheet-reset { 
	    background: transparent !important; 
	    border: 0 !important; 
	    box-shadow: none !important; 
	    color: var(--ctl-muted) !important; 
	}
	.ctl-filter .ctl-sheet-apply { 
	    background: var(--ctl-button) !important; 
	    border: 0 !important; 
	    box-shadow: none !important; 
	    color: #fff !important; 
	}

	/* Chừa chỗ cho nút "Lọc" ở cuối danh sách */
	.ctl-layout .ctl-list { padding-bottom: 72px; }
}
    html.ctl-sheet-open, 
    html.ctl-sheet-open body { overflow: hidden; }

/* ===================== Danh sách ===================== */
.ctl-grid { 
    display: grid; 
    grid-template-columns: repeat(var(--ctl-cols, 3), minmax(0, 1fr)); 
    gap: 24px; 
    transition: opacity .2s; 
}
.ctl-list.is-loading .ctl-grid { 
    opacity: .45; 
    pointer-events: none; 
}
@media (max-width: 1024px) { 
    .ctl-grid { 
        grid-template-columns: repeat(min(2, var(--ctl-cols, 3)), 
        minmax(0, 1fr)); gap: 20px; 
    } 
}
@media (max-width: 549px) { 
    .ctl-grid { 
        grid-template-columns: 1fr; 
        gap: 16px; 
    } 
}

.ctl-empty { 
    grid-column: 1 / -1; 
    padding: 48px 20px; 
    text-align: center; 
    color: var(--ctl-muted); 
    background: #fff; 
    border-radius: var(--ctl-radius); 
    box-shadow: var(--ctl-shadow); 
}
.ctl-empty p { margin: 0; }

/* Thẻ tour */
.ctl-card { 
    display: flex; 
    flex-direction: column; 
    background: #fff; 
    border-radius: var(--ctl-radius); 
    box-shadow: var(--ctl-shadow); 
    overflow: hidden; 
    transition: transform .2s, 
    box-shadow .2s; 
}
.ctl-card:hover { 
    transform: translateY(-3px); 
    box-shadow: var(--ctl-shadow-hover); 
}

.ctl-card-media { 
    position: relative; 
    display: block; aspect-ratio: 16 / 9; 
    overflow: hidden; 
    background: var(--ctl-line); 
}
.ctl-list .ctl-card-media img, 
.ctl-card-noimg { 
    position: absolute; 
    inset: 0; 
    display: block; 
    width: 100% !important; 
    height: 100% !important; 
    max-width: none !important; 
    max-height: none !important; 
    margin: 0; object-fit: cover; 
    transition: transform .4s;
}
.ctl-card:hover .ctl-card-media img { 
    transform: scale(1.04); 
}
.ctl-card-badge { 
    position: absolute; 
    top: 10px; 
    left: 10px; 
    padding: 3px 10px; 
    border-radius: 999px; 
    background: var(--ctl-accent); 
    color: #fff; 
    font-size: 12px; 
    font-weight: 600; 
    line-height: 1.5; 
}

.ctl-card-body { 
    display: flex; 
    flex-direction: column; 
    flex: 1; 
    padding: 12px 14px 14px; 
}
.ctl-card-rating { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    margin-bottom: 4px; 
    font-size: 12px; 
    color: var(--ctl-text); 
}
.ctl-card-rating svg { 
    color: var(--hg-star, #FBC421);
}
.ctl-card-rating b { 
    color: var(--hg-star, #FBC421); 
    font-weight: 600; 
}
.ctl-card-rating.is-empty svg { 
    color: var(--ctl-border); 
}

.ctl-list .ctl-card-title { 
    margin: 0 0 4px; 
    font-size: 20px; 
    font-weight: 600; 
    line-height: 1.35; 
}
.ctl-list .ctl-card-title a { 
    color: var(--ctl-brand); 
    text-decoration: none; 
}
/*.ctl-list .ctl-card-title a:hover { */
/*    color: var(--ctl-text); */
/*}*/
.ctl-card-desc { 
    margin: 0 0 6px; 
    font-size: 16px; 
    line-height: 1.45; 
    color: var(--ctl-text); 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.ctl-card-meta { 
    margin: 0 0 30px; 
    padding: 0; 
    list-style: none; 
}
.ctl-card-meta li { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin: 0; 
    padding: 3px 0; 
    font-size: 16px; 
    color: var(--ctl-text); 
    margin-left: unset !important;
}
.ctl-card-meta svg { 
    flex: none; 
    width: 18px; 
    height: 18px; 
    color: var(--ctl-accent); 
}

.ctl-card-foot { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 10px; 
    margin-top: auto; 
    padding-top: 12px; 
    border-top: 1px solid var(--ctl-text); 
    color: var(--ctl-brand); 
    text-decoration: none; 
}
.ctl-card-price { 
    font-size: 16px; 
    font-weight: 700;
    color: var(--ctl-brand);
}
.ctl-card-foot svg { 
    flex: none; 
    transition: transform .2s; 
}
.ctl-card-foot:hover { 
    color: var(--ctl-brand); 
}
.ctl-card-foot:hover svg { 
    transform: translateX(4px); 
}

/* Phân trang */
.ctl-pagination { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center; 
    gap: 6px; 
    margin-top: 28px; 
}
.ctl-pagination:empty { display: none; }
.ctl-page { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    min-width: 30px; 
    height: 30px; 
    padding: 0 6px; 
    border-radius: 6px; 
    color: var(--ctl-text); 
    font-size: 16px; 
    font-weight: 500; 
    text-decoration: none; 
}
.ctl-page:hover { 
    background: var(--ctl-soft); 
    color: var(--ctl-brand); 
}
.ctl-page.is-current { 
    background: var(--ctl-button); 
    color: #fff;
    border-radius: 3px;
}
.ctl-page-dots { 
    color: var(--ctl-muted); 
    padding: 0 2px; 
}

/* ===================== Trang danh mục tour (/danh-muc-tour/...) ===================== */
.ctl-archive { 
    padding: 30px 0 30px; 
    color: var(--hg-text); 
}
.ctl-archive-head { padding: 16px 0 24px; }
.ctl-archive-title { margin: 12px 0 0; color: var(--hg-primary); font-size: 32px; font-weight: 700; line-height: 1.3; }
.ctl-archive-desc { max-width: 820px; margin-top: 10px; font-size: 15px; line-height: 1.65; }
.ctl-archive-desc > :last-child { margin-bottom: 0; }
@media (max-width: 849px) { .ctl-archive-title { font-size: 26px; } }