/* ===== Scoped cho trang danh sách ===== */
#listApp .toolbar{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:10px 0 18px;
}
#listApp .toolbar label{font-weight:600; color:#333}
#listApp .toolbar select{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  border:1px solid #ddd; border-radius:10px; background:#fff;
  padding:8px 12px; line-height:1.2; cursor:pointer;
}

/* Breadcrumb: bỏ dấu chấm & căn hàng ngang */
.wrap .breadcrumbs{list-style:none; margin:10px 0 0; padding:0}
.wrap .breadcrumbs li{display:inline-block}
.wrap .breadcrumbs li+li:before{
  content:"›"; margin:0 .35rem; opacity:.55
}

/* Bố cục 2 cột ổn định (kể cả khi list rỗng) */
#listApp .main-wrapper{
  display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:24px;
}
@media (max-width: 1024px){
  #listApp .main-wrapper{grid-template-columns:1fr}
}

/* Khoảng trống giữ chỗ khi đang tải / không có dữ liệu */
#listApp .placeholder{
  background:#fafafa; border:1px dashed #e5e5e5; border-radius:12px;
  padding:18px; color:#666; margin-bottom:16px
}

/* Bản ghi truyện theo grid nếu theme cũ dùng float */
#listApp .truyen-list{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:16px;
}
#listApp .truyen-list .item{
  background:#fff; border:1px solid #eee; border-radius:14px; overflow:hidden;
}
#listApp .truyen-list .item .cover img{display:block; width:100%; height:auto}
#listApp .truyen-list .item h3{font-size:16px; line-height:1.35; margin:10px 12px}
#listApp .truyen-list .item .line{margin:4px 12px; color:#444}
#listApp .truyen-list .item .line span:first-child{color:#666}

/* Phân trang canh hàng ngang đẹp */
#listApp .phan-trang{display:flex; gap:8px; flex-wrap:wrap; margin:16px 0}
#listApp .btn-page{
  display:inline-block; padding:8px 12px; border:1px solid #ddd; border-radius:8px;
  background:#fff; text-decoration:none
}
#listApp .btn-page.active{background:#007bff !important; color:#fff; border-color:#007bff}

/* Sidebar hình quảng cáo bị vỡ ảnh vẫn giữ kích thước */
.sidebar .poster img{width:100%; height:auto; display:block}

