/* ============================================================
   امکانات رشد فروش: کمپین زمان‌دار، نوار ارسال رایگان، باندل،
   پله‌ی تعدادی، معرفی دوست و اعلان مرورگر.
   ============================================================ */

:root {
    --gf-success: #0f9d58;
    --gf-success-soft: #e8f7ef;
    --gf-warn: #d97706;
    --gf-warn-soft: #fff7ed;
    --gf-ink: #1f2937;
    --gf-muted: #6b7280;
    --gf-line: #e5e7eb;
}

/* ---------- نوار «تا ارسال رایگان» ---------- */
.free-ship-bar {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--gf-line);
    border-radius: 12px;
    background: var(--gf-warn-soft);
}

.free-ship-bar.is-reached {
    background: var(--gf-success-soft);
    border-color: #bbe7cd;
}

.free-ship-bar .fsb-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--gf-ink);
    margin-bottom: 8px;
}

.free-ship-bar .fsb-text i {
    font-size: 1.1rem;
    color: var(--gf-warn);
}

.free-ship-bar.is-reached .fsb-text i {
    color: var(--gf-success);
}

.free-ship-bar .fsb-track {
    height: 7px;
    border-radius: 99px;
    background: #fff;
    overflow: hidden;
    border: 1px solid var(--gf-line);
}

.free-ship-bar .fsb-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--gf-warn), #f59e0b);
    transition: width .4s ease;
}

.free-ship-bar.is-reached .fsb-fill {
    background: linear-gradient(90deg, var(--gf-success), #34c77b);
}

/* ---------- نشان‌های سبد ---------- */
.cart-item-badge.badge-campaign {
    background: #fee2e2;
    color: #b91c1c;
}

.cart-item-badge.badge-tier {
    background: var(--gf-success-soft);
    color: #0b7a45;
}

.summary-note {
    margin: -4px 0 10px;
    line-height: 1.7;
}

/* ---------- شمارش معکوس کمپین ---------- */
.gf-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.gf-countdown .cd-cell {
    min-width: 42px;
    padding: 6px 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .28);
    color: #fff;
    text-align: center;
    line-height: 1.1;
}

.gf-countdown .cd-num {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
}

.gf-countdown .cd-lbl {
    display: block;
    font-size: .62rem;
    opacity: .85;
}

.gf-countdown.is-compact .cd-cell {
    min-width: 34px;
    padding: 3px 3px;
    background: rgba(0, 0, 0, .12);
    color: inherit;
}

.gf-countdown.is-compact .cd-num {
    font-size: .82rem;
}

/* ---------- بنر کمپین ---------- */
/* نوار تمام‌عرض بدون گوشه‌ی گرد و بدون فاصله از منو.
   رنگ تا لبه‌ی صفحه کشیده می‌شود و چیدمان به لایه‌ی داخلی منتقل شده تا محتوا
   با هدر و بقیه‌ی صفحه هم‌تراز بماند. */
.gf-campaign-strip {
    color: #fff;
    background: var(--gf-campaign-accent, #c0392b);
}

.gf-campaign-strip__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.gf-campaign-strip .cs-text {
    margin-inline-end: auto;
}

.gf-campaign-strip .cs-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin: 0;
}

.gf-campaign-strip .cs-desc {
    margin: 2px 0 0;
    font-size: .84rem;
    opacity: .92;
}

.gf-campaign-strip .cs-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 99px;
    background: #fff;
    color: var(--gf-campaign-accent, #c0392b);
    font-weight: 700;
    font-size: .86rem;
    text-decoration: none;
    white-space: nowrap;
}

