/* ===================================================================
   Trường Tiểu học Phú Long — Trang con: page hero, danh mục, chi tiết bài,
   trang nội dung, liên hệ, tìm kiếm, thư viện, 404
   =================================================================== */

/* ================================================== PAGE HERO ===== */
/* Dải tiêu đề trang con: nền trời (bg-head.jpg) giống header trang chủ, chữ xanh đậm.
   Trang danh mục có ảnh banner thì ảnh đó thay nền (inline style) và lớp phủ làm sáng lại. */
.page-hero {
    position: relative;
    padding: clamp(26px, 4vw, 44px) 0 clamp(30px, 4.5vw, 40px);
    background: var(--c-sky-bg) url("../images/banne_hero.jpg") center top / cover no-repeat;
    color: var(--c-ink);
    overflow: hidden;
}
.page-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .25) 100%);
}
.page-hero-plain .page-hero-overlay { background: linear-gradient(90deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 70%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero-title {
    position: relative;
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--c-primary);
    margin: 0 0 14px;
    padding-bottom: 14px;
    text-align: center;
    margin-top: 20px;
}
.page-hero-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 84px;
    height: var(--rule);
    border-radius: var(--rule);
    background: var(--c-accent);
    margin: 0px auto;
    left: 0;
    right: 0;
}
/* Mô tả danh mục: nằm trong page-hero thì chữ tối, nằm ở thân trang cũng chữ tối */
.page-intro {
    max-width: var(--container-narrow);
    margin: 0 0 var(--sp-block);
    color: var(--c-body);
    font-size: var(--fs-lead);
    margin-bottom: 19px;
}
.page-hero .page-intro { margin: 18px 0 0; color: var(--c-body); }

/* Dải chip danh mục con (Hoạt động → Dạy & Học / Trải nghiệm / Liên đội…). Do PostList.aspx.cs sinh. */
.cat-subnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--sp-block); }
.cat-subnav-item {
    padding: 8px 18px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: .9375rem;
    font-weight: 600;
    color: var(--c-primary);
    box-shadow: var(--shadow-sm);
}
.cat-subnav-item:hover { border-color: var(--c-sky-deep); color: var(--c-sky-deep); }
.cat-subnav-item.is-active { background: var(--c-sky-deep); border-color: var(--c-sky-deep); color: var(--c-white); }

/* Danh sách văn bản / thông báo (PostList.aspx.cs → .doc-list chứa .notice-item) */
.doc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.doc-list .notice-item {
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow-sm);
    padding: 12px 16px 12px 12px;
}
.doc-list .notice-item-title { font-size: 1rem; }
.doc-list .notice-item:hover { border-color: var(--c-sky); }
@media (max-width: 767.98px) { .doc-list { grid-template-columns: 1fr; } }

