/* ==========================================================
   Brand Hub Page — cherypartsiran.com
   ========================================================== */

/* --- Heading --- */
.section__heading--maintitle {
    font-size: 2.6rem;
    font-weight: var(--headings-weight);
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* خط اکسنت زیر تیتر (RTL: از راست شروع میشه) */
.section__heading--maintitle::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 6rem;
    height: 0.4rem;
    border-radius: 1rem;
    background: linear-gradient(270deg, var(--secondary-color), transparent);
}

.section__heading .ck-content {
    color: var(--foreground-sub-color);
    font-size: 1.4rem;
    line-height: 2.6rem;
    max-width: 80rem;
}

/* --- Model Card --- */
.categories__card {
    background: var(--text-white-color);
    border: 1px solid var(--border-color);
    border-radius: 1.2rem;
    padding: 2rem 1.5rem 1.6rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
}

/* نوار آبی بالای کارت که با هاور ظاهر میشه */
.categories__card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 0.3rem;
    background: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s ease;
}

.categories__card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 1.2rem 2.8rem rgba(37, 99, 235, 0.12);
    transform: translateY(-0.5rem);
}

.categories__card:hover::before {
    transform: scaleX(1);
}

/* --- Image --- */
.categories__card img {
    width: 14rem; /* 224px */
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: contain;
    margin: 0 auto 1.2rem;
    transition: var(--transition);
    filter: drop-shadow(0 0.4rem 0.8rem rgba(15, 23, 42, 0.08));
}



.categories__card:hover img {
    transform: scale(1.07);
}

/* --- Title --- */
.categories__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground-color);
    margin: 0;
    transition: var(--transition);
}

.categories__card:hover .categories__title {
    color: var(--secondary-color);
}

/* --- Empty State --- */
.text-muted {
    background: var(--bg-offwhite-color);
    border: 1px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    width: 100%;
    color: var(--foreground-sub-color);
}


/* --- SEO Bottom Content --- */
.ck-content.mt-30 {
    background: var(--text-white-color);
    border: 1px solid var(--border-color);
    border-radius: 1.2rem;
    padding: 2.5rem;
    color: var(--foreground-sub-color);
    line-height: 3rem;
}

.ck-content.mt-30 h2,
.ck-content.mt-30 h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .section__heading--maintitle {
        font-size: 2rem;
    }
    .categories__card {
        padding: 1.5rem 1rem 1.2rem;
        border-radius: 1rem;
    }
   @media (max-width: 767px) {
    .categories__card img {
        width: 11rem; /* 176px */
        height: auto;
        aspect-ratio: 8 / 5;
    }
}
    .categories__title {
        font-size: 1.3rem;
    }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    .categories__card,
    .categories__card img,
    .categories__card::before {
        transition: none;
    }
}



/* --- Product Count Badge --- */
.categories__card--count {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--secondary-color), #1d4ed8);
    color: var(--text-white-color);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    line-height: 1;
    box-shadow: 0 0.4rem 1rem rgba(37, 99, 235, 0.3);
    z-index: 2;
    transition: var(--transition);
}

.categories__card--count svg {
    width: 1.3rem;
    height: 1.3rem;
    flex-shrink: 0;
}

.categories__card:hover .categories__card--count {
    background: linear-gradient(135deg, #1d4ed8, var(--secondary-color));
    box-shadow: 0 0.6rem 1.4rem rgba(37, 99, 235, 0.4);
}

@media (max-width: 767px) {
    .categories__card--count {
        top: 0.8rem;
        right: 0.8rem;
        font-size: 1rem;
        padding: 0.4rem 0.9rem;
    }
    .categories__card--count svg {
        width: 1.1rem;
        height: 1.1rem;
    }
}



/* --- Brand Product Count Line --- */
.brand__product--count {
    display: flex;          /* قبلاً inline-flex بود */
    width: fit-content;     /* که پس‌زمینه/دات کل عرض رو نگیره */
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0.8rem 0 1.2rem;
    align-items: center;
    gap: 0.6rem;
}

.brand__product--count::before {
    content: "";
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--secondary-color);
}