/* ===== LIST STYLE giống ảnh mẫu ===== */
.book-list{ display:flex; flex-direction:column; gap:18px; }
.book{
  display:flex; gap:14px; padding:12px; background:#fff;
  border:1px solid #eee; border-radius:12px;
}
.book + .book{ border-top:1px solid #f1e9ff } /* nhẹ nhàng ngăn cách */
.book .cover{
  flex:0 0 110px; width:110px; height:150px; overflow:hidden; border-radius:10px;
  border:1px solid #eee; background:#fafafa;
}
.book .cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.book .body{ flex:1; min-width:0; }
.book .title{ margin:0 0 6px; font-size:18px; font-weight:800; line-height:1.3; }
.book .title a{ color:#222; }
.badge-full{
  margin-left:8px; font-size:12px; font-weight:700;
  color:#1e7e34; background:#d4edda; border:1px solid #c3e6cb;
  border-radius:999px; padding:2px 7px; vertical-align:middle;
}
.book .meta{ list-style:none; margin:8px 0 0; padding:0; color:#333; }
.book .meta li{ margin:6px 0; line-height:1.5; }
.book .meta .label{ color:#6b7280; margin-right:6px; }

@media (max-width: 560px){
  .book{ gap:12px; padding:10px; }
  .book .cover{ width:90px; height:125px; }
  .book .title{ font-size:16px; }
}

/* Placeholders (khi rỗng/đang tải) */
.placeholder{
  background:#fafafa; border:1px dashed #e5e5e5; border-radius:12px;
  padding:18px; color:#666; margin-bottom:16px;
}
/* Bổ sung layout cột phải nếu theme chưa có */
.main-wrapper { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 992px){
  .main-wrapper { grid-template-columns: 3fr 1fr; }
}
.sideCol .widget { background:#fff; border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.05); padding:14px; margin-bottom:16px; }
.widget-title { font-weight:700; padding:0 0 8px; text-align:center; font-size:20pt; color:  #007bff !important; border-bottom:1px solid #e5e7eb !important }
.top-list { margin:0; }
.top-list li { margin:6px 0; }
.banner-img { width:100%; height:auto; border-radius:8px; display:block; }
.btn-readnow { display:block; text-align:center; padding:10px 12px; border-radius:8px; background:#2b6cb0; color:#fff; font-weight:600; }
.btn-readnow:hover { background:#2c5282; color:#fff; }
/* Huy hiệu FULL nếu chưa có style */
.badge-full { background:#10b981; color:#fff; border-radius:4px; padding:2px 6px; font-size:12px; margin-left:6px; }
.top-list small {color: gray; font-size:8pt;}

/* ===== MOBILE FIX (hard reset desktop styles) ===== */
@media (max-width: 768px) {

  /* 1 cột, bỏ sidebar */
  .main-wrapper { display: grid; grid-template-columns: 1fr !important; gap: 16px; }
  .sideCol { display: none !important; }

  /* Danh sách */
  .book-list { display: flex; flex-direction: column; gap: 14px; }

  /* Card */
  .book {
     display: grid !important;
	  grid-template-columns: 120px 1fr;   /* cover 120px, nội dung chiếm phần còn lại */
	  gap: 12px;
	  align-items: start;
	   background: transparent !important;
	  border: 0 !important;
	  border-radius: 0 !important;
	  box-shadow: none !important;
	  padding: 0 !important;
	max-width: fit-content;
	 position: relative; /* để vẽ gạch */
  }
 .book:not(:first-child)::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;              /* nằm giữa khoảng cách 2 item */
  height: 1px;
  background: #e5e7eb;     /* đổi #d1d5db nếu muốn đậm hơn */
  pointer-events: none;
}
.book::before{ z-index: 0; }
.book:first-child::before{ display: none; }

	.book .cover{
	  grid-column: 1/2;
	  display: block !important;
	  float: none !important;
	  width: 100% !important;
	  margin: 0 !important;
	  border-radius: 8px !important;
	  overflow: hidden;
	}
	.book .cover img{
	  width: 100% !important;
	  height: 160px !important;           /* có thể chỉnh 140–180px */
	  object-fit: cover !important;
	  display: block;
	}

	.book .body{
	  grid-column: 2/2;
	  margin: 0 !important;
	  padding: 0 !important;
	  min-height: auto !important;
	  width: 100% !important;
	}

	.book .title,
	.book .title a {
	  display: block;                 /* để tính dòng đúng */
	  white-space: normal !important; /* bỏ nowrap */
	  overflow: visible !important;   /* bỏ overflow hidden */
	  text-overflow: clip !important; /* bỏ ellipsis */
	  word-break: break-word;         /* ngắt từ dài */
	  overflow-wrap: anywhere;        /* fallback ngắt chỗ bất kỳ nếu cần */
	  line-height: 1.35;
	}

	/* Nếu theme cũ dùng line-clamp (multi-line ellipsis), tắt luôn */
	.book .title,
	.book .title a {
	  display: block;
	  -webkit-line-clamp: unset !important;
	  -webkit-box-orient: unset !important;
	}
	.book .meta{
	  list-style: none;
	  margin: 6px 0 0 !important;
	  padding: 0 !important;
	  font-size: 14px !important;
	  line-height: 1.45 !important;
	  color: #4b5563 !important;
	}
	.book .meta .label{ font-weight: 600; color:#111827; margin-right:4px; }

  /* Phân trang */
  .phan-trang { margin-top: 10px; display:flex; gap:6px; justify-content:center; flex-wrap:wrap; }
  .phan-trang .btn-page { padding: 7px 11px; font-size: 14px; border-radius: 8px; }

  
}
/* Title/desc đầu trang */
.title-list h1 { font-size: 20px !important; margin-bottom: 6px; }
.title-list p  { font-size: 14px !important; color: #6b7280; }
/* Responsive nhỏ hơn: vẫn giữ bố cục trái-phải nhưng cover thu gọn */
@media (max-width: 420px){
  .book{ grid-template-columns: 100px 1fr; gap: 10px; padding: 8px; }
  .book .cover img{ height: 130px !important; }
  .book .title{ font-size: 15.5px !important; }
  .book .meta{ font-size: 13.5px !important; }
}


/* chỉnh khoảng cách dòng mô tả cho gọn */
.title-list p{
  margin: 8px 0 30px;
  color: #6b7280;
}
/* NGẮN GỌN: gạch dưới tiêu đề, đúng vị trí */
.title-list h1{
  position: static !important;      /* tránh ảnh hưởng position cũ */
  margin: 0 0 10px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* mô tả ngay dưới */
.title-list p{
  margin: 8px 0 30px !important;
  color: #6b7280;
}
.phan-trang {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 25px 0;
}

.btn-page {
  display: inline-block;
  padding: 8px 14px;
  background: #f6f7f8;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #ddd;
}

.btn-page:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.btn-page.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
  cursor: default;
}

.btn-page.prev, .btn-page.next {
  font-weight: bold;
  padding: 8px 12px;
}

.top-title{
	font-size: 18px;
}