/*
Theme Name: TOTO Paint Premium Theme
Theme URI: https://haomkt.com/
Description: Theme WordPress custom cao cấp, chuẩn SEO và tối ưu Mobile dành cho thương hiệu sơn TOTO Paint.
Version: 1.0.0
Author: HaoMKT & AI Collaborator
License: GNU General Public License v2 or later
Text Domain: totopaint
*/

/* ==========================================================================
   1. BASE & UTILITIES (CÀI ĐẶT CHUNG & LƯỚI)
   ========================================================================== */
:root {
    --primary-color: #0E2E8A;
    --accent-color: #00A651;
    --text-color: #333333;
    --light-bg: #F8FAFD;
    --white: #ffffff;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }

*, *:before, *:after { box-sizing: border-box; }

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Flexbox & Grid Helpers */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.d-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.d-none { display: none !important; }

/* Responsive Container */
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { 
    .container { max-width: 960px; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.text-white { color: var(--white) !important; }
.text-light { color: #A0B4E5 !important; }
.mb-40 { margin-bottom: 40px; }

/* ==========================================================================
   2. BUTTONS (NÚT BẤM)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
    white-space: nowrap;
    min-width: 200px;
    text-align: center;
}
.btn-primary { background: var(--primary-color); color: var(--white); border: 1px solid var(--primary-color); }
.btn-primary:hover { background: #061B54; }
.btn-outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: var(--white); }
.btn-outline-white { background: transparent; border: 1px solid rgba(255, 255, 255, 0.5); color: var(--white); }
.btn-outline-white:hover { background: var(--white); color: var(--primary-color); }

/* ==========================================================================
   3. HEADER & TÌM KIẾM
   ========================================================================== */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.header-inner { height: 90px; }
.site-logo img { max-height: 55px; width: auto; display: block; }

.main-menu { list-style: none; margin: 0; padding: 0; gap: 35px; }
.main-menu li { position: relative; height: 100%; }
.main-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    padding: 35px 0;
    display: block;
    transition: color 0.3s;
}
.main-menu a:hover, .main-menu .current-menu-item > a { color: var(--primary-color); }
.main-menu a::after {
    content: ''; position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px; background-color: var(--primary-color); transition: width 0.3s ease;
}
.main-menu .current-menu-item > a::after, .main-menu a:hover::after { width: 25px; }

/* Khối Hotline */
.header-contact { position: relative; height: 100%; padding: 0 20px 0 50px; gap: 15px; z-index: 1; }
.header-contact::before {
    content: ''; position: absolute; top: 0; left: 0; width: 200%; height: 100%;
    background-color: #F4F7FA; z-index: -1; transform: skewX(-25deg); transform-origin: bottom left;
}
.contact-icon {
    width: 40px; height: 40px; background: var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.contact-icon svg { width: 20px; height: 20px; color: var(--primary-color); }
.contact-info { display: flex; flex-direction: column; }
.contact-info strong { color: var(--primary-color); font-size: 17px; line-height: 1.2; font-weight: 800; }
.contact-info span { font-size: 12px; color: #666; }

/* Ô Tìm Kiếm trên Header */
.header-search-wrap {
    margin-left: 20px; 
    flex-shrink: 0;
}
.header-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px; 
    transition: width 0.3s ease;
}
.header-search-form:focus-within { width: 280px; }
.header-search-form .search-input {
    width: 100%;
    padding: 8px 35px 8px 15px; 
    border: 1px solid #EAEAEA;
    border-radius: 20px; 
    background-color: #F4F7FA;
    font-size: 13px;
    outline: none;
    transition: 0.3s;
}
.header-search-form .search-input:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(11, 46, 89, 0.05);
}
.header-search-form .search-submit-btn {
    position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #888; cursor: pointer;
    padding: 6px 10px; display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.header-search-form .search-submit-btn:hover { color: var(--primary-color); }

/* Nút 3 gạch Mobile (Mặc định ẩn) */
.mobile-menu-toggle { 
    display: none; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    color: var(--primary-color); 
    padding: 5px; 
}

/* ==========================================================================
   4. HERO BANNER
   ========================================================================== */
.hero-banner { 
    position: relative; 
    padding: 80px 0 140px 0; 
    overflow: hidden; 
    background: var(--light-bg); 
}
.hero-content { 
    position: relative; 
    z-index: 2; 
    padding: 20px; 
    border-radius: 8px; 
    width: fit-content; 
}
.hero-sub { color: #666; text-transform: uppercase; font-size: 13px; letter-spacing: 2px; margin-bottom: 10px; display: block; }
.hero-title { font-size: 52px; color: var(--primary-color); line-height: 1.2; margin: 15px 0; font-weight: 800; }
.hero-desc { font-size: 16px; color: #555; margin-bottom: 30px; max-width: 500px; }
.hero-actions { display: flex; gap: 15px; }

/* Hero Image & Masking */
.hero-image { 
    position: absolute; top: 0; right: 0; width: 100%; height: 100%; z-index: 1; 
    filter: drop-shadow(-20px 0px 40px rgba(0, 0, 0, 0.15));
}
.hero-image .image-wrapper {
    width: 100%; height: 100%;
    -webkit-mask-image: linear-gradient(110deg, transparent 50%, black 70%);
    mask-image: linear-gradient(110deg, transparent 40%, black 80%);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* Badges (Tagline) */
.hero-badges { display: flex; flex-wrap: nowrap; gap: 15px; margin: 30px 0; }
.badge-item { display: flex; align-items: center; gap: 10px; flex: 1; }
.badge-item svg, .badge-item img { width: 32px; height: 32px; flex-shrink: 0; }
.badge-item span { font-size: 13px; font-weight: 500; line-height: 1.3; color: #444;}

/* ==========================================================================
   5. BRAND FEATURES (Thống kê Trắng)
   ========================================================================== */
.brand-features { position: relative; z-index: 3; margin-top: -60px; }
.features-wrapper { 
    display: flex; justify-content: space-between; background: var(--white); border-radius: 12px; 
    padding: 25px 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
}
.feature-item { display: flex; align-items: center; gap: 15px; }
.feature-icon svg, .feature-icon img { width: 40px; height: 40px; flex-shrink: 0; color: #042789; }
.f-title { font-size: 18px; color: var(--primary-color); display: block; font-weight: 700;}
.f-desc { font-size: 13px; color: #666; margin: 0; white-space: nowrap;}

/* ==========================================================================
   6. SẢN PHẨM NỔI BẬT
   ========================================================================== */
.featured-products { padding: 80px 0; background-color: #FAFAFC; }
.sub-title { font-size: 13px; font-weight: 600; color: #666; letter-spacing: 1px; text-transform: uppercase; display: block; margin-bottom: 8px; }
.sec-title { font-size: 38px; color: var(--primary-color); margin: 0 0 10px 0; font-weight: 700; line-height: 1.3; }
.sec-desc { color: #555; margin-bottom: 0; }

.product-showcase.top-grid { display: grid; grid-template-columns: 40% 60%; align-items: center; gap: 40px; margin-bottom: 40px; }
.product-banner-img img { max-width: 100%; height: auto; display: block; }

/* Product Tabs UI */
.product-tabs { list-style: none; padding: 0; margin: 40px auto 50px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
.tab-item { padding: 12px 24px; cursor: pointer; font-weight: 600; color: #888; border: 1px solid transparent; border-radius: 8px; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; position: relative; }
.tab-item svg { width: 20px; height: 20px; object-fit: contain; filter: grayscale(100%) opacity(0.5); transition: all 0.3s ease; }
.tab-item::after { content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 1px; height: 18px; background-color: #E0E0E0; }
.tab-item:last-child::after, .tab-item.active::after, .tab-item:has(+ .tab-item.active)::after { display: none; }
.tab-item.active { color: var(--primary-color); border-color: var(--primary-color); background-color: var(--white); box-shadow: 0 4px 15px rgba(14, 46, 138, 0.05); }
.tab-item.active svg { filter: none; }
.tab-item:hover { color: var(--primary-color); }
.tab-item:hover svg { filter: grayscale(0%) opacity(0.8); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Product Grid & Card */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { background: var(--white); border-radius: 8px; border: 1px solid #EAEAEA; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.product-img { background: #F8F9FA; padding: 30px; text-align: center; }
.product-img img { max-width: 100%; height: auto; transition: transform 0.3s ease; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-info { padding: 20px; border-top: 1px solid #EAEAEA; display: flex; flex-direction: column; flex-grow: 1; }
.product-name { font-size: 18px; margin: 0 0 4px 0; font-weight: 700; }
.product-name a { color: var(--text-color); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; transition: color 0.3s ease; }
.product-name a:hover { color: var(--primary-color); }
.product-cat { font-size: 13px; color: #777; margin-top: 0; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.view-detail { font-size: 14px; font-weight: 600; color: var(--primary-color); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; margin-top: auto; }
.view-detail:hover { color: var(--accent-color); }

/* ==========================================================================
   7. CÔNG NGHỆ VƯỢT TRỘI
   ========================================================================== */
.tech-section { background-color: var(--primary-color); padding: 80px 0; position: relative; overflow: hidden; }
.tech-grid { display: grid; grid-template-columns: 35% 65%; align-items: center; gap: 40px; }
.tech-info .sub-title { color: #5CB8FF !important; }
.tech-info .btn { width: fit-content; }
.tech-desc { font-size: 15px; margin-bottom: 25px; line-height: 1.6; color: var(--white); }
.tech-visual { display: flex; flex-direction: row; gap: 30px; }
.tech-features { display: flex; flex-direction: column; gap: 20px; width: 30%; }
.tech-item { display: flex; gap: 15px; }
.left-features .tech-item { flex-direction: row-reverse; text-align: right; }
.tech-icon svg { width: 20px; height: 20px; color: #00D1FF; margin-top: 3px; }
.tech-text h4 { color: var(--white); font-size: 15px; margin: 0 0 5px 0; }
.tech-text p { color: #A0B4E5; font-size: 13px; margin: 0; }
.tech-shield { width: 40%; }
.tech-shield img { max-width: 250px; display: block; margin: 0 auto; filter: drop-shadow(0 0 20px rgba(0, 209, 255, 0.4)); }

/* ==========================================================================
   8. BLOG & DỰ ÁN (LAYOUT 4 CỘT)
   ========================================================================== */
.blog-section { padding: 80px 0 40px; background-color: var(--white); }
.projects-section { padding: 40px 0 80px; background-color: #FAFAFC; }
.content-4-col-grid { display: grid; grid-template-columns: 300px 1fr 1fr 1fr; gap: 30px; align-items: stretch; }
.swipe-mobile-wrapper { display: contents; }
.section-side-header { padding-right: 15px; }
.section-side-header .btn { width: fit-content; margin-top: 15px; padding: 10px 24px; margin-left: 0; }

/* Project Card */
.project-card { background: var(--white); border-radius: 12px; overflow: hidden; border: 1px solid #EAEAEA; transition: all 0.3s ease; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08); }
.project-thumb { aspect-ratio: 16/10; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-info { padding: 20px; border-top: 1px solid #f1f1f1; }
.project-title { font-size: 18px; margin: 0 0 5px 0; }
.project-title a { color: var(--text-color); text-decoration: none; font-weight: 700; }
.project-title a:hover { color: var(--primary-color); }
.project-loc { font-size: 14px; color: #666; margin: 0; }

/* Blog Card */
.blog-card { background: var(--white); border: 1px solid #EAEAEA; border-radius: 12px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06); }
.blog-thumb { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-thumb img { transform: scale(1.08); }
.blog-badge { position: absolute; bottom: 15px; left: 15px; background: var(--white); color: var(--primary-color); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 2; }
.blog-info { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.blog-title { font-size: 18px; margin: 0 0 10px 0; font-weight: 700; }
.blog-title a { color: var(--text-color); text-decoration: none; line-height: 1.4; transition: color 0.3s ease; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-title a:hover { color: var(--primary-color); }
.blog-excerpt { font-size: 13.5px; color: #666; margin-bottom: 20px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-meta { margin-top: auto; font-size: 12.5px; color: #999; align-items: center; }
.dot-separator { margin: 0 10px; font-size: 10px; color: #ccc; }

/* ==========================================================================
   9. CALL TO ACTION (CTA TƯ VẤN)
   ========================================================================== */
.cta-section { padding: 40px 0; background-color: #FAFAFC; }
.cta-wrapper { background: var(--white); border-radius: 12px; padding: 30px; box-shadow: 0 10px 40px rgba(14, 46, 138, 0.05); gap: 20px; }
.cta-left { gap: 20px; }
.cta-icon-wrapper { width: 60px; height: 60px; background: #F0F4FF; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cta-icon-wrapper svg { width: 28px; height: 28px; color: var(--primary-color); }
.cta-text h3 { font-size: 20px; color: var(--primary-color); margin: 0 0 5px 0; }
.cta-text p { font-size: 14px; color: #666; margin: 0; }

/* ==========================================================================
   10. TRANG DANH MỤC & BLOG LIÊN QUAN
   ========================================================================== */
.page-banner {
    background: linear-gradient(135deg, rgb(14 46 138 / 85%) 0%, rgb(6 27 84 / 52%) 100%), 
                url('https://sonecoluxe.com/upload/oto/media//banner%203.jpg'); /* ĐÃ XÓA NGOẶC NHỌN DƯ THỪA TẠI ĐÂY */
    background-size: cover; background-position: center; background-repeat: no-repeat;
    padding: 80px 0; text-align: left; 
}
.banner-title { color: var(--white); font-size: 34px; font-weight: 700; margin-bottom: 15px; }
.breadcrumbs { color: #A0B4E5; font-size: 14px; display: flex; align-items: center; gap: 8px;}
.breadcrumbs a { color: var(--white); text-decoration: none; opacity: 0.8; transition: 0.3s; }
.breadcrumbs a:hover { opacity: 1; }
.breadcrumbs .current { color: var(--white); font-weight: 600; }

.archive-features { border-bottom: 1px solid #EAEAEA; background: var(--white); padding: 15px 0; }
.inline-features { box-shadow: none; padding: 0; background: transparent; margin: 0; }
.inline-features .feature-item { justify-content: center; padding: 15px; }

.archive-products { padding: 50px 0 30px; background-color: var(--white); }
.archive-tabs { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 40px; }
.archive-tabs .tab-item { display: inline-flex; padding: 10px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; color: #555; background: #F4F7FA; border: 1px solid transparent; cursor: pointer; transition: all 0.3s ease; }
.archive-tabs .tab-item:hover, .archive-tabs .tab-item.active { background: var(--primary-color); color: var(--white); box-shadow: 0 4px 15px rgba(14, 46, 138, 0.2); }

.cta-bottom { padding: 20px 0 60px; background-color: var(--white); }
.cta-blue { background: var(--primary-color); justify-content: space-between; }
.cta-blue .cta-icon-wrapper { background: rgba(255,255,255,0.1); }
.cta-blue .cta-text h3 { color: var(--white); font-size: 22px; margin-bottom: 8px;}
.cta-blue .cta-text p { color: #A0B4E5; }
.btn-white { background: var(--white); color: var(--primary-color); border: none; }
.btn-white:hover { background: #F0F4FF; color: #061B54; }

.cat-header { background: #f8f9fa; padding: 60px 0; text-align: center; border-bottom: 1px solid #eaeaea; }
.cat-title { font-size: 36px; color: var(--primary-color); font-weight: 700; margin-bottom: 10px; }
.cat-desc { font-size: 16px; color: #666; max-width: 600px; margin: 0 auto; }
    
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 60px 0; }
.news-card { background: #fff; border: 1px solid #eaeaea; border-radius: 12px; overflow: hidden; transition: 0.3s; box-shadow: 0 2px 10px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.news-img { position: relative; display: block; overflow: hidden; padding-bottom: 60%; }
.news-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.news-card:hover .news-img img { transform: scale(1.05); }
.news-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.news-meta { font-size: 13px; color: #888; margin-bottom: 10px; }
.news-title { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0 0 10px 0; }
.news-title a { color: #222; text-decoration: none; transition: 0.2s; }
.news-title a:hover { color: var(--primary-color); }
.news-excerpt { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 20px; flex-grow: 1; }
.news-readmore { font-size: 14px; font-weight: 600; color: var(--primary-color); text-decoration: none; text-transform: uppercase; }

.pagination { display: flex; justify-content: center; gap: 10px; padding-bottom: 60px; }
.pagination .nav-links { display: flex; gap: 10px; }
.pagination a, .pagination span { display: inline-block; padding: 10px 18px; border: 1px solid #ddd; border-radius: 6px; color: #444; text-decoration: none; font-weight: 600; transition: 0.2s; }
.pagination a:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pagination .current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ==========================================================================
   11. FOOTER 
   ========================================================================== */
.site-footer { background-color: var(--white); padding: 60px 0 20px; border-top: 1px solid #EAEAEA; color: #444; }
.footer-top { margin-bottom: 40px; }
.footer-5-col { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; gap: 20px; }
.footer-logo img { max-height: 40px; margin-bottom: 15px; }
.brand-desc { font-size: 13px; line-height: 1.6; color: #666; margin-bottom: 20px; max-width: 90%; }
.social-icons { display: flex; gap: 10px; }
.social-btn { width: 32px; height: 32px; background-color: var(--primary-color); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: background 0.3s; }
.social-btn svg { width: 16px; height: 16px; }
.social-btn:hover { background-color: #061B54; }
.footer-heading { font-size: 14px; font-weight: 700; color: #333; margin: 0 0 20px 0; text-transform: uppercase; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 12px; }
.footer-menu a { color: #666; font-size: 13.5px; text-decoration: none; transition: color 0.3s; }
.footer-menu a:hover { color: var(--primary-color); }
.footer-contact-list { list-style: none; padding: 0; margin: 0; }
.footer-contact-list li { display: flex; align-items: flex-start; margin-bottom: 15px; font-size: 13.5px; color: #666; line-height: 1.5; }
.footer-contact-list svg { width: 18px; height: 18px; margin-right: 10px; margin-top: 2px; color: #888; flex-shrink: 0; }
.footer-contact-list a { color: #666; text-decoration: none; transition: color 0.3s; }
.footer-contact-list a:hover { color: var(--primary-color); }
.footer-bottom { padding-top: 20px; border-top: 1px solid #EAEAEA; font-size: 13px; color: #888; display: flex; justify-content: space-between; align-items: center; }
.footer-legal a { color: #888; text-decoration: none; }
.footer-legal a:hover { color: var(--primary-color); }
.footer-legal .divider { margin: 0 10px; color: #CCC; }
.back-to-top { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background-color: #F0F4FF; color: var(--primary-color); border-radius: 4px; margin-left: 20px; text-decoration: none; transition: all 0.3s; }
.back-to-top svg { width: 18px; height: 18px; }
.back-to-top:hover { background-color: var(--primary-color); color: var(--white); }

/* =======================================================
   LƯỚI DỰ ÁN TRANG ARCHIVE
   ======================================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Chia 3 cột đều nhau */
    gap: 30px;
}

/* Ép lại hiển thị cho Responsive */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 cột */
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Mobile: 1 cột */
    }
}

/* ==========================================================================
   12. RESPONSIVE (MOBILE & TABLET) - GỘP CHUNG MỘT KHỐI
   ========================================================================== */

/* --- TABLET (< 992px) --- */
@media (max-width: 991px) {
    /* Header & Menu Mobile */
    .header-inner { flex-wrap: wrap !important; padding: 10px 0; }
    .site-logo { order: 1; max-width: 120px; }
    .site-logo img { width: 100%; height: auto; }
    
    .mobile-menu-toggle { display: block; order: 2; margin-left: auto; background: transparent; border: none; color: var(--primary-color); padding: 5px; }
    
    .header-search-wrap { order: 3; width: 100% !important; flex: 0 0 100%; margin-left: 0; margin-top: 5px; }
    .header-search-form, .header-search-form:focus-within { width: 100%; }

    .main-navigation { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.1); z-index: 999; padding: 10px 20px; }
    .main-navigation.active { display: block !important; }
    .main-navigation ul { flex-direction: column; padding: 0; margin: 0; }
    .main-navigation li { border-bottom: 1px solid #F0F0F0; width: 100%; }
    .main-navigation li:last-child { border-bottom: none; }
    .main-navigation a { display: block; padding: 14px 0; font-size: 15px; font-weight: 600; color: #333; }

    /* Hero Banner */
    .hero-title { font-size: 38px; }
    .hero-banner { padding: 40px 0 80px 0; }
    .hero-image { position: relative; height: 280px; margin-top: 30px; filter: none; }
    .hero-image .image-wrapper { clip-path: none; -webkit-mask-image: none !important; mask-image: none !important; border-radius: 12px; }
    .hero-image img { content: url('https://totopaint.com/wp-content/uploads/2026/01/son-toto-home-totopaint-new-1.png'); object-fit: cover; }
    .hero-badges { flex-wrap: wrap; }
    .badge-item { min-width: calc(50% - 15px); }

    /* Features */
    .features-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 15px; margin-top: -40px; padding: 20px; }
    .feature-item { width: 100%; }
    .feature-item:nth-child(5) { display: none !important; }

    /* Product Showcase */
    .product-showcase.top-grid { grid-template-columns: 1fr; gap: 20px; text-align: center; }
    .product-banner-img { margin-top: 20px; }
    .product-grid { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; gap: 15px; padding-bottom: 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; width: 100%; scrollbar-width: none; }
    .product-grid::-webkit-scrollbar { display: none; }
    .product-grid > .product-card { flex: 0 0 85% !important; max-width: 85% !important; scroll-snap-align: start; box-sizing: border-box; }

    /* Blog & Project */
    .content-4-col-grid { display: block; }
    .section-side-header { margin-bottom: 25px; }
    .swipe-mobile-wrapper { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 15px; padding-bottom: 15px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .swipe-mobile-wrapper::-webkit-scrollbar { display: none; }
    .swipe-mobile-wrapper > article { flex: 0 0 85%; scroll-snap-align: start; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }

    /* Technology */
    .tech-section { padding: 50px 0; }
    .tech-grid { grid-template-columns: 1fr; gap: 30px; }
    .tech-visual { flex-direction: column; }
    .tech-features { width: 100%; }
    .tech-shield { width: 100%; }

    /* CTA & Others */
    .cta-blue { flex-direction: column; text-align: center; gap: 20px;}
    .cta-blue .cta-left { flex-direction: column; }
    .archive-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; scrollbar-width: none;}
    .archive-tabs::-webkit-scrollbar { display: none; }
    .archive-tabs .tab-item { white-space: nowrap; }

    /* Footer */
    .footer-5-col { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

/* --- MOBILE NHỎ (< 768px) --- */
@media (max-width: 767px) {
    .featured-products { padding: 20px 0 !important; }
    .blog-section { padding: 20px 0 20px !important; }
    .projects-section { padding: 20px 0 40px !important; }
    .tech-section { padding: 20px 0 !important; }
    .hero-banner { padding: 20px 0 !important; }
    
    .section-header { flex-direction: column; align-items: flex-start !important; gap: 20px; }
    .product-tabs { margin: 25px auto 25px !important; gap: 8px; }
    .tab-item { padding: 8px 15px; font-size: 14px; flex: 1 1 calc(50% - 8px); justify-content: center; border: 1px solid #E5E5E5; }
    .tab-item::after { display: none !important; }
    .product-showcase-top { margin-bottom: 25px !important; }
    .section-side-header { margin-bottom: 20px !important; }
    .sec-title { font-size: 26px !important; }
    
    .news-grid { grid-template-columns: 1fr; }
    
    .cta-wrapper { flex-direction: column; text-align: center; }
    .cta-left { flex-direction: column; }
    
    .footer-5-col { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}

/* =======================================================
   ÉP KHUNG LƯỚI 3 CỘT CHO TRANG DỰ ÁN (ARCHIVE)
   ======================================================= */
/* 1. Chia 3 cột đều nhau */
.projects-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 30px;
}

/* 2. Định dạng thẻ dự án */
.projects-grid .project-card {
    background: #fff;
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}
.projects-grid .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* 3. ÉP CHẾT CHIỀU CAO ẢNH CHUẨN ĐẸP */
.projects-grid .project-thumb {
    width: 100%;
    height: 240px; /* Cố định chiều cao ảnh, không cho to hơn */
    display: block;
    overflow: hidden;
}
.projects-grid .project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Lệnh này xén ảnh tự động cho vừa khung mà không bị méo hình */
    transition: transform 0.5s ease;
}
.projects-grid .project-card:hover .project-thumb img {
    transform: scale(1.05); /* Zoom nhẹ khi di chuột */
}

/* 4. Phần thông tin chữ bên dưới */
.projects-grid .project-info {
    padding: 20px;
}
.projects-grid .project-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.projects-grid .project-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Quá 2 dòng sẽ hiện dấu ... */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.projects-grid .project-title a:hover {
    color: var(--primary-color);
}
.projects-grid .project-loc {
    font-size: 14px;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Quá 3 dòng mô tả sẽ hiện dấu ... */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 5. Responsive cho Mobile/Tablet */
@media (max-width: 992px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
    .projects-grid { grid-template-columns: 1fr !important; }
    .projects-grid .project-thumb { height: 200px; } /* Màn hình đt thì ảnh lùn xuống xíu */
}