/* Trang Giới thiệu: thống kê + các điểm trường (HTML nhập trong Admin dùng các class này) */
.school-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 1.6em 0;
}
.school-stat {
    padding: 20px 14px;
    text-align: center;
    background: var(--c-primary-mist);
    border-radius: var(--radius-lg);
    border-bottom: var(--rule) solid var(--c-accent);
    font-size: 14px;
}
.school-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
    font-weight: 800;
    color: var(--c-primary);
    line-height: 1.1;
}
.school-stat span { font-size: var(--fs-small); color: var(--c-body); }
.school-sites { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 10px; }
.school-sites li {
    padding: 12px 16px;
    background: var(--c-bg-soft);
    border-left: var(--rule) solid var(--c-sky);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.school-sites strong { display: block; color: var(--c-primary); font-family: var(--font-display); }
@media (max-width: 575.98px) { .school-stats {grid-template-columns: 1fr;} }
/* ================================================== NỘI DUNG ====== */
.inner-section { padding: var(--sp-section) 0; }

/* Thân trang nội dung (module PAGE) — HTML soạn trong Admin */
.page-content {font-size: 1.0625rem;color: var(--c-body);text-align: justify;}
.page-content > :first-child { margin-top: 0; }
.page-content .lead { font-size: var(--fs-lead); color: var(--c-primary); }
.page-content h2 { font-size: 1.5rem; margin-top: 1.7em; }
.page-content h3 { font-size: 1.25rem; margin-top: 1.5em; }
.page-content img { border-radius: var(--radius); margin: 0; }
.page-content ul, .page-content ol {/* padding-left: 1.35em; */}
.page-content li { margin-bottom: .5em; }
.page-content figure {
    margin: 1.6em 0;
    max-width: 340px;
}
.page-content figure img { width: 100%; border: 1px solid var(--c-line); }
.page-content figcaption {
    margin-top: 10px;
    padding-left: 14px;
    border-left: var(--rule) solid var(--c-accent);
    font-size: var(--fs-small);
    color: var(--c-muted);
}
.page-content blockquote {
    margin: 1.5em 0;
    padding: 6px 0 6px 22px;
    border-left: var(--rule) solid var(--c-accent);
    color: var(--c-primary);
    font-size: var(--fs-lead);
}
.page-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.page-content th, .page-content td { border: 1px solid var(--c-line); padding: 10px 12px; text-align: left; }
.page-content th { background: var(--c-bg-soft); color: var(--c-primary); }

/* ================================================== CHI TIẾT BÀI == */
.post-article { max-width: 100%; }
.post-article-title { font-size: var(--fs-h1); margin-bottom: 18px; }
.post-article-meta {
    display: flex; flex-wrap: wrap; gap: 10px 22px;
    padding-bottom: 20px; margin-bottom: 26px;
    border-bottom: 1px solid var(--c-line);
    font-size: var(--fs-small);
    color: var(--c-muted);
}
.post-article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.post-article-meta i { color: var(--c-accent); }
.post-article-content {font-size: 1.0625rem;color: var(--c-body);text-align: justify;}
.post-article-content h2 { font-size: 1.5rem; margin-top: 1.6em; }
.post-article-content h3 { font-size: 1.25rem; margin-top: 1.5em; }
.post-article-content img { margin: 1.4em 0; border-radius: var(--radius); }
.post-article-content blockquote {
    margin: 1.5em 0;
    padding: 6px 0 6px 22px;
    border-left: var(--rule) solid var(--c-accent);
    color: var(--c-primary);
    font-size: var(--fs-lead);
}
.post-article-content ul, .post-article-content ol { padding-left: 1.35em; }
.post-article-content li { margin-bottom: .5em; }
.post-article-content > :first-child { margin-top: 0; }
.post-article-content .lead {
    font-size: var(--fs-lead);
    color: var(--c-primary);
    margin-bottom: 1.4em;
}

/* Ghi chú "thông tin chung, không phải tư vấn pháp lý" cuối mỗi bài.
   Dùng chung cho trang bài viết và trang nội dung (module PAGE). */
.post-article-content .article-note,
.page-content .article-note {
    margin-top: 2.2em;
    padding: 18px 20px;
    background: var(--c-bg-soft);
    border-left: var(--rule) solid var(--c-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: var(--fs-small);
    color: var(--c-muted);
}
.post-article-content .article-note strong,
.page-content .article-note strong { color: var(--c-primary); }

/* Bài liên quan nằm TRONG section.page-main (PostDetail.aspx) — chỉ cần cách khối trên. */
.related-posts { margin-top: var(--sp-section); }

/* ================================================== LIÊN HỆ ======= */
/* Markup: Frontend/Contact.aspx (+ Contact.aspx.cs cho bản đồ và thông báo). Tên class là hợp đồng với hai file đó. */
.contact-section { background: var(--c-bg-soft); }

.contact-info-title {font-size: var(--fs-h2);margin-bottom: 10px;display: none;}
.contact-info-desc {color: var(--c-body);margin-bottom: 22px;display: none;}

.contact-info-list {
    list-style: none;
    margin: 0 0 22px;
    padding: 6px 15px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.contact-info-list li {display: flex;align-items: flex-start;gap: 15px;padding: 15px 0;border-bottom: 1px solid var(--c-line-soft);}
.contact-info-list li:last-child { border-bottom: 0; }
.ci-ic {
    flex: 0 0 42px;
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c-primary-mist);
    color: var(--c-sky-deep);
    border-radius: 50%;
}
.ci-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
/* Nhãn nhỏ phía trên, giá trị đậm vừa phải bên dưới (trước đây ngược lại: giá trị bị in hoa như nhãn). */
.contact-info-list small {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--c-muted);
}
.ci-value {color: var(--c-ink);font-weight: 500;overflow-wrap: anywhere;font-size: 16px;}
a.ci-value { color: var(--c-primary); font-weight: 700; font-size: 1.0625rem; }
a.ci-value:hover { color: var(--c-sky-deep); }

.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.contact-actions > a { flex: 1 1 200px; }

.contact-socials { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.contact-socials-label { font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary); }
.contact-socials .socials { display: flex; gap: 10px; }
.contact-socials a {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--c-line); border-radius: 50%;
    background: var(--c-white);
    color: var(--c-primary);
}
.contact-socials a:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }

