﻿
.spc-section {
    direction: rtl;
    --spc-bg: #ffffff;
    --spc-card-bg: #fbfbfc;
    --spc-border: #ececef;
    --spc-text: #1f2430;
    --spc-text-muted: #6b7280;
    --spc-accent: #f0a136;
    --spc-accent-dark: #c97e1b;
    --spc-radius: 14px;
    --spc-mono: "JetBrains Mono", monospace;
    font-family: "Vazirmatn", "IRANSans", system-ui, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

.spc-section__head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 20px;
}

.spc-section__head-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--spc-accent);
}

.spc-section__head-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--spc-text);
}

.spc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.spc-card {
    position: relative;
    background: var(--spc-card-bg);
    border: 1px solid var(--spc-border);
    border-radius: var(--spc-radius);
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

    .spc-card:hover, .spc-card:focus-within {
        box-shadow: 0 12px 28px -12px rgba(20, 25, 35, .18);
        transform: translateY(-3px);
        border-color: #e2e2e6;
    }

.spc-card__count {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: rgba(255, 255, 255, .92);
    color: var(--spc-text);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--spc-border);
    backdrop-filter: blur(2px);
}

.spc-card__media {
    position: relative;
    height: 190px;
    background: #ffffff;
}

    .spc-card__media .pic {
        width: 64px;
        height: 64px;
        margin: 0 auto 10px;
        border-radius: 11px;
        background: var(--amber-050);
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

        .spc-card__media .pic svg {
            width: 100%;
            height: 100%;
            display: block;
        }
    .spc-card__media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 14px;
        display: block;
    }

.spc-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(15,20,30,0) 40%, rgba(12,16,24,.82) 100%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}

.spc-card:hover .spc-card__overlay, .spc-card:focus-within .spc-card__overlay, .spc-card.is-expanded .spc-card__overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.spc-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/*
.spc-card__chip {
    font-size: 11px;
    color: #f4f4f5;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
*/
.spc-card__chip {
    font-size: 11px;
    color: #ffffff;
    background: rgb(21 61 110 / 88%);
    border: 1px solid rgba(255,255,255,.22);
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 600;
}

.spc-card__overlay-actions {
    display: flex;
    gap: 6px;
}

.spc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.14);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}

    .spc-icon-btn:hover {
        background: var(--spc-accent);
        border-color: var(--spc-accent);
    }

    .spc-icon-btn svg {
        width: 16px;
        height: 16px;
    }

.spc-card__expand {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 4;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--spc-border);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (hover: none) {
    .spc-card__expand {
        display: inline-flex;
    }
}

.spc-card__body {
    padding: 14px 14px 12px;
}

.spc-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--spc-text);
    margin: 0 0 8px;
    display: block;
    text-decoration: none;
}

.spc-card__codes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.spc-code-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f4f5f9;
    border: 1px solid var(--spc-border);
    color: var(--spc-text-muted);
}

    .spc-code-chip b {
        font-family: var(--spc-mono);
        color: var(--spc-text);
        font-weight: 700;
        direction: ltr;
        unicode-bidi: plaintext;
    }

    .spc-code-chip.spc-code-chip--hs {
        background: #eaf0fe;
        border-color: #d8dff0;
    }

    .spc-code-chip.spc-code-chip--isic {
        background: #fff1e2;
        border-color: #ffd9ab;
    }

.spc-card__registered {
    font-size: 11px;
    color: var(--spc-text-muted);
    margin: 0 0 10px;
}

.spc-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--spc-border);
}

.spc-card__footer-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--spc-accent-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.spc-card__footer-actions {
    display: flex;
    gap: 6px;
}

.spc-icon-btn--ghost {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--spc-border);
    background: #fff;
    color: var(--spc-text-muted);
}

    .spc-icon-btn--ghost:hover {
        background: #faf3e7;
        border-color: var(--spc-accent);
        color: var(--spc-accent-dark);
    }

.spc-modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    width: min(560px, 92vw);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.35);
    max-height: 88vh;
}

    .spc-modal::backdrop {
        background: rgba(10,14,20,.55);
    }

.spc-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--spc-border);
    font-family: inherit;
}

.spc-modal__title {
    font-weight: 700;
    font-size: 16px;
    color: var(--spc-text);
}

.spc-modal__close {
    border: none;
    background: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--spc-text-muted);
}

.spc-modal__media img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
}

.spc-modal__body {
    padding: 14px 18px 18px;
    font-family: inherit;
    max-height: calc(88vh - 260px);
    overflow-y: auto;
}

.spc-modal__codes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.spc-modal__desc {
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--spc-text-muted);
    margin: 0 0 14px;
    text-align: justify;
}

.spc-modal__section-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--spc-text);
    margin: 0 0 8px;
}

.spc-product-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spc-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f7f7f8;
    border-radius: 10px;
    padding: 10px 12px;
}

    .spc-product-row.is-unavailable {
        opacity: .55;
    }

.spc-product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--spc-text);
}

.spc-product-price {
    font-size: 11.5px;
    color: var(--spc-text-muted);
    font-family: var(--spc-mono);
    direction: ltr;
    unicode-bidi: plaintext;
}

.spc-product-add {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--spc-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

    .spc-product-add:hover {
        background: var(--spc-accent-dark);
    }

    .spc-product-add:disabled {
        background: #d8dade;
        color: #8a8fa3;
        cursor: not-allowed;
    }

.spc-modal__cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    padding: 11px;
    border-radius: 10px;
    background: #fff;
    color: var(--spc-accent-dark);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    border: 1.5px solid var(--spc-accent);
}

    .spc-modal__cta:hover {
        background: #faf3e7;
    }

@media (max-width: 480px) {
    .spc-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .spc-card__media {
        height: 140px;
    }
}
