/* Minh Thắng Mobile – CSS bổ sung cho bản web tĩnh (đi kèm assets/js/main.js) */

/* ---- Panel trượt: menu mobile + tìm kiếm ---- */
.mt-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 100000; opacity: 0; visibility: hidden; transition: opacity .25s; }
.mt-overlay.show { opacity: 1; visibility: visible; }
html.mt-locked { overflow: hidden; }
#main-menu.mt-open { display: block !important; position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 86vw; background: #fff; z-index: 100001; overflow-y: auto; box-shadow: -6px 0 24px rgba(0, 0, 0, .2); animation: mtSlide .25s ease-out; }
@keyframes mtSlide { from { transform: translateX(100%); } to { transform: none; } }
#main-menu .sidebar-menu { padding: 16px 0 30px; }
#main-menu .sidebar-menu-tabs { display: none; }
#main-menu .nav-sidebar > li > a { padding-left: 20px; padding-right: 50px; }
#main-menu .nav-sidebar li li > a { padding-left: 30px; }
#main-menu .nav-sidebar > li.header-search-form { padding: 0 16px 10px; }
#main-menu .nav-sidebar > li.html { padding: 6px 16px; }
#main-menu .nav-sidebar > li { position: relative; }
#main-menu .nav-sidebar .children { display: none; }
#main-menu .nav-sidebar li.mt-sub-open > .children { display: block !important; position: static !important; transform: none !important; visibility: visible !important; opacity: 1 !important; left: auto !important; width: auto !important; height: auto !important; background: #f7f7f7; }
#main-menu .nav-slide { overflow: visible !important; transform: none !important; }
#main-menu .mt-toggle { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: #555; }
#main-menu li.mt-sub-open > .mt-toggle i { transform: rotate(180deg); display: inline-block; }
#main-menu .ux-sidebar-menu-icon { width: 24px; height: auto; margin-right: 8px; vertical-align: middle; }
.mt-search-box.mt-open { display: block !important; position: fixed; top: 70px; left: 50%; transform: translateX(-50%); width: 92%; max-width: 560px; z-index: 100001; background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.mt-search-box form { display: flex; gap: 8px; margin: 0; }
.mt-search-box input[type=search] { flex: 1; margin: 0; border-radius: 99px; padding: 0 16px; height: 44px; }
.mt-search-box button { margin: 0; border-radius: 99px; height: 44px; background: #d70018; color: #fff; border: 0; padding: 0 18px; font-weight: 700; }

/* ---- Header dính ---- */
.header-wrapper.stuck { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); animation: mtDown .3s; }
@keyframes mtDown { from { transform: translateY(-100%); } to { transform: none; } }

/* ---- Accordion: nội dung ẩn mặc định ---- */
.accordion-inner { display: none; }

/* ---- Thư viện ảnh sản phẩm ---- */
.mt-gallery { position: relative; }
.mt-gallery .woocommerce-product-gallery__image, .mt-gallery > .slide { display: none; }
.mt-gallery .is-selected { display: block !important; }
.mt-gallery img { width: 100%; height: auto; display: block; }
.mt-thumbs { display: flex !important; flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin: 0 !important; scrollbar-width: none; }
.mt-thumbs::-webkit-scrollbar { display: none; }
.mt-thumbs > .col { flex: 0 0 76px !important; max-width: 76px !important; padding: 0 !important; cursor: pointer; opacity: .6; border: 1px solid #eee; border-radius: 6px; overflow: hidden; }
.mt-thumbs > .col.is-nav-selected { opacity: 1; border-color: #d70018; }
.mt-thumbs img { width: 100%; height: 76px; object-fit: cover; display: block; }

/* ---- Slider → dải cuộn ngang ---- */
.mt-scroller { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; height: auto !important; transform: none !important; }
.mt-scroller::-webkit-scrollbar { display: none; }
.mt-scroller > * { flex-shrink: 0 !important; scroll-snap-align: start; position: relative !important; left: auto !important; }
.mt-scroller.mt-full > * { flex-basis: 100% !important; width: 100% !important; max-width: 100% !important; }
.slider:not(.flickity-enabled) { visibility: visible !important; }
.slider > .flickity-viewport { overflow: visible; height: auto !important; }
.mt-slider-wrap, .mt-gallery { position: relative; }
.mt-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 38px; height: 38px; min-height: 0; margin: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #222; font-size: 26px; line-height: 36px; text-align: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: pointer; opacity: .85; }
.mt-arrow:hover { opacity: 1; background: #d70018; color: #fff; }
.mt-prev { left: 8px; }
.mt-next { right: 8px; }

/* ---- Ô chọn biến thể ---- */
.variable-items-wrapper .variable-item { cursor: pointer; }
.variable-items-wrapper .variable-item.selected { box-shadow: 0 0 0 2px #d70018 !important; }

/* ---- Xem ảnh lớn ---- */
.mt-lightbox { position: fixed; inset: 0; z-index: 100002; background: rgba(0, 0, 0, .9); display: none; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.mt-lightbox.show { display: flex; }
.mt-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.mt-lb-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; margin: 0; padding: 0; min-height: 0; }

/* ---- Hộp gửi yêu cầu (thay Contact Form 7) ---- */
.mt-modal { position: fixed; inset: 0; z-index: 100003; background: rgba(0, 0, 0, .6); display: none; align-items: center; justify-content: center; padding: 16px; }
.mt-modal.show { display: flex; }
.mt-modal-box { position: relative; background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.mt-modal-box h3 { margin: 0 30px 6px 0; color: #d70018; font-size: 20px; }
.mt-modal-sub { font-size: 14px; color: #555; margin-bottom: 10px; }
.mt-modal-box textarea { width: 100%; font-size: 13px; background: #f7f7f7; border-radius: 8px; min-height: 140px; }
.mt-modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mt-btn { display: block; text-align: center; padding: 12px 16px; border-radius: 99px; font-weight: 700; color: #fff !important; text-decoration: none; }
.mt-btn-zalo { background: #0068ff; }
.mt-btn-call { background: #d70018; }
.mt-btn-mail { background: #444; }
.mt-modal-note { margin: 10px 0 0; font-size: 13px; color: #0a7d2c; min-height: 1em; }
.mt-modal-x { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 30px; line-height: 1; margin: 0; padding: 0; min-height: 0; color: #888; }

/* ---- Trang tìm kiếm ---- */
.mt-kq { display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 10px; background: #fff; border: 1px solid #eee; border-radius: 12px; color: #222; transition: box-shadow .2s, border-color .2s; }
.mt-kq:hover { border-color: #d70018; box-shadow: 0 4px 16px rgba(215, 0, 24, .12); }
.mt-kq img, .mt-kq .mt-kq-img { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; border-radius: 8px; background: #f5f5f5; }
.mt-kq b { display: block; color: #d70018; }
.mt-kq small { display: block; color: #666; line-height: 1.45; }

/* ---- Nút liên hệ nổi ---- */
.mt-fab { position: fixed; right: 14px; bottom: 14px; z-index: 99999; }
.mt-fab-btn { width: 60px; height: 60px; border-radius: 50%; background: #d70018; color: #fff; display: flex; align-items: center; justify-content: center; border: 0; margin: 0; padding: 0; min-height: 0; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); cursor: pointer; position: relative; }
.mt-fab-btn::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(215, 0, 24, .5); animation: mtRing 1.6s infinite; }
@keyframes mtRing { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.mt-fab-btn svg { width: 28px; height: 28px; transition: transform .2s; }
.mt-fab.open .mt-fab-btn { background: #333; }
.mt-fab.open .mt-fab-btn::before { display: none; }
.mt-fab-list { position: absolute; right: 0; bottom: 72px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .2s; }
.mt-fab.open .mt-fab-list { opacity: 1; visibility: visible; transform: none; }
.mt-fab-list a { display: flex; align-items: center; gap: 10px; white-space: nowrap; background: #fff; color: #222; padding: 8px 14px 8px 8px; border-radius: 99px; box-shadow: 0 3px 12px rgba(0, 0, 0, .2); font-weight: 600; font-size: 14px; }
.mt-fab-list a:hover { color: #d70018; }
.mt-fab-list i { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-style: normal; }
.mt-fab-list i svg { width: 20px; height: 20px; }
.mt-fab-dim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 99998; display: none; }
.mt-fab.open + .mt-fab-dim { display: block; }