.gf-campaign-strip .cs-cta:hover {
    opacity: .9;
    color: var(--gf-campaign-accent, #c0392b);
}

@media (max-width: 767.98px) {
    .gf-campaign-strip__inner {
        justify-content: center;
        text-align: center;
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .gf-campaign-strip .cs-text {
        margin-inline-end: 0;
        width: 100%;
    }

    /* توضیح روی موبایل فضای زیادی می‌گیرد و عنوان و شمارش معکوس مهم‌ترند */
    .gf-campaign-strip .cs-desc {
        display: none;
    }

    .gf-campaign-strip .cs-title {
        font-size: .95rem;
    }

    .gf-campaign-strip .cs-cta {
        padding: 7px 14px;
        font-size: .8rem;
    }
}

.gf-campaign-hero {
    padding: 26px 22px;
    border-radius: 16px;
    color: #fff;
    background: var(--gf-campaign-accent, #c0392b);
    margin-bottom: 26px;
}

.gf-campaign-hero h1 {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 900;
    margin: 0 0 8px;
}

.gf-campaign-hero p {
    margin: 0 0 14px;
    opacity: .93;
    font-size: .92rem;
}

.gf-campaign-hero img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* ---------- جدول پله‌ی تعدادی ---------- */
.gf-tier-box {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: #f8fafc;
}

.gf-tier-box .tier-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: .88rem;
    margin-bottom: 8px;
    color: var(--gf-ink);
}

.gf-tier-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gf-tier-list li {
    padding: 6px 12px;
    border-radius: 99px;
    background: #fff;
    border: 1px solid var(--gf-line);
    font-size: .8rem;
    color: var(--gf-ink);
}

.gf-tier-list li strong {
    color: var(--gf-success);
}

/* ---------- باندل «با هم بخرید» ---------- */
.gf-bundle {
    border: 1px solid var(--gf-line);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 22px;
    background: #fff;
}

.gf-bundle h5 {
    font-size: .98rem;
    font-weight: 800;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gf-bundle-items {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
}

.gf-bundle-item {
    flex: 1 1 150px;
    min-width: 0;
    border: 1px solid var(--gf-line);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.gf-bundle-item .bi-img {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.gf-bundle-item .bi-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gf-bundle-item .bi-name {
    font-size: .8rem;
    font-weight: 600;
    color: var(--gf-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gf-bundle-item .bi-price {
    font-size: .78rem;
    color: var(--gf-muted);
    margin-top: 3px;
}

.gf-bundle-item .bi-check {
    margin-inline-start: auto;
}

.gf-bundle-plus {
    align-self: center;
    font-size: 1.2rem;
    color: var(--gf-muted);
    font-weight: 700;
}

.gf-bundle-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px dashed var(--gf-line);
    padding-top: 12px;
}

.gf-bundle-total .bt-old {
    text-decoration: line-through;
    color: var(--gf-muted);
    font-size: .82rem;
    margin-inline-end: 8px;
}

.gf-bundle-total .bt-new {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gf-ink);
}

.gf-bundle-total .bt-save {
    display: block;
    font-size: .78rem;
    color: var(--gf-success);
    font-weight: 700;
    margin-top: 2px;
}

/* ---------- صفحه معرفی دوست ---------- */
.gf-referral-card {
    border: 1px solid var(--gf-line);
    border-radius: 14px;
    padding: 20px;
    background: #fff;
    margin-bottom: 20px;
}

.gf-referral-code {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin: 14px 0;
}

.gf-referral-code input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--gf-line);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    direction: ltr;
    text-align: left;
    background: #f9fafb;
}

.gf-referral-code button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    background: var(--primary, #c71920);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.gf-referral-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.gf-referral-stats .rs-cell {
    border: 1px solid var(--gf-line);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.gf-referral-stats .rs-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gf-ink);
}

.gf-referral-stats .rs-lbl {
    font-size: .78rem;
    color: var(--gf-muted);
}

.gf-share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.gf-share-row a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 99px;
    border: 1px solid var(--gf-line);
    font-size: .82rem;
    color: var(--gf-ink);
    text-decoration: none;
}

.gf-share-row a:hover {
    background: #f9fafb;
}

/* ---------- درخواست اجازه‌ی اعلان ---------- */
.gf-push-prompt {
    position: fixed;
    inset-inline: 16px;
    bottom: 16px;
    z-index: 1040;
    max-width: 420px;
    margin-inline: auto;
    background: #fff;
    border: 1px solid var(--gf-line);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
    padding: 14px 16px;
    display: none;
}

.gf-push-prompt.is-visible {
    display: block;
}

.gf-push-prompt h6 {
    font-size: .92rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.gf-push-prompt p {
    font-size: .8rem;
    color: var(--gf-muted);
    margin: 0 0 12px;
    line-height: 1.7;
}

.gf-push-prompt .pp-actions {
    display: flex;
    gap: 8px;
}

.gf-push-prompt .pp-actions button {
    flex: 1;
    border: 0;
    border-radius: 9px;
    padding: 9px;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
}

.gf-push-prompt .pp-yes {
    background: var(--primary, #c71920);
    color: #fff;
}

.gf-push-prompt .pp-no {
    background: #f3f4f6;
    color: var(--gf-muted);
}

/* ---------- نظر با عکس ---------- */
.gf-review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.gf-review-photos a {
    width: 74px;
    height: 74px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gf-line);
    display: block;
}

.gf-review-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gf-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--gf-success);
    background: var(--gf-success-soft);
    border-radius: 99px;
    padding: 2px 9px;
}

.gf-review-reward-hint {
    font-size: .8rem;
    color: var(--gf-success);
    background: var(--gf-success-soft);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

@media (max-width: 575px) {
    .gf-bundle-item {
        flex: 1 1 100%;
    }

    .gf-bundle-plus {
        display: none;
    }
}
