/* fix1005 — sửa lỗi demo (2026-10-05): ảnh SP không cắt/mờ, "Xem tất cả" 1 dòng, hero không đè chữ, mobile, trang SP, blog. Nạp SAU mpm-*.css. */

/* Thẻ SP: khung vuông theo đúng tỉ lệ ảnh (ảnh nguồn 1:1) -> không mất chủ thể */
.moc-img, .moc-sm .moc-img { height: auto !important; aspect-ratio: 1 / 1; background-size: cover; background-position: center; }
.moc-wide-card { align-items: stretch; }
.moc-wide-img { flex: 0 0 42% !important; aspect-ratio: 1 / 1; align-self: center; }
.moc-cat-img { height: auto !important; aspect-ratio: 4 / 3; }

/* "Xem tất cả" trên một dòng */
.mpm-head > p, .mpm-head > a, .mpm-head > p a { white-space: nowrap; }

/* Hero: chữ trên nền sáng dần, ghi chú phải là thẻ có nền (không chìm vào chai/lá) */
@media (min-width: 850px) {
  .mpm-hero .banner-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(248,245,239,.92) 0%, rgba(248,245,239,.78) 38%, rgba(248,245,239,0) 58%); pointer-events: none; }
  .mpm-hero .mpm-hero-lead { max-width: 440px; }
  .mpm-hero-note { width: auto !important; } .mpm-hero-note p { white-space: nowrap; }
  .mpm-hero-note .text-box-content { background: rgba(248,245,239,.9); padding: 14px 16px 12px; border-radius: 6px; box-shadow: 0 6px 24px rgba(31,77,54,.10); }
  .mpm-hero-note p { border-left: 2px solid var(--mpm-green) !important; margin: 0 !important; color: var(--mpm-ink) !important; }
}
@media (min-width: 1500px) { .mpm-hero-note { display: none !important; } }

