/*
 * Category pages: small fixes from the UX feedback of 2026-11-24 (Google Slides, slide numbers below).
 * Loaded after the template CSS (kosmos_category_template_css). Every rule is scoped to body.term-<slug> + the
 * section id, so it only touches the page that was asked for and outranks the template's own rules (which use
 * #section ids, some of them inline) without !important where possible.
 */

/* s24-s34 Feature / guide cards: centre the round icon over its card. The icon box was absolutely positioned at a
   fixed left (8%, 19%, 22%...) that ignored the icon width: 3-20 px off on phones, 10-48 px on tablets, and 15 px
   on desktop on phu-kien-xop. Now the box spans the card and the image is centred in it, whatever its size. */
body.term-phao-chi-ps-kosmos #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem,
body.term-phao-chi-ps-kosmos #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem,
body.term-san-go-robina #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem,
body.term-len-chan-tuong #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem,
body.term-len-chan-tuong #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem,
body.term-phu-kien-xop #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem,
body.term-san-nhua-kosmos-spc #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem,
body.term-san-nhua-kosmos-spc #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem,
body.term-vach-ngan-nhua-2-mat-galawood #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem,
body.term-vach-ngan-nhua-2-mat-galawood #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem,
body.term-san-nhua-chiu-luc-galawood #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem,
body.term-tam-panel-galawood #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem {
    left: 0 !important; /* templates pin it with left: 19% / 22% !important on phones */
    right: 0 !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
}
body.term-phao-chi-ps-kosmos #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem img,
body.term-phao-chi-ps-kosmos #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem img,
body.term-san-go-robina #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem img,
body.term-len-chan-tuong #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem img,
body.term-len-chan-tuong #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem img,
body.term-phu-kien-xop #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem img,
body.term-san-nhua-kosmos-spc #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem img,
body.term-san-nhua-kosmos-spc #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem img,
body.term-vach-ngan-nhua-2-mat-galawood #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem img,
body.term-vach-ngan-nhua-2-mat-galawood #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem img,
body.term-san-nhua-chiu-luc-galawood #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem img,
body.term-tam-panel-galawood #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem img {
    left: 50% !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: translateX(-50%) !important;
}

/* s24 tam-panel-galawood, phones: feature cards in 2 columns (the template forces 3 x 110 px with !important). */
@media (max-width: 767px) {
    body.term-tam-panel-galawood #dac-diem-noi-bat .dac-diem-noi-bat.grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* s38 pvc-van-da, desktop: the 5 guide cards on one row, centred (cards were 17.9% wide but their margins pushed the
   5th to a second row). Same layout as pvc-van-da-kosmos. */
@media (min-width: 1025px) {
    body.term-pvc-van-da #huong-dan-su-dung .dac-diem-noi-bat {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 80px 40px;
    }
    body.term-pvc-van-da #huong-dan-su-dung .dac-diem-noi-bat .grid-25 {
        width: auto;
        float: none;
        margin-left: 0;
        margin-right: 0;
    }
    body.term-pvc-van-da #huong-dan-su-dung .dac-diem-noi-bat::before,
    body.term-pvc-van-da #huong-dan-su-dung .dac-diem-noi-bat::after {
        content: none;
    }
}

/* s13 mai-nhom-cach-nhiet, desktop: the 5 feature cards on one row (was 4 + 1; additional.css sets 4 !important). */
@media (min-width: 1025px) {
    body.term-mai-nhom-cach-nhiet #dac-diem-noi-bat .dac-diem-noi-bat.grid-container {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

/* s40 phao-chi-ps-kosmos, desktop: feature cards were 198 px tall for one line of text. */
@media (min-width: 1025px) {
    body.term-phao-chi-ps-kosmos #dac-diem-noi-bat .dac-diem-noi-bat.grid-container > .grid-25 {
        min-height: 140px;
    }
}

