@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Dancing+Script:wght@400..700&family=Great+Vibes&family=Lora:ital,wght@0,400..700;1,400..700&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&family=Noto+Serif+Devanagari:wght@400;600;700&family=Noto+Serif+JP:wght@400;600;700&family=Noto+Serif+KR:wght@400;600;700&family=Noto+Serif+Lao:wght@400;600;700&family=Noto+Serif+Thai:wght@400;600;700&family=Noto+Serif+Tibetan:wght@400;600;700&family=Philosopher:ital,wght@0,400;0,700;1,400&family=Playball&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Roboto:ital,wght@0,400;0,700;1,400&display=swap');

@font-face {
	font-family: 'CN_KHAI_30';
	src: url('../fonts/CN_KHAI_30.woff') format('woff'),
		url('../fonts/CN_KHAI_30.TTF') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
	unicode-range: U+2E80-2EFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF, U+20000-2A6DF, U+2A700-2B73F, U+2B740-2B81F, U+2B820-2CEAF, U+2CEB0-2EBEF, U+2F800-2FA1F;
}

#chapter-content,
#chapter-content *,
.story_description,
.story_description * {
	color: #783f04;
	font-family: 'Great Vibes', cursive, Philosopher, 'CN_KHAI_30', 'CN-KHAI', serif;
	font-size: x-large;
}

/* Tiêu đề in HOA, Heading và Copyright line sử dụng font Philosopher mặc định */
.chappter h1,
.chappter h2,
.chappter h3,
.chappter h4,
.chappter .title,
.chappter .about-chapter .title,
.chappter .kinh-title-upper,
.chappter .kinh-title-upper *,
.kinh-title-upper,
.kinh-title-upper *,
.cpright,
.cpright *,
#chapter-content h1,
#chapter-content h2,
#chapter-content h3,
#chapter-content h4,
#chapter-content h5,
#chapter-content h6,
#chapter-content .title,
#chapter-content .cpright,
#chapter-content .cpright *,
#chapter-content .kinh-title-upper,
#chapter-content .kinh-title-upper *,
.content.m-bottom h1,
.content.m-bottom h2,
.content.m-bottom h3,
.content.m-bottom h4,
.content.m-bottom .title,
.content.m-bottom .cpright,
.content.m-bottom .cpright *,
.content.m-bottom .kinh-title-upper,
.content.m-bottom .kinh-title-upper * {
	font-family: 'Philosopher', 'Times New Roman', serif !important;
}

html[lang="cn"] .chappter,
html[lang="cn"] .chappter #chapter-content,
html[lang="cn"] .chappter #chapter-content *,
html[lang="zh"] .chappter,
html[lang="zh"] .chappter #chapter-content,
html[lang="zh"] .chappter #chapter-content *,
html[lang="zh-CN"] .chappter,
html[lang="zh-CN"] .chappter #chapter-content,
html[lang="zh-CN"] .chappter #chapter-content *,
html[lang="tw"] .chappter,
html[lang="tw"] .chappter #chapter-content,
html[lang="tw"] .chappter #chapter-content *,
html[lang="zh-TW"] .chappter,
html[lang="zh-TW"] .chappter #chapter-content,
html[lang="zh-TW"] .chappter #chapter-content * {
	color: #783f04 !important;
	font-family: 'Great Vibes', 'CN_KHAI_30', 'CN-KHAI', Philosopher, serif !important;
	font-size: x-large !important;
}

/* Căn đều hai bên lề (justify) cho văn bản kinh sách, dàn trang đầu vào căn lề phải cuối dòng bằng nhau */
#chapter-content,
.content.m-bottom,
.pd_description {
	text-align: justify !important;
	text-justify: inter-word;
}

#chapter-content p,
#chapter-content div:not(.hgroup):not(.cpright),
.content.m-bottom p,
.pd_description p {
	text-align: justify !important;
	text-justify: inter-word;
	line-height: 1.8;
	margin-bottom: 15px;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

#chapter-content .hgroup {
	text-align: center !important;
	margin-bottom: 20px;
}

#chapter-content .hgroup h2,
#chapter-content .hgroup p {
	text-align: center !important;
}

#chapter-content h2,
#chapter-content h3,
#chapter-content h4 {
	margin-top: 20px;
	margin-bottom: 12px;
	line-height: 1.5;
}

* {
	margin: 0;
	padding: 0;
}

/*-----------------------------------FLOAT FORMAT-----------------------------------*/
.float_left {
	float: left;
}

.float_right {
	float: right;
}

/*-----------------------------------FONT SIZE---COLOR-----------------------------------*/
.fs11 {
	font-size: 11px;
}

.fs16 {
	font-size: 16px;
}

.red {
	color: #C60005;
}

.black {
	color: #484848
}

.w_color {
	color: #fff;
}

.grey {
	color: #999 !important
}

.green {
	color: #6C0
}

/*-----------------------------------BORDER-----------------------------------*/
.bs1 {
	border: solid 1px #aeaeae;
}

/*-----------------------------------WIDTH-----------------------------------*/
.w200 {
	width: 200px;
}

/*--------------------------------PADDING------------------------------*/
.p27t {
	padding-top: 27px;
}

.p10t {
	padding-top: 10px;
}

.p7t {
	padding-top: 7px;
}

.p5t {
	padding-top: 5px;
}

.p10r {
	padding-right: 10px;
}

.p20r {
	padding-right: 20px;
}

.p10l {
	padding-left: 10px;
}

.p80l {
	padding-left: 124px;
}

.p30l {
	padding-left: 30px;
}

.p130l {
	padding-left: 130px;
}

.p20b {
	padding-bottom: 20px;
}

.p10b {
	padding-bottom: 10px;
}

.p5b {
	padding-bottom: 5px;
}

.p50b {
	padding-bottom: 50px;
}

/*--------------------------------MARGIN------------------------------*/
.m10l {
	margin-left: 10px;
}

