/* Dynamic Fonts - تطبيق الخط المحدد من قاعدة البيانات */

/* تطبيق الخط على جميع العناصر */
* {
    font-family: var(--store-font-family, 'Avenir Next World'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* تطبيق الخط على العناصر المحددة */
body,
.store-header,
.store-navbar,
.store-footer,
.navbar-nav .nav-link,
.form-control,
.btn,
.dropdown-menu,
.dropdown-item,
.announcement-bar,
.language-switcher .dropdown-toggle,
.language-switcher .dropdown-item,
.currency-badge .badge,
.store-header h1,
.store-footer h5,
.store-footer h6,
.store-footer ul li a {
    font-family: var(--store-font-family, 'Avenir Next World'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* تطبيق الخط على العناصر الإضافية */
.product-card,
.product-title,
.product-price,
.product-description,
.category-card,
.category-title,
.hero-section,
.hero-title,
.hero-subtitle,
.section-title,
.section-subtitle,
.card-title,
.card-text,
.alert,
.modal-title,
.modal-body,
.table,
.table th,
.table td,
.pagination,
.page-link,
.badge,
.input-group-text,
.list-group-item,
.breadcrumb,
.breadcrumb-item,
.nav-tabs .nav-link,
.tab-content,
.accordion-button,
.accordion-body,
.tooltip,
.popover,
.toast,
.toast-header,
.toast-body {
    font-family: var(--store-font-family, 'Avenir Next World'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* تطبيق الخط على العناصر التفاعلية */
input,
textarea,
select,
option,
label,
legend,
fieldset,
.help-text,
.error-message,
.success-message,
.info-message,
.warning-message {
    font-family: var(--store-font-family, 'Avenir Next World'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* تطبيق الخط على العناصر المخصصة */
.custom-element,
.dynamic-content,
.user-generated-content,
.admin-content,
.merchant-content,
.store-content {
    font-family: var(--store-font-family, 'Avenir Next World'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* تطبيق الخط على العناصر المتجاوبة */
@media (max-width: 768px) {
    * {
        font-family: var(--store-font-family, 'Avenir Next World'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    }
}

@media (max-width: 576px) {
    * {
        font-family: var(--store-font-family, 'Avenir Next World'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    }
}

/* Dynamic Footer Fonts and Typography */

/* Footer Font Family Variables */
.store-footer {
    --footer-font-family: var(--footer-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    --footer-heading-font-family: var(--footer-heading-font-family, var(--footer-font-family));
    --footer-text-font-family: var(--footer-text-font-family, var(--footer-font-family));
    --footer-link-font-family: var(--footer-link-font-family, var(--footer-font-family));
}

/* Footer Font Size Variables */
.store-footer {
    --footer-base-font-size: var(--footer-base-font-size, 16px);
    --footer-heading-size: var(--footer-heading-size, 1.1rem);
    --footer-text-size: var(--footer-text-size, 0.95rem);
    --footer-link-size: var(--footer-link-size, 0.9rem);
    --footer-small-size: var(--footer-small-size, 0.8rem);
}

/* Footer Font Weight Variables */
.store-footer {
    --footer-heading-weight: var(--footer-heading-weight, 600);
    --footer-text-weight: var(--footer-text-weight, 400);
    --footer-link-weight: var(--footer-link-weight, 500);
    --footer-bold-weight: var(--footer-bold-weight, 700);
}

/* Footer Line Height Variables */
.store-footer {
    --footer-heading-line-height: var(--footer-heading-line-height, 1.3);
    --footer-text-line-height: var(--footer-text-line-height, 1.6);
    --footer-link-line-height: var(--footer-link-line-height, 1.4);
}

/* Footer Letter Spacing Variables */
.store-footer {
    --footer-heading-spacing: var(--footer-heading-spacing, 0.02em);
    --footer-text-spacing: var(--footer-text-spacing, 0.01em);
    --footer-link-spacing: var(--footer-link-spacing, 0.005em);
}

/* Footer Typography Application */
.store-footer h5,
.store-footer h6 {
    font-family: var(--footer-heading-font-family);
    font-size: var(--footer-heading-size);
    font-weight: var(--footer-heading-weight);
    line-height: var(--footer-heading-line-height);
    letter-spacing: var(--footer-heading-spacing);
}

.store-footer p,
.store-footer div {
    font-family: var(--footer-text-font-family);
    font-size: var(--footer-text-size);
    font-weight: var(--footer-text-weight);
    line-height: var(--footer-text-line-height);
    letter-spacing: var(--footer-text-spacing);
}

.store-footer a {
    font-family: var(--footer-link-font-family);
    font-size: var(--footer-link-size);
    font-weight: var(--footer-link-weight);
    line-height: var(--footer-link-line-height);
    letter-spacing: var(--footer-link-spacing);
}

.store-footer .footer-bottom p,
.store-footer small {
    font-size: var(--footer-small-size);
    font-weight: var(--footer-text-weight);
}

/* Footer Font Loading States */
.store-footer.font-loading {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.store-footer.font-loaded {
    font-family: var(--footer-font-family);
}

/* Footer Font Fallbacks */
.store-footer {
    font-display: swap;
}

.store-footer h5,
.store-footer h6 {
    font-display: swap;
}

.store-footer p,
.store-footer a {
    font-display: swap;
}

/* Footer Responsive Typography */
@media (max-width: 768px) {
    .store-footer {
        --footer-heading-size: calc(var(--footer-heading-size) * 0.9);
        --footer-text-size: calc(var(--footer-text-size) * 0.95);
        --footer-link-size: calc(var(--footer-link-size) * 0.95);
    }
}

@media (max-width: 576px) {
    .store-footer {
        --footer-heading-size: calc(var(--footer-heading-size) * 0.85);
        --footer-text-size: calc(var(--footer-text-size) * 0.9);
        --footer-link-size: calc(var(--footer-link-size) * 0.9);
    }
}

/* Footer Print Typography */
@media print {
    .store-footer {
        --footer-heading-size: 12pt;
        --footer-text-size: 10pt;
        --footer-link-size: 9pt;
        --footer-heading-weight: 700;
        --footer-text-weight: 400;
    }
}

/* Footer High Contrast Typography */
@media (prefers-contrast: high) {
    .store-footer {
        --footer-heading-weight: 700;
        --footer-text-weight: 500;
        --footer-link-weight: 600;
    }
}

/* Footer Reduced Motion Typography */
@media (prefers-reduced-motion: reduce) {
    .store-footer * {
        transition: none !important;
        animation: none !important;
    }
}