/* s47 pvc-van-da-kosmos: 4th guide card had a near-white border (#f5f5f5); use its icon's grey like the others. */
body.term-pvc-van-da-kosmos #huong-dan-su-dung .dac-diem-noi-bat .grid-25:nth-child(4) {
    border-color: rgb(109, 110, 113);
}

/* san-go-robina guide icons are position: static, so `left` does nothing there: centre them as a block. */
body.term-san-go-robina #huong-dan-su-dung .dac-diem-noi-bat .icon-dacdiem img {
    position: relative !important;
}

/* s39 san-go-robina: feature icons are all 115x133 images but shrank to 53-81 px with the length of the text next
   to them (flex-shrink). Keep every icon at 81 px. */
body.term-san-go-robina #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem {
    flex: 0 0 81px;
    width: 81px;
}
body.term-san-go-robina #dac-diem-noi-bat .dac-diem-noi-bat .icon-dacdiem img {
    width: 100%;
}

/* s44 bac-cau-thang-galawood: colour swatches were 60 px at every width; same sizes as san-nhua-chiu-luc
   (120 px desktop, 100 px tablet, 80 px phone). */
body.term-bac-cau-thang-galawood .mau-tam-op button.tab img {
    width: 120px;
    height: 120px;
    max-width: none;
}
@media (max-width: 1024px) {
    body.term-bac-cau-thang-galawood .mau-tam-op button.tab img {
        width: 100px;
        height: 100px;
    }
}
@media (max-width: 767px) {
    body.term-bac-cau-thang-galawood .mau-tam-op button.tab img {
        width: 80px;
        height: 80px;
    }
}

/* s45 san-go-egger, desktop: line the "Đặc điểm nổi bật" columns up with the price cards above (same 15 px box
   padding, 29.333% cards with 2% side margins) and let the photos fill their column. On wide screens the 400 px
   photos sat at the left of 530 px columns, so the whole section looked shifted to the left. */
@media (min-width: 1025px) {
    body.term-san-go-egger #dacdiem-kythuat-section > .grid-container {
        padding-left: 15px;
        padding-right: 15px;
    }
    body.term-san-go-egger #dacdiem-kythuat-section > .grid-container > .grid-33 {
        width: 29.333%;
        margin-left: 2%;
        margin-right: 2%;
        padding-left: 0;
        padding-right: 0;
    }
    body.term-san-go-egger #dacdiem-kythuat-section .tieuchuan-kythuat-img img {
        width: 100%;
    }
}

/* s17 san-go-egger: the "XEM THÊM" links of the installation guide and the warranty sections were plain red text
   ("> XEM THÊM", left); now the red pill button used on the other category pages, centred. */
body.term-san-go-egger #huongdan-thicong .news_link,
body.term-san-go-egger #section_5 .news_link {
    display: flex;
    justify-content: center;
    width: 100%;
}
body.term-san-go-egger #huongdan-thicong .news_link a,
body.term-san-go-egger #section_5 .news_link a {
    display: inline-block;
    background-color: #e31937;
    color: #fff;
    border-radius: 100px;
    padding: 7px 20px;
    font-weight: 500;
    text-transform: uppercase;
}
body.term-san-go-egger #huongdan-thicong .news_link a:hover,
body.term-san-go-egger #section_5 .news_link a:hover {
    background-color: #c3122c;
    color: #fff;
}

/* s9 / s10 phones: price-table heading "Bảng báo giá" 40 px + product line 26 px (were 34 / 20), guide heading second
   line 26 px (was 40). The sizes are inline in the editor content (90 / 40 px), so !important as the template does. */
