/* ============================================================
   SaharParts - Footer (Automotive Marketplace, light theme)
   ============================================================ */

.sp-footer {
    background: var(--brand-bg, #F8FAFC);
    color: var(--brand-text-muted, #64748B);
    direction: rtl;
    text-align: right;
    margin-top: auto;
    flex-shrink: 0;
    font-size: 13px;
    line-height: 1.8;
    position: relative;
    border-top: 1px solid var(--brand-border, #E2E8F0);
    font-family: var(--brand-font, 'Vazirmatn', sans-serif);
}

.sp-footer-back-to-top {
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--brand-text-muted, #64748B);
    border-bottom: 1px solid var(--brand-border, #E2E8F0);
    background: #FFFFFF;
    transition: color .25s ease;
}
.sp-footer-back-to-top:hover {
    color: var(--brand-primary, #0F4C81);
}
.sp-footer-back-to-top span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sp-footer-main {
    padding: 26px 0 18px;
    width: 100%;
}
.sp-footer-content {
    max-width: 1240px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.6fr repeat(5, 1fr);
    gap: 20px;
    padding: 0 24px;
    align-items: start;
}

/* Brand + contact */
.sp-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sp-footer-brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-text, #172033);
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
}
.sp-footer-brand__logo i {
    color: var(--brand-primary, #0F4C81);
    font-size: 19px;
}
.sp-footer-brand__intro {
    margin: 0;
    color: var(--brand-text-muted, #64748B);
    font-size: 12.5px;
    line-height: 1.9;
}
.sp-footer-contact {
    list-style: none;
    padding: 0;
    margin: 2px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sp-footer-contact li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--brand-text, #172033);
}
.sp-footer-contact i {
    color: var(--brand-primary, #0F4C81);
    width: 15px;
    text-align: center;
    font-size: 11px;
}

/* Sections */
.sp-footer-section { min-width: 0; }
.sp-footer-section__title {
    list-style: none;
    cursor: default;
    pointer-events: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-text, #172033);
    margin: 0 0 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 7px;
    position: relative;
}
.sp-footer-section__title::-webkit-details-marker { display: none; }
.sp-footer-section__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 2px;
    background: var(--brand-primary, #0F4C81);
    border-radius: 2px;
}
.sp-footer-section__title > i:first-child {
    font-size: 12px;
    color: var(--brand-primary, #0F4C81);
}
.sp-footer-section__caret {
    display: none;
    font-size: 10px;
    color: var(--brand-text-muted, #64748B);
    margin-inline-start: auto;
    transition: transform .25s ease;
}
.sp-footer-section__body { display: block; }

.sp-footer-links,
.sp-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sp-footer-links li,
.sp-footer-list li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
}
.sp-footer-list li i {
    font-size: 8px;
    color: var(--brand-primary, #0F4C81);
    opacity: .7;
}
.sp-footer-section a,
.sp-footer-section span {
    color: var(--brand-text-muted, #64748B);
    text-decoration: none;
    transition: color .2s ease;
    padding: 2.5px 0;
    display: inline-block;
}
.sp-footer-section a:hover {
    color: var(--brand-primary, #0F4C81);
}

/* Trust badges */
.sp-footer-trust-row {
    max-width: 1240px;
    margin-inline: auto;
    padding: 0 24px 16px;
}
.sp-footer-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sp-footer-trust-badge {
    background: #FFFFFF;
    border: 1px solid var(--brand-border, #E2E8F0);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .25s ease;
}
.sp-footer-trust-badge:hover {
    border-color: var(--brand-primary, #0F4C81);
}
.sp-footer-trust-badge img {
    max-width: 80px;
    height: auto;
    display: block;
}
.sp-footer-trust-badge a { display: block; padding: 0; }

/* Bottom */
.sp-footer-bottom {
    border-top: 1px solid var(--brand-border, #E2E8F0);
    background: #FFFFFF;
    padding: 12px 0;
}
.sp-footer-bottom-content {
    max-width: 1240px;
    margin-inline: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
}
.sp-footer-copyright {
    font-size: 12px;
    color: var(--brand-text-muted, #64748B);
}
.sp-footer-bottom-logo {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-text, #172033);
    font-weight: 700;
    text-decoration: none;
}
.sp-footer-bottom-logo i {
    color: var(--brand-primary, #0F4C81);
    font-size: 16px;
}
.sp-footer .text-muted {
    font-size: 12px;
    color: var(--brand-text-muted, #64748B);
}

/* Responsive */
@media (max-width: 1024px) {
    .sp-footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    .sp-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .sp-footer-main { padding: 20px 0 16px; }
    .sp-footer-content {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 0 20px;
    }
    .sp-footer-brand {
        gap: 8px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--brand-border, #E2E8F0);
        margin-bottom: 4px;
    }
    .sp-footer-section__title {
        cursor: pointer;
        pointer-events: auto;
        margin-bottom: 0;
        padding: 10px 0;
    }
    .sp-footer-section__title::after { display: none; }
    .sp-footer-section__caret { display: inline-block; }
    .sp-footer-section[open] .sp-footer-section__caret { transform: rotate(180deg); }
    .sp-footer-section:not([open]) .sp-footer-section__body { display: none; }
    .sp-footer-section { border-bottom: 1px solid var(--brand-border, #E2E8F0); }
    .sp-footer-section__body { padding-bottom: 12px; }

    .sp-footer-trust-row { padding: 0 20px 22px; }
    .sp-footer-bottom-content {
        flex-direction: column-reverse;
        gap: 10px;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .sp-footer-brand__logo { font-size: 17px; }
}