/* ---- Form ---- */
.contact-form-card {
    padding: clamp(22px, 3vw, 34px);
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-top: var(--rule) solid var(--c-accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.contact-form-heading { margin: 0 0 6px; font-size: 1.5rem; }
.contact-form-sub { margin: 0 0 22px; font-size: var(--fs-small); color: var(--c-muted); }
.contact-form-card .cf-label { margin-bottom: 6px; }
.contact-form-card .cf-input { background: var(--c-bg-soft); }
.contact-form-card .cf-input:focus { background: var(--c-white); }
.contact-form-card .cf-input::placeholder { color: var(--c-muted); opacity: .8; }
.contact-form-card textarea.cf-input { min-height: 130px; }
.contact-submit { width: 100%; margin-top: 4px; }
.contact-form-note { margin: 12px 0 0; font-size: .8125rem; color: var(--c-muted); text-align: center; }
.contact-form-note i { color: var(--c-leaf); margin-right: 6px; }

/* Thông báo dưới nút gửi: main.js đặt class is-info / is-success / is-error và nội dung vào .booking-msg */
.contact-form .booking-msg { margin: 14px 0 0; min-height: 0; }
.contact-form .booking-msg:empty { display: none; }
.contact-form .booking-msg.is-info,
.contact-form .booking-msg.is-success,
.contact-form .booking-msg.is-error {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: var(--fs-small);
    font-weight: 500;
}
.contact-form .booking-msg.is-info { background: var(--c-info-soft); border-color: var(--c-line); color: var(--c-primary); }
.contact-form .booking-msg.is-success { background: var(--c-success-soft); border-color: var(--c-success); color: var(--c-success); }
.contact-form .booking-msg.is-error { background: var(--c-danger-soft); border-color: var(--c-danger); color: var(--c-danger); }

/* ---- Bản đồ ---- */
.contact-map-section {padding: var(--sp-section) 0;padding-bottom: 100px;padding-bottom: 200px;background: url(../images/bg-thuvien.png) no-repeat bottom center;background-size: cover;}
.contact-map-title {font-size: var(--fs-h2);margin-bottom: 18px;text-align: center;}
.contact-map {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow-sm);
}
.contact-map iframe { display: block; width: 100%; height: 380px; border: 0; }
.contact-map-link {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--t-fast), transform var(--t-fast);
}
.contact-map-link:hover { border-color: var(--c-sky); transform: translateY(-2px); }
.cq-ic {
    flex: 0 0 42px; width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c-sky-deep); color: var(--c-white);
    border-radius: 50%;
}
.cq-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.cq-body small { font-size: .8125rem; color: var(--c-muted); }
.cq-body strong { color: var(--c-primary); }
.cq-go { color: var(--c-sky-deep); }
/* ================================================== TÌM KIẾM ====== */
.search-box {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px 10px 46px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--sp-block);
}
.search-box > i:first-child { position: absolute; left: 18px; color: var(--c-accent); }
.search-input { flex: 1; border: 0; padding: 8px 0; box-shadow: none; }
.search-input:focus { box-shadow: none; }
.search-submit { flex: 0 0 auto; }
.search-summary { margin-bottom: 22px; color: var(--c-muted); font-size: var(--fs-small); }