.m5l {
	margin-left: 5px;
}

.m5r {
	margin-right: 5px;
}

.m5t {
	margin-top: 5px;
}

.m7t {
	margin-top: 7px;
}

.m2l {
	margin-left: 2px;
}

.m20l {
	margin-left: 20px;
}

.m30l {
	margin-left: 30px !important;
}

.m60l {
	margin-left: 178px;
}

.m20b {
	margin-bottom: 20px;
}

.m5b {
	margin-bottom: 5px;
}

.m10r {
	margin-right: 10px;
}

.m60r {
	margin-right: 60px !important;
}

.m10t {
	margin-top: 10px;
}

.m15t {
	margin-top: 15px;
}

.m20t {
	margin-top: 20px;
}

.m40t {
	margin-top: 30px;
}

.m30t {
	margin-top: 30px !important;
}

.m20b {
	margin-bottom: 20px;
}

.m12l {
	margin-left: 130px;
}

.m13l {
	margin-left: 112px;
}

/*--------------------------------BACKGROUND------------------------------*/

/*end slide show*/
.readMore {
	margin-left: 5px;
	font-style: italic;
}

.about-chapter img,
.chappter .about-chapter img,
.kinhsachinfo img.img-thumbnail {
	width: 250px !important;
	height: 350px !important;
	object-fit: cover;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
	float: left;
	margin-right: 20px;
	margin-bottom: 15px;
}

@media (max-width: 480px) {

	.about-chapter img,
	.chappter .about-chapter img,
	.kinhsachinfo img.img-thumbnail {
		width: 100% !important;
		max-width: 250px !important;
		height: auto !important;
		aspect-ratio: 250 / 350;
		float: none;
		margin: 0 auto 15px auto;
		display: block;
	}
}

.updateNew {
	position: relative;
}

.imgCover {
	width: 124px;
	height: 170px;
	border: solid #CCC 1px;
}

.borderImgCover {
	border: solid #CCC 1px;
	position: absolute;
	width: 73px;
	height: 102px;
	top: -1px;
	left: -2px;
}

.imgCover1 {
	width: 85px;
	height: 120px;
	border: solid #EEE 1px;
}

.borderImgCover1 {
	border: solid #CCC 1px;
	position: absolute;
	width: 87px;
	height: 122px;
	top: -2px;
	left: -2px;
}

.smallimgCover {
	width: 57px;
	height: 74px;
}

.smallborderImgCover {
	border: solid #CCC 1px;
	position: absolute;
	width: 55px;
	height: 72px;
	top: 0px;
	left: 0px;
}

.w160 {
	width: 160px
}

.w190 {
	width: 190px
}

.borderImgCoverShow {
	display: block;
	padding: 3px;
	line-height: 20px;
	border: 1px solid #ddd;
	-moz-transition: all .5s ease-in-out;
	-webkit-transition: all .5s ease-in-out;
}

.borderImgCoverShow:hover {
	background-color: #f66b00;
}

.titleStory {
	margin-left: 10px;
}

.titleStory h2 {
	width: 188px;
}

.titleStory span {
	position: relative;
	color: #999
}

.bgCountTop {
	float: left;
	display: inline-block;
	color: white;
	text-align: center;
	margin: 0px 5px 0 3px;
	position: relative;
	background: #679a26;
	line-height: 18px;
	font-size: 10px;
	height: 18px;
	width: 18px;
	border-radius: 50px;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	-o-border-radius: 50px;
	-ms-border-radius: 50px;
}

.bgCount {
	float: left;
	display: inline-block;
	color: white;
	text-align: center;
	margin: 0px 5px 0 3px;
	position: relative;
	background: #FDA500;
	line-height: 18px;
	font-size: 10px;
	height: 18px;
	width: 18px;
	border-radius: 50px;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	-o-border-radius: 50px;
	-ms-border-radius: 50px;
}

.imgAvatar {
	width: 66px;
	height: 60px;
}

.categoriesTop {
	background: #f00;
	width: 100%;
}

.categoriesTop h2 {
	font-size: 18px;
	text-transform: uppercase;
	color: #fff;
	position: relative;
	line-height: 38px;
	left: 10px;
	font-family: utm_helvetins;
	font-weight: normal;
}

.categoriesCenter {
	background: #dadada;
	width: 100%;
}

.categoriesCenter ul li {
	line-height: 30px;
	padding-left: 10px;
	border-bottom: 1px solid #fff;
}

.categoriesCenter ul li a {
	color: #333;
	display: block;
	font-weight: bold
}

.categoriesCenter ul li a:hover {
	color: #e23f02;
	font-weight: bold;
}

.catSelect {
	font-weight: bold;
}

.categoriesCenter li.current a {
	color: #e23f02;
	font-weight: bold;
}

.categoriesBottom {
	width: 102px;
	height: 40px;
}

.showCategories {
	float: left;
	margin: 10px 0 10px 0;
}

.showCategories li {
	display: inline-table;
	padding: 0 14px;
}

.re {
	position: relative
}

.titleShow {
	font-size: 13px;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	width: 124px;
	padding-top: 5px
}

.author {
	font-size: 11px;
	color: #999;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	width: 124px;
}

.hot-prev,
.hot-next {
	font-weight: bold;
	left: 0;
	line-height: 60px;
	margin-top: -34px;
	opacity: 0.8;
	position: absolute;
	text-align: center;
	top: 50%;
}

.mybutton2 {
	background: #ffffff none repeat scroll 0 0;
	border: 1px solid #e1e1e1;
	cursor: pointer;
	font-weight: bold;
	padding: 3px 10px;
}

.hot-next {
	left: auto;
	right: 0;
}

.column-left {
	border: 1px solid #ccc;
}

.catSelect {
	font-weight: bold;
	color: #ff0 !important;
}

.info-stories>p i {
	font-size: 12px;
	color: #444;
}

.item div {
	float: left;
	height: 20px;
	padding-top: 5px;
}

