/* ============================================================
   target_home — Front CSS
   ============================================================ */

/* ── Variables & base ──────────────────────────────────────── */
:root {
    --th-radius: 8px;
    --th-gap: 16px;
    --th-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.th-section {
    padding: 40px 0;
}

.th-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.th-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.th-section-sub {
    color: #666;
    font-size: .9rem;
    margin: 4px 0 0;
    flex-basis: 100%;
}

.th-see-all {
    font-size: .85rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    text-decoration: none;
}
.th-see-all:hover { color: #000; }
.th-see-all .material-icons { font-size: 16px; }

/* ── Nouveautés ─────────────────────────────────────────────── */
.th-new-products { background: #fff; }

.th-products-scroll {
    display: flex;
    gap: var(--th-gap);
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.th-products-scroll .js-product,
.th-products-scroll article {
    flex: 0 0 220px;
    min-width: 0;
}

/* ── Blocs catégories ───────────────────────────────────────── */
.th-category-block {
    background: #fafafa;
}

.th-cat-row {
    display: flex;
    gap: var(--th-gap);
    align-items: stretch;
}

/* Vignette catégorie (colonne gauche) */
.th-cat-thumb {
    flex: 0 0 220px;
    min-height: 260px;
    background: var(--block-color, #E67E22);
    border-radius: var(--th-radius);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.th-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.th-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 16px;
    color: #fff;
}

.th-cat-thumb:not(:has(img)) .th-cat-overlay {
    background: var(--block-color, #E67E22);
    position: relative;
    inset: auto;
}

.th-cat-no-img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--block-color, #E67E22);
}
.th-cat-no-img .material-icons { font-size: 64px; color: rgba(255,255,255,0.5); }

.th-cat-link {
    font-size: .82rem;
    font-weight: 600;
    color: #fff;
    text-decoration: underline;
}

/* Produits de la catégorie (colonne droite) */
.th-cat-products {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: var(--th-gap);
    overflow-x: auto;
    align-items: flex-start;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.th-cat-products .js-product,
.th-cat-products article {
    flex: 0 0 200px;
    min-width: 0;
}

/* ── Marques ─────────────────────────────────────────────────── */
.th-brands { background: #fff8f0; }

.th-brands-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.th-brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    width: 140px;
    text-align: center;
    transition: transform .2s;
}
.th-brand-card:hover { transform: translateY(-4px); }

.th-brand-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 2px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--th-shadow);
}

.th-brand-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.th-brand-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}
.th-brand-no-img .material-icons { font-size: 40px; color: #bbb; }

.th-brand-name {
    font-size: .9rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* ── Pays ────────────────────────────────────────────────────── */
.th-countries { background: #f9f7f4; }

.th-countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--th-gap);
}

.th-country-card {
    display: block;
    text-decoration: none;
    border-radius: var(--th-radius);
    overflow: hidden;
    box-shadow: var(--th-shadow);
    transition: transform .2s, box-shadow .2s;
    background: #fff;
}
.th-country-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.th-country-img {
    height: 160px;
    overflow: hidden;
    background: #ddd;
    position: relative;
}
.th-country-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.th-country-card:hover .th-country-img img { transform: scale(1.05); }

.th-country-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
}
.th-country-no-img .material-icons { font-size: 64px; color: #bbb; }

.th-country-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.th-country-info strong { font-size: .95rem; color: #1a1a1a; }
.th-country-info span   { font-size: .8rem;  color: #888; }

/* ── CTA ─────────────────────────────────────────────────────── */
.th-cta { background: #1a1a1a; padding: 48px 0; }

.th-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.th-cta-text { flex: 1; }
.th-cta-text h2 { color: #fff; font-size: 1.6rem; margin: 0 0 8px; }
.th-cta-text p  { color: rgba(255,255,255,.7); margin: 0; }

.th-cta-action { flex-shrink: 0; }

.th-cta-btn {
    display: inline-block;
    text-decoration: none;
}

.th-cta-btn img {
    max-height: 60px;
    border-radius: var(--th-radius);
}

.th-cta-btn span {
    display: inline-block;
    background: #E67E22;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 30px;
    transition: background .2s;
}
.th-cta-btn:hover span { background: #d35400; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .th-cat-row { flex-direction: column; }

    .th-cat-thumb {
        flex: none;
        min-height: 180px;
        width: 100%;
    }

    .th-cat-products { overflow-x: auto; }

    .th-brands-grid { gap: 12px; }
    .th-brand-card  { width: 110px; }
    .th-brand-img   { width: 80px; height: 80px; }

    .th-countries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .th-cta-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .th-section-title { font-size: 1.2rem; }
    .th-countries-grid { grid-template-columns: 1fr 1fr; }
}

.home_supplier .hb-cover{background-size: cover !important;}
