/* =========================================================
   صفحه عمومی کارت ویزیت
   ========================================================= */

.public-card-body {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    padding: 50px 18px 70px;
    position: relative;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--dc-1) 10%, var(--bg)), var(--bg) 60%);
}

.pc-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pc-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; animation: floaty 10s ease-in-out infinite; }
.pc-blob.b1 { width: 380px; height: 380px; background: var(--dc-1); top: -100px; inset-inline-start: -100px; }
.pc-blob.b2 { width: 320px; height: 320px; background: var(--dc-2); bottom: -80px; inset-inline-end: -80px; animation-delay: 2s; }
.pc-blob.b3 { width: 240px; height: 240px; background: var(--dc-1); top: 45%; inset-inline-end: 20%; opacity: .2; animation-delay: 4s; }

.pc-wrap { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center; }

.pc-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }

/* ---------- بنر تبلیغاتی (فقط کارت‌های پلان رایگان) ---------- */
.pc-ad { width: 100%; max-width: 380px; margin-bottom: 18px; }

/* چند کمپین روی هم چیده می‌شوند تا ارتفاع جا عوض نشود و محو‌شدن نرم بماند */
.pc-ad-stack { display: grid; }
.pc-ad-stack > .pc-ad-card { grid-area: 1 / 1; }

.pc-ad-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.pc-ad-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--dc-1) 35%, var(--border)); }

/* حالت چرخشی: فقط کمپین فعال دیده و کلیک می‌شود */
.pc-ad-stack.is-rotating > .pc-ad-card {
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);
    pointer-events: none;
    transition:
        opacity 1.1s var(--ease),
        transform 1.1s var(--ease),
        visibility 0s linear 1.1s,
        box-shadow .2s var(--ease),
        border-color .2s;
}
.pc-ad-stack.is-rotating > .pc-ad-card.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition:
        opacity 1.1s var(--ease),
        transform 1.1s var(--ease),
        visibility 0s,
        box-shadow .2s var(--ease),
        border-color .2s;
}
.pc-ad-stack.is-rotating > .pc-ad-card.is-active:hover { transform: translateY(-2px); }

.pc-ad-img {
    width: 54px; height: 54px; flex-shrink: 0;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--surface-2);
}
.pc-ad-img-fallback {
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--dc-1), var(--dc-2));
    color: #fff;
}

.pc-ad-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pc-ad-title { font-size: .88rem; font-weight: 700; color: var(--text); line-height: 1.5; }
.pc-ad-body {
    font-size: .76rem; color: var(--text-soft); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.pc-ad-cta {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: var(--radius-btn);
    background: linear-gradient(135deg, var(--dc-1), var(--dc-2));
    color: #fff;
    font-size: .76rem; font-weight: 700;
    white-space: nowrap;
}

.pc-ad-note {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 7px; padding-inline: 4px;
    font-size: .7rem; color: var(--text-faint);
}
.pc-ad-note-start { display: inline-flex; align-items: center; gap: 8px; }

.pc-ad-dots { display: inline-flex; align-items: center; gap: 5px; }
.pc-ad-dots i {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--border);
    transition: background-color .6s var(--ease), width .6s var(--ease);
}
.pc-ad-dots i.is-active { width: 14px; border-radius: 3px; background: var(--dc-1); }
.pc-ad-label {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    border: 1px solid var(--border);
    letter-spacing: .3px;
}
.pc-ad-note a { color: var(--text-faint); text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.pc-ad-note a:hover { color: var(--dc-1); }

@media (max-width: 380px) {
    .pc-ad-card { flex-wrap: wrap; }
    .pc-ad-cta { width: 100%; text-align: center; }
}

/* احترام به تنظیم «کاهش حرکت» سیستم: چرخش می‌ماند ولی جابه‌جایی حذف می‌شود */
@media (prefers-reduced-motion: reduce) {
    .pc-ad-stack.is-rotating > .pc-ad-card,
    .pc-ad-stack.is-rotating > .pc-ad-card.is-active { transform: none; }
    .pc-ad-dots i { transition: background-color .3s linear; }
}

.pc-made { margin-top: 26px; }
.pc-made a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: .78rem; transition: color .2s; }
.pc-made a:hover { color: var(--dc-1); }

/* مودال QR */
.pc-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; }
.pc-modal[hidden] { display: none; }
.pc-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 20, .55); backdrop-filter: blur(4px); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pc-modal-box {
    position: relative; z-index: 1; background: var(--surface);
    border-radius: var(--radius-lg); padding: 32px; text-align: center;
    box-shadow: var(--shadow-lg); max-width: 320px; width: calc(100% - 40px);
}
.pc-modal-box h3 { font-size: 1.05rem; margin-bottom: 18px; }
.pc-modal-box #qrcode { display: flex; justify-content: center; margin-bottom: 14px; }
.pc-url { color: var(--text-faint); font-size: .74rem; word-break: break-all; }
.pc-modal-close {
    position: absolute; top: 6px; inset-inline-end: 6px;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; font-size: 1.4rem; color: var(--text-faint); line-height: 1; cursor: pointer;
    border-radius: 50%; transition: background .2s, color .2s;
}
.pc-modal-close:hover { background: var(--surface-2); color: var(--text); }