/* ================================================== THƯ VIỆN ====== */
.media-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-block); }
.media-tab {
    padding: 9px 18px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    color: var(--c-primary);
    font-size: var(--fs-small);
    font-weight: 600;
}
.media-tab.is-active, .media-tab:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.media-item { display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--c-line); }
.media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.media-item:hover img { transform: scale(1.05); }

/* --- Album (MediaGallery.aspx dùng tiền tố .album-, không phải .media-) --- */
.album-tabs {
    display: flex; flex-wrap: wrap; gap: 10px;
    list-style: none; margin: 0 0 var(--sp-block); padding: 0;
    border: 0;
}
.album-tab {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px 8px 8px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: 999px;
    color: var(--c-primary);
    font-size: var(--fs-small);
    font-weight: 600;
    transition: background var(--t), border-color var(--t), color var(--t);
}
.album-tab:hover { border-color: var(--c-accent); }
.album-tab.active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }
.album-tab-thumb {
    flex: 0 0 34px; width: 34px; height: 34px;
    overflow: hidden; border-radius: 50%;
}
.album-tab-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.album-desc { margin-bottom: 20px; color: var(--c-muted); max-width: 720px; }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.album-photo {
    position: relative; display: block; overflow: hidden;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
}
.album-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.album-photo:hover img { transform: scale(1.05); }
.album-photo-zoom {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11, 67, 180, .45);
    color: var(--c-white);
    opacity: 0; transition: opacity var(--t);
}
.album-photo:hover .album-photo-zoom { opacity: 1; }
.album-grid .album-empty { grid-column: 1 / -1; }

/* ================================================== 404 =========== */
.notfound { text-align: center; padding: clamp(60px, 10vw, 120px) 0; }
.notfound-code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 9rem); line-height: 1; color: var(--c-primary-mist); margin: 0; }
.notfound h1 { margin-top: -.2em; }
.notfound p { max-width: 520px; margin: 0 auto 28px; color: var(--c-muted); }


/* ================================================== SẢN PHẨM ====== */
/* Dùng biến trong tokens.css — không viết thẳng mã màu ở đây. */

/* --- Lưới + thẻ sản phẩm (FrontendProductCard.RenderCard) --- */
.product-grid { margin-top: 8px; }

.product-card {
    height: 100%;
    display: flex; flex-direction: column;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--c-line-soft); }

.product-card-media {
    position: relative; display: block;
    aspect-ratio: 1 / 1; background: var(--c-bg-soft);
    overflow: hidden;
}
.product-card-img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: opacity var(--t), transform .6s var(--ease);
}
.product-card:hover .product-card-img { transform: scale(1.04); }
/* Ảnh thứ hai chỉ tồn tại khi admin nhập HoverImageUrl. */
.product-card-img-hover { position: absolute; inset: 0; opacity: 0; }
.product-card:hover .product-card-img-hover { opacity: 1; }

.product-card-noimg {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--c-line); font-size: 2.5rem;
}

.product-card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.product-card-brand { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.product-card-title { font-size: 1.02rem; line-height: 1.4; margin: 0; }
.product-card-title a { color: var(--c-ink); }
.product-card-title a:hover { color: var(--c-primary); }
.product-card-desc { font-size: .9rem; color: var(--c-muted); margin: 0; }
.product-card-link { margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--c-primary); }
.product-card-link i { transition: transform var(--t); }
.product-card-link:hover i { transform: translateX(3px); }

/* --- Giá --- */
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 2px 0 4px; }
.product-price-now { font-size: 1.12rem; font-weight: 700; color: var(--c-primary); }
.product-price-prefix, .product-price-unit { font-size: .85rem; color: var(--c-muted); }
.product-price-old { font-size: .9rem; color: var(--c-muted); }
.product-price-contact { font-size: 1rem; font-weight: 600; color: var(--c-accent-dark); }
.product-price-note { flex-basis: 100%; font-size: .8rem; color: var(--c-muted); }

