:root {
    --main-color: #702283;
    --secondary-color: #bb9f7c;
    --danger: #e63946;
    --text: #1d1d1b;
    --text-muted: #505049;
    --text-light: #8f9192;
    --bg-soft: #faf7f8;
    --border: #eee7ea;
}

.category-page {
    width: 100%;
    padding: 24px 0 64px;
    background: #fff;
    font-family: Tahoma, sans-serif;
    color: var(--text);
}

/* ============================================
   Breadcrumb
   ============================================ */
.category-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.category-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.25s ease;
}

.category-breadcrumb a:hover { color: var(--main-color); }
.category-breadcrumb__sep { color: #c0c2c5; }
.category-breadcrumb [aria-current] { color: var(--text); font-weight: 600; }

/* ============================================
   Header
   ============================================ */
.category-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.category-header__title {
    margin: 0;
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 700;
    line-height: 1.4;
}

.category-header__desc {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   Search Bar
   ============================================ */
.category-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px ;
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    margin-bottom: 20px;
    transition: border-color 0.25s ease;
}

.category-search:focus-within {
    border-color: var(--main-color);
}

.category-search i {
    color: var(--text-light);
    font-size: 16px;
    flex-shrink: 0;
}

.category-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
}

.category-search input::placeholder { color: var(--text-light); }

.category-search__btn {
    padding: 10px 20px;
    background: var(--main-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.category-search__btn:hover { background: #5a1a6a; }

/* ============================================
   Toolbar (تعداد + مرتب‌سازی)
   ============================================ */
.category-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--bg-soft);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.category-toolbar__count {
    font-size: 13px;
    color: var(--text-muted);
}

.category-toolbar__count strong {
    color: var(--text);
    font-weight: 700;
}

.category-sort {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.category-sort label {
    white-space: nowrap;
}

.category-sort select {
    padding: 8px 30px 8px 12px;
    border: 1.5px solid #d9d9d9;
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23505049' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 8px center;
    background-size: 14px;
}

.category-sort select:focus { border-color: var(--main-color); }

/* ============================================
   گرید محصولات
   ============================================ */
.category-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ============================================
   صفحه‌بندی
   ============================================ */
.category-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 24px;
    flex-wrap: wrap;
}

.category-pagination__btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-pagination__btn:hover:not(:disabled) {
    border-color: var(--main-color);
    color: var(--main-color);
}

.category-pagination__btn.active {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

.category-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.category-pagination__btn i { font-size: 12px; }

/* ============================================
   ریسپانسیو
   ============================================ */
@media (max-width: 991px) {
    .category-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .category-page { padding: 16px 0 40px; }
    .category-header__title { font-size: 20px; }
    .category-search { padding: 4px 12px; }
    .category-search__btn { padding: 10px 16px; font-size: 13px; }
    .category-products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-toolbar { padding: 10px 12px; }
    .category-toolbar__count { font-size: 12px; }
    .category-sort { font-size: 12px; }
    .category-sort select { font-size: 12px; }
    .category-pagination__btn { min-width: 36px; height: 36px; font-size: 12px; }
}

.category-pagination__btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.category-pagination .active a { color: #fff; }

/* ============================================
   توضیحات دسته
   ============================================ */
/* ============================================
   🔑 Heading Sizes (H1–H6)
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0;
    font-family: inherit;
}

h1, .h1 {
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    margin: 0 0 16px;
}

h2, .h2 {
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    margin: 0 0 14px;
}

h3, .h3 {
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
    margin: 0 0 12px;
}

h4, .h4 {
    font-size: clamp(15px, 1.4vw, 18px);
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 10px;
}

h5, .h5 {
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 8px;
}

h6, .h6 {
    font-size: clamp(13px, 1.1vw, 14px);
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0 0 8px;
}

@media (max-width: 575px) {
    h1, .h1 { font-size: 22px; line-height: 1.3; margin-bottom: 12px; }
    h2, .h2 { font-size: 19px; line-height: 1.35; margin-bottom: 10px; }
    h3, .h3 { font-size: 17px; line-height: 1.4; margin-bottom: 8px; }
    h4, .h4 { font-size: 15px; line-height: 1.45; margin-bottom: 8px; }
    h5, .h5 { font-size: 14px; line-height: 1.5; margin-bottom: 6px; }
    h6, .h6 { font-size: 13px; line-height: 1.5; margin-bottom: 6px; }
}

/* ============================================
   🔑 توضیحات دسته‌بندی
   ============================================ */
.category-description {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-soft);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.category-description__title {
    margin: 0 0 16px;
    padding-right: 12px;
    position: relative;
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
}

.category-description__title::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: 0;
    width: 4px;
    background: var(--secondary-color);
    border-radius: 3px;
}

.category-description__content {
    font-size: 14px;
    line-height: 2;
    color: var(--text-muted);
    text-align: justify;
}

.category-description__content p {
    margin: 0 0 12px;
}

.category-description__content p:last-child {
    margin-bottom: 0;
}

.category-description__content h2,
.category-description__content h3,
.category-description__content h4 {
    color: var(--text);
    margin: 20px 0 10px;
}

.category-description__content h2 { font-size: 18px; font-weight: 700; }
.category-description__content h3 { font-size: 16px; font-weight: 700; }
.category-description__content h4 { font-size: 15px; font-weight: 600; }

.category-description__content ul,
.category-description__content ol {
    margin: 0 0 12px;
    padding-right: 24px;
    padding-left: 0;
}

.category-description__content li {
    margin-bottom: 6px;
    line-height: 1.9;
}

.category-description__content strong {
    color: var(--text);
    font-weight: 600;
}

.category-description__content a {
    color: var(--main-color);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px dotted var(--main-color);
}

.category-description__content a:hover {
    color: #5a1a6a;
    border-bottom-style: solid;
}

.category-description__content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 12px 0;
    display: block;
}

.category-description__content blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    background: #fff;
    border-right: 3px solid var(--main-color);
    border-radius: 8px;
    font-style: italic;
    color: var(--text);
}
@media (max-width: 991px) {
    .category-description {
        margin-top: 32px;
        padding: 20px;
    }
}

@media (max-width: 575px) {
    .category-description {
        margin-top: 24px;
        padding: 16px;
        border-radius: 12px;
    }

    .category-description__title {
        font-size: 16px;
        margin-bottom: 12px;
        padding-right: 10px;
    }

    .category-description__content {
        font-size: 13px;
        line-height: 1.9;
        text-align: right;
    }

    .category-description__content h2 { font-size: 16px; }
    .category-description__content h3 { font-size: 15px; }
    .category-description__content h4 { font-size: 14px; }

    .category-description__content ul,
    .category-description__content ol {
        padding-right: 20px;
    }
}






.products-grid{display:grid;gap:15px;}
.meta_tag {
    display: block;
    width: max-content !important;
    padding: 2px 8px;
    border-radius: 11px;
    font-size: 11px;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--main-color);
    background-color: #fff;
    border: 1px solid var(--main-color);
}
@media (min-width: 576px){
    .products-grid{grid-template-columns:repeat(2, 1fr);}
}
@media (min-width: 768px){
    .products-grid{grid-template-columns:repeat(3, 1fr);}
}
@media (min-width: 992px){
    .products-grid{grid-template-columns:repeat(4, 1fr);}
}
@media (min-width: 1200px){
    .products-grid{grid-template-columns:repeat(5, 1fr);}
}
/*! CSS Used from: style-change.css */
