/*
 | Ahoora Storefront Visual Rescue
 | لایه سازگاری برای صفحات قدیمی که x-site-header و x-site-footer را مستقیم استفاده می‌کنند.
 | این فایل فونت، عرض صفحه، هدر و فوتر را بدون وابستگی به public-layout پایدار می‌کند.
 */

html.sf-storefront-root {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    font-size: 16px !important;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body.sf-body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    font-family: var(--ahoora-font, "Vazirmatn Variable", Tahoma, Arial, sans-serif) !important;
    font-size: 16px;
    line-height: 1.75;
    direction: rtl;
    overflow-x: clip;
}

body.sf-body,
body.sf-body button,
body.sf-body input,
body.sf-body select,
body.sf-body textarea,
body.sf-body option,
body.sf-body table,
body.sf-body label,
body.sf-body summary {
    font-family: var(--ahoora-font, "Vazirmatn Variable", Tahoma, Arial, sans-serif) !important;
}

body.sf-body *,
body.sf-body *::before,
body.sf-body *::after {
    box-sizing: border-box;
}

body.sf-body > main,
body.sf-body .sf-site,
body.sf-body .sf-header,
body.sf-body .sf-footer {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

.sf-header,
.sf-footer {
    direction: rtl;
    font-family: var(--ahoora-font, "Vazirmatn Variable", Tahoma, Arial, sans-serif) !important;
    text-align: right;
}

.sf-header *,
.sf-footer *,
.sf-trust * {
    box-sizing: border-box;
    font-family: inherit;
}

.sf-header img,
.sf-footer img,
.sf-trust img {
    display: block;
    height: auto;
}

.sf-brand-logo {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
}

.sf-footer-logo {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    object-fit: contain !important;
}

.sf-header a,
.sf-footer a {
    color: inherit;
}

.sf-header button,
.sf-header input {
    font: inherit;
}

.sf-footer {
    clear: both;
    position: relative;
    z-index: 2;
}

/* جلوگیری از به‌هم‌ریختگی ناشی از استایل‌های عمومی قدیمی */
.sf-header ul,
.sf-header ol,
.sf-footer ul,
.sf-footer ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-header h1,
.sf-header h2,
.sf-header h3,
.sf-header p,
.sf-footer h1,
.sf-footer h2,
.sf-footer h3,
.sf-footer p {
    margin-block-start: 0;
}

@media (max-width: 820px) {
    html.sf-storefront-root {
        font-size: 16px !important;
    }

    .sf-brand-logo {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
        min-height: 54px !important;
        max-height: 54px !important;
    }
}

@media (max-width: 620px) {
    .sf-footer-logo {
        width: 62px !important;
        height: 62px !important;
        min-width: 62px !important;
        max-width: 62px !important;
        min-height: 62px !important;
        max-height: 62px !important;
    }
}
