/* napchaivietthai.com.vn - bổ sung nhỏ, nạp SAU style.css (theme gốc như ncvt). */

.mobile-menu-sub { padding: .4rem .875rem .4rem 2rem !important; font-size: .85rem; color: var(--muted-fg); }
.mobile-menu .mobile-contact-btn { padding: .85rem 1rem !important; min-height: 48px; margin-top: .35rem; border-radius: .6rem; font-size: .95rem; flex-shrink: 0; }

/* ---------- Nút nổi Zalo: logo + số điện thoại ---------- */
.float-zalo { position: fixed; bottom: 15px; left: 20px; width: 45px; height: 45px; z-index: 900; border-radius: 40%; }
.float-zalo img { width: 100%; height: 100%; display: block; }
.float-zalo::after { content: attr(data-phone); position: absolute; top: 60%; left: 110%; transform: translateY(-50%); background: var(--primary); color: #fff; font-size: 15px; line-height: 1.3; font-weight: 500; white-space: nowrap; padding: 5px 10px; border-radius: 10px 10px 10px 0; }
@media (max-width: 480px) { .float-zalo { left: 12px; bottom: 12px; } .float-zalo::after { font-size: 14px; } }

/* ---------- Tiêu đề khối: fade-up khi cuộn tới ---------- */
.section-header.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.section-header.reveal.reveal-in { opacity: 1; transform: none; }

/* ---------- Breadcrumb (nằm trong nội dung, không cố định) ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted-fg); margin-bottom: 1.5rem; position: relative; z-index: 1; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .45; font-size: .65rem; }
.breadcrumb [aria-current] { color: var(--fg); font-weight: 500; }

/* ---------- Đầu trang danh mục (bổ sung cho category.css) ---------- */
.category-hero-summary { color: var(--muted-fg); font-size: 1.05rem; line-height: 1.7; margin: .75rem 0 0; max-width: 40rem; }
.category-hero .breadcrumb { margin-bottom: 2rem; }
.category-products-section { background: var(--muted); border-top: 1px solid var(--border); }
.category-intro-section { background: #fff; }
.pagination-container { margin-top: 2.5rem; }

/* ---------- Trang sản phẩm (bổ sung cho product-show.css) ---------- */
.product-page .breadcrumb { margin-bottom: 1.25rem; }
.product-main-image { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(15, 23, 42, .9); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: .75rem; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; }

/* ---------- Đầu trang đơn giản (blog, liên hệ, giới thiệu) ---------- */
.page-hero { background: var(--gradient-hero); padding: 7rem 0 3rem; position: relative; overflow: hidden; }
.page-hero-grid { display: grid; gap: 2rem; align-items: center; }
.page-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.2; font-weight: 700; margin-top: .5rem; }
.page-hero .lead { color: var(--muted-fg); font-size: 1.05rem; line-height: 1.7; margin-top: 1rem; max-width: 46rem; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.page-hero-media img { border-radius: 1.25rem; box-shadow: var(--shadow-xl); width: 100%; object-fit: cover; background: #fff; }
@media (min-width: 900px) {
    .page-hero { padding-top: 9rem; }
    .page-hero-grid.has-media { grid-template-columns: 1.3fr 1fr; }
}

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; justify-content: center; }
.chip { padding: .45rem 1rem; border: 1px solid var(--border); border-radius: 999px; font-size: .875rem; background: #fff; transition: .2s; }
.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); background: #eff6ff; }

/* ---------- Nội dung bài viết ---------- */
.rich-content { font-size: 1.02rem; line-height: 1.8; color: #1e293b; }
.rich-content h2 { font-size: 1.5rem; margin: 2rem 0 .9rem; line-height: 1.3; }
.rich-content h3 { font-size: 1.22rem; margin: 1.6rem 0 .7rem; }
.rich-content h4, .rich-content h5 { font-size: 1.08rem; margin: 1.3rem 0 .5rem; }
.rich-content p { margin: 0 0 1rem; }
.rich-content ul, .rich-content ol { margin: 0 0 1rem 1.4rem; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin-bottom: .35rem; }
.rich-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.rich-content img { border-radius: .75rem; margin: 1.25rem auto; max-width: min(100%, 640px); height: auto; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
.rich-content th, .rich-content td { border: 1px solid var(--border); padding: .6rem .8rem; vertical-align: top; text-align: left; }
.rich-content th { background: #f1f5f9; }
.category-description-content img { max-width: min(100%, 560px); }

/* ---------- Blog ---------- */
.news-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .news-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.news-article-header h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.25; margin: .75rem 0; }
.news-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted-fg); font-size: .875rem; }
.news-cover { border-radius: 1.25rem; overflow: hidden; margin: 1.5rem 0 2rem; }
.news-cover img { width: 100%; }
.news-excerpt { font-weight: 600; color: #334155; line-height: 1.7; margin-bottom: 1.25rem; }
.side-card { border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; background: #fff; margin-bottom: 1.25rem; }
.side-card h3 { font-size: 1rem; margin-bottom: 1rem; }
.side-post { display: grid; grid-template-columns: 76px 1fr; gap: .75rem; align-items: center; padding: .5rem 0; }
.side-post img { width: 76px; height: 56px; object-fit: cover; border-radius: .5rem; }
.side-post span { font-size: .875rem; font-weight: 500; line-height: 1.4; }
.side-post:hover span { color: var(--primary); }
.side-links a { display: block; padding: .45rem 0; font-size: .9rem; border-bottom: 1px dashed var(--border); }
.side-links a:hover { color: var(--primary); }
.news-search { display: flex; gap: .5rem; max-width: 34rem; margin: 0 auto 1.5rem; }
.news-search input { flex: 1; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: .75rem; font-size: .95rem; }
/* ---------- Liên hệ ---------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.map-embed iframe { width: 100%; height: 380px; border: 0; border-radius: 1.25rem; }

/* ---------- Phân trang ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; font-size: .9rem; background: #fff; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled { color: #cbd5e1; }

/* ---------- Giới thiệu: khách hàng, chứng chỉ ---------- */
.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2rem 3rem; }
.logo-strip img { height: 64px; width: auto; filter: grayscale(1); opacity: .75; transition: .25s; }
.logo-strip img:hover { filter: none; opacity: 1; }
.cert-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 52rem; margin: 0 auto; }
.cert-grid img { border-radius: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 9rem 1rem 4rem; }
.notfound-code { font-size: 5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.category-hero-image-small img { width: 260px; height: 260px; object-fit: cover; }
@media (max-width: 640px) { .category-hero-image-small img { width: 100%; height: auto; max-height: 280px; } }

/* ---------- Tinh chỉnh sau khi kiểm tra ảnh chụp ---------- */
.specs-table-wrapper { overflow-x: auto; }
.specs-table td:first-child, .specs-table th:first-child { min-width: 170px; }
.specs-table td, .specs-table th { white-space: nowrap; }
.specs-table td:first-child { white-space: normal; }
.news-cover img { aspect-ratio: 16 / 9; object-fit: cover; max-height: 460px; }
.news-article-header .category-badge, .news-badge { display: inline-flex; padding: .3rem .8rem; border-radius: 999px; background: #eff6ff; color: var(--primary); font-size: .78rem; font-weight: 600; }

/* Nhãn góc thẻ danh mục trang chủ: không xuống dòng */
.single-new-arrival .sale { width: auto !important; min-width: 0 !important; padding: 0 8px; }
.single-new-arrival .sale p { white-space: nowrap; }

/* ---------- Khung bảo vệ sản phẩm (khách ngoài VN / khách mới) ---------- */
.gate-wrap { position: relative; }
.gate-blur { filter: blur(6px) opacity(.42); pointer-events: none; user-select: none; }
.gate-overlay { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 2rem; pointer-events: none; }
.gate-card { pointer-events: auto; position: sticky; top: 5rem; z-index: 5; width: 95%; max-width: 560px; background: #fff; border: 1.5px solid rgba(17, 115, 212, .25); border-radius: 1.25rem; box-shadow: 0 25px 50px -12px rgba(15, 23, 42, .22); padding: 2rem 2rem; text-align: center; }
.gate-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(17, 115, 212, .12); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: .8rem; }
.gate-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: .45rem; line-height: 1.35; }
.gate-sub { font-size: .9rem; color: var(--muted-fg); line-height: 1.6; margin: 0 auto 1.1rem; max-width: 460px; }
.gate-en { font-size: .88rem; color: var(--primary); font-weight: 600; margin-bottom: .8rem; }
.gate-form { text-align: left; }
.gate-grid { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; margin-bottom: .75rem; }
.gate-field label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .25rem; color: #334155; }
.gate-field b { color: #ef4444; }
.gate-field input, .gate-field textarea { width: 100%; padding: .6rem .8rem; border: 1.5px solid #cbd5e1; border-radius: .55rem; font: inherit; font-size: .88rem; background: #f8fafc; outline: none; }
.gate-field input:focus, .gate-field textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(17, 115, 212, .15); }
.gate-field .is-invalid { border-color: #ef4444; background: #fef2f2; }
.gate-err { display: block; color: #dc2626; font-size: .75rem; margin-top: .2rem; min-height: 0; }
.gate-alert { padding: .6rem .85rem; border-radius: .55rem; font-size: .84rem; margin: .75rem 0; }
.gate-alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.gate-alert-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.gate-btn { width: 100%; justify-content: center; margin-top: .6rem; }
.gate-help { text-align: center; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted-fg); }
.gate-help a { color: var(--primary); font-weight: 600; margin: 0 .3rem; }
.gate-contact { background: #f8fafc; border: 1px solid var(--border); border-radius: .85rem; padding: 1rem 1.2rem; text-align: left; display: grid; gap: .8rem; }
.gate-contact > div { display: flex; align-items: center; gap: .8rem; }
.gate-contact i { width: 36px; height: 36px; border-radius: 50%; background: rgba(17, 115, 212, .1); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gate-contact small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); font-weight: 600; }
.gate-contact a { font-weight: 600; color: var(--primary); }
.gate-contact em { color: #cbd5e1; margin: 0 .35rem; font-style: normal; }
@media (max-width: 560px) { .gate-grid { grid-template-columns: 1fr; } .gate-card { padding: 1.5rem 1.1rem; } }

/* ---------- Ảnh: không cắt góc (ảnh chi tiết chủ yếu 1:1, còn lại 16:9) ---------- */
body .product-card-img { aspect-ratio: 1 / 1 !important; background: #fff; }
body .product-card-img img,
body .product-card-slider-track img,
body .category-suggest-img-wrap img,
body .related-product-image img,
body .product-thumb img,
body .product-main-image,
body .category-hero-image-small img,
body .hero-main-img { object-fit: contain; background: #fff; }
body .category-suggest-img-wrap { aspect-ratio: 1 / 1; background: #fff; }
body .product-main-image-container { aspect-ratio: 1 / 1; max-height: none; background: #fff; }
body .category-hero-image-small img { width: 260px; height: 260px; }
body .hero-main-img { aspect-ratio: 4 / 3; }
body .news-card-img-wrap { aspect-ratio: 16 / 9; }
body .news-card-img-wrap img, body .news-cover img { object-fit: cover; }
body .news-cover img { aspect-ratio: 16 / 9; max-height: none; }

/* ---------- Bài viết gần đây (trang chủ): 1 bài lớn + danh sách bên cạnh ---------- */
.blog-wrap { display: grid; gap: 1.5rem; align-items: stretch; }
@media (min-width: 900px) { .blog-wrap { grid-template-columns: 1.1fr 1fr; } }
.blog-feature, .blog-item { display: flex; background: #fff; border: 1px solid var(--border); border-radius: 1rem; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.blog-feature:hover, .blog-item:hover { border-color: rgba(17, 115, 212, .35); box-shadow: var(--shadow-md, 0 6px 18px rgba(15, 23, 42, .08)); }
.blog-feature { flex-direction: column; }
.blog-feature-img { aspect-ratio: 16 / 9; background: #f1f5f9; overflow: hidden; }
.blog-feature-img img, .blog-item-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-feature-body { padding: 1.5rem 1.75rem 1.75rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.blog-feature-body h3 { font-size: 1.3rem; line-height: 1.35; }
.blog-feature-body p, .blog-item-body p { color: var(--muted-fg); font-size: .92rem; line-height: 1.6; }
.blog-meta { display: flex; align-items: center; gap: .75rem; font-size: .78rem; }
.blog-cat { color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.blog-date { color: var(--muted-fg); }
.blog-author { margin-top: auto; display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; color: var(--muted-fg); }
.blog-author img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; border: 1px solid var(--border); background: #fff; }
.blog-stack { display: grid; gap: 1.25rem; align-content: space-between; }
.blog-item { gap: 1.25rem; padding: 1.1rem 1.25rem; align-items: center; }
.blog-item-img { width: 34%; flex-shrink: 0; aspect-ratio: 16 / 10; border-radius: .65rem; overflow: hidden; background: #f1f5f9; align-self: center; }
.blog-item-body { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.blog-item-body h4 { font-size: 1rem; line-height: 1.4; }
@media (max-width: 520px) { .blog-item { flex-direction: column; } .blog-item-img { width: 100%; } }

/* ---------- Gợi ý "Cuộn xuống để xem sản phẩm" (trang danh mục) ---------- */
#scroll-indicator { position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 8px; background: #f8fafc; padding: 5px 12px 5px 8px; border-radius: 999px; box-shadow: 0 2px 12px rgba(0, 0, 0, .09); border: 1px solid rgba(0, 0, 0, .06); transition: opacity .3s ease; }
#scroll-indicator.hidden { opacity: 0; pointer-events: none; }
#scroll-indicator .scroll-label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: #334155; white-space: nowrap; }
.scroll-mouse { width: 14px; height: 20px; border: 2px solid #475569; border-radius: 6px; position: relative; flex-shrink: 0; display: block; }
.scroll-wheel { width: 2px; height: 4px; background: #475569; border-radius: 2px; position: absolute; top: 3px; left: 50%; transform: translateX(-50%); animation: scroll-wheel-anim 1.2s ease-in-out infinite; }
@keyframes scroll-wheel-anim { 0% { top: 3px; opacity: 1; } 55% { top: 10px; opacity: 0; } 56%, 100% { top: 3px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-wheel { animation: none; } }

/* ---------- Icon thông số (đường kính, chiều cao, chất liệu): vừa khung, không cắt ---------- */
body .product-detail-info-icon { width: 46px; height: 46px; padding: 8px; box-sizing: border-box; }
body .product-detail-info-icon img { width: 100%; height: 100%; object-fit: contain; }