/* --- Nhãn --- */
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.product-badge {
    font-size: .72rem; font-weight: 700; letter-spacing: .04em;
    padding: 3px 8px; border-radius: var(--radius-pill);
    background: var(--c-primary); color: var(--c-white);
}
.product-badge-sale { background: var(--c-danger); }
.product-badge-new { background: var(--c-success); }
.product-badge-best { background: var(--c-accent); color: var(--c-primary-dark); }
.product-badge-out { background: var(--c-muted); }

/* --- Dải danh mục con --- */
.product-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.product-subnav-item {
    font-size: .88rem; padding: 6px 14px;
    border: 1px solid var(--c-line); border-radius: var(--radius-pill);
    color: var(--c-body); background: var(--c-bg);
}
.product-subnav-item:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* --- Trang chi tiết --- */
.page-hero-compact { padding-block: 24px; }

.product-gallery-main {
    border: 1px solid var(--c-line); border-radius: var(--radius);
    overflow: hidden; background: var(--c-bg-soft);
}
.product-gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.product-gallery-empty {
    aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
    background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--radius);
    color: var(--c-line); font-size: 3rem;
}
.product-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.product-gallery-thumb {
    width: 72px; height: 72px; border: 1px solid var(--c-line); border-radius: var(--radius);
    overflow: hidden; display: block;
}
.product-gallery-thumb.is-active { border-color: var(--c-primary); }
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-summary { position: relative; }
.product-summary .product-badges { position: static; flex-direction: row; margin-bottom: 10px; }
.product-summary-brand { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); }
.product-summary-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 4px 0 12px; }
.product-summary-desc { color: var(--c-body); margin-bottom: 12px; }