.cp1 {
	font-weight: bold;
	padding-right: 10px;
	text-align: right;
	width: 180px;
	clear: both;
}

.chuongmoi {
	font-size: 14px;
	line-height: 20px;
}

.chuongmoi a {
	color: #222222;
	font-size: 14px;
}

.chuongmoi a:visited {
	color: #888;
	font-size: 13px;
}

.chuongmoi>div {
	clear: both;
}

.chuongmoi>div>a>div {
	float: left;
}

.line {
	border: 1px dotted #222222;
	margin-bottom: 10px;
}

.form-gopage {
	font-weight: bold;
	font-size: 18px;
}

.search_alpha ul li {
	float: left;
	width: auto;
	padding: 5px 0;
	margin-right: 2px;
	border: 1px solid #ccc;
}

.search_alpha ul li:hover {
	background: #f00;
}

.search_alpha ul li a {
	padding: 10px;
	font-weight: bold;
}

.search_alpha ul li a:hover {
	color: #fff;
}

.w250 {
	width: 250px;
	float: left;
}

.w50 {
	width: 50px;
	display: inline-block;
}

.select {
	background: #f00;
}

.select a {
	color: #fff !important;
}

.bgCountTop {
	background: #679a26 none repeat scroll 0 0;
	border-radius: 50px;
	color: white;
	display: inline-block;
	float: left;
	font-size: 10px;
	height: 18px;
	line-height: 18px;
	margin: 0 5px 0 3px;
	position: relative;
	text-align: center;
	width: 18px;
}

.box-search>select,
.box-search>input {
	margin: 5px;
}

.viewgrid .image {
	float: left;
	margin-right: 6px
}

ul.info-stories {
	font-size: 12px
}

ul.list-info {
	margin-bottom: 0;
	font-size: 12px
}

table.table-middle td {
	vertical-align: middle !important
}

table.table-middle td span.help-block,
table.table-middle td span.help-block ul {
	margin-bottom: 0;
	font-size: 12px
}

.story_description>div {
	text-align: center;
}

.story_description .btn {
	margin-bottom: 5px;
	text-align: center;
}

a {

	color: #c00;

	text-decoration: none;

}

a:hover {

	color: #f00;

	text-decoration: underline;

}

.nw_post_detail .pd_zoom .zoomin {
	display: block;
	float: left;
	width: 21px;
	height: 21px;
	background: url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/sprite-x.png) -13px -372px no-repeat;
	margin-right: 5px
}

.nw_post_detail .pd_zoom .zoomout {
	display: block;
	float: left;
	width: 21px;
	height: 21px;
	background: url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/sprite-x.png) -13px -336px no-repeat
}

.nw_post_detail .pd_nextback {
	float: right
}

.nw_post_detail .pd_nextback .prevpost {
	display: block;
	height: 21px;
	line-height: 21px;
	float: left;
	background: url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/sprite-x.png) 0 -299px no-repeat;
	padding-left: 20px
}

.nw_post_detail .pd_nextback .nextpost {
	display: block;
	height: 21px;
	line-height: 21px;
	float: right;
	background: url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/sprite-x.png) right -263px no-repeat;
	padding-right: 20px;
	margin-left: 20px
}

.nw_post_detail .pd_prints .print {
	display: block;
	height: 21px;
	line-height: 21px;
	float: left;
	text-indent: -500px;
	overflow: hidden;
	background: url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/sprite-x.png) -13px -407px no-repeat;
	padding-left: 20px
}

.nw_box_list_brief .pl_list .pl_row {
	margin-bottom: 5px
}

.nw_box_list_brief .pl_thumbnail {
	float: left;
	margin: 5px 8px 0 0
}

.nw_box_list_thumb .pl_list .pl_row {
	margin-bottom: 5px
}

.nw_box_list_thumb .pl_title {
	text-align: center;
	display: block
}

.nw_box_list_thumb .pl_content {
	text-align: center
}

.nw_box_list_thumb .pl_thumbnail {
	text-align: center
}

.nw_box_list_thumb .pl_thumbnail_border {
	display: inline-block
}

#recaptcha_image {
	background: #fff url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/loading.ajax.gif) center center no-repeat;
	border-radius: 3px;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	float: left;
	max-width: 100%;
	width: 302px !important;
	height: 59px !important;
	border: 1px solid #c5c5c5;
	overflow: hidden
}

#recaptcha_image img {
	max-width: 100%
}

.recaptcha {
	padding-bottom: 15px
}

.recaptcha_image_container {
	max-width: 330px;
	position: relative
}

.recaptcha_button {
	background: url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/sprite-x.png) right -508px no-repeat;
	position: absolute;
	top: 0;
	right: 0;
	height: 59px;
	width: 25px
}

.recaptcha_refresh a {
	display: block;
	height: 21px;
	width: 25px
}

.recaptcha_only_if_image a {
	display: block;
	height: 18px;
	width: 25px
}

.recaptcha_only_if_audio a {
	background: url(https://hoavouu.com/content/themes/owner/hoavouu_com/images/sprite-x.png) no-repeat right -567px;
	display: block;
	height: 18px;
	width: 25px
}

.recaptcha_help a {
	display: block;
	height: 20px;
	width: 25px
}

#chapter-content {
	text-align: justify !important;
}

#chapter-content p {
	text-align: justify;
	text-indent: 2em;
}

#chapter-content p[style*="text-align: center" i],
#chapter-content p[style*="text-align:center" i],
#chapter-content p[align="center" i],
#chapter-content p[style*="text-align: right" i],
#chapter-content p[style*="text-align:right" i],
#chapter-content p[align="right" i],
#chapter-content blockquote,
#chapter-content blockquote p {
	text-indent: 0 !important;
}

@media (min-width: 768px) {
	#chapter-content {
		padding-left: 2.5cm !important;
		padding-right: 2.5cm !important;
	}
}

