/* استایل مشترک دسته، زیرگروه و برند از طریق کلاس ویترین به همین صفحه‌ها محدود است. */
.category-browse {
    --bq-category-ink: #172d38;
    --bq-category-muted: #52656d;
    --bq-category-line: #dde5e7;
    --bq-category-soft: #f5f8f8;
    --bq-category-accent: #a35200;
    color: var(--bq-category-ink);
}

.category-browse .breadcrumb {
    margin-bottom: 8px;
    padding-inline: 0;
    background: transparent;
}

.category-browse-header { margin-bottom: 17px; }

.category-browse-brand-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-browse-brand-heading img,
.category-browse-brand-list img {
    object-fit: contain;
    flex: none;
}

.category-browse-header h1 {
    margin: 0;
    color: var(--bq-category-ink);
    font-size: clamp(25px, 3.5vw, 37px);
    font-weight: 800;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.category-browse-choices,
.category-browse-grid {
    display: grid;
    gap: 14px;
}

.category-browse-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}

.category-browse a.category-browse-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 100px;
    min-width: 0;
    padding: 10px 12px 10px 10px;
    border: 1px solid var(--bq-category-line);
    border-radius: 15px;
    background: #fff;
    color: var(--bq-category-ink);
    text-decoration: none;
}

.category-browse-choice img {
    order: 1;
    display: block;
    width: 124px;
    height: 112px;
    padding: 3px;
    border-radius: 10px;
    background: var(--bq-category-soft);
    object-fit: contain;
    flex: none;
}

.category-browse-choices--brands .category-browse-choice img {
    width: 82px;
    height: 72px;
    padding: 7px;
}

.category-browse-choice-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.category-browse-choice-text strong { font-size: clamp(15px, 2vw, 20px); line-height: 1.55; }
.category-browse-choice-action { color: var(--bq-category-accent); font-size: 13px; font-weight: 700; }
.category-browse a.category-browse-choice:hover { border-color: #cb9967; background: #fffbf5; }

.category-browse-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
}

.category-browse-workwear { margin-bottom: 16px; }

.category-browse a.category-browse-link,
.category-browse-brand-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid var(--bq-category-line);
    border-radius: 10px;
    color: var(--bq-category-ink);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.category-browse a.category-browse-link:hover,
.category-browse-brand-list a:hover { background: #fffbf5; border-color: #cb9967; }

.category-browse a:focus-visible,
.category-browse-question summary:focus-visible { outline: 2px solid var(--bq-category-accent); outline-offset: 2px; }

.category-browse-results {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.category-browse-results h2,
.category-browse-brands h2,
.category-browse-faq h2 {
    margin: 0;
    color: var(--bq-category-ink);
    font-size: clamp(17px, 2.2vw, 22px);
    font-weight: 800;
    line-height: 1.6;
}

.category-browse-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.category-browse-grid > * { min-width: 0; }

/* کل کارت لینک است. ارتفاع تصویر از ابتدا معلوم است تا بارگذاری عکس ردیف را جابه‌جا نکند. */
.category-browse-grid a.shop-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    border: 1px solid var(--bq-category-line);
    border-radius: 14px;
    text-decoration: none;
}

.category-browse-grid a.shop-card:hover { transform: none; border-color: #9bafb3; }
.category-browse-grid .shop-card-img {
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bq-category-soft);
}

.category-browse-grid .shop-card-img img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.category-browse-grid .shop-card-body { flex: 1; max-height: none; padding: 12px; text-align: start; }
.category-browse-grid .shop-card-title { height: auto; min-height: 3.4em; overflow-wrap: anywhere; }
.category-browse-grid .shop-card-footer,
.category-browse-grid .shop-card-price { align-items: flex-start; }
.category-browse-grid .shop-card-footer { margin-top: auto; flex-direction: column; gap: 4px; }
.category-browse-grid a.shop-card .shop-card-view {
    width: auto;
    padding: 0;
    background: transparent;
    color: var(--bq-category-muted);
    text-align: start;
    font-weight: 700;
}

.category-browse-grid .shop-card-view::after { content: " ←"; }
.category-browse-size { margin-top: 16px; }

.category-browse-empty {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: var(--bq-category-soft);
    color: var(--bq-category-muted);
}

.category-browse-brands,
.category-browse-faq,
.category-browse-copy { margin-top: 24px; }

.category-browse-brand-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 8px 0 0;
    list-style: none;
}

.category-browse-copy { overflow-wrap: anywhere; line-height: 2; }
.category-browse-copy :is(h2, h3) { font-size: clamp(18px, 2.4vw, 24px); line-height: 1.6; }
.category-browse-copy img { max-width: 100%; height: auto; }
.category-browse-faq h2 { margin-bottom: 10px; }

.category-browse-question {
    margin-bottom: 8px;
    border: 1px solid var(--bq-category-line);
    border-radius: 12px;
    background: #fff;
}

.category-browse-question summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 12px;
    list-style: none;
    cursor: pointer;
    font-weight: 700;
}

.category-browse-question summary::-webkit-details-marker { display: none; }
.category-browse-question summary:hover,
.category-browse-question[open] summary { background: var(--bq-category-soft); }
.category-browse-question summary::after { content: "+"; flex: none; font-size: 18px; line-height: 1; }
.category-browse-question[open] summary::after { content: "−"; }
.category-browse-answer { padding: 10px 14px; color: var(--bq-category-muted); line-height: 2; }
.category-browse .collection-faq-content { line-height: 2; overflow-wrap: anywhere; }

@media (min-width: 768px) and (max-width: 991px) {
    .category-browse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .category-browse-header { margin-bottom: 11px; }
    .category-browse-choices,
    .category-browse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .category-browse-choices { margin-bottom: 16px; }
    .category-browse a.category-browse-choice { display: grid; align-content: start; gap: 8px; min-height: 0; padding: 7px; }
    .category-browse-choice img {
        order: 0;
        width: 100%;
        height: auto;
        aspect-ratio: 1.5;
    }
    .category-browse-choices--brands .category-browse-choice img { width: 100%; height: 56px; }
    .category-browse-choice-text { gap: 2px; padding: 0 3px 3px; }
    .category-browse-choice-action { font-size: 12px; }
    .category-browse-grid .shop-card-body { padding: 9px; }
    .category-browse-results a.category-browse-link { padding-inline: 8px; font-size: 12px; }
}