.product-meta { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.product-meta li { font-size: .9rem; }
.product-meta-label { color: var(--c-muted); margin-right: 6px; }
.product-meta-value { font-weight: 600; color: var(--c-ink); }

.product-highlights { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.product-highlights li { font-size: .93rem; }
.product-highlights i { color: var(--c-accent); margin-right: 6px; }

.product-quote {
    background: var(--c-bg-soft); border: 1px solid var(--c-line);
    border-radius: var(--radius-lg); padding: 18px;
    display: grid; gap: 10px;
}
.product-quote-title { font-size: 1.05rem; margin: 0; }
.product-quote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-quote .cf-input { width: 100%; }

.product-section { margin-top: 40px; }
.product-section-title { font-size: 1.25rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--c-line); }

.product-specs { width: 100%; border-collapse: collapse; }
.product-specs th, .product-specs td { padding: 10px 12px; border-bottom: 1px solid var(--c-line-soft); font-size: .93rem; text-align: left; vertical-align: top; }
.product-specs th { width: 38%; color: var(--c-muted); font-weight: 500; }
.product-specs td { color: var(--c-ink); }
.product-specs-group th { background: var(--c-bg-soft); color: var(--c-ink); font-weight: 700; width: auto; }

.product-docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.product-docs a { display: inline-flex; align-items: center; gap: 8px; color: var(--c-primary); font-weight: 600; }
.product-doc-size { color: var(--c-muted); font-weight: 400; font-size: .85rem; }

@media (max-width: 575.98px) {
    .product-quote-row { grid-template-columns: 1fr; }
    .product-card-body { padding: 12px; }
}

/* --- Biến thể + nhãn ở trang chi tiết --- */
.product-variants { margin: 14px 0; }
.product-variants-label { font-size: .85rem; color: var(--c-muted); margin-bottom: 6px; }
.product-variants-list { display: flex; flex-wrap: wrap; gap: 8px; }
.product-variant {
    font-size: .9rem; padding: 8px 14px; cursor: pointer;
    border: 1px solid var(--c-line); border-radius: var(--radius);
    background: var(--c-bg); color: var(--c-body);
}
.product-variant:hover { border-color: var(--c-primary); }
.product-variant.is-active { border-color: var(--c-primary); background: var(--c-primary-mist); color: var(--c-primary); font-weight: 600; }
.product-variant-out { color: var(--c-danger); }

.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.product-tag {
    font-size: .78rem; font-weight: 700; padding: 3px 10px;
    border-radius: var(--radius-pill); background: var(--c-primary); color: var(--c-white);
}

/* --- Chi tiết media (module MEDIA) --- */
.media-detail-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 18px; }
.media-detail-figure { margin: 0 0 18px; }
.media-detail-figure img {
    width: 100%; max-height: 70vh; object-fit: contain; display: block;
    background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.media-detail-figure figcaption { margin-top: 8px; font-size: .9rem; color: var(--c-muted); text-align: center; }
.media-detail-frame {
    position: relative; aspect-ratio: 16 / 9; margin-bottom: 18px;
    border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; background: #000;
}
.media-detail-frame iframe, .media-detail-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-detail-caption { color: var(--c-muted); }
.media-detail-desc { margin-top: 12px; }

/* ================================================== THƯ VIỆN: TRANG TỔNG + VIDEO ===== */
/* Markup do MediaGallery.aspx.cs sinh (RenderHub / RenderVideos). */
.gallery-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery-hub-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--c-white);
    border-radius: 22px;
    box-shadow: var(--shadow);
    transition: transform var(--t), box-shadow var(--t);
}
.gallery-hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gallery-hub-media { position: relative; display: block; overflow: hidden; background: var(--c-primary-mist); }
.gallery-hub-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-hub-card:hover .gallery-hub-media img { transform: scale(1.05); }
.gallery-hub-badge {
    position: absolute;
    left: 18px; bottom: 18px;
    width: 54px; height: 54px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-primary);
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}
.gallery-hub-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px 22px; }
.gallery-hub-body strong {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--c-primary);
}
.gallery-hub-body span { color: var(--c-body); font-size: var(--fs-small); }

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.video-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--c-primary);
}
.video-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--c-primary-darker);
    box-shadow: var(--shadow-sm);
}
.video-card-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--ease), opacity var(--t); }
.video-card:hover .video-card-media img { transform: scale(1.05); opacity: .85; }
.video-card-play {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
}
.video-card-play i {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-primary);
    font-size: 1.375rem;
    box-shadow: var(--shadow);
    transition: transform var(--t-fast);
}
.video-card:hover .video-card-play i { transform: scale(1.1); }
.video-card-title {font-weight: 700;line-height: 1.4;text-align: center;}
.video-card:hover .video-card-title { color: var(--c-sky-deep); }

@media (max-width: 991.98px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .gallery-hub, .video-grid { grid-template-columns: 1fr; }
}

/* ================================================== BÌNH LUẬN BÀI VIẾT ===== */
/* Markup: PostDetail.aspx.cs → RenderComments. Chỉ hiện tên + nội dung + ngày; không có email / SĐT. */
.post-comments { margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(24px, 3vw, 34px); border-top: 1px solid var(--c-line); }
.post-comments-title { font-size: 1.375rem; text-transform: uppercase; margin-bottom: 18px; }
.post-comments-count { color: var(--c-sky-deep); }

.comment-empty {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 24px;
    padding: 16px 18px;
    background: var(--c-bg-soft);
    border: 1px dashed var(--c-line);
    border-radius: var(--radius-lg);
    color: var(--c-muted);
}
.comment-empty i { color: var(--c-sky); font-size: 1.25rem; }

.comment-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 14px; align-items: flex-start; }
.comment-avatar {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--c-sky), var(--c-sky-deep));
    color: var(--c-white);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
}
.comment-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 16px;
    background: var(--c-bg-soft);
    border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg);
}
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 4px; }
.comment-author { color: var(--c-primary); font-weight: 700; }
.comment-date { font-size: .8125rem; color: var(--c-muted); }
.comment-text { margin: 0; color: var(--c-body); overflow-wrap: anywhere; }