@media (max-width: 767px) {
    body.term-pvc-van-da-kosmos #baogia h2 > span:first-child,
    body.term-tam-op-than-tre-galawood #baogia h2 > span:first-child {
        font-size: 40px !important;
        line-height: 1.2 !important;
    }
    body.term-pvc-van-da-kosmos #baogia h2 > span:nth-of-type(2),
    body.term-tam-op-than-tre-galawood #baogia h2 > span:nth-of-type(2),
    body.term-tam-op-than-tre-galawood #huong-dan-su-dung h2 > span:nth-of-type(2) {
        font-size: 26px !important;
        line-height: 1.3 !important;
    }
}

/* s18 / s43 san-nhua-chiu-luc, san-go-kosmos, desktop: certificates fit in one screen like the design (two 330 px
   certificates side by side, caption under each). The 1200x1697 scans were shown ~575 px wide, ~815 px tall. */
@media (min-width: 1025px) {
    body.term-san-nhua-chiu-luc-galawood #section_6 .chungchi-grid.grid-2-col {
        grid-template-columns: repeat(2, 330px);
        justify-content: center;
        column-gap: 80px;
    }
    body.term-san-nhua-chiu-luc-galawood #section_6 .chungchi-image img {
        width: 100%;
        height: auto;
    }
    body.term-san-go-kosmos #section_6 .item.chung-chi .slick-slide > a {
        display: block;
        width: 330px;
        margin-left: auto;
        margin-right: auto;
    }
    body.term-san-go-kosmos #section_6 .item.chung-chi .slick-slide > a img {
        width: 100%;
        height: auto;
        max-height: none;
    }
}
@media (min-width: 1025px) {
    /* the caption is display: table-caption, which shrank to ~60 px inside the narrower link */
    body.term-san-go-kosmos #section_6 .item.chung-chi .slick-slide > a .chung-chi-name {
        display: block;
        width: 100%;
    }
}

/* s11 tam-op-go-nhua-ngoai-troi, phones: product-line tabs above the technical tables (built by category-fixes.js). */
body.term-tam-op-go-nhua-ngoai-troi .kosmos-tech-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 16px;
}
body.term-tam-op-go-nhua-ngoai-troi .kosmos-tech-tab {
    padding: 8px 6px;
    border: 1px solid #e31937;
    border-radius: 8px;
    background: #fff;
    color: #e31937;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
    cursor: pointer;
}
body.term-tam-op-go-nhua-ngoai-troi .kosmos-tech-tab.is-active {
    background: #e31937;
    color: #fff;
}

/* s14 / s15 mai-nhom-cach-nhiet + mai-panel-cach-nhiet (new section there): the "Hướng dẫn thi công" section (Section 9 in the admin) was hidden with an inline
   display: none; now shown like the than tre pages: dark background, video left, big white title + text right. */
body.term-mai-nhom-cach-nhiet #huongdan-thicong,
body.term-mai-panel-cach-nhiet #huongdan-thicong {
    background-color: #292d34;
    padding: 60px 0;
}
body.term-mai-nhom-cach-nhiet #huongdan-thicong .huongdan-thicong-content,
body.term-mai-panel-cach-nhiet #huongdan-thicong .huongdan-thicong-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: none;
    background: transparent;
}
body.term-mai-nhom-cach-nhiet #huongdan-thicong .section_heading,
body.term-mai-panel-cach-nhiet #huongdan-thicong .section_heading {
    text-align: left;
    margin-bottom: 20px;
}
body.term-mai-nhom-cach-nhiet #huongdan-thicong .sec_title,
body.term-mai-panel-cach-nhiet #huongdan-thicong .sec_title {
    color: #fff;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
    margin: 0;
}
body.term-mai-nhom-cach-nhiet #huongdan-thicong .text-content,
body.term-mai-panel-cach-nhiet #huongdan-thicong .text-content,
body.term-mai-nhom-cach-nhiet #huongdan-thicong .text-content p,
body.term-mai-panel-cach-nhiet #huongdan-thicong .text-content p,
body.term-mai-nhom-cach-nhiet #huongdan-thicong .text-content li,
body.term-mai-panel-cach-nhiet #huongdan-thicong .text-content li {
    color: #fff;
}
body.term-mai-nhom-cach-nhiet #huongdan-thicong .image iframe,
body.term-mai-panel-cach-nhiet #huongdan-thicong .image iframe,
body.term-mai-nhom-cach-nhiet #huongdan-thicong .image .youtube-container,
body.term-mai-panel-cach-nhiet #huongdan-thicong .image .youtube-container {
    border-radius: 10px;
    overflow: hidden;
}
@media (max-width: 767px) {
    body.term-mai-nhom-cach-nhiet #huongdan-thicong,
    body.term-mai-panel-cach-nhiet #huongdan-thicong {
        padding: 40px 0;
    }
    body.term-mai-nhom-cach-nhiet #huongdan-thicong .sec_title,
    body.term-mai-panel-cach-nhiet #huongdan-thicong .sec_title {
        font-size: 30px;
        margin-top: 20px;
    }
}

