.listing-detail-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-top: 20px;
}
.main-content { flex: 1 1 65%; }
.sidebar-right { flex: 1 1 30%; }
.main-image {
    position: relative;
}

.main-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 768px) {

    .main-image img {
        width: 100%;
        height: 280px;
        object-fit: cover;
        border-radius: 8px;
    }

}

.nav-button {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.5);
	color: white;
	border: none;
	padding: 10px;
	cursor: pointer;
	font-size: 24px;
	z-index: 10;
}
.nav-button.left { left: 10px; }
.nav-button.right { right: 10px; }

.thumbnail-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.thumbnail-row .thumb {
  flex: 0 0 auto;
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid #ddd;
  border-radius: 4px;
}

/* ✅ Mobile chỉ 2-3 ảnh / dòng */
@media (max-width: 768px) {
  .thumbnail-row {
    justify-content: center;
  }
  .thumbnail-row .thumb {
    width: 30%;
    height: 100px;
  }
}


.listing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  background: #FFEB3B;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 16px 0;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.summary-item {
  flex: 1 1 20%;
  font-size: 16px;
  white-space: nowrap;
}

.summary-item.price {
  color: #ff0000;
  font-weight: bold;
  font-size: 24px;
}

/* Responsive cho di động */
@media (max-width: 768px) {
  .summary-item {
    flex: 1 1 40%;
    font-size: 15px;
  }
}

.listing-title {
	font-size: 26px;
	margin: 20px 0 10px;
	font-weight: bold;
	color: #222;
	line-height: 1.3;
}

.listing-description {
	list-style: none;
	padding: 0;
	margin: 20px 0;
	line-height: 1.8;
	font-size: 15px;
	background: #fafafa;
	border-left: 3px solid #28a745;
	padding: 15px 20px;
	border-radius: 4px;
}

.listing-details {
	list-style: none;
	padding: 0;
	margin: 20px 0;
	line-height: 1.8;
	font-size: 15px;
	background: #fafafa;
	border-left: 3px solid #28a745;
	padding: 15px 20px;
	border-radius: 4px;
}

.listing-details li {
	margin-bottom: 6px;
	color: #333;
}

/* Tính lãi vay */
.loan-calc form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 8px 0 12px 0;
}

.loan-calc label {
	font-weight: 500;
	color: #333;
	font-size: 14px;
}

.loan-calc input[type="number"] {
	padding: 6px 10px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
	width: 100%;
	box-sizing: border-box;
}

.loan-calc button {
	margin-top: 6px;
	padding: 8px 12px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	font-size: 14px;
}

.loan-calc button:hover {
	background-color: #0056b3;
}

.loan-result {
	margin: 12px 0 24px 0;
	padding: 10px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.6;
	color: orange;
}


/* Nổi bật sidebar */
.sidebar-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
	overflow: hidden;
	margin-bottom: 16px;
	font-size: 14px;
	border: 1px solid #eee;
	transition: box-shadow 0.2s ease;
}
.sidebar-card:hover {
	box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.sidebar-card a {
	color: #ff9800;
	text-decoration: none;
	display: block;
}
.sidebar-card-img {
	position: relative;
	height: 250px;
	overflow: hidden;
}
.sidebar-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}
.vip-badge {
	position: absolute;
	top: 6px;
	left: 6px;
	background: red;
	color: white;
	font-size: 14px;
	padding: 2px 6px;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sidebar-card-body {
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.sidebar-card-title {
	font-weight: bold;
	line-height: 1.3;
	font-size: 15px;
	color: #222;
}
.sidebar-card-desc {
	color: #666;
	font-size: 13px;
	line-height: 1.3;
}
.sidebar-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: #555;
	margin-top: 6px;
}
.sidebar-card-meta .price {
	color: #ff0000;
	font-weight: bold;
	font-size: 20px;
}
.clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 5px 0 5px 0;
}

/* ==== Viết tin tức ==== */
.news-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.news-form input[type="text"],
.news-form textarea,
.news-form input[type="file"] {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  background: #fafafa;
}

.news-form textarea {
  resize: vertical;
  min-height: 400px;
}

.news-form button[type="submit"] {
  align-self: flex-start;
  padding: 10px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.news-form button[type="submit"]:hover {
  background: #218838;
}

.news-form h2 {
  font-size: 22px;
  color: #333;
  margin-bottom: 10px;
}

.news-form p.error {
  color: red;
  margin-top: -10px;
  font-size: 14px;
}

.ck-editor__editable {
    min-height: 500px !important;
}

/* Danh sách tin tức */
.news-item {
	display: flex;
	gap: 16px;
	margin-bottom: 20px;
	border-bottom: 1px solid #ddd;
	padding-bottom: 16px;
	flex-wrap: wrap;
}

.news-item img {
	width: 100%;
	height: 250px;
	object-fit: cover;
	border-radius: 8px;
}

.news-info {
	flex: 1;
	min-width: 250px;
}

.news-info h3 {
	margin: 10px 0 10px 0;
	font-size: 20px;
}

.short-content {
	width: 100%;
	line-height: 1.5em;
}

@media (min-width: 768px) {
	.news-item {
		flex-wrap: nowrap;
	}

	.news-item img {
		width: 300px;
		height: 250px;
	}
}

/* Video */
.listing-video {
	margin-top: 20px;
	border: 1px solid #ccc;
	border-radius: 8px;
	overflow: hidden;
}

/* delete */
.delete-btn {
	color: red;
	background: none;
	border: none;
	cursor: pointer;
	font: inherit;
	padding: 0;
}

.delete-btn:hover {
	text-decoration: underline;
	opacity: 0.8;
}

/* captcha */
.captcha-img {
	border: 1px solid #ccc;
    width: 104px;
    height: 34px;
    object-fit: contain;
}

.captcha-input {
	width: 100px;
	text-align: center;
}

/* no-result */
.no-result-msg {
	text-align: center;
	color: red;
	font-size: 18px;
	font-weight: bold;
	margin-top: 20px;
}

/* news_detail.php */

.news-detail h1 {
    font-size: 26px;
    margin-bottom: 10px;
}

.news-detail .meta {
    color: #777;
    font-size: 14px;
    margin-bottom: 20px;
}

.main-thumbnail {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

.content-area {
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

.content-area img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.content-area a {
    color: #FF9800;
}

.content-area h2, .content-area h3 {
    margin-top: 24px;
}

.content-area p {
    max-width: 95%;
}

.related-news {
    margin-top: 24px;
    padding-left: 16px;
}

.related-news li {
    margin: 6px 0;
}

.captcha-code-box {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 6px;
}

.captcha-code-box span {
	font-size: 20px;
	font-weight: bold;
}

/* Thông báo */
.message-success {
    color: green;
    font-size: 16px;
    padding: 10px;
}

.message-error {
    color: red;
    font-size: 16px;
    padding: 10px;
}

.message-warning {
    color: orange;
    font-size: 16px;
    padding: 10px;
}

#editor-container {
    height: 400px;
    font-family: "Arial", sans-serif;
    font-size: 16px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ql-editor {
    min-height: 350px;
    line-height: 1.6;
    padding: 12px;
}

.listing-warning{
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:#9a3412;
    padding:10px 12px;
    margin:12px 0 14px;
    border-radius:8px;
    font-size:14px;
    line-height:1.5;
}

.warning-item{
    margin:2px 0;
}

.listing-hidden-box{
    background:#f8fafc;
    border:1px dashed #cbd5e1;
    color:#475569;
    padding:14px 16px;
    border-radius:8px;
    margin-top:12px;
}
