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

/* ---- Khoảng cách section gọn như gốc ---- */
#main .section { padding-top: 28px !important; padding-bottom: 28px !important; min-height: 0 !important; }
#main .section-title-container { margin-bottom: 14px; }
#main .row > p, #footer .row > p { display: none; }

/* ---- Lưới sản phẩm 2 cột (bản mobile của theme đang để 1 cột, ảnh quá to) ---- */
#main .row.equalize-box > .product-small.col { flex: 0 0 50%; max-width: 50%; padding: 0 7.5px 15px; }
#main .row.equalize-box { margin-left: -7.5px; margin-right: -7.5px; }
#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 .category { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Dự án (lưới Packery): xếp 1 cột thường, không định vị tuyệt đối (trước bị lệch 70px → tràn ngang + khoảng trắng lớn) ---- */
#main .row-grid { height: auto !important; }
#main .row-grid > .col.grid-col { position: static !important; left: auto !important; top: auto !important; width: 100% !important; max-width: 100% !important; flex-basis: 100% !important; transform: none !important; padding-bottom: 20px; }
#main .row-grid [data-animate], #main .row-grid[data-animate] { opacity: 1 !important; transform: none !important; filter: none !important; }

/* Mũi tên carousel đủ lớn để chạm */
.flickity-prev-next-button { width: 40px; height: 44px; }

/* ---- Nút liên hệ nổi: góc phải dưới, không che nội dung giữa màn hình ---- */
#button-contact-vr { top: auto !important; bottom: 16px !important; transform: none !important; }

/* ---- Footer: 1 cột như gốc (trước chia 2 cột chật, email tràn) ---- */
#footer .row > .col { flex: 0 0 100% !important; max-width: 100% !important; padding-bottom: 16px; }
#footer .section { padding-top: 24px !important; padding-bottom: 8px !important; }
#footer a, #footer li { overflow-wrap: anywhere; }
.absolute-footer { padding-bottom: 24px !important; }

/* ---- Tương phản chữ đủ đọc (Accessibility) ---- */
#main .product-small .category.op-7 { opacity: 1; color: #666; }
#main .from_the_blog_excerpt { color: #555; }
.absolute-footer, .absolute-footer .copyright-footer { color: rgba(255,255,255,.85) !important; }

/* ---- Menu ☰: danh mục chép từ menu desktop (HeaderState.tsx) ---- */
.nav-sidebar > li.mg-mitem { position: relative; border-top: 1px solid #ececec; }
.nav-sidebar > li.mg-mitem > a { display: block; padding: 14px 52px 14px 20px; font-weight: 700; text-transform: uppercase; color: #333; font-size: .9em; }
.mg-mtoggle { position: absolute; top: 0; right: 0; width: 48px; height: 48px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.mg-mtoggle::after { content: ''; display: inline-block; width: 8px; height: 8px; border-right: 2px solid #777; border-bottom: 2px solid #777; transform: rotate(45deg); transition: transform .2s; }
.mg-mitem.is-open > .mg-mtoggle::after { transform: rotate(-135deg); }
.mg-msub { display: none; list-style: none; margin: 0; padding: 0 0 8px; background: #f7f7f7; }
.mg-mitem.is-open > .mg-msub { display: block; }
.mg-msub a { display: block; padding: 10px 20px 10px 34px; color: #555; }
