/* ===================================================================
   Nhà Đẹp BT — CSS của TRANG CHỦ (chỉ Default.aspx nạp)
   Thiết kế gốc: nhadepbt/Homepage-UI.png (1366px, nội dung 1206px).

   Quy ước còn nguyên giá trị:
   - Không hard-code mã màu. Dùng biến trong tokens.css.
   - Sửa file này xong phải tăng ?v=N ở Default.aspx.
   - Tên class trong khối do C# sinh (.product-card*, .partner-card, .policy-card, .cat-row…)
     là HỢP ĐỒNG với Default.aspx.cs / FrontendProductCard.cs — xem quy tắc 13 trong CLAUDE.md.
   =================================================================== */

/* ---------- Tiêu đề section dùng chung (kicker nhỏ + H2 đậm) ---------- */
.home-heading { text-align: center; margin-bottom: 26px; }
.home-kicker { margin: 0 0 4px; font-size: 1.25rem; font-weight: 500; color: var(--c-body); }
.home-title {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--c-primary);
}

/* ---------- 1. Banner dạng slide ----------
   Slider dựng bởi home.js từ class .js-swiper + data-*. Ghi đè padding mặc định của .js-swiper
   (chừa chỗ cho bóng thẻ) và vị trí chấm trang (mặc định nằm DƯỚI slider) để chấm đè lên ảnh. */
.home-hero { background: var(--c-primary-dark); line-height: 0; }
.home-hero-swiper { padding: 0; }
.home-hero .swiper-slide { line-height: 0; }
.home-hero img { width: 100%; height: auto; display: block; }
.home-hero .swiper-horizontal > .swiper-pagination-bullets,
.home-hero .swiper-pagination {
    position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; z-index: 3;
    display: flex; justify-content: center; gap: 8px;
}
.home-hero .swiper-pagination-bullet { width: 28px; height: 4px; margin: 0 !important; background: var(--c-white); opacity: .55; }
.home-hero .swiper-pagination-bullet-active { background: var(--c-accent); opacity: 1; }
.home-hero .swiper-button-prev, .home-hero .swiper-button-next {background: rgba(255, 255, 255, .85);border-color: transparent;padding: 10px;}

/* ---------- Lớp nền đá cẩm thạch: đối tác + chính sách + giới thiệu ---------- */
.home-marble {
    background: var(--c-bg-soft) url(../images/bg-gioithieu.jpg) center top / cover no-repeat;
    padding-top: 30px;
}

/* ---------- 2. Đối tác ---------- */
/* Slider logo: 6 / 3 / 2 logo mỗi lượt do data-slides* trong Default.aspx.cs. .js-swiper đã chừa padding cho bóng thẻ. */
.partner-swiper .swiper-slide { height: auto; }
.partner-card {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 192 / 90;
    padding: 10px 15px;
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0, 39, 107, .12);
    transition: transform var(--t), box-shadow var(--t);
}
a.partner-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 39, 107, .2); }
.partner-card img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* ---------- 3. Chính sách nổi bật ---------- */
.home-policies { padding-top: 32px; }
.policy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.policy-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 212px;
    padding: 22px 18px;
    text-align: center;
    color: var(--c-white);
    background: var(--c-primary) url(../images/bg-chinhsach.svg?v=2) center / cover no-repeat;
    border-radius: var(--radius-lg);
}
.policy-card .item-icon { width: 80px; height: 72px; margin-bottom: 14px; background: transparent; border-radius: 0; color: var(--c-white); font-size: 2.5rem; }
.policy-card .item-icon img { width: auto; height: 100%; max-width: 80px; object-fit: contain; }
.policy-card h3 {margin: 0 0 10px;font-size: 18px;font-weight: 500;letter-spacing: 0;color: var(--c-white);font-family: var(--font-base);}
.policy-card p {margin: 0;font-size: 14px;line-height: 1.45;color: rgba(255, 255, 255, .95);}

