/* Siman Payesh catalog pages: mobile-first, RTL */
.catalog {
    --navy: #0a3a8c;
    --blue: #1d6fd8;
    --sky: #9fd0ff;
    --ink: #1f2937;
    --muted: #5b6676;
    --line: #dbe3ee;
    --panel: #f1f6fc;
    --card: #fff;
    --radius: 14px;
    --cat-top-offset: 15px; /* CHANGED: اگر هدر سایت sticky/fixed است، ارتفاع آن را بگذارید، مثلاً 64px */
    color: var(--ink);
    line-height: 1.95;
    font-size: 1rem;
    font-family: "Vazirmatn","IRANSans","Segoe UI",Tahoma,system-ui,sans-serif;
    overflow-x: hidden;
    text-align: right;
}

    .catalog *, .catalog *::before, .catalog *::after {
        box-sizing: border-box
    }

    .catalog img {
        max-width: 100%;
        height: auto;
        display: block
    }

    .catalog a {
        color: inherit
    }

.cat-wrap {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    padding-inline: clamp(16px,4vw,32px)
}

/* top bar */
/* CHANGED: sticky زیر هدر سایت، بدون لوگو، ارتفاع ثابت */
.cat-top {
    position: sticky;
    top: var(--cat-top-offset);
    z-index: 40;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line)
}

    .cat-top .cat-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between; /* CHANGED: was flex-start، برای قرارگیری سوییچر و دکمه‌ها در دو سمت */
        gap: 12px;
        min-height: 60px;
        padding-block: 8px
    }

.cat-top__actions {
    display: flex;
    gap: 10px;
    align-items: center
}

/* NEW: catalog switcher (holding / factory) */
.cat-switch {
    display: inline-flex;
    padding: 3px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    flex-shrink: 0
}

.catalog .cat-switch__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: .3em 16px 0;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease
}

    .catalog .cat-switch__item:hover {
        color: var(--blue)
    }

    .catalog .cat-switch__item.is-active {
        background: var(--navy);
        color: #fff;
        pointer-events: none
    }

.cat-switch__item:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 2px
}

/* buttons */
/* CHANGED: line-height:1 و padding بالای .3em برای وسط‌چین‌شدن بصری متن فارسی */
.cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: .3em 20px 0;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--navy);
    color: var(--navy);
    background: #fff;
    font-size: .95rem;
    line-height: 1
}

.cat-btn--primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff
}

.cat-btn--ghost {
    background: transparent;
    border-color: rgba(255,255,255,.7);
    color: #fff
}

.cat-btn:focus-visible, .cat-lightbox a:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 2px
}

/* hero */
.cat-hero {
    background: linear-gradient(135deg,#0a3a8c 0%,#1456b8 100%);
    color: #fff;
    padding-block: clamp(28px,6vw,64px)
}

.cat-hero__kicker {
    color: var(--sky);
    font-weight: 700;
    margin: 0 0 8px;
    font-size: .95rem
}

.cat-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(1.55rem,5.4vw,2.7rem);
    line-height: 1.5
}

.cat-hero p {
    margin: 0 0 22px;
    max-width: 46em;
    font-size: clamp(.98rem,2.6vw,1.1rem);
    color: #e8f0fb
}

.cat-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

/* sections */
.cat-section {
    padding-block: clamp(24px,5vw,48px);
    border-bottom: 1px solid var(--line)
}

    .cat-section:last-of-type {
        border-bottom: 0
    }

    .cat-section h2 {
        margin: 0 0 10px;
        color: var(--navy);
        font-size: clamp(1.25rem,3.8vw,1.75rem);
        line-height: 1.5
    }

    .cat-section h3 {
        margin: 22px 0 8px;
        color: var(--navy);
        font-size: 1.1rem
    }

    .cat-section p {
        margin: 0 0 12px
    }

.cat-lead {
    color: var(--muted);
    max-width: 52em
}

.cat-list {
    margin: 12px 0;
    padding-inline-start: 1.3em
}

    .cat-list li {
        margin-bottom: 6px
    }

.cat-stat {
    font-weight: 700;
    color: var(--navy);
    margin: 14px 0
}

/* callout */
.cat-callout {
    background: var(--panel);
    border-inline-start: 4px solid var(--blue);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 20px 0
}

    .cat-callout strong {
        display: block;
        color: var(--navy);
        margin-bottom: 4px
    }

    .cat-callout p {
        margin: 0
    }

        .cat-callout p + p {
            margin-top: 6px
        }

/* cards */
.cat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(230px,1fr));
    gap: 12px;
    margin: 18px 0
}

