/*
 * Phần bổ trợ cho giao diện inoxlienhung (viết riêng, thay cho các thư viện thương mại/không dùng lại được của website cũ:
 * animate.css, mmenu, MagicZoomPlus, fancybox, AddToAny, nút chia sẻ Zalo). Giữ đúng hình dáng/hành vi hiển thị.
 */

/* ---------- Hiệu ứng (tương đương các lớp animate.css website cũ dùng) ---------- */
.animated, .animate__animated { animation-duration: 1s; animation-fill-mode: both; }
.animated.infinite, .animate__animated.animate__infinite { animation-iteration-count: infinite; }
@keyframes zoomIn { from { opacity: 0; transform: scale3d(.3, .3, .3); } 50% { opacity: 1; } }
@keyframes pulse { from { transform: scale3d(1, 1, 1); } 50% { transform: scale3d(1.05, 1.05, 1.05); } to { transform: scale3d(1, 1, 1); } }
@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -100%, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes zoomInUp { from { opacity: 0; transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); } 60% { opacity: 1; transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); } }
@keyframes zoomInDown { from { opacity: 0; transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); } 60% { opacity: 1; transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); } }
@keyframes backInUp { 0% { transform: translateY(1200px) scale(.7); opacity: .7; } 80% { transform: translateY(0) scale(.7); opacity: .7; } 100% { transform: scale(1); opacity: 1; } }
@keyframes backInDown { 0% { transform: translateY(-1200px) scale(.7); opacity: .7; } 80% { transform: translateY(0) scale(.7); opacity: .7; } 100% { transform: scale(1); opacity: 1; } }
@keyframes backInLeft { 0% { transform: translateX(-2000px) scale(.7); opacity: .7; } 80% { transform: translateX(0) scale(.7); opacity: .7; } 100% { transform: scale(1); opacity: 1; } }
@keyframes backInRight { 0% { transform: translateX(2000px) scale(.7); opacity: .7; } 80% { transform: translateX(0) scale(.7); opacity: .7; } 100% { transform: scale(1); opacity: 1; } }
@keyframes rollIn { from { opacity: 0; transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes rotateInDownLeft { from { transform: rotate3d(0, 0, 1, -45deg); opacity: 0; } to { transform: translate3d(0, 0, 0); opacity: 1; } }
.animate__fadeInDown { animation-name: fadeInDown; } .animate__fadeInUp { animation-name: fadeInUp; } .animate__zoomIn { animation-name: zoomIn; }
.animate__zoomInUp { animation-name: zoomInUp; } .animate__zoomInDown { animation-name: zoomInDown; } .animate__backInUp { animation-name: backInUp; }
.animate__backInDown { animation-name: backInDown; } .animate__backInLeft { animation-name: backInLeft; } .animate__backInRight { animation-name: backInRight; }
.animate__rollIn { animation-name: rollIn; } .animate__rotateInDownLeft { animation-name: rotateInDownLeft; transform-origin: left bottom; }
.pulse { animation-name: pulse; }
@media (prefers-reduced-motion: reduce) { .animate__animated, .animated { animation-duration: 1ms !important; animation-iteration-count: 1 !important; } }

/* ---------- Menu điện thoại (tương đương mmenu: border-full, position-left, position-front) ---------- */
.mm-menu { position: fixed; top: 0; bottom: 0; left: 0; z-index: 10000; width: 80%; min-width: 240px; max-width: 440px; overflow: hidden;
    background: #f3f3f3; color: rgba(0, 0, 0, .75); font: 14px/20px Arial, Helvetica, sans-serif; transform: translate3d(-100%, 0, 0);
    transition: transform .4s ease; -webkit-tap-highlight-color: rgba(255, 255, 255, .4); }
.mm-wrapper_opened .mm-menu { transform: translate3d(0, 0, 0); }
.mm-menu .mm-panel { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #f3f3f3; transition: transform .4s ease; }
.mm-menu .mm-panel.is-sub { transform: translate3d(100%, 0, 0); }
.mm-menu .mm-panel.is-sub.is-open { transform: translate3d(0, 0, 0); }
.mm-menu .mm-panel.is-parent { transform: translate3d(-30%, 0, 0); }
.mm-menu .mm-navbar { position: sticky; top: 0; z-index: 2; display: flex; height: 44px; align-items: center; justify-content: center; text-align: center;
    background: #f3f3f3; border-bottom: 1px solid rgba(0, 0, 0, .1); color: rgba(0, 0, 0, .3); }
.mm-menu .mm-navbar a, .mm-menu .mm-navbar span { color: rgba(0, 0, 0, .3); text-decoration: none; padding: 12px 20px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mm-menu .mm-btn-prev { position: absolute; left: 0; top: 0; width: 50px; height: 44px; padding: 0 !important; flex: none !important; }
.mm-menu .mm-btn-prev:before, .mm-menu .mm-btn-next:after { content: ''; position: absolute; top: 0; bottom: 0; margin: auto; width: 8px; height: 8px;
    border: 2px solid rgba(0, 0, 0, .3); border-bottom: none; border-right: none; }
.mm-menu .mm-btn-prev:before { left: 23px; transform: rotate(-45deg); }
.mm-menu .mm-listview { list-style: none; margin: 0; padding: 0; }
.mm-menu .mm-listitem { position: relative; display: flex; flex-wrap: wrap; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.mm-menu .mm-listitem > a.mm-text { flex: 1; display: block; padding: 12px 10px 12px 20px; color: inherit; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mm-menu .mm-btn-next { position: relative; width: 50px; flex: none; border-left: 1px solid rgba(0, 0, 0, .1); }
.mm-menu .mm-btn-next:after { right: 23px; transform: rotate(135deg); }
.mm-blocker { position: fixed; inset: 0; z-index: 9999; display: none; background: rgba(0, 0, 0, 0); }
.mm-wrapper_opened .mm-blocker { display: block; }

/* ---------- Ảnh sản phẩm phóng to + video (tương đương MagicZoom/fancybox) ---------- */
.left-pro-detail .MagicZoom { display: block; position: relative; cursor: zoom-in; text-align: center; }
.left-pro-detail .MagicZoom img { max-width: 100%; height: auto; }
.lb-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(30, 30, 30, .87); opacity: 0; transition: opacity .3s; }
.lb-overlay.is-open { opacity: 1; }
.lb-overlay img { max-width: 92vw; max-height: 88vh; box-shadow: 0 0 20px rgba(0, 0, 0, .5); background: #fff; }
.lb-overlay .lb-video { width: min(92vw, 1000px); aspect-ratio: 16 / 9; background: #000; }
.lb-overlay .lb-video iframe { width: 100%; height: 100%; border: 0; }
.lb-overlay .lb-close, .lb-overlay .lb-prev, .lb-overlay .lb-next { position: absolute; border: 0; background: rgba(30, 30, 30, .6); color: #ccc; cursor: pointer; font-size: 28px; line-height: 44px; width: 44px; height: 44px; padding: 0; }
.lb-overlay .lb-close { top: 0; right: 0; }
.lb-overlay .lb-prev { left: 0; top: 50%; margin-top: -22px; }
.lb-overlay .lb-next { right: 0; top: 50%; margin-top: -22px; }
.lb-overlay button:hover { color: #fff; }
.video-main, [data-video] { cursor: pointer; }

/* ---------- Nút chia sẻ (cùng kích thước bộ AddToAny 32px + nút Zalo 30px) ---------- */
.a2a_kit { line-height: 32px; display: block; }
.a2a_kit:after { content: ''; display: table; clear: both; }
.a2a_kit > a { display: block; float: left; padding: 0 2px; line-height: 16px; text-decoration: none; }
.a2a_kit .a2a_svg { display: block; float: left; width: 32px; height: 32px; line-height: 32px; border-radius: 4px; overflow: hidden; }
.a2a_kit .a2a_svg svg { display: block; width: 32px; height: 32px; }
.a2a_kit > a:hover .a2a_svg { opacity: .7; }
.a2a_kit .a2a_label { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
.social-plugin .zalo-share-button { display: block; float: left; position: relative; width: 30px; height: 30px; margin-left: 3px; border-radius: 4px; background: #0068ff; }
.social-plugin .zalo-share-button:before { content: 'Zalo'; position: absolute; inset: 0; color: #fff; font: bold 10px/30px Arial, Helvetica, sans-serif; text-align: center; letter-spacing: -.2px; }

/* ---------- Khung Facebook trang chủ (iframe chính thức thay cho SDK) ---------- */
#fanpage-facebook .fb-page iframe { display: block; max-width: 100%; margin: 0 auto; }
.fb-comments iframe { width: 100%; min-height: 300px; }

/* ---------- Ô đồng ý xử lý dữ liệu cá nhân (form liên hệ) ---------- */
.contact-consent { margin-bottom: 15px; text-align: left; }
.contact-consent .custom-control-label { font-size: 14px; line-height: 1.5; cursor: pointer; }
.contact-consent .custom-control-label a { color: #f58220; text-decoration: underline; }
.contact-consent .custom-control-input:checked ~ .custom-control-label::before { border-color: #f58220; background-color: #f58220; }
.contact-consent .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 .2rem rgba(245, 130, 32, .25); }
.contact-consent .custom-control-input:focus:not(:checked) ~ .custom-control-label::before { border-color: #f9b77d; }

/* ---------- Ảnh, video chèn bằng trình soạn thảo (SunEditor) trong nội dung bài viết / sản phẩm / trang ---------- */
/* Đặt rộng bao nhiêu cũng nằm gọn trong khung, tự co theo màn hình (giữ tỉ lệ). Video bỏ khoảng đệm padding-bottom của
   SunEditor (gây dư một khoảng trắng dưới video), dùng tỉ lệ 16:9. Căn Trái / Giữa / Phải theo lựa chọn trong hộp chèn ảnh. */
:is(.content-main, .desc-pro-detail, .contact-text) .se-component,
:is(.content-main, .desc-pro-detail, .contact-text) .se-component figure { max-width: 100%; }
:is(.content-main, .desc-pro-detail, .contact-text) .se-component img { max-width: 100%; height: auto !important; }
:is(.content-main, .desc-pro-detail, .contact-text) .__se__float-left { float: left; margin-right: 20px; }
:is(.content-main, .desc-pro-detail, .contact-text) .__se__float-right { float: right; margin-left: 20px; }
:is(.content-main, .desc-pro-detail, .contact-text) .__se__float-center figure { margin-left: auto; margin-right: auto; }
:is(.content-main, .desc-pro-detail, .contact-text) .se-video-container figure { height: auto !important; padding-bottom: 0 !important; }
:is(.content-main, .desc-pro-detail, .contact-text) .se-video-container iframe,
:is(.content-main, .desc-pro-detail, .contact-text) .se-video-container video { display: block; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0; }
.desc-pro-detail::after, .contact-text::after { content: ''; display: block; clear: both; }
@media (max-width: 767px) {
    :is(.content-main, .desc-pro-detail, .contact-text) .__se__float-left,
    :is(.content-main, .desc-pro-detail, .contact-text) .__se__float-right { float: none; margin-left: 0; margin-right: 0; }
}

/* ---------- Sản phẩm nổi bật trang chủ: lưới cố định 2 hàng (thay carousel) + nút Xem thêm ---------- */
/* Desktop 4 cột x 2 hàng = 8 sản phẩm; máy tính bảng 3 cột (6 SP), 2 cột (4 SP). Từ 500px trở xuống dùng khối .spnoibat-mbd sẵn có. */
.spnb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.spnb-grid .wr-probest-sale > a, .spnb-grid .wr-prod { display: block; height: 100%; }
.spnb-more { margin-top: 15px; text-align: center; }
.namelist.spnb-more span { color: #f58220; background: #fff; }
.namelist.spnb-more span:hover { color: #000; }
@media (max-width: 991px) {
    .spnb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .spnb-grid > :nth-child(n+7) { display: none; }
}
@media (max-width: 767px) {
    .spnb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spnb-grid > :nth-child(n+5) { display: none; }
}
