/* ==========================================================================
   NVT Theme - CSS chính (viết tay, không phụ thuộc Flatsome)
   Mục lục: 1 Biến + nền | 2 Bố cục | 3 Header | 4 Menu dọc + mega | 5 Menu chính
            6 Ngăn kéo điện thoại | 7 Nội dung | 8 Footer | 9 Tiện ích | 10 Responsive
   ========================================================================== */
/* ---------- 1. Biến + nền ---------- */
:root {
    --c-primary: #006eb5;
    --c-primary-dark: #005690;
    --c-primary-deep: #02426d;
    --c-accent: #219eff;
    --c-alert: #e5322d;
    --c-text: #4a4a4a;
    --c-heading: #111;
    --c-border: #e5e5e5;
    --c-soft: #f1f1f1;
    --wrap: 1500px;
    --radius: 12px;
    --f-body: Roboto, "Helvetica Neue", Arial, sans-serif;
    --f-nav: Oswald, Roboto, Arial, sans-serif;
    --bp: 849px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.6 var(--f-body); color: var(--c-text); background: #fff; overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; border: 0; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; font-family: var(--f-body); font-weight: 700; line-height: 1.3; color: var(--c-heading); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
button { font-family: inherit; }
.icon { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
/* ---------- 2. Bố cục ---------- */
.page-wrap { padding-top: 24px; padding-bottom: 40px; }
.blank-page { width: 100%; }
/* ---------- 3. Header ---------- */
/* ---------- 4. Menu dọc "Danh mục sản phẩm" + mega ---------- */
/* ---------- 5. Menu chính (thanh xanh) ---------- */
/* ---------- 6. Ngăn kéo điện thoại ---------- */
/* ---------- 7. Nội dung ---------- */
.page-head { margin-bottom: 20px; }
.page-title, .entry__title { font-size: 30px; font-weight: 700; color: var(--c-heading); }
.entry__content { font-size: 15px; color: #050505; }
.entry__content img { height: auto; }
.entry__content a { color: var(--c-primary); }
.blog-single .entry__head { max-width: 820px; margin: 0 auto 20px; text-align: center; }
.blog-single .entry__title { text-align: center; color: #000; }
.blog-single .entry__content { max-width: 1020px; margin: 0 auto; text-align: justify; }
.blog-single .entry__content p { margin: 0 auto 13px; }
.post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.post-card__img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.post-card__title { margin: 10px 0 6px; font-size: 18px; line-height: 22px; }
.post-card__title a { color: #2c2c2c; }
.post-card__title a:hover { color: orangered; }
.post-card__date { font-size: 13px; color: #777; }
.post-card__excerpt { margin-top: 6px; font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.pagination .nav-links { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination .page-numbers { min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--c-border); border-radius: 8px; color: #333; }
.pagination .page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.notfound { text-align: center; padding: 80px 15px; }
.btn { display: inline-block; padding: 12px 26px; border-radius: 8px; background: var(--c-primary); color: #fff; font-weight: 700; }
.btn:hover { background: var(--c-primary-dark); color: #fff; }
/* ---------- 8. Footer ---------- */
/* ---------- 9. Tiện ích ---------- */
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: #666; text-align: center; }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; }
/* ---------- 9b. Hệ bố cục nội dung (section / hàng / cột) ---------- */
.n-sec { position: relative; padding: 30px 0; background-size: cover; background-position: center; }
.n-sec > .n-col { max-width: var(--wrap); margin: 0 auto; padding: 0 15px 30px; }
.n-row { --gx: 15px; display: flex; flex-wrap: wrap; width: 100%; max-width: var(--wrap); margin: 0 auto; }
.n-row--small { --gx: 10px; }
.n-row--large { --gx: 30px; }
.n-row--collapse { --gx: 0px; }
.n-row--full { max-width: none; }
.n-col .n-row { margin-left: calc(var(--gx) * -1); margin-right: calc(var(--gx) * -1); width: auto; max-width: none; }
.n-col .n-row--collapse { margin-left: 0; margin-right: 0; }
.n-col { flex: 0 0 calc(var(--span, 12) / 12 * 100%); max-width: calc(var(--span, 12) / 12 * 100%); padding: 0 var(--gx, 15px) 30px; min-width: 0; }
.n-row--collapse > .n-col { padding-bottom: 0; }
.n-va-middle { align-items: center; }
.n-va-bottom { align-items: flex-end; }
.n-va-equal > .n-col { display: flex; flex-direction: column; }
.n-ha-center { justify-content: center; }
.n-ha-right { justify-content: flex-end; }
.n-light, .n-light h1, .n-light h2, .n-light h3, .n-light h4, .n-light p { color: #fff; }
.n-dark { color: #fff; }
.n-gap { width: 100%; height: 30px; }
.n-divider { margin: 1em 0; border: 0; height: 3px; background: rgba(0, 0, 0, .1); }
.n-text > :last-child { margin-bottom: 0; }
.n-html iframe { max-width: 100%; display: block; }
.n-img { position: relative; margin-bottom: 0; }
.n-img img { display: block; width: 100%; height: auto; }
.n-img--crop { padding-bottom: var(--ratio, 56%); overflow: hidden; }
.n-img--crop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.n-img + .n-img { margin-top: 10px; }
.n-btn { display: inline-block; margin: 0 8px 8px 0; padding: 0 1.2em; min-height: 2.5em; line-height: 2.4em; border: 2px solid var(--c-primary); border-radius: 4px; background: var(--c-primary); color: #fff; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; text-align: center; cursor: pointer; }
.n-btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.n-btn--outline { background: transparent; color: var(--c-primary); }
.n-btn--outline:hover { background: var(--c-primary); color: #fff; }
.n-btn--alert { background: var(--c-alert); border-color: var(--c-alert); }
.n-btn--alert.n-btn--outline { background: transparent; color: var(--c-alert); }
.n-btn--link { background: transparent; border-color: transparent; color: var(--c-primary); padding: 0; }
.n-btn--small { font-size: 13px; }
.n-btn--block { display: block; margin-right: 0; }
.n-btn--case { text-transform: none; letter-spacing: 0; }
.n-feat { display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start; }
.n-feat__img { flex: 0 0 90px; }
.n-feat__body { flex: 1 1 auto; }
.n-msg { padding: 10px; background-size: cover; background-position: center; border-radius: 6px; }
.n-hide-sm { }
.n-only-sm { display: none; }
.n-only-md { display: none; }
/* Tiêu đề khối + thẻ sản phẩm + lưới */
.stitle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--c-primary); }
.stitle__t { margin: 0; font-size: 24px; line-height: 1.2; text-transform: uppercase; color: var(--c-primary); }
.stitle__more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--c-text); white-space: nowrap; }
.pgrid { position: relative; }
.pgrid__track { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 12px; }
.pgrid--slider .pgrid__track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pgrid--slider .pgrid__track::-webkit-scrollbar { display: none; }
.pgrid--slider .pgrid__item { flex: 0 0 calc((100% - (var(--cols, 5) - 1) * 12px) / var(--cols, 5)); scroll-snap-align: start; }
.pgrid__nav { position: absolute; top: 40%; z-index: 5; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); color: #333; font-size: 24px; line-height: 1; cursor: pointer; }
.pgrid__nav--prev { left: -10px; }
.pgrid__nav--next { right: -10px; }
.pc { position: relative; height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid #ececec; text-align: center; }
.pc__badge { position: absolute; top: 0; left: 0; z-index: 2; padding: 4px 8px; background: var(--c-alert); color: #fff; font: 700 16px/1.2 var(--f-body); }
.pc__media { display: block; padding: 10px 10px 0; }
.pc__img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.pc__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 8px 10px 12px; text-align: left; }
.pc__cat { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; color: #777; }
.pc__title { margin: 0 0 6px; font-size: 15px; line-height: 1.35; font-weight: 500; }
.pc__title a { color: #222; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.pc__title a:hover { color: var(--c-primary); }
.pc__price { margin-top: auto; padding-top: 4px; font-size: 16px; }
.pc__price .price, .pc__price { color: var(--c-alert); font-weight: 700; }
.pc__price del { color: #999; font-weight: 400; font-size: 14px; margin-right: 6px; text-decoration: line-through; }
.pc__price ins { text-decoration: none; }
.pc__btn.button, .pc .button { display: block; margin-top: 8px; padding: 9px 10px; border: 0; border-radius: 4px; background: var(--c-primary); color: #fff; font: 600 14px/1.2 var(--f-body); text-align: center; cursor: pointer; }
.pc .button:hover { background: var(--c-primary-dark); color: #fff; }
.plist--big .pcard__img img, .plist--list .pcard__img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.plist--list .pcard { display: grid; grid-template-columns: 40% 1fr; gap: 12px; margin-bottom: 14px; }
.pcard__title { margin: 8px 0 4px; font-size: 18px; line-height: 1.25; }
.plist--list .pcard__title { font-size: 15px; margin-top: 0; }
.pcard__title a { color: #2c2c2c; }
.pcard__title a:hover { color: orangered; }
.pcard__date { font-size: 13px; color: #777; }
/* Khối "Sản phẩm bán chạy" + dòng thương hiệu trên thẻ */
.hot-item { margin: 0 15px; padding: 10px 15px 0; border: 1px dashed var(--c-alert); border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px rgba(229, 50, 45, .08); }
.hot-item h2 { margin: 8px 0 14px; font-size: 36px; color: var(--c-alert); text-transform: uppercase; }
.hot-item h2 img { display: inline-block; vertical-align: middle; }
.pc__vendor { display: block; margin: 6px 0 0; text-align: center; font: 700 12px/1.2 var(--f-body); color: var(--c-primary); }
/* Slider ảnh (tự viết) */
.n-slider { position: relative; overflow: hidden; }
.n-slider__track { display: flex; transition: transform .45s ease; will-change: transform; }
.n-slide { flex: 0 0 100%; min-width: 0; }
.n-slider__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.n-slider__dot { width: 12px; height: 12px; padding: 0; border: 2px solid rgba(255, 255, 255, .9); background: rgba(0, 0, 0, .25); cursor: pointer; }
.n-slider__dot.is-on { background: #fff; }
.n-slider[data-bullets="circle"] .n-slider__dot, .n-slider:not([data-bullets="square"]) .n-slider__dot { border-radius: 50%; }
/* Mega-menu */
/* Nút liên hệ nổi (máy tính) + khối thông tin dưới bài viết + PDF nhúng */
.post-company { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--c-border); }
.pdf-embed { display: block; width: 100%; height: 85vh; min-height: 480px; border: 1px solid var(--c-border); }
/* ---------- 10. Responsive ---------- */
@media (max-width: 1199px) {.n-col { flex-basis: calc(var(--md, var(--span, 12)) / 12 * 100%); max-width: calc(var(--md, var(--span, 12)) / 12 * 100%); }
.pgrid__track { grid-template-columns: repeat(var(--cols-md, 4), minmax(0, 1fr)); }
.pgrid--slider .pgrid__item { flex-basis: calc((100% - (var(--cols-md, 4) - 1) * 12px) / var(--cols-md, 4)); }
.post-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 849px) {.n-col { flex-basis: calc(var(--sm, 12) / 12 * 100%); max-width: calc(var(--sm, 12) / 12 * 100%); padding-left: 12px; padding-right: 12px; }
.n-col[style*="--pad-sm"] { padding: var(--pad-sm); }
.n-hide-sm { display: none; }
.n-only-sm { display: block; }
.pgrid__track { grid-template-columns: repeat(var(--cols-sm, 2), minmax(0, 1fr)); }
.pgrid--slider .pgrid__item { flex-basis: calc((100% - (var(--cols-sm, 2) - 1) * 12px) / var(--cols-sm, 2)); }
.pgrid__nav { display: none; }
.stitle__t { font-size: 18px; }
.post-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.page-title, .entry__title { font-size: 24px; }
body { padding-bottom: 60px; }
}