/* ==========================================================================
   NÂNG CẤP GIAO DIỆN THƯ VIỆN KINH SÁCH PHẬT GIÁO — CHÙA KHAI NGUYÊN (V2)
   Thiết kế gọn đẹp: 4 - 6 kinh sách hàng ngang & cấu hình số lượng tùy ý
   ========================================================================== */

.ks-hub-wrap,
.ks-block-showcase,
.ks-listing-wrap,
.ks-viewcat-wrap,
.ks-search-widget {
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	box-sizing: border-box;
}

.ks-hub-wrap *,
.ks-block-showcase *,
.ks-listing-wrap *,
.ks-viewcat-wrap *,
.ks-search-widget * {
	box-sizing: border-box;
}

/* 1. Khung Tìm Kiếm Kinh Sách Gọn Đẹp (Chế độ hiển thị ngang toàn hệ thống) */
.ks-search-widget {
	width: 100%;
	padding: 2px 0;
	container-type: inline-size;
}

.ks-search-widget .ks-search-form {
	margin: 0;
	padding: 0;
	width: 100%;
}

.ks-search-widget .ks-alpha-bar {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 6px;
	width: 100%;
	margin: 0 0 8px 0 !important;
	padding: 0 0 7px 0 !important;
	border-bottom: 1px dashed #e5d2ba;
}

.ks-search-widget .ks-alpha-lbl {
	flex: 0 0 auto;
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 700;
	color: #7c2d12;
	white-space: nowrap;
	margin: 0 !important;
}

.ks-search-widget ul.ks-alpha-list {
	list-style: none !important;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between;
	flex: 1 1 0%;
	min-width: 0;
	gap: 3px;
	margin: 0 !important;
	padding: 0 !important;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.ks-search-widget ul.ks-alpha-list > li {
	flex: 1 1 0%;
	min-width: 22px;
	display: flex !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	float: none !important;
}

.ks-search-widget ul.ks-alpha-list > li > a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 22px;
	height: 26px;
	padding: 0 2px !important;
	border-radius: 5px;
	background: #fdf8f0;
	border: 1px solid #e2cdb2;
	color: #7c2d12 !important;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	transition: all 0.16s ease;
}

.ks-search-widget ul.ks-alpha-list > li > a:hover,
.ks-search-widget ul.ks-alpha-list > li.select > a {
	background: linear-gradient(135deg, #b45309 0%, #7c2d12 100%) !important;
	border-color: #7c2d12 !important;
	color: #ffffff !important;
}

.ks-search-widget .ks-search-controls {
	display: grid !important;
	grid-template-columns: minmax(125px, 1.55fr) minmax(105px, 1fr) minmax(115px, 1.25fr) minmax(105px, 1fr) auto auto !important;
	align-items: center !important;
	gap: 6px !important;
	width: 100% !important;
	margin: 0 !important;
}

.ks-search-widget .ks-sf-field {
	min-width: 0 !important;
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
}

.ks-search-widget .ks-sf-field .form-control {
	display: block !important;
	float: none !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: 34px !important;
	line-height: 22px !important;
	padding: 5px 8px !important;
	margin: 0 !important;
	border-radius: 7px !important;
	border: 1px solid #dcc4a6 !important;
	background-color: #fffdfa !important;
	color: #332010 !important;
	font-size: 12.5px !important;
	box-shadow: none !important;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
}

.ks-search-widget .ks-sf-field .form-control:focus {
	border-color: #b45309 !important;
	box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.14) !important;
	outline: none !important;
}

