/*
 * Bố cục mobile theo tieuam.com.vn (Flatsome). Chỉ nạp khi màn hình < 850px
 * (document.ts: <link media="(max-width: 849px)">) → desktop không đổi.
 * Chỉ sắp xếp lại bố cục, không đổi nội dung.
 */

/* ---- Khoảng cách section: gọn lại như gốc (~28px) ---- */
#main .section { padding-top: 28px !important; padding-bottom: 28px !important; min-height: 0 !important; }
#main .section-title-container { margin-bottom: 14px; }
#main .section-title { margin-bottom: 0; }
#main .row > .col { padding-bottom: 16px; }
#main .section-content > .row > .col:last-child { padding-bottom: 0; }

/* ---- Lưới sản phẩm / bài viết thay carousel (Flickity watchCSS tắt trên mobile) ---- */
#main [data-mtn-watch]:not(.flickity-enabled) {
  display: flex; flex-wrap: wrap; overflow: visible; white-space: normal; width: auto;
  position: relative !important; height: auto !important; padding: 0 !important;
}
#main [data-mtn-watch]:not(.flickity-enabled) > * { display: block !important; }
#main [data-mtn-watch].small-columns-2:not(.flickity-enabled) > .col { flex: 0 0 50%; max-width: 50%; }
#main [data-mtn-watch].small-columns-1:not(.flickity-enabled) > .col { flex: 0 0 100%; max-width: 100%; }

/* Thẻ sản phẩm: nền trắng, bóng nhẹ, chữ đều nhau */
#main .product-small.col { padding-bottom: 15px; }
#main .product-small.box { height: 100%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
#main .product-small .box-text { padding: 10px 10px 12px; }
#main .product-small .name.product-title { font-size: 14px; line-height: 1.35; }
#main .product-small .price-wrapper .price { font-size: 14px; }

/* Bài viết (dự án / tin / catalogue): 1 cột, khoảng cách vừa phải */
#main .post-item { padding-bottom: 20px; }
#main .post-item .box-text { padding: 10px 6px 4px; }

/* Nút mũi tên carousel còn lại (banner…): đủ lớn để chạm */
.flickity-prev-next-button { width: 40px; height: 44px; }

/* ---- Nút nổi: không che nội dung giữa màn hình ---- */
/* Gọi + Zalo: góc phải, phía trên nút chat */
.mtcb.mtcb--right { top: auto !important; bottom: 84px; transform: none !important; right: 10px; gap: 10px; }
.mtcb .mtcb-btn { width: 46px; height: 46px; }
/* Chat AI (nút tròn cam) góc phải dưới; "Tư vấn ngay" nằm bên trái nó, không chồng lên nhau */
#wp-aichat-toggle { right: 10px !important; bottom: 16px !important; }
#embed-chat-widget-button { right: 76px !important; bottom: 16px !important; left: auto !important; transform: none !important; }

/* <p> rỗng do WordPress tự chèn giữa các cột (flex) bị kéo giãn → khoảng trống lớn */
.footer-wrapper .row > p, #main .row > p { display: none; }

/* ---- Footer: bỏ khoảng trống thừa, chữ chân trang đủ tương phản ---- */
.footer-wrapper .section { padding-top: 24px !important; padding-bottom: 8px !important; }
.footer-wrapper .row > .col { padding-bottom: 20px; }
.footer-wrapper .widget { margin-bottom: 12px; }
.footer-wrapper .section-title-container, .footer-wrapper .widget-title { margin-bottom: 10px; }
.footer-wrapper .gap-element { display: none !important; }
.absolute-footer, .absolute-footer .copyright-footer { color: rgba(255,255,255,.85) !important; }
.absolute-footer .copyright-footer strong { color: #fff !important; }
/* chừa chỗ để nút nổi không đè dòng bản quyền */
.absolute-footer { padding-bottom: 76px !important; }


/* Menu ☰: HTML đã có nút mở rộng, JS Flatsome chèn thêm 1 nút → 2 mũi tên. Ẩn nút thừa. */
.nav-sidebar li > .toggle + .toggle { display: none; }