/* s4 tấm ốp ASA Galawood: "Button nhiều link" (one red box per button, its links listed inside), same look as the
   san-nhua-chiu-luc download buttons. */
body.term-tam-op-nhua-asa-galawood #btn-huong-dan {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}
body.term-tam-op-nhua-asa-galawood #btn-huong-dan .button-group {
    display: block;
    margin: 24px 50px;
    padding: 15px 30px;
    border-radius: 42px;
    background: #e31937;
    color: #fff;
    text-align: left;
    font-size: 16px;
}
body.term-tam-op-nhua-asa-galawood #btn-huong-dan .button-group h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 400;
}
body.term-tam-op-nhua-asa-galawood #btn-huong-dan .sub-buttons ul {
    display: block;
    margin: 0;
}
body.term-tam-op-nhua-asa-galawood #btn-huong-dan .sub-button-item {
    margin: 4px 0 0 10%;
    list-style: disc;
    color: #fff;
}
body.term-tam-op-nhua-asa-galawood #btn-huong-dan .sub-button-item a {
    color: #fff;
    text-decoration: none;
    text-transform: none;
}
@media (max-width: 575px) {
    body.term-tam-op-nhua-asa-galawood #btn-huong-dan .button-group {
        margin: 12px 5px;
        padding: 15px;
        border-radius: 12px;
        font-size: 15px;
    }
    body.term-tam-op-nhua-asa-galawood #btn-huong-dan .button-group h3 {
        font-size: 16px;
    }
}
/* the page's own .sub-buttons / .sub-button-item rules (wood background, 47 px padding, block items) belong to the
   old single-link buttons */
body.term-tam-op-nhua-asa-galawood #btn-huong-dan .sub-buttons {
    background: none;
    padding: 0;
    margin: 4px 0 0;
    width: auto;
}
body.term-tam-op-nhua-asa-galawood #btn-huong-dan .sub-button-item {
    display: list-item;
    margin: 4px 0 0 20px;
    padding: 0;
}

/* s42 go-nhua-galawood: "Cấu tạo" entered as left/right columns like gỗ nhựa 1 lớp (white card, materials in a row
   on the left, product picture on the right); the old single picture is used while these fields are empty. */
body.term-go-nhua-galawood .cau-tao-2-cot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 10px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 5px 8px -2px rgba(73, 73, 73, 0.78);
}
body.term-go-nhua-galawood .cau-tao-2-cot ul {
    display: flex;
    flex-flow: row;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    margin: 0;
}
body.term-go-nhua-galawood .cau-tao-2-cot li {
    list-style: none;
    text-align: center;
    color: #222;
}
body.term-go-nhua-galawood .cau-tao-2-cot img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}
@media (max-width: 767px) {
    body.term-go-nhua-galawood .cau-tao-2-cot ul {
        flex-wrap: wrap;
    }
    body.term-go-nhua-galawood .cau-tao-2-cot li {
        width: 33%;
        font-size: 13px;
    }
}