.comment-form {
    padding: clamp(18px, 2.4vw, 26px);
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-top: var(--rule) solid var(--c-accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.comment-form-title { font-size: 1.125rem; margin-bottom: 14px; }
.comment-form .cf-input { background: var(--c-bg-soft); }
.comment-form .cf-input:focus { background: var(--c-white); }
.comment-form textarea.cf-input { min-height: 110px; }
.comment-submit { padding-left: 26px; padding-right: 26px; }
.comment-submit[disabled] { opacity: .6; cursor: not-allowed; }
.comment-msg { margin: 12px 0 0; }
.comment-msg:empty { display: none; }
.comment-msg.is-info, .comment-msg.is-success, .comment-msg.is-error {
    padding: 11px 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: var(--fs-small);
    font-weight: 500;
}
.comment-msg.is-info { background: var(--c-info-soft); border-color: var(--c-line); color: var(--c-primary); }
.comment-msg.is-success { background: var(--c-success-soft); border-color: var(--c-success); color: var(--c-success); }
.comment-msg.is-error { background: var(--c-danger-soft); border-color: var(--c-danger); color: var(--c-danger); }
.comment-privacy { margin: 12px 0 0; font-size: .8125rem; color: var(--c-muted); }
.comment-privacy i { color: var(--c-leaf); margin-right: 6px; }

/* ================================================== TỆP ĐÍNH KÈM BÀI VIẾT ===== */
/* Markup: PostDetail.aspx.cs → RenderAttachments. Màu biểu tượng theo đuôi file (class attach-ext-<đuôi>). */
.post-attachments {
    margin-top: clamp(26px, 3.4vw, 38px);
    padding: clamp(16px, 2.2vw, 22px);
    background: var(--c-bg-soft);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
}
.post-attachments-title { font-size: 1.125rem; text-transform: uppercase; margin: 0 0 14px; }
.post-attachments-title i { color: var(--c-sky-deep); margin-right: 6px; }
.post-attachments-count { color: var(--c-sky-deep); }
.attach-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.attach-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.attach-row:hover { border-color: var(--c-sky); box-shadow: var(--shadow-sm); }
.attach-badge {
    flex: 0 0 46px;
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--c-primary-mist);
    color: var(--c-primary);
    font-size: 1.375rem;
}
/* Màu theo loại tài liệu: đỏ PDF, xanh Word, lục Excel, cam PowerPoint, vàng gói nén (dùng token có sẵn). */
.attach-badge.attach-ext-pdf { background: var(--c-danger-soft); color: var(--c-danger); }
.attach-badge.attach-ext-doc, .attach-badge.attach-ext-docx, .attach-badge.attach-ext-rtf, .attach-badge.attach-ext-odt { background: var(--c-info-soft); color: var(--c-sky-deep); }
.attach-badge.attach-ext-xls, .attach-badge.attach-ext-xlsx, .attach-badge.attach-ext-ods, .attach-badge.attach-ext-csv { background: var(--c-success-soft); color: var(--c-success); }
.attach-badge.attach-ext-ppt, .attach-badge.attach-ext-pptx, .attach-badge.attach-ext-odp { background: var(--c-orange-soft); color: var(--c-orange); }
.attach-badge.attach-ext-zip, .attach-badge.attach-ext-rar, .attach-badge.attach-ext-7z { background: var(--c-accent-soft); color: var(--c-accent-dark); }
.attach-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.attach-name { font-weight: 600; color: var(--c-ink); overflow-wrap: anywhere; }
.attach-meta { font-size: .8125rem; color: var(--c-muted); }
.attach-download {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--c-sky) 0%, var(--c-sky-deep) 100%);
    color: var(--c-white);
    font-family: var(--font-display);
    font-weight: 600;
    white-space: nowrap;
    transition: background var(--t-fast), transform var(--t-fast);
}
.attach-download:hover { background: linear-gradient(180deg, var(--c-sky-deep) 0%, var(--c-primary) 100%); color: var(--c-white); transform: translateY(-1px); }
@media (max-width: 575.98px) {
    .attach-row { flex-wrap: wrap; }
    .attach-info { flex-basis: calc(100% - 62px); }
    .attach-download { width: 100%; justify-content: center; }
}