/* ================= BLOG BEAUTY PACK (Sapo .rte only) ================= */

/* 0) Biến nhanh tay – đổi 1 chỗ ăn khắp bài */
:root {
  --brand: #f05454;                 /* màu nhấn */
  --brand-weak: rgba(240,84,84,.08);
  --text: #222;
  --muted: #666;
  --border: #ececec;
  --bg-soft: #fafafa;
}

/* 1) Vùng nội dung blog */
.rte {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 17px !important;
  line-height: 1.85 !important;
  color: var(--text) !important;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.rte p { margin: 0 0 1.1em; }

/* 2) Heading có nhịp */
.rte h1 { font-size: 1.9rem; line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }
.rte h2 {
  font-size: 1.45rem; font-weight: 700;
  margin: 1.2em 0 .6em; padding-bottom: .35em;
  /*border-bottom: 1.8px solid var(--brand);*/
}
.rte h3 { font-size: 1.2rem; font-weight: 600; margin: 1.3em 0 .4em; color: #006600; }
.rte h4 { font-size: 1.05rem; font-weight: 600; margin: 1.1em 0 .3em; }

/* 3) Link tinh tế */
.rte a {
  color: var(--brand); text-decoration: none;
  border-bottom: 1px dashed var(--brand);
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.rte a:hover { color: #111; background: var(--brand-weak); border-bottom-color: var(--brand); }

/* 4) Ảnh + caption */
.rte img {
  display: block; max-width: 100%; height: auto;
  margin: 18px auto; border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.rte figure { margin: 20px 0; }
.rte figcaption { text-align: center; color: var(--muted); font-size: .92em; margin-top: 8px; }

/* 5) Blockquote bắt mắt */

/* Blockquote cân đối, viền trái chuẩn cao bằng hộp */
.rte blockquote{
  position: relative;
  margin: 16px 0;                  /* khoảng cách với đoạn ngoài */
  padding: 14px 18px 14px 22px;     /* padding đều hơn */
  background: #fafafa;
  border: none;                     /* bỏ border-left cũ */
  border-radius: 8px;
  color: #444;
  font-style: italic;
}

/* Viền trái dùng pseudo để luôn full chiều cao */
.rte blockquote::before{
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);         /* #f05454 hoặc màu brand của sếp */
  border-radius: 8px 0 0 8px;
}

/* Xóa margin mặc định của phần tử bên trong để không “đội” blockquote */
.rte blockquote > p,
.rte blockquote > ul,
.rte blockquote > ol{
  margin: 0 !important;
}

/* Nếu có nhiều phần tử con, đảm bảo khoảng cách nhẹ giữa chúng */
.rte blockquote > * + *{
  margin-top: .4em;
}

}

/* 6) Danh sách dễ đọc */
.rte ul { padding-left: 1.3em; margin: 1em 0; }
.rte ul li { margin: .45em 0; }
.rte ul li::marker { color: var(--brand); }
.rte ol { padding-left: 1.3em; margin: 1em 0; }

/* 7) Bảng có viền + tự cuộn khi tràn */
.rte table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .96em; }
.rte th, .rte td { border: 1px solid var(--border); padding: 10px 12px; vertical-align: top; }
.rte th { background: #f6f6f6; text-align: left; }
.rte .table-responsive { overflow-x: auto; }

/* 8) Code block (nếu có tech) */
.rte pre {
  background: #0f172a; color: #e2e8f0;
  padding: 14px 16px; border-radius: 8px; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em;
}
.rte code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }

/* 9) Hộp callout */
.rte .callout {
  padding: 14px 16px; border: 1px solid var(--border);
  border-left: 4px solid var(--brand); background: #fff;
  border-radius: 10px; margin: 18px 0;
}
.rte .callout strong { color: var(--brand); }

/* 10) Mục lục (TOC) – hover nền đỏ mờ */
.rte .toc, .rte .post-toc, .rte .article-toc {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 14px; margin: 16px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.rte .toc h3, .rte .post-toc h3, .rte .article-toc h3 {
  margin: 0 0 8px; font-size: 1rem; color: var(--muted);
}
.rte .toc a, .rte .post-toc a, .rte .article-toc a {
  display: block; padding: 6px 8px; border-radius: 8px;
}
.rte .toc a:hover, .rte .post-toc a:hover, .rte .article-toc a:hover { background: var(--brand-weak); }

/* 11) Meta/ghi chú nhỏ */
.rte .meta { color: var(--muted); font-size: .92em; }

/* 12) Fix spacing theme chèn <br> đôi */
.rte br + br { display: none; }

/* 13) Khoảng cách phần “bài viết liên quan” nếu có */
.related-articles, .article-related { margin-top: 28px; }

/* 14) Mobile tweaks */
@media (max-width: 767px) {
  .rte { font-size: 16.5px !important; line-height: 1.9 !important; padding: 0 14px; }
  .rte h1 { font-size: 1.6rem; }
  .rte h2 { font-size: 1.25rem; }
  .rte h3 { font-size: 1.08rem; }
}

/* Danh sách UL có icon custom */
.rte ul {
  list-style: none;          /* bỏ bullet mặc định */
  padding-left: 1.6em;       /* tạo khoảng trống cho icon */
  margin: 1em 0;
}

.rte ul li {
  position: relative;
  margin-bottom: 8px;
  line-height: 1.6;
}

.rte ul li::before {
  content: "•";              /* icon tick */
  font-weight: 400;
  position: absolute;
  left: -1.4em;              /* canh icon ra ngoài */
  top: 0.1em;
}

.rte p, .rte li {
  font-weight: 400 !important;   /* chữ mảnh, dễ đọc */
}

/* ================= END ================= */

.ftoc-head {
    background: #efffcf;
    padding: 20px 20px;
    border-radius: 15px;
    margin: 30px 0 30px 0;
}

.ftoc-head .dola-toc .toc-list {
    list-style: decimal;
    list-style-type: auto;
    list-style-position: inherit;
    padding-left: 20px;
}

.ftoc-head .dola-toc .toc-list .toc-list-item .is-collapsible {
    list-style: decimal;
    list-style-type: square;
    list-style-position: inherit;
    padding-left: 20px;
	padding-top: 10px;
}

.article-details {
    min-height: 100%;
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    text-align: justify;
}

/* =================================================================== */
/* COMPONENT: FLASH SALE                          */
/* =================================================================== */

/* --- 1. Animation Definitions --- */
/* Hiệu ứng nhấp nháy cho icon */
@keyframes icon_blinker {
  50% {
    opacity: 0.3;
  }
}


/* --- 2. Main Layout --- */
/* Container chính chứa tiêu đề và đồng hồ */
.section_flashsale .thumb-flasale .group_title_index {
  display: flex;
  justify-content: space-between; /* << ĐỔI LẠI THÀNH SPACE-BETWEEN */
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}


/* --- 3. Title & Icon --- */
/* Tiêu đề "Flash Sale" */
.section_flashsale .group_title_index .title .title-name {
  position: relative;
  font-size: 30px;
  font-weight: 700;
  color: #E53935;
  text-transform: uppercase;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* Icon nhấp nháy trước tiêu đề */
.section_flashsale .group_title_index .title .title-name::before {
  content: '⚡'; /* Bạn có thể đổi icon tại đây */
  margin-right: 8px;
  animation: icon_blinker 0.8s linear infinite; /* Điều chỉnh tốc độ tại đây */
}


/* --- 4. Countdown Timer --- */
/* Vùng chứa các khối thời gian */
.section_flashsale .timer-view {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Từng khối thời gian (Ngày, Giờ, Phút, Giây) */
.section_flashsale .block-timer {
  background-color: #004d40;
  color: white;
  border-radius: 5px;
  padding: 8px 12px;
  text-align: center;
  min-width: 60px;
  position: relative; /* Thêm position để định vị dấu hai chấm */
}

/* Chữ "Ngày", "Giờ"... */
.section_flashsale .block-timer p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

/* Số đếm */
.section_flashsale .block-timer b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

/* Ẩn dấu hai chấm gốc từ HTML */
.section_flashsale .timer-view > span {
  display: none;
}

/* Tạo dấu hai chấm mới bằng CSS */
.section_flashsale .block-timer:not(:last-child)::after {
  content: ':';
  font-size: 20px;
  font-weight: bold;
  color: #333;
  
  /* Căn chỉnh vị trí tuyệt đối so với khối cha (.block-timer) */
  position: absolute;
  top: 50%;
  right: -13px; /* Đẩy dấu hai chấm ra giữa các khối */
  transform: translateY(-50%); /* Căn giữa theo chiều dọc */
}