/* ---------- 4. Giới thiệu ---------- */
.home-about { padding: 46px 0 150px; position: relative; z-index: 0; }
.about-grid {display: grid;grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);gap: 40px;align-items: start;}
.about-text {}
.about-kicker { margin: 0; font-size: 1.375rem; font-weight: 500; color: var(--c-body); }
.about-title { margin: 0 0 4px; font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 800; text-transform: uppercase; color: var(--c-primary); }
.about-slogan {margin: 0 0 16px;font-size: 20px;font-weight: 500;line-height: 1.3;color: var(--c-accent);}
.about-desc { font-size: 1rem; font-weight: 400; line-height: 1.7; color: var(--c-body); }
.about-desc p {margin-bottom: .8em;text-align: justify;}
.about-checks { list-style: none; margin: 20px 0 26px; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 14px 40px; justify-content: start; }
.about-checks li { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; font-weight: 600; }
.about-checks i { color: var(--c-accent); font-size: 1.25rem; }
.about-checks a, .about-checks span { color: var(--c-primary); }
.about-checks a:hover { color: var(--c-accent-dark); }
.about-media { margin-top: -6px; }
.about-media img { width: 100%; height: auto; }

/* ---------- Lớp nền sản phẩm (trắng + nét bản vẽ mờ) ---------- */
.home-products-bg {
    background: var(--c-bg) url(../images/bg-sanpham.jpg) center top / cover no-repeat;
    padding-bottom: clamp(40px, 5vw, 70px);
    display: flow-root; /* chặn margin âm của .home-featured kéo cả lớp nền này đè lên nền đá */
}

/* ---------- 5. Sản phẩm nổi bật (khối xanh gối lên nền đá) ---------- */
.home-featured {position: relative;z-index: 2;margin-top: -110px;padding-bottom: 149px;}
.featured-panel {
    padding: 52px clamp(20px, 5.5vw, 70px) 44px;
    text-align: center;
    color: var(--c-white);
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0) 0 90px, rgba(255, 255, 255, .05) 90px 150px),
        linear-gradient(160deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    box-shadow: var(--shadow);
}
.featured-kicker { margin: 0 0 6px; font-size: 1.25rem; font-weight: 400; }
.featured-title {margin: 0 0 8px;font-size: clamp(1.625rem, 3vw, 2rem);font-weight: 600;text-transform: uppercase;color: var(--c-white);}
.featured-title a { color: inherit; }
.featured-title a:hover { color: var(--c-accent); }
.featured-sub { margin: 0; font-size: .9375rem; color: var(--c-white); }
/* Slider 4 / 2 / 1.2 thẻ mỗi lượt (data-slides* trong Default.aspx.cs). .js-swiper đã chừa padding cho bóng thẻ. */
.featured-swiper {margin-top: 34px;text-align: center;margin-bottom: -180px;}
.featured-swiper .swiper-slide { display: flex; height: auto; }
.featured-swiper .product-card { width: 100%; }
/* Ảnh tủ bếp cao hơn ảnh vật tư (239 x 311 trong thiết kế) */
.featured-swiper .product-card-media { aspect-ratio: 239 / 311; }
.featured-swiper .product-card-title { min-height: 0; -webkit-line-clamp: 1; }

/* ---------- 6. Sản phẩm theo nhóm ---------- */
.home-products { padding-top: 56px; }
.cat-rows { display: grid; gap: 20px; margin-top: 8px; }
.cat-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 20px;
}
.cat-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 25px;
    border-radius: var(--radius-lg);
    background: var(--c-primary) center / cover no-repeat;
    color: var(--c-white);
    text-align: center;
    overflow: hidden;
}
.cat-panel::before { content: ""; position: absolute; inset: 0; background: rgba(0, 75, 162, .8); transition: background var(--t); }
.cat-panel:hover::before { background: rgba(0, 75, 162, .66); }
.cat-panel span {
    position: relative;
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    font-weight: 400;
    line-height: 1.25;
    text-transform: uppercase;
}
.cat-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* ---------- 7. Giải pháp toàn diện ---------- */
.home-solution {
    padding: clamp(70px, 9vw, 120px) 0;
    background: var(--c-primary-darker) center / cover no-repeat;
    text-align: center;
    color: var(--c-white);
    background-attachment: fixed;
    background-size: cover;
}
.solution-kicker { margin: 0 0 6px; font-size: 1.375rem; font-weight: 400; color: var(--c-white); }
.solution-title {margin: 0 0 16px;font-size: clamp(1.625rem, 3.4vw, 2rem);font-weight: 600;text-transform: uppercase;color: var(--c-white);}
.solution-desc { max-width: 800px; margin: 0 auto 36px; font-size: 1.0625rem; line-height: 1.6; color: var(--c-white); }

