/* ==========================================================================
   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 #0C6C02. Responsive mobile-first.
   ========================================================================== */

:root {
    --ta-red: #0C6C02;        /* xanh lá thương hiệu (giữ tên biến để tương thích) */
    --ta-red-dark: #095201;   /* xanh đậm — hover */
    --ta-dark: #1f2430;       /* nền tối làm tương phản */
    --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 xanh lá thương hiệu */
.top-bar { background-color: #0C6C02 !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(12, 108, 2,.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(12, 108, 2,.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: #5a6472; }
.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%;
    }
}

/* ==========================================================================
   Hạt Giống Cánh Diều — Section trang chủ (slider danh mục & sản phẩm).
   Port từ trang chủ bản cũ, dùng Swiper. Tông xanh lá hạt giống.
   ========================================================================== */
:root {
    --hgs-green: #0C6C02;       /* xanh lá thương hiệu hạt giống */
    --hgs-green-dark: #095201;  /* xanh đậm — hover */
    --hgs-ink: #1a2b1c;         /* màu chữ tiêu đề */
    --hgs-bg: #f4f9f1;          /* nền nhạt khối sản phẩm */
}

.hgs-section { padding: 36px 0; }

/* Tiêu đề section: chữ ở giữa, 2 vạch ngang hai bên */
.hgs-title {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    margin: 0 0 26px; text-align: center;
}
.hgs-title span {
    font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 800; color: var(--hgs-ink);
    text-transform: uppercase; letter-spacing: .3px;
}
.hgs-title a { text-decoration: none; color: var(--hgs-green); }
.hgs-title a:hover span { color: var(--hgs-green-dark); }
.hgs-title::before, .hgs-title::after {
    content: ""; height: 2px; flex: 1 1 auto; max-width: 120px;
    background: linear-gradient(90deg, transparent, var(--hgs-green));
}
.hgs-title::after { background: linear-gradient(90deg, var(--hgs-green), transparent); }

/* Nền khối sản phẩm giữa trang — ảnh trang trí phủ trên nền xanh nhạt */
.hgs-mainbg {
    background-color: var(--hgs-bg);
    background-image: url('/images/main-bg.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}
@media (max-width: 991.98px) {
    /* Mobile: bỏ fixed (gây giật khi cuộn) + cho ảnh co theo bề ngang */
    .hgs-mainbg { background-attachment: scroll; background-size: 100% auto; }
}

/* Pattern trang trí dưới slider (port từ .categories .pattern bản cũ) */
.hgs-pattern { position: relative; z-index: 2; line-height: 0; }
.hgs-pattern img { width: 100%; height: auto; display: block; }
@media (min-width: 1200px) {
    .hgs-pattern { margin-top: -45px; }
}

/* Dải ảnh minh hoạ */
.hgs-decor { text-align: center; padding: 8px 0; }
.hgs-decor img { max-width: 100%; height: auto; }

/* ── Slider danh mục ──────────────────────────────────────────────────── */
.hgs-cat-slider { position: relative; padding: 0 8px; }
.hgs-cat-tile { display: block; text-align: center; text-decoration: none; }
.hgs-cat-media {
    display: block; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
    border: 3px solid #e3efdc; background: #fff; transition: border-color .2s, transform .2s;
}
.hgs-cat-tile:hover .hgs-cat-media { border-color: var(--hgs-green); transform: translateY(-4px); }
.hgs-cat-media img { width: 100%; height: 100%; object-fit: cover; }
.hgs-cat-noimg {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
    font-size: 2rem; color: var(--hgs-green);
}
.hgs-cat-name {
    display: block; margin-top: 10px; font-size: .95rem; font-weight: 600; color: var(--hgs-ink);
    line-height: 1.3;
}
.hgs-cat-tile:hover .hgs-cat-name { color: var(--hgs-green); }

/* ── Slider sản phẩm ──────────────────────────────────────────────────── */
.hgs-prod-slider { position: relative; padding: 4px 8px 44px; }
.hgs-prod-slider .swiper-slide { height: auto; }
.hgs-prod-slider .swiper-slide > .product-card { height: 100%; }

/* Nút điều hướng + chấm phân trang theo tông xanh */
.hgs-cat-slider .swiper-button-next,
.hgs-cat-slider .swiper-button-prev,
.hgs-prod-slider .swiper-button-next,
.hgs-prod-slider .swiper-button-prev {
    color: var(--hgs-green);
    --swiper-navigation-size: 28px;
}
.hgs-prod-slider .swiper-pagination { bottom: 8px; }
.hgs-prod-slider .swiper-pagination-bullet-active { background: var(--hgs-green); }

@media (max-width: 575.98px) {
    .hgs-section { padding: 26px 0; }
    .hgs-title::before, .hgs-title::after { max-width: 48px; }
}

/* ── Cam kết dịch vụ (port từ services-container bản cũ) ───────────────── */
.hgs-services .hgs-service {
    height: 100%; text-align: center; background: #fff;
    border: 1px solid #eef1ec; border-radius: 12px; padding: 26px 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,.05);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.hgs-services .hgs-service:hover {
    transform: translateY(-5px); box-shadow: 0 10px 22px rgba(12, 108, 2,.12); border-color: #cfe6c6;
}
.hgs-service-icon {
    width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: var(--hgs-bg);
}
.hgs-service-icon i { font-size: 44px; color: var(--hgs-green); }
.hgs-service-title {
    font-size: 1rem; font-weight: 600; color: var(--hgs-ink);
    margin: 0; padding-bottom: 10px; position: relative;
}
.hgs-service-title::after {
    content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 38px; height: 2px; background: var(--hgs-green);
}
@media (max-width: 575.98px) {
    .hgs-services .hgs-service { padding: 18px 10px; }
    .hgs-service-icon { width: 62px; height: 62px; }
    .hgs-service-icon i { font-size: 30px; }
    .hgs-service-title { font-size: .9rem; }
}

/* ── Tap target ≥24px cho điều khiển slider (a11y: target-size) ───────── */
.hgs-cat-slider .swiper-button-next,
.hgs-cat-slider .swiper-button-prev,
.hgs-prod-slider .swiper-button-next,
.hgs-prod-slider .swiper-button-prev {
    width: 44px;
    height: 44px;
}
.hgs-cat-slider .swiper-pagination-bullet,
.hgs-prod-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 7px !important;
    position: relative;
}
.hgs-cat-slider .swiper-pagination-bullet::after,
.hgs-prod-slider .swiper-pagination-bullet::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
}