.ks-search-widget .ks-sf-check {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: center;
	gap: 5px;
	margin: 0 !important;
	height: 34px !important;
	padding: 0 10px !important;
	border-radius: 7px;
	background: #fdf6ec;
	border: 1px solid #e7d3b8;
	color: #7c2d12;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.ks-search-widget .ks-sf-check input[type="checkbox"],
.box-search input[type="checkbox"] {
	width: 14px !important;
	height: 14px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	display: inline-block !important;
	position: static !important;
	accent-color: #b45309;
}

.ks-search-widget .ks-sf-submit {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: center;
	gap: 5px;
	height: 34px !important;
	padding: 0 14px !important;
	margin: 0 !important;
	border-radius: 7px;
	border: 1px solid #92400e;
	background: linear-gradient(135deg, #d97706 0%, #9a3412 100%) !important;
	color: #ffffff !important;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.18s ease;
}

.ks-search-widget .ks-sf-submit:hover {
	background: linear-gradient(135deg, #b45309 0%, #7c2d12 100%) !important;
	box-shadow: 0 2px 6px rgba(154, 52, 18, 0.22);
}

@container (max-width: 719px) {
	.ks-search-widget .ks-search-controls {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@container (max-width: 479px) {
	.ks-search-widget .ks-search-controls {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	.ks-search-widget .ks-search-controls {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 519px) {
	.ks-search-widget .ks-search-controls {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* 2. Khung Thống Kê Thư Viện Kinh Sách (Thanh ngang gọn đẹp) */
.ks-hub-wrap {
	margin-bottom: 12px;
}

.ks-stats-panel {
	background: linear-gradient(135deg, #5c1d07 0%, #852d0d 55%, #4a1705 100%);
	border: 1.5px solid #f59e0b;
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 12px;
	color: #fffbeb;
	box-shadow: 0 6px 18px rgba(69, 26, 3, 0.18);
}

.ks-stats-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.ks-stats-title-group {
	display: flex;
	align-items: center;
	gap: 11px;
	flex: 1 1 300px;
	min-width: 0;
}

.ks-stats-crest {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
	color: #451a03;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}

.ks-stats-heading {
	margin: 0 0 2px 0 !important;
	font-size: 17px !important;
	font-weight: 800 !important;
	color: #fef08a !important;
	line-height: 1.25 !important;
	font-family: 'Philosopher', Georgia, serif;
}

.ks-stats-sub {
	margin: 0 !important;
	font-size: 12px;
	color: #fde68a;
	opacity: 0.92;
}

.ks-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(135px, 1fr));
	gap: 8px;
	flex: 1.4 1 560px;
}

.ks-stat-card {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 11px;
	border-radius: 9px;
	background: rgba(255, 251, 235, 0.11);
	border: 1px solid rgba(253, 230, 138, 0.28);
}

.ks-stat-icon {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: rgba(251, 191, 36, 0.2);
	border: 1px solid rgba(251, 191, 36, 0.42);
	color: #fde047;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	flex-shrink: 0;
}

.ks-stat-value {
	font-size: 17px;
	font-weight: 800;
	color: #ffffff;
	line-height: 1.15;
}

.ks-stat-value small {
	font-size: 12.5px;
	font-weight: 700;
	color: #fde68a;
}

.ks-stat-label {
	font-size: 11px;
	color: #fed7aa;
	font-weight: 600;
	margin-top: 1px;
	white-space: nowrap;
}

/* 3. Khung Danh Mục Chủ Đề Cha & Chủ Đề Con (Gọn 1 thanh, bấm mở rộng cây con) */
.ks-cat-directory {
	background: #fffdf9;
	border: 1px solid #e6d1b5;
	border-radius: 10px;
	margin-bottom: 12px;
	overflow: hidden;
}

.ks-cat-dir-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 12px;
	background: linear-gradient(90deg, #fdf5e6 0%, #faedd6 100%);
}

.ks-cat-quick-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1 1 auto;
	min-width: 0;
}

.ks-cat-dir-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 800;
	color: #7c2d12;
	white-space: nowrap;
	margin-right: 2px;
}

.ks-cat-dir-title i {
	color: #b45309;
}

.ks-cat-quick-pills {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
}

.ks-quick-parent-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 9px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid #dec39d;
	color: #7c2d12 !important;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.16s ease;
}

.ks-quick-parent-pill small {
	display: inline-block;
	padding: 0 5px;
	border-radius: 999px;
	background: #fef3c7;
	color: #92400e;
	font-size: 10.5px;
	font-weight: 700;
}

.ks-quick-parent-pill:hover {
	background: #7c2d12;
	border-color: #7c2d12;
	color: #ffffff !important;
}

.ks-quick-parent-pill:hover small {
	background: rgba(255, 255, 255, 0.2);
	color: #fde047;
}

.ks-cat-toggle-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	border-radius: 999px;
	border: 1px solid #cfa97e;
	background: #ffffff;
	color: #7c2d12;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: all 0.16s ease;
}

.ks-cat-toggle-btn:hover {
	background: #7c2d12;
	color: #ffffff;
	border-color: #7c2d12;
}

.ks-cat-dir-body {
	padding: 12px;
	border-top: 1px solid #e6d1b5;
	background: #fffefb;
}

.ks-cat-dir-body.ks-collapsed {
	display: none !important;
}

.ks-cat-tree-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.ks-cat-parent-box {
	background: #ffffff;
	border: 1px solid #ead8c1;
	border-radius: 8px;
	padding: 9px 11px;
}

.ks-cat-parent-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding-bottom: 6px;
	margin-bottom: 6px;
	border-bottom: 1px dashed #eedec9;
}

.ks-cat-parent-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 800;
	color: #7c2d12 !important;
	text-decoration: none !important;
}

.ks-cat-parent-link i {
	color: #d97706;
}

.ks-cat-count-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	background: #fef3c7;
	border: 1px solid #fcd34d;
	color: #92400e;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.ks-cat-children-wrap {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ks-cat-child-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.ks-cat-child-main {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 7px;
	border-radius: 5px;
	background: #fdf6ec;
	border: 1px solid #e6d0b3;
	color: #6b2106 !important;
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: none !important;
}

.ks-cat-child-main:hover {
	background: #b45309;
	border-color: #b45309;
	color: #ffffff !important;
}

.ks-cat-grand-pills {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 3px;
}

.ks-cat-grand-pill {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #f0fdfa;
	border: 1px solid #99f6e4;
	color: #0f766e !important;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none !important;
}

.ks-cat-grand-pill:hover {
	background: #0f766e;
	color: #ffffff !important;
}

/* 4. Thanh Công Cụ Chuyển Tab Nhanh & Chọn 4 - 6 Kinh Sách Hàng Ngang */
.ks-hub-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding: 8px 12px;
	background: #fffbf4;
	border: 1px solid #e4cda9;
	border-radius: 10px;
	margin-bottom: 14px;
}

.ks-hub-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
}

.ks-hub-tab {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	border-radius: 7px;
	border: 1px solid #e2caa5;
	background: #ffffff;
	color: #6b2106;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.16s ease;
}

.ks-hub-tab i {
	color: #d97706;
}

.ks-hub-tab:hover {
	border-color: #b45309;
	background: #fef3c7;
}