/* Trang SP: ảnh chính vuông <= cỡ thật ảnh (416px), ảnh nhỏ dọc bên trái */
@media (min-width: 850px) {
  .mpq-gal { display: grid !important; grid-template-columns: 88px minmax(0, 416px); gap: 14px; align-content: start; justify-content: start; }
  .mpq-gal .mpq-main { grid-column: 2; grid-row: 1; height: auto !important; aspect-ratio: 1 / 1; width: 100%; }
  .mpq-gal .mpq-thumbs { grid-column: 1; grid-row: 1; display: flex !important; flex-direction: column; gap: 10px; margin: 0 !important; }
  .mpq-gal .mpq-thumbs span { height: auto !important; aspect-ratio: 1 / 1; width: 88px; }
}
@media (max-width: 849px) { .mpq-gal .mpq-main { height: auto !important; aspect-ratio: 1 / 1; max-width: 416px; margin: 0 auto; } .mpq-gal .mpq-thumbs span { height: auto !important; aspect-ratio: 1 / 1; } }
.mpq-hot strong { color: var(--mpm-ink); font-weight: 700; margin-left: 4px; }
.mpq-strip { background: url(icons/deco-leaves-l.png) left center / auto 100% no-repeat, url(icons/deco-leaves-r.png) right center / auto 100% no-repeat, #E6EFE3 !important; padding: 12px 90px !important; }

/* Mobile 390 */
@media (max-width: 849px) {
  .mpm-usp { grid-template-columns: 1fr !important; }
  .moc-wide { grid-template-columns: minmax(0, 1fr) !important; }
  .moc-wide-card { min-width: 0; }
  .moc-wide-body { min-width: 0; }
  .moc-cols-4, .moc-cols-5, .moc-cols-6, .moc-cats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .moc-card, .moc-cat { min-width: 0; }
  /* hero 2 tầng: ảnh trên, chữ dưới (LESSONS 112) */
  .banner.mpm-hero { padding-top: 0 !important; height: auto !important; background: #F1ECE2; }
  .banner.mpm-hero .banner-inner { position: relative !important; height: auto !important; }
  .banner.mpm-hero .banner-bg { position: relative !important; height: 240px !important; }
  .banner.mpm-hero .banner-bg img.bg { object-position: 72% 50% !important; }
  .banner.mpm-hero .banner-layers { position: relative !important; height: auto !important; padding: 0 !important; }
  .banner.mpm-hero .text-box.mpm-hero-box { position: relative !important; left: 0 !important; top: 0 !important; transform: none !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 22px 16px 26px !important; }
  .banner.mpm-hero .mpm-hero-box .text-box-content { background: none !important; padding: 0 !important; }
  .banner.mpm-hero .mpm-hero-note { display: none !important; }
}

/* ---------- Blog (tpl-mpb.php) ---------- */
.mpb-page { background: var(--mpm-cream); }
.mpb-w { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.mpb-band { background: url(icons/deco-leaves-r.png) right -40px center / auto 120% no-repeat, #E6EFE3; padding: 36px 0 34px; border-bottom: 1px solid var(--mpm-line); }
.mpb-band-in { display: flex; gap: 40px; align-items: center; }
.mpb-band-text { flex: 1 1 auto; min-width: 0; }
.mpb-band-s { background: #E6EFE3; }
.mpb-band-img { flex: 0 0 auto; width: min(420px, 38%); margin: 0; }
.mpb-band-img img { display: block; width: 100%; max-width: 487px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 160px 160px 8px 8px; box-shadow: 0 10px 30px rgba(31,77,54,.12); }
.mpb-crumb { font-size: 13px !important; color: var(--mpm-text) !important; margin: 0 0 14px !important; }
.mpb-crumb a { color: var(--mpm-text) !important; } .mpb-crumb span { margin: 0 8px; }
.mpb-kicker { font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; color: var(--mpm-green2) !important; margin: 0 0 6px !important; }
.mpb-h1 { font-family: "Playfair Display", Georgia, serif !important; font-weight: 400 !important; font-size: 40px !important; line-height: 1.2 !important; color: var(--mpm-ink) !important; margin: 0 0 12px !important; }
.mpb-lead, .mpb-meta { font-size: 15px !important; color: var(--mpm-text) !important; margin: 0 !important; max-width: 640px; }
.mpb-meta span { margin: 0 6px; color: #A8B3A0; }
.mpb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 40px; padding-bottom: 50px; align-items: start; }
.mpb-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mpb-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mpb-card { background: #fff; border: 1px solid var(--mpm-line); display: flex; flex-direction: column; min-width: 0; }
.mpb-card-img { display: block; aspect-ratio: 4 / 3; background: #EEE9DE center / cover no-repeat; }
.mpb-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.mpb-date { font-size: 12px; color: #8A8A7F; }
.mpb-card-title { font-family: "Be Vietnam Pro", Arial, sans-serif !important; font-size: 17px !important; font-weight: 600 !important; line-height: 1.4 !important; margin: 6px 0 8px !important; }
.mpb-card-title a { color: var(--mpm-ink) !important; }
.mpb-cards-3 .mpb-card-title { font-size: 15px !important; }
.mpb-card-ex { font-size: 13.5px !important; color: var(--mpm-text) !important; margin: 0 0 12px !important; }
.mpb-more { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--mpm-green) !important; }
.mpb-more span { margin-left: 6px; }
.mpb-pager ul { display: flex; gap: 8px; list-style: none; margin: 28px 0 0 !important; }
.mpb-pager li { margin: 0 !important; } .mpb-pager a, .mpb-pager span { display: inline-block; min-width: 38px; padding: 8px 12px; text-align: center; border: 1px solid var(--mpm-line); background: #fff; color: var(--mpm-ink); }
.mpb-pager .current { background: var(--mpm-green); color: #fff; border-color: var(--mpm-green); }
.mpb-content { background: #fff; border: 1px solid var(--mpm-line); padding: 32px 36px; }
.mpb-content p, .mpb-content li { font-size: 16px !important; line-height: 1.75 !important; color: #3E463F !important; }
.mpb-content h2 { font-family: "Playfair Display", Georgia, serif !important; font-weight: 500 !important; font-size: 25px !important; color: var(--mpm-ink) !important; margin: 26px 0 10px !important; }
.mpb-content ul { list-style: none; margin: 0 0 16px !important; padding: 0; }
.mpb-content ul li { position: relative; padding-left: 28px; margin: 0 0 8px !important; }
.mpb-content ul li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; background: url(icons/check-leaf.png) center / contain no-repeat; }
.mpb-content img { max-width: 100%; height: auto; }
.mpb-share { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 0; font-size: 13.5px; color: var(--mpm-text); }
.mpb-share a { border: 1px solid var(--mpm-green); color: var(--mpm-green) !important; padding: 6px 16px; border-radius: 99px; }
.mpb-rel { margin-top: 40px; }
.mpb-rel-title { font-family: "Playfair Display", Georgia, serif !important; font-size: 26px !important; font-weight: 400 !important; margin: 0 0 16px !important; color: var(--mpm-ink) !important; }
.mpb-aside { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 90px; }
.mpb-box { background: #fff; border: 1px solid var(--mpm-line); padding: 20px 20px 10px; }
.mpb-box-title { font-family: "Playfair Display", Georgia, serif !important; font-size: 20px !important; font-weight: 400 !important; color: var(--mpm-ink) !important; margin: 0 0 12px !important; padding-bottom: 10px; border-bottom: 1px solid var(--mpm-line); }
.mpb-recent, .mpb-cats { list-style: none; margin: 0 !important; padding: 0; }
.mpb-recent li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px !important; }
.mpb-recent-img { flex: 0 0 72px; height: 56px; background: #EEE9DE center / cover no-repeat; border-radius: 4px; }
.mpb-recent span { min-width: 0; font-size: 13.5px; line-height: 1.4; }
.mpb-recent span a { color: var(--mpm-ink) !important; font-weight: 500; }
.mpb-recent small { display: block; color: #8A8A7F; font-size: 12px; margin-top: 3px; }
.mpb-cats li { margin: 0 !important; border-bottom: 1px dashed var(--mpm-line); }
.mpb-cats li:last-child { border-bottom: 0; }
.mpb-cats a { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; color: var(--mpm-ink) !important; }
.mpb-cats a img { width: 16px; height: 16px; }
.mpb-cats small { margin-left: auto; color: #8A8A7F; font-size: 12px; }
.mpb-cta { background: var(--mpm-green); color: #fff; padding: 24px 22px; }
.mpb-cta p { color: rgba(255,255,255,.88) !important; margin: 0 0 10px !important; font-size: 14px !important; }
.mpb-cta .mpb-cta-k { font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; color: #CFE3C8 !important; margin-bottom: 6px !important; }
.mpb-cta .mpb-cta-t { font-family: "Playfair Display", Georgia, serif !important; font-size: 22px !important; line-height: 1.3; color: #fff !important; }
.mpb-cta strong { color: #fff; }
.mpb-cta-btn { display: inline-block; background: #fff; color: var(--mpm-green) !important; border-radius: 99px; padding: 9px 22px; font-size: 14px; font-weight: 600; margin-top: 4px; }
.mpb-empty { background: #fff; border: 1px solid var(--mpm-line); padding: 24px; }
@media (max-width: 849px) {
  .mpb-band { padding: 26px 0; background: #E6EFE3; }
  .mpb-band-in { flex-direction: column-reverse; align-items: stretch; gap: 18px; }
  .mpb-band-img { width: 100%; } .mpb-band-img img { border-radius: 8px; }
  .mpb-h1 { font-size: 28px !important; }
  .mpb-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 26px; }
  .mpb-cards, .mpb-cards-3 { grid-template-columns: minmax(0, 1fr); }
  .mpb-content { padding: 22px 18px; }
  .mpb-aside { position: static; }
}

/* Danh mục chưa có sản phẩm (moc-inner.php mpe-) */
.mpe-empty { background: #fff url(icons/deco-leaves-r.png) right -30px center / auto 110% no-repeat; border: 1px solid var(--mpm-line); padding: 30px 32px; margin-bottom: 26px; }
.mpe-k { font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; color: var(--mpm-green2) !important; margin: 0 0 6px !important; }
.mpe-t { font-family: "Playfair Display", Georgia, serif !important; font-size: 30px !important; font-weight: 400 !important; color: var(--mpm-ink) !important; margin: 0 0 8px !important; }
.mpe-p { font-size: 14.5px !important; color: var(--mpm-text) !important; max-width: 520px; margin: 0 0 16px !important; }
.mpe-btn { display: inline-block; background: var(--mpm-green); color: #fff !important; border-radius: 99px; padding: 10px 24px; font-size: 14px; }
.mpe-sub { font-family: "Playfair Display", Georgia, serif !important; font-size: 22px !important; font-weight: 400 !important; margin: 0 0 14px !important; }
.moc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 849px) { .moc-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mpe-empty { background-image: none; padding: 22px 18px; } }
@media (max-width: 849px) { .mpq-strip { padding: 12px 54px !important; font-size: 16px !important; background-size: 48px auto, 48px auto, auto !important; } }
/* chữ viết tay "Sống xanh…" cạnh ảnh thương hiệu tràn phải ở 900–1366 */
@media (max-width: 1439px) { .mpm-about-script { display: none !important; } }