/* ---------- 8. Tin tức & cẩm nang ---------- */
.home-news {padding: clamp(44px, 6vw, 50px) 0 clamp(50px, 6vw, 50px);background: var(--c-white);}
.news-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.news-head .home-title { text-align: left; }
.news-grid { display: grid; grid-template-columns: minmax(0, 534fr) minmax(0, 644fr); gap: 28px; align-items: start; }

.news-lead-thumb { display: block; overflow: hidden; border-radius: var(--radius); }
.news-lead-thumb img {width: 100%;aspect-ratio: 534 / 321;/* object-fit: cover; */transition: transform .6s var(--ease);}
.news-lead:hover .news-lead-thumb img { transform: scale(1.03); }
.news-lead h3 {margin: 26px 0 14px;padding-bottom: 14px;border-bottom: 1px solid var(--c-line);font-size: 1.25rem;font-weight: 600;letter-spacing: 0;font-family: var(--font-base);}
.news-lead p { font-size: .9375rem; line-height: 1.7; color: var(--c-muted); }

.news-list { display: grid; }
.news-item { display: grid; grid-template-columns: minmax(0, 218px) minmax(0, 1fr); gap: 16px; padding: 0 0 22px; }
.news-item + .news-item { padding-top: 22px; border-top: 1px dashed var(--c-line); }
.news-item-thumb { display: block; overflow: hidden; border-radius: 6px; }
.news-item-thumb img {width: 100%;aspect-ratio: 218 / 130;/* object-fit: cover; */transition: transform .6s var(--ease);}
.news-item:hover .news-item-thumb img { transform: scale(1.05); }
.news-item h3 {margin: 0 0 8px;font-size: 1rem;font-weight: 600;line-height: 1.35;letter-spacing: 0;font-family: var(--font-base);}
.news-item h3 a { color: var(--c-ink); }
.news-item h3 a:hover, .news-lead h3 a:hover { color: var(--c-accent-dark); }
.news-item p { margin: 0 0 10px; font-size: .875rem; line-height: 1.55; color: var(--c-muted); }
.news-meta { display: flex; gap: 20px; font-size: .875rem; color: var(--c-muted); }
.news-meta i { margin-right: 4px; color: var(--c-primary); }

/* ================================================== RESPONSIVE ===== */
@media (max-width: 1199.98px) {
    .home-about { padding-bottom: 130px; }
    .about-text { padding-left: 0; }
    .cat-row { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
    .cat-panel { padding: 22px 16px; min-height: 96px; }
    .cat-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-grid { grid-template-columns: 1fr; }
    .about-text { max-width: none; }
    .home-featured { margin-top: -90px; }
    .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .policy-grid {/* grid-template-columns: 1fr; */gap: 10px;}
    .policy-card {min-height: 180px;padding: 10px;}
    .policy-card .item-icon{
    height: 45px;
    }
    .policy-card h3{
        font-size: 16px;
    }
    .policy-card p{
    font-size: 13px;
    }
    .about-checks {/* grid-template-columns: 1fr; */}
    .featured-panel {padding-top: 40px;margin-left: -16px;margin-right: -16px;}
    .cat-products { gap: 10px; }
    .news-head { flex-direction: column; }
    .news-item { grid-template-columns: 1fr; }
    .news-item-thumb img { aspect-ratio: 16 / 9; }
    .about-checks li{
    font-size: 14px;
    }
}
