@font-face {
    font-family: "IRANSansWeb";
    src: url("/fonts/IRANSansWeb.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ig-bg: #fafafa;
    --ig-surface: #ffffff;
    --ig-ink: #262626;
    --ig-muted: #8e8e8e;
    --ig-line: #dbdbdb;
    --ig-buy: #0095f6;
    --ig-buy-hover: #1877f2;
    --ig-ring: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "IRANSansWeb", Tahoma, sans-serif;
    color: var(--ig-ink);
    background: var(--ig-bg);
    min-height: 100vh;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.ig-preview-banner {
    background: #111;
    color: #fff;
    text-align: center;
    padding: .55rem;
    font-size: .85rem;
}

.ig-shell {
    max-width: 935px;
    margin: 0 auto;
    padding: 0 16px 72px;
}

.ig-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ig-line);
}

.ig-topbar-inner {
    max-width: 935px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ig-logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -.02em;
}

.ig-top-links {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: .92rem;
    color: var(--ig-muted);
}

.ig-top-links a:hover { color: var(--ig-ink); }

.ig-profile {
    padding: 28px 0 20px;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 28px;
    align-items: center;
}

.ig-avatar-ring {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    padding: 3px;
    background: var(--ig-ring);
}

.ig-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #efefef center/cover no-repeat;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: #bbb;
    overflow: hidden;
}

.ig-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ig-profile-main h1 {
    margin: 0 0 12px;
    font-size: 1.65rem;
    font-weight: 400;
}

.ig-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ig-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: .55rem 1.1rem;
    font-weight: 700;
    font-size: .9rem;
    border: 1px solid transparent;
    cursor: pointer;
}

.ig-btn-buy {
    background: var(--ig-buy);
    color: #fff;
}

.ig-btn-buy:hover { background: var(--ig-buy-hover); }

.ig-btn-ghost {
    background: #efefef;
    color: var(--ig-ink);
}

.ig-stats {
    display: flex;
    gap: 28px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: .95rem;
}

.ig-stats strong { font-weight: 700; }

.ig-bio {
    margin: 0;
    max-width: 420px;
    white-space: pre-wrap;
}

.ig-bio .ig-username {
    font-weight: 700;
    display: block;
    margin-bottom: .2rem;
}

.ig-highlights {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 20px;
}

.ig-highlight {
    flex: 0 0 auto;
    width: 74px;
    text-align: center;
    font-size: .72rem;
    color: var(--ig-muted);
}

.ig-highlight-ring {
    width: 64px;
    height: 64px;
    margin: 0 auto 6px;
    border-radius: 50%;
    padding: 2px;
    background: var(--ig-line);
}

.ig-highlight-ring span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #f5f5f5;
    font-size: 1.2rem;
}

.ig-tabs {
    border-top: 1px solid var(--ig-line);
    display: flex;
    justify-content: center;
    gap: 48px;
}

.ig-tab {
    padding: 14px 0;
    font-size: .78rem;
    letter-spacing: .08em;
    color: var(--ig-muted);
    border-top: 1px solid transparent;
    margin-top: -1px;
}

.ig-tab.is-active {
    color: var(--ig-ink);
    border-top-color: var(--ig-ink);
    font-weight: 700;
}

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.ig-post {
    position: relative;
    aspect-ratio: 1;
    background: #efefef;
    overflow: hidden;
}

.ig-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ig-post-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #bbb;
    font-size: 1.8rem;
    background: linear-gradient(145deg, #f3f3f3, #e8e8e8);
}

.ig-post-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    color: #fff;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity .15s ease;
    font-weight: 700;
    font-size: .92rem;
}

.ig-post:hover .ig-post-overlay { opacity: 1; }

.ig-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: var(--ig-muted);
}

.ig-show {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 0;
    background: var(--ig-surface);
    border: 1px solid var(--ig-line);
    border-radius: 4px;
    overflow: hidden;
    margin: 24px 0;
    min-height: 520px;
}

.ig-show-media {
    background: #000;
    display: grid;
    place-items: center;
    min-height: 420px;
}

.ig-show-media img {
    width: 100%;
    height: 100%;
    max-height: 720px;
    object-fit: contain;
}

.ig-show-side {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--ig-line);
}

.ig-show-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ig-line);
}

.ig-show-head .mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ig-ring);
    padding: 2px;
}

.ig-show-head .mini-avatar span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff center/cover;
    border: 2px solid #fff;
}

.ig-show-body {
    padding: 16px;
    flex: 1;
    overflow: auto;
}

.ig-show-body h1 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.ig-price {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 10px 0 14px;
}

.ig-price small {
    font-weight: 500;
    color: var(--ig-muted);
    font-size: .85rem;
}

.ig-show-foot {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--ig-line);
}

.ig-bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--ig-line);
    display: none;
    justify-content: space-around;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    z-index: 50;
}

.ig-bottom-nav a {
    font-size: .75rem;
    color: var(--ig-ink);
    display: grid;
    gap: 2px;
    place-items: center;
}

.ig-footer {
    text-align: center;
    color: var(--ig-muted);
    font-size: .8rem;
    padding: 28px 16px 90px;
}

@media (max-width: 735px) {
    .ig-profile {
        grid-template-columns: 86px 1fr;
        gap: 16px;
        padding-top: 20px;
    }

    .ig-avatar-ring {
        width: 86px;
        height: 86px;
    }

    .ig-profile-main h1 { font-size: 1.2rem; }

    .ig-stats {
        grid-column: 1 / -1;
        justify-content: space-around;
        gap: 8px;
        border-top: 1px solid var(--ig-line);
        border-bottom: 1px solid var(--ig-line);
        padding: 12px 0;
        margin: 8px 0 12px;
    }

    .ig-stats li {
        display: grid;
        text-align: center;
        font-size: .8rem;
    }

    .ig-show {
        grid-template-columns: 1fr;
    }

    .ig-show-side { border-right: 0; border-top: 1px solid var(--ig-line); }

    .ig-bottom-nav { display: flex; }

    .ig-top-links { display: none; }
}