.ks-hub-tab.active {
	background: linear-gradient(135deg, #9a3412 0%, #7c2d12 100%);
	border-color: #7c2d12;
	color: #ffffff !important;
}

.ks-hub-tab.active i {
	color: #fde047;
}

.ks-hub-right-tools {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.ks-global-qty-box {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px;
	border-radius: 7px;
	background: #ffffff;
	border: 1px solid #dfc7a7;
	font-size: 12px;
	font-weight: 700;
	color: #6b2106;
}

.ks-global-qty-box select {
	height: 25px;
	border: 1px solid #d6bc98;
	border-radius: 5px;
	padding: 0 6px;
	font-size: 12px;
	font-weight: 700;
	color: #7c2d12;
	background: #fffdf9;
	cursor: pointer;
}

.ks-view-switch {
	display: inline-flex;
	align-items: center;
	background: #f3e8d8;
	padding: 2px;
	border-radius: 7px;
	border: 1px solid #dfc7a7;
	gap: 2px;
}

.ks-view-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 9px;
	border-radius: 5px;
	border: none;
	background: transparent;
	color: #6b2106;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.ks-view-btn:hover {
	color: #9a3412;
	background: rgba(255, 255, 255, 0.6);
}

.ks-view-btn.active {
	background: #852d0d;
	color: #fef08a !important;
	box-shadow: 0 1px 4px rgba(120, 53, 15, 0.22);
}

/* 5. Khung Panel Block Chức Năng ("Kinh sách mới đăng", "Kinh Sách mới cập nhật", "Kinh Sách đọc nhiều") */
.panel.ks-group-panel {
	border: 1px solid #dec49e !important;
	border-radius: 12px !important;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(92, 40, 8, 0.07) !important;
	margin-bottom: 18px !important;
	background: #ffffff !important;
}

.panel.ks-group-panel > .panel-heading {
	background: linear-gradient(135deg, #7c2d12 0%, #b45309 58%, #852d0d 100%) !important;
	color: #fef08a !important;
	font-size: 15.5px !important;
	font-weight: 800 !important;
	letter-spacing: 0.3px;
	padding: 10px 15px !important;
	border-bottom: 2px solid #f59e0b !important;
	text-transform: uppercase;
	font-family: 'Philosopher', Georgia, serif;
}

.panel.ks-group-panel > .panel-body {
	padding: 10px 12px 14px 12px !important;
	background: #fcf9f4 !important;
}

.ks-block-subbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding: 6px 10px;
	margin-bottom: 10px;
	background: #ffffff;
	border: 1px solid #ead8c0;
	border-radius: 8px;
}

.ks-block-subinfo {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
}

.ks-sub-ico {
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: #fef3c7;
	color: #b45309;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
}

.ks-sub-text {
	font-size: 12.5px;
	font-weight: 700;
	color: #5c2808;
}

.ks-sub-count {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: #fef3c7;
	border: 1px solid #f59e0b;
	color: #92400e;
	font-size: 11.5px;
	font-weight: 700;
}

.ks-block-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

/* Bộ điều khiển Số lượng kinh sách tùy ý ngay trong Block */
.ks-qty-ctrl {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 6px;
	border-radius: 7px;
	background: #fdf8f0;
	border: 1px solid #e2caa5;
}

.ks-qty-lbl {
	font-size: 11.5px;
	font-weight: 700;
	color: #7c2d12;
	white-space: nowrap;
}

.ks-qty-lbl i {
	color: #d97706;
}

.ks-qty-input {
	width: 52px !important;
	height: 25px !important;
	padding: 2px 5px !important;
	border: 1px solid #d4b489 !important;
	border-radius: 5px !important;
	background: #ffffff !important;
	color: #7c2d12 !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	text-align: center;
}

.ks-qty-preset {
	height: 25px;
	padding: 0 4px;
	border: 1px solid #d4b489;
	border-radius: 5px;
	background: #ffffff;
	color: #5c2808;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
}

.ks-qty-apply-btn {
	height: 25px;
	padding: 0 9px;
	border-radius: 5px;
	border: 1px solid #9a3412;
	background: #9a3412;
	color: #ffffff !important;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
}

.ks-qty-apply-btn:hover {
	background: #7c2d12;
}

.ks-admin-save-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 25px;
	padding: 0 8px;
	border-radius: 5px;
	border: 1px solid #b45309;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #ffffff !important;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
}

.ks-admin-save-btn:hover {
	background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
}

.ks-cards-container.ks-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

/* 6. THẺ KINH SÁCH CHUẨN GỌN ĐẸP (Dùng chung cho Lưới 4-6 cột & Danh sách ngang) */
.ks-book-card {
	background: #ffffff;
	border: 1px solid #e7d4bc;
	border-radius: 10px;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	position: relative;
	overflow: hidden;
}

.ks-book-card:hover {
	border-color: #d97706;
	box-shadow: 0 8px 20px rgba(124, 45, 18, 0.13);
	transform: translateY(-2px);
}

/* Khung ảnh bìa sách chuẩn tỷ lệ ấn phẩm gọn đẹp */
.ks-cover-frame {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4.05;
	border-radius: 7px;
	overflow: hidden;
	background: linear-gradient(145deg, #7c2d12 0%, #451a03 100%);
	box-shadow: 0 3px 10px rgba(69, 26, 3, 0.16);
	border: 1px solid #dbc2a3;
	text-decoration: none !important;
}

.ks-cover-img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	display: block !important;
	transition: transform 0.3s ease;
}

.ks-book-card:hover .ks-cover-img {
	transform: scale(1.04);
}

.ks-rank-badge {
	position: absolute;
	top: 5px;
	left: 5px;
	z-index: 2;
	padding: 1px 6px;
	border-radius: 5px;
	font-size: 10.5px;
	font-weight: 800;
	line-height: 1.35;
	color: #ffffff;
	background: rgba(15, 23, 42, 0.82);
}

.ks-rank-badge.ks-rank-1 {
	background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
	border: 1px solid #fde047;
}

