/* =========================================================
   فوتر — بازطراحی ۲۰۲۶-۰۹ (inc/footer.php)
   تیره‌ی گرم (هم‌خانواده‌ی کارتِ نرخ زنده)، طلایی فقط برای تأکید،
   گوشی: برند + پیوندهای جمع‌شونده + تماس؛ دسکتاپ: ۴ ستون
   ========================================================= */
html body .site-footer {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #1C1916 !important;
    color: #CFC6B8 !important;
}
html body .site-footer > .col-full {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
}
.sg-ft {
    --ft-text: #CFC6B8;
    --ft-muted: #8F8678;
    --ft-white: #F4EFE6;
    --ft-gold: #C9A227;
    --ft-line: rgba(255, 255, 255, 0.09);
    position: relative;
    padding: 36px 16px 0;
    color: var(--ft-text);
    font-size: 0.88rem;
    line-height: 1.9;
}
/* خطِ طلاییِ ظریف بالای فوتر */
.sg-ft::before {
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    width: min(240px, 50%);
    height: 2px;
    transform: translateX(50%);
    background: var(--ft-gold);
    opacity: 0.7;
}
.sg-ft a { color: var(--ft-text) !important; text-decoration: none !important; transition: color 0.2s ease; }
.sg-ft a:hover, .sg-ft a:focus-visible { color: var(--ft-gold) !important; }
.sg-ft svg { flex: 0 0 auto; }

.sg-ft__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* ---------- برند ---------- */
.sg-ft__brand { padding: 0 0 22px; border-bottom: 1px solid var(--ft-line); }
.sg-ft__logo { display: inline-flex; align-items: center; gap: 10px; }
.sg-ft__logo img { width: 44px; height: 44px; border-radius: 50%; background: #FFFFFF; padding: 4px; object-fit: contain; }
.sg-ft__logo span { font-size: 1.25rem; font-weight: 700; color: var(--ft-white); }
.sg-ft__intro { margin: 12px 0 14px !important; color: var(--ft-text); font-size: 0.86rem; line-height: 2; }
.sg-ft__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px !important;
    padding: 6px 12px;
    border: 1px solid rgba(232, 108, 84, 0.35);
    border-radius: 999px;
    font-size: 0.78rem;
    color: #F29A86;
}
.sg-ft__status[hidden] { display: none !important; }
.sg-ft__status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sg-ft__status.is-open { border-color: rgba(63, 191, 127, 0.4); color: #6FD9A3; }
.sg-ft__status.is-open i { animation: sgFtPulse 1.6s ease-in-out infinite; }
@keyframes sgFtPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.sg-ft__social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--ft-line);
    border-radius: 12px;
    font-size: 0.84rem;
}
.sg-ft__social:hover { border-color: var(--ft-gold); }
.sg-ft__socials { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- ستون‌ها ---------- */
.sg-ft__col { border-bottom: 1px solid var(--ft-line); }
.sg-ft__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 !important;
    padding: 16px 0 !important;
    color: var(--ft-white) !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    list-style: none;
    cursor: pointer;
}
.sg-ft__title::-webkit-details-marker { display: none; }
.sg-ft-acc summary svg { color: var(--ft-muted); transition: transform 0.2s ease; }
.sg-ft-acc[open] summary svg { transform: rotate(180deg); }
.sg-ft__links { margin: 0 !important; padding: 0 0 16px !important; list-style: none !important; columns: 2; column-gap: 16px; }
.sg-ft__links li { margin: 0 0 8px !important; padding: 0 !important; break-inside: avoid; }
.sg-ft__links a { font-size: 0.86rem; }

/* ---------- تماس ---------- */
.sg-ft__contact { border-bottom: 0; padding-bottom: 8px; }
.sg-ft__contact .sg-ft__title { cursor: default; }
.sg-ft__address { margin: 0 !important; font-style: normal; }
.sg-ft__row { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px !important; font-size: 0.86rem; }
.sg-ft__row svg { margin-top: 4px; color: var(--ft-gold); }
.sg-ft__row strong { color: var(--ft-white); font-weight: 600; }
.sg-ft__map {
    display: inline-block;
    margin-top: 4px;
    color: var(--ft-gold) !important;
    font-size: 0.8rem;
    border-bottom: 1px dashed rgba(201, 162, 39, 0.5);
}
.sg-ft__phones span { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sg-ft__phones a { font-weight: 600; color: var(--ft-white) !important; letter-spacing: 0.02em; }

/* ---------- نمادها و پایین ---------- */
.sg-ft__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--ft-line); }
.sg-ft__badges .sg-badge { padding: 6px; border-radius: 12px; background: #FFFFFF; }
.sg-ft__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--ft-line);
    font-size: 0.78rem;
    color: var(--ft-muted);
}
.sg-ft__bottom p { margin: 0 !important; }
.sg-ft__top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border: 1px solid var(--ft-line) !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: var(--ft-text) !important;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.sg-ft__top:hover { border-color: var(--ft-gold) !important; color: var(--ft-gold) !important; }

/* ---------- دسکتاپ ---------- */
@media (min-width: 900px) {
    .sg-ft { padding: 56px 24px 0; }
    .sg-ft__inner { grid-template-columns: 1.35fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 36px; }
    .sg-ft__brand, .sg-ft__col { border-bottom: 0; padding: 0; }
    .sg-ft__title { padding: 0 0 14px !important; cursor: default; pointer-events: none; }
    .sg-ft-acc summary svg { display: none; }
    .sg-ft__links { columns: 1; padding: 0 !important; }
}

/* نوارِ اعتمادِ بالای فوتر (صفحه‌های غیرِ خانه) روی زمینه‌ی تیره */
html body .site-footer .sg-trust-bar { background: transparent !important; border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important; }
html body .site-footer .sg-trust-bar__item { background: transparent !important; border-color: rgba(255, 255, 255, 0.09) !important; box-shadow: none !important; }
html body .site-footer .sg-trust-bar__item strong { color: #F4EFE6 !important; }
html body .site-footer .sg-trust-bar__item span { color: #8F8678 !important; }
html body .site-footer .sg-trust-bar__icon { color: #C9A227 !important; }

/* سبد و پرداخت روی گوشی: نوارِ جمعِ پایین جای فوتر رو می‌گیره (مثلِ قبل) */
@media (max-width: 768px) {
    html body.woocommerce-cart .sg-ft,
    html body.woocommerce-cart .site-footer .sg-trust-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .sg-ft__status.is-open i { animation: none; }
}
@media (min-width: 900px) {
    html body .site-footer .sg-trust-bar { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 12px !important; padding: 22px 24px !important; }
    html body .site-footer .sg-trust-bar__item { width: auto !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; }
}

/* گوشی: آخرین خطِ فوتر (کپی‌رایت و «بالا») زیرِ دکمه‌ی شناورِ گفتگو نرود */
@media (max-width: 900px) {
    body:has(#swan-chat) .sg-ft__bottom { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