/* پیام کوچک Toast */
.toast {
    position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--text); color: var(--bg);
    padding: 12px 22px; border-radius: var(--radius-full);
    font-size: .85rem; opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   صفحه محصولات و خدمات
   ========================================================= */

.pp-body { padding-top: 34px; }
.pp-wrap { position: relative; z-index: 1; width: 100%; max-width: 760px; margin-inline: auto; }

/* ---------- سربرگ ---------- */
.pp-head { text-align: center; margin-bottom: 26px; }

.pp-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 20px; padding: 7px 14px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: .78rem; font-weight: 700;
    transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.pp-back:hover { color: var(--dc-1); border-color: color-mix(in srgb, var(--dc-1) 40%, var(--border)); transform: translateX(3px); }
.pp-back-icon { transform: rotate(-90deg); }

.pp-owner { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.pp-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center; overflow: hidden;
    background: var(--surface-2);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 2px var(--dc-1);
    color: var(--dc-1);
}
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pp-owner-text { display: flex; flex-direction: column; text-align: start; }
.pp-owner-text strong { font-size: .92rem; }
.pp-owner-text small { font-size: .76rem; color: var(--text-soft); }

.pp-title { font-size: 1.6rem; margin-bottom: 6px; }
.pp-sub { color: var(--text-soft); font-size: .86rem; }

/* ---------- گرید محصولات ---------- */
.pp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 16px;
}

.pp-card {
    display: flex; flex-direction: column;
    padding: 0; overflow: hidden;
    text-align: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-family: inherit;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.pp-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--dc-1) 40%, var(--border));
}
.pp-card:active { transform: translateY(-2px); }

.pp-card-thumb {
    display: grid; place-items: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, color-mix(in srgb, var(--dc-1) 15%, var(--surface)), color-mix(in srgb, var(--dc-2) 15%, var(--surface)));
    color: var(--dc-1);
}
.pp-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.pp-card:hover .pp-card-thumb img { transform: scale(1.05); }

.pp-card-body { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px 16px; }
.pp-card-title { font-size: .92rem; font-weight: 700; line-height: 1.6; color: var(--text); }
.pp-card-desc {
    font-size: .78rem; color: var(--text-soft); line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pp-card-price { margin-top: 6px; font-size: .86rem; font-weight: 800; color: var(--dc-1); }

/* ---------- پاپ‌آپ جزئیات ---------- */
body.is-modal-open { overflow: hidden; }

.pp-modal-box {
    position: relative;
    z-index: 1;
    width: min(440px, calc(100vw - 36px));
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.pp-modal-media {
    aspect-ratio: 16 / 10;
    display: grid; place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dc-1), var(--dc-2));
}
.pp-modal-media img { width: 100%; height: 100%; object-fit: cover; }
.pp-modal-media.is-empty { aspect-ratio: auto; height: 6px; }

.pp-modal-body { padding: 20px 22px 24px; }
.pp-modal-title { font-size: 1.15rem; margin-bottom: 10px; }
.pp-modal-desc { color: var(--text-soft); font-size: .88rem; line-height: 2; margin-bottom: 18px; }
.pp-modal-desc[hidden] { display: none; }

.pp-modal-price-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 13px 15px; margin-bottom: 18px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.pp-modal-price-label { font-size: .78rem; color: var(--text-faint); }
.pp-modal-price { font-size: 1.05rem; color: var(--dc-1); }

.pp-modal-cta {
    background: linear-gradient(90deg, var(--dc-1), var(--dc-2));
    box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px color-mix(in srgb, var(--dc-1) 30%, transparent);
}
.pp-modal-cta[hidden] { display: none; }

@media (max-width: 480px) {
    .pp-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .pp-title { font-size: 1.3rem; }
    .pp-card-title { font-size: .84rem; }
    .pp-card-price { font-size: .8rem; }
}

/* ---------- بازبینی محتوا: نوار وضعیت و گزارش تخلف ---------- */
.pc-mod-notice { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: #fef3c7; color: #92400e; font-size: .86rem; line-height: 1.8; }
.pc-report { margin: 18px auto 0; max-width: 420px; text-align: center; font-size: .82rem; }
.pc-report summary { cursor: pointer; color: var(--text-faint); display: inline-flex; align-items: center; gap: 4px; list-style: none; }
.pc-report summary::-webkit-details-marker { display: none; }
.pc-report summary:hover { color: var(--danger); }
.pc-report-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); text-align: start; }
.pc-report-form .hint { margin: 0; font-size: .8rem; }
.pc-report-form button { align-self: flex-start; }