.ks-rank-badge.ks-rank-2 {
	background: linear-gradient(135deg, #ea580c 0%, #9a3412 100%);
	border: 1px solid #fed7aa;
}

.ks-rank-badge.ks-rank-3 {
	background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
	border: 1px solid #fde68a;
}

.ks-cover-views {
	position: absolute;
	top: 5px;
	right: 5px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 1px 6px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.35;
	color: #fef08a;
	background: rgba(28, 12, 4, 0.8);
	border: 1px solid rgba(251, 191, 36, 0.38);
}

.ks-cover-ribbon {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 3px 5px;
	font-size: 10px;
	font-weight: 700;
	text-align: center;
	color: #ffffff;
	background: linear-gradient(90deg, rgba(20, 83, 45, 0.92), rgba(21, 128, 61, 0.92));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ks-cover-ribbon.ks-badge-updating {
	background: linear-gradient(90deg, rgba(146, 64, 14, 0.92), rgba(217, 119, 6, 0.92));
}

/* Thành phần thông tin thẻ */
.ks-card-topmeta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 5px;
	margin-bottom: 5px;
	min-width: 0;
}

.ks-class-badge {
	display: inline-block;
	max-width: 100%;
	padding: 2px 7px;
	border-radius: 999px;
	background: #fef3c7;
	border: 1px solid #f59e0b;
	color: #92400e !important;
	font-size: 10.5px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ks-class-badge:hover {
	background: #d97706;
	color: #ffffff !important;
}

.ks-views-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 7px;
	border-radius: 999px;
	background: #fff7ed;
	border: 1px solid #fdba74;
	color: #9a3412;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
}

.ks-views-pill i {
	color: #ea580c;
}

.ks-views-pill strong {
	font-weight: 800;
	color: #7c2d12;
}

.ks-card-title {
	margin: 0 0 5px 0 !important;
	font-size: 13.5px !important;
	font-weight: 700 !important;
	line-height: 1.36 !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ks-card-title a {
	color: #7c2d12 !important;
	text-decoration: none !important;
}

.ks-card-title a:hover {
	color: #c2410c !important;
	text-decoration: underline !important;
}

.ks-card-authors {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 5px;
	min-width: 0;
}

.ks-author-line {
	font-size: 11.5px;
	line-height: 1.38;
	color: #374151;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ks-author-line i {
	color: #b45309;
	width: 13px;
	text-align: center;
	font-size: 11px;
}

.ks-meta-lbl {
	font-weight: 600;
	color: #6b3410;
}

.ks-author-line a {
	color: #9a3412 !important;
	font-weight: 700;
	text-decoration: none !important;
}

.ks-author-line a:hover {
	color: #ea580c !important;
	text-decoration: underline !important;
}

.ks-card-summary {
	margin: 0 0 7px 0 !important;
	font-size: 11.5px !important;
	line-height: 1.44 !important;
	color: #475569 !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-align: left;
}

.ks-card-footer {
	margin-top: auto;
	padding-top: 6px;
	border-top: 1px dashed #ead8c2;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 6px;
	min-width: 0;
}

.ks-tax-box {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	flex: 1 1 auto;
}

.ks-tax-line {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	overflow: hidden;
}

.ks-tax-label {
	font-size: 10.5px;
	font-weight: 700;
	color: #78350f;
	white-space: nowrap;
	flex-shrink: 0;
}

.ks-tax-pills {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 3px;
	min-width: 0;
}

.ks-tax-pill {
	display: inline-block;
	max-width: 155px;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ks-pill-parent {
	background: #fdf4e7;
	border: 1px solid #e5c396;
	color: #852d0d !important;
}

.ks-pill-parent:hover {
	background: #852d0d;
	border-color: #852d0d;
	color: #ffffff !important;
}

.ks-pill-child {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46 !important;
}

.ks-pill-child:hover {
	background: #059669;
	border-color: #059669;
	color: #ffffff !important;
}

.ks-read-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 6px;
	background: linear-gradient(135deg, #b45309 0%, #7c2d12 100%);
	color: #ffffff !important;
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
	flex-shrink: 0;
	transition: all 0.16s ease;
}

.ks-read-btn:hover {
	background: linear-gradient(135deg, #ea580c 0%, #9a3412 100%);
	color: #ffffff !important;
}

/* ==========================================================================
   7A. KIỂU LƯỚI 4 TỚI 6 KINH SÁCH HÀNG NGANG (MẶC ĐỊNH GỌN ĐẸP)
   ========================================================================== */
.ks-cards-container.ks-mode-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	align-items: stretch;
}

.ks-cards-container.ks-mode-grid.ks-cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.ks-cards-container.ks-mode-grid.ks-cols-5 {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
}

.ks-cards-container.ks-mode-grid.ks-cols-6 {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
}

.ks-cards-container.ks-mode-grid .ks-book-card {
	display: flex;
	flex-direction: column;
	padding: 9px;
	height: 100%;
}

.ks-cards-container.ks-mode-grid .ks-card-cover-col {
	margin-bottom: 8px;
}

.ks-cards-container.ks-mode-grid .ks-card-body-col {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ks-cards-container.ks-mode-grid .ks-card-title {
	min-height: 2.72em;
}

/* Trong chế độ 4-6 cột hàng ngang: lượt đọc đã hiện rõ góc phải bìa + hiện gọn khi đủ chỗ, ẩn meta phụ để thẻ đều tăm tắp */
.ks-cards-container.ks-mode-grid .ks-list-only-meta,
.ks-cards-container.ks-mode-grid .ks-list-only-chip {
	display: none !important;
}

.ks-cards-container.ks-mode-grid.ks-cols-6 .ks-views-pill {
	display: none !important;
}

.ks-cards-container.ks-mode-grid .ks-card-footer {
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}

.ks-cards-container.ks-mode-grid .ks-read-btn {
	width: 100%;
	padding: 4px 8px;
	font-size: 11.5px;
}

.ks-cards-container.ks-mode-grid.ks-cols-6 .ks-book-card {
	padding: 8px;
}

.ks-cards-container.ks-mode-grid.ks-cols-6 .ks-card-title {
	font-size: 12.8px !important;
}

/* ==========================================================================
   7B. KIỂU DANH SÁCH NGANG (2 CỘT THẺ NGANG GỌN ĐẸP TRÊN DESKTOP)
   ========================================================================== */
.ks-cards-container.ks-mode-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ks-cards-container.ks-mode-list .ks-book-card {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 12px;
	padding: 11px 12px;
}

.ks-cards-container.ks-mode-list .ks-card-cover-col {
	flex: 0 0 96px;
	width: 96px;
}

.ks-cards-container.ks-mode-list .ks-cover-views {
	display: none;
}

.ks-cards-container.ks-mode-list .ks-card-body-col {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.ks-cards-container.ks-mode-list .ks-card-title {
	font-size: 14.5px !important;
}

.ks-cards-container.ks-mode-list .ks-card-authors {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 3px 10px;
}

.ks-list-only-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #64748b;
	white-space: nowrap;
}

.ks-list-only-chip i {
	color: #b45309;
}

/* 8. Trang Chủ Đề (viewcat) */
.ks-viewcat-header {
	background: linear-gradient(135deg, #fffcf6 0%, #faeed9 100%);
	border: 1px solid #e3c9a6;
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 12px;
}

.ks-viewcat-toprow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 6px;
}

.ks-viewcat-breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	font-size: 12px;
}

.ks-bc-root {
	font-weight: 700;
	color: #7c2d12 !important;
	text-decoration: none !important;
}

.ks-bc-lbl {
	font-weight: 700;
	color: #6b3410;
}

.ks-viewcat-metrics {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ks-vc-metric {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid #e2c8a4;
	color: #6b2106;
	font-size: 12px;
}

.ks-vc-metric i {
	color: #d97706;
}

.ks-viewcat-title {
	margin: 2px 0 8px 0 !important;
	font-size: 20px !important;
	font-weight: 800 !important;
	color: #7c2d12 !important;
	font-family: 'Philosopher', Georgia, serif;
}

.ks-viewcat-subcats {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 6px;
	padding-top: 8px;
	border-top: 1px dashed #e2c8a4;
}

.ks-subcats-label {
	font-size: 12px;
	font-weight: 800;
	color: #7c2d12;
	padding-top: 3px;
	white-space: nowrap;
}

.ks-subcats-list {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	flex: 1 1 auto;
}

.ks-subcat-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid #d8be9a;
	color: #6b2106 !important;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
}

.ks-subcat-pill:hover {
	background: #9a3412;
	border-color: #9a3412;
	color: #ffffff !important;
}

.ks-subcat-cnt {
	display: inline-block;
	padding: 0 5px;
	border-radius: 999px;
	background: #fef3c7;
	color: #92400e;
	font-size: 10.5px;
}

.ks-pagination-bar {
	margin: 10px 0;
}

/* 9. Responsive Màn Hình Laptop, Tablet & Điện Thoại */
@media (max-width: 1199px) {
	.ks-cards-container.ks-mode-grid.ks-cols-6,
	.ks-cards-container.ks-mode-grid.ks-cols-5 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ks-cat-tree-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.ks-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ks-cat-tree-grid {
		grid-template-columns: 1fr;
	}

	.ks-cards-container.ks-mode-grid,
	.ks-cards-container.ks-mode-grid.ks-cols-4,
	.ks-cards-container.ks-mode-grid.ks-cols-5,
	.ks-cards-container.ks-mode-grid.ks-cols-6 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ks-cards-container.ks-mode-list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.ks-cards-container.ks-mode-grid,
	.ks-cards-container.ks-mode-grid.ks-cols-4,
	.ks-cards-container.ks-mode-grid.ks-cols-5,
	.ks-cards-container.ks-mode-grid.ks-cols-6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.ks-cards-container.ks-mode-grid .ks-views-pill {
		display: none !important;
	}

	.ks-hub-toolbar,
	.ks-block-subbar {
		flex-direction: column;
		align-items: stretch;
	}

	.ks-hub-right-tools,
	.ks-block-actions {
		justify-content: space-between;
	}
}

@media (max-width: 400px) {
	.ks-stats-grid {
		grid-template-columns: 1fr;
	}

	.ks-cards-container.ks-mode-list .ks-card-cover-col {
		flex: 0 0 80px;
		width: 80px;
	}
}

/* 10. Tự động thu gọn thông minh khi Block đặt trong cột hẹp Trang Chủ (col-md-8 / col-md-6 / Sidebar) */
.col-md-6 .ks-block-showcase .ks-block-subbar,
.col-md-7 .ks-block-showcase .ks-block-subbar,
.col-md-8 .ks-block-showcase .ks-block-subbar {
	display: none !important;
}

.col-md-6 .ks-block-showcase .ks-cards-container,
.col-md-7 .ks-block-showcase .ks-cards-container,
.col-md-8 .ks-block-showcase .ks-cards-container {
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
}

.col-md-6 .ks-block-showcase .ks-book-card,
.col-md-7 .ks-block-showcase .ks-book-card,
.col-md-8 .ks-block-showcase .ks-book-card {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 10px !important;
	padding: 7px 8px !important;
	height: auto !important;
}

.col-md-6 .ks-block-showcase .ks-card-cover-col,
.col-md-7 .ks-block-showcase .ks-card-cover-col,
.col-md-8 .ks-block-showcase .ks-card-cover-col {
	flex: 0 0 54px !important;
	width: 54px !important;
	margin: 0 !important;
}

.col-md-6 .ks-block-showcase .ks-cover-views,
.col-md-7 .ks-block-showcase .ks-cover-views,
.col-md-8 .ks-block-showcase .ks-cover-views,
.col-md-6 .ks-block-showcase .ks-cover-ribbon,
.col-md-7 .ks-block-showcase .ks-cover-ribbon,
.col-md-8 .ks-block-showcase .ks-cover-ribbon,
.col-md-6 .ks-block-showcase .ks-card-summary,
.col-md-7 .ks-block-showcase .ks-card-summary,
.col-md-8 .ks-block-showcase .ks-card-summary,
.col-md-6 .ks-block-showcase .ks-card-footer,
.col-md-7 .ks-block-showcase .ks-card-footer,
.col-md-8 .ks-block-showcase .ks-card-footer {
	display: none !important;
}

.col-md-6 .ks-block-showcase .ks-card-title,
.col-md-7 .ks-block-showcase .ks-card-title,
.col-md-8 .ks-block-showcase .ks-card-title {
	min-height: 0 !important;
	font-size: 13px !important;
	margin-bottom: 3px !important;
}