.cat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px
}

    .cat-card h3 {
        margin: 0 0 4px;
        font-size: 1rem
    }

    .cat-card p {
        margin: 0;
        color: var(--muted);
        font-size: .95rem
    }

/* table */
.cat-tablewrap {
    overflow-x: auto;
    margin: 12px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius)
}

.cat-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 300px
}

    .cat-table th {
        background: var(--navy);
        color: #fff;
        text-align: right;
        padding: 10px 14px;
        font-size: .95rem
    }

    .cat-table td {
        padding: 10px 14px;
        border-top: 1px solid var(--line);
        vertical-align: top
    }

        .cat-table td:first-child {
            font-weight: 700;
            white-space: nowrap
        }

    .cat-table tbody tr:nth-child(even) {
        background: #f8fafd
    }

@media (max-width:520px) {
    .cat-table td:first-child {
        white-space: normal
    }
}

/* figures + lightbox (CSS only, uses :target) */
.cat-fig {
    margin: 18px auto;
    width: 100%;
    max-width: var(--w,1040px)
}

    .cat-fig > a {
        display: block;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
        background: #fff;
        cursor: zoom-in;
        box-shadow: 0 2px 10px rgba(10,58,140,.07)
    }

    .cat-fig figcaption {
        margin-top: 8px;
        font-size: .88rem;
        color: var(--muted);
        text-align: center
    }

.cat-fig__hint {
    display: none
}

@media (max-width:720px) {
    .cat-fig__hint {
        display: inline
    }
}

.cat-figgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 14px;
    align-items: start
}

    .cat-figgrid .cat-fig {
        margin: 10px auto
    }

.cat-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    background: rgba(10,20,40,.93);
    overflow: auto;
    padding: 64px 12px 28px;
    -webkit-overflow-scrolling: touch
}

    .cat-lightbox:target {
        display: block
    }

    .cat-lightbox img {
        width: min(max(100%,900px),var(--w));
        max-width: none;
        margin-inline: auto;
        background: #fff;
        border-radius: 8px
    }

.cat-lightbox__close {
    position: fixed;
    top: 10px;
    inset-inline-start: 12px;
    z-index: 101;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.7rem;
    line-height: 1;
    font-weight: 700
}

/* mini feature trio */
.cat-trio {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 10px;
    margin-top: 14px
}

/* CTA */
.cat-cta {
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(18px,4vw,32px);
    margin-block: 10px
}

    .cat-cta h2 {
        color: #fff;
        margin: 0 0 6px
    }

.cat-cta__sub {
    color: #cfe3ff;
    margin: 0 0 14px
}

.cat-cta ol {
    margin: 0 0 16px;
    padding-inline-start: 1.4em
}

.cat-cta li {
    margin-bottom: 4px
}

.cat-cta__contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 10px;
    margin: 14px 0
}

    .cat-cta__contacts a, .cat-cta__contacts span {
        display: flex;
        flex-direction: column;
        background: rgba(255,255,255,.1);
        border-radius: 12px;
        padding: 10px 14px;
        text-decoration: none;
        min-height: 56px;
        justify-content: center
    }

    .cat-cta__contacts small {
        color: var(--sky);
        font-weight: 700
    }

    .cat-cta__contacts b {
        direction: ltr;
        text-align: right;
        font-size: 1.05rem;
        overflow-wrap: anywhere
    }

.cat-trust {
    text-align: center;
    color: var(--muted);
    font-size: .92rem;
    margin: 18px 0 6px
}

.cat-foot {
    text-align: center;
    color: var(--muted);
    font-size: .88rem;
    padding-block: 6px 20px
}

/* sticky mobile bar */
.cat-sticky {
    display: none
}

@media (max-width:720px) {
    .cat-sticky {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 45;
        display: flex;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 14px rgba(0,0,0,.08)
    }

        .cat-sticky .cat-btn {
            flex: 1
        }

    .catalog {
        padding-bottom: 78px
    }

    .cat-top__actions {
        display: none
    }

    /* NEW: در موبایل actions مخفی است، پس سوییچر تمام عرض می‌گیرد */
    .cat-switch {
        width: 100%
    }

    .catalog .cat-switch__item {
        flex: 1;
        padding-inline: 8px
    }
}

@media print {
    .cat-top, .cat-sticky, .cat-hero__actions {
        display: none !important
    }

    .cat-lightbox {
        display: none !important
    }

    .catalog {
        padding-bottom: 0
    }
}

.cat-section[id] {
    scroll-margin-top: 70px
}
