/* ==========================================================================
   Mindpoo — Các section trang chủ (TMĐT phụ tùng ô tô):
   cam kết, danh mục, banner khuyến mãi, sản phẩm, thương hiệu, tin tức.
   Màu thương hiệu #d12428. Responsive mobile-first.
   ========================================================================== */

:root {
    --ta-red: #d12428;        /* đỏ thương hiệu Mindpoo */
    --ta-red-dark: #b01f22;   /* đỏ đậm — hover */
    --ta-dark: #1f2430;       /* nền tối làm tương phản cho đỏ */
    --ta-ink: #1a2240;        /* màu chữ tiêu đề */
    --ta-muted: #6b7280;
    --ta-line: #eef1f6;       /* viền nhạt dùng chung cho thẻ */
}

/* Top bar: nền tối → đỏ làm điểm nhấn, đỡ rát mắt */
.top-bar { background-color: var(--ta-dark) !important; }

/* ── Tiêu đề section dùng chung ───────────────────────────────────────── */
.ta-sec { padding: 44px 0; }
.ta-sec-head { text-align: center; margin-bottom: 28px; }
.ta-sec-head h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 800; color: var(--ta-ink);
    margin: 0; text-transform: uppercase; letter-spacing: .3px;
}
.ta-sec-head h2 span { color: var(--ta-red); }
.ta-sec-head p { color: var(--ta-muted); margin: 8px 0 0; font-size: .95rem; }
.ta-sec-head::after {
    content: ""; display: block; width: 64px; height: 3px; margin: 12px auto 0;
    background: var(--ta-red); border-radius: 3px;
}

/* ── Dải cam kết / uy tín ─────────────────────────────────────────────── */
.ta-trust { background: var(--ta-dark); padding: 18px 0; }
.ta-trust .row { --bs-gutter-y: 14px; }
.ta-trust-item { display: flex; align-items: center; gap: 12px; color: #fff; }
.ta-trust-item i { font-size: 1.9rem; color: var(--ta-red); flex-shrink: 0; line-height: 1; }
.ta-trust-item .t { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.ta-trust-item .d { font-size: .8rem; color: #b9bfca; }

/* ── Lưới danh mục phụ tùng (full-width, hiện trên mọi thiết bị) ───────── */
.ta-cat-tile {
    display: block; position: relative; overflow: hidden; border-radius: 12px;
    background: #f1f3f5; box-shadow: 0 2px 10px rgba(0,0,0,.07);
    border-bottom: 3px solid var(--ta-red);
    transition: transform .25s ease, box-shadow .25s ease;
}
.ta-cat-tile:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,.14); }
.ta-cat-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform .35s ease; }
.ta-cat-tile:hover img { transform: scale(1.06); }
.ta-cat-tile .lbl {
    position: absolute; left: 0; right: 0; bottom: 0; padding: .55rem .7rem;
    background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff;
    font-weight: 600; font-size: .9rem; line-height: 1.3;
}
.ta-cat-noimg {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3;
    font-size: 2.2rem; color: #adb5bd; background: #e9ecef;
}

/* ── Banner đôi khuyến mãi (home_promo) ───────────────────────────────── */
.ta-sec-tight { padding: 14px 0; }
.ta-promo-tile {
    display: block; border-radius: 12px; overflow: hidden;
    box-shadow: 0 3px 14px rgba(0,0,0,.08); line-height: 0;
}
.ta-promo-tile img { width: 100%; height: auto; display: block; transition: transform .4s ease; }
.ta-promo-tile:hover img { transform: scale(1.04); }

/* ── Banner ngang full-width (home_strip) ─────────────────────────────── */
.ta-strip-wrap { margin: 18px 0; }
.ta-strip-wrap .banner-wrapper img { display: block; width: 100%; height: auto; }

/* ── Section sản phẩm: mobile bỏ padding để lấy tối đa không gian ──────── */
@media (max-width: 991.98px) {
    .pf-products {
        padding: 0;
        background-image: none;   /* bỏ nền gradient xám của .pf-bg-gray */
        border-radius: 0;
    }
}

/* ── Nút "Xem tất cả" cuối section ────────────────────────────────────── */
.pf-products-allbtn {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; text-decoration: none; font-size: 1rem;
    padding: 11px 30px; border-radius: 50px;
    color: var(--ta-red); border: 2px solid var(--ta-red);
    background: #fff; transition: .2s ease;
}
.pf-products-allbtn:hover {
    background: var(--ta-red); color: #fff;
    transform: translateY(-2px); box-shadow: 0 8px 18px rgba(209,36,40,.25);
}

/* ── Thương hiệu chính hãng (logo wall) ───────────────────────────────── */
.ta-brands-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (min-width: 576px) { .ta-brands-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .ta-brands-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .ta-brands-grid { grid-template-columns: repeat(6, 1fr); } }
.ta-brand-tile {
    display: flex; align-items: center; justify-content: center;
    height: 88px; padding: 12px; background: #fff;
    border: 1px solid var(--ta-line); border-radius: 12px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ta-brand-tile:hover {
    border-color: var(--ta-red);
    box-shadow: 0 8px 20px rgba(209,36,40,.12);
    transform: translateY(-3px);
}
.ta-brand-tile img {
    max-width: 100%; max-height: 60px; object-fit: contain;
    filter: grayscale(100%); opacity: .75;
    transition: filter .2s ease, opacity .2s ease;
}
.ta-brand-tile:hover img { filter: grayscale(0); opacity: 1; }
.ta-brand-name { font-weight: 600; color: var(--ta-ink); text-align: center; font-size: 14px; }

/* ── Tin tức & cẩm nang ───────────────────────────────────────────────── */
.ta-news-card {
    height: 100%; background: #fff; border: 1px solid var(--ta-line);
    border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}
.ta-news-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.08); transform: translateY(-4px); }
.ta-news-thumb {
    position: relative; display: block; aspect-ratio: 16 / 10;
    overflow: hidden; background: #f3f5f9;
}
.ta-news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ta-news-card:hover .ta-news-thumb img { transform: scale(1.05); }
.ta-news-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: #c4ccda; font-size: 2.2rem; }
.ta-news-cat {
    position: absolute; top: 10px; left: 10px;
    background: var(--ta-red); color: #fff;
    font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.ta-news-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ta-news-meta { font-size: 12.5px; color: #8a93a3; }
.ta-news-meta i { color: var(--ta-red); margin-right: 4px; }
.ta-news-title { font-size: 15.5px; line-height: 1.45; margin: 0; }
.ta-news-title a { color: var(--ta-ink); text-decoration: none; }
.ta-news-title a:hover { color: var(--ta-red); }
.ta-news-excerpt { font-size: 13.5px; color: var(--ta-muted); margin: 0; }

/* ── Mobile tinh chỉnh ────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .ta-sec { padding: 30px 0; }
    .ta-trust-item { gap: 9px; }
    .ta-trust-item i { font-size: 1.5rem; }
    .ta-trust-item .t { font-size: .85rem; }
    .ta-cat-tile .lbl { font-size: .8rem; padding: .4rem .5rem; }

    /* Dải cam kết: cuộn ngang cho đỡ chiếm diện tích, mượt + snap */
    .ta-trust .row {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        margin-bottom: 0;
        padding-bottom: 2px;
    }
    .ta-trust .row::-webkit-scrollbar { display: none; }
    .ta-trust .row > [class*="col-"] {
        flex: 0 0 auto;
        width: 72%;
        scroll-snap-align: start;
    }
    .ta-trust-item {
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.10);
        border-radius: 10px;
        padding: 12px 14px;
        height: 100%;
    }
}
