/**
 * CTB global typography + theme overrides (storefront & auth layouts that include this file).
 * Variables: see partials/ctb-global-theme-vars.blade.php + get_setting() keys.
 * Load after aiz-core.css; keep custom-style.css after this for local overrides.
 */

@import url("../assets/css/hc-bbw-typography.css");

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-size: clamp(0.875rem, 0.12vw + 0.82rem, 1rem);
    font-weight: 400;
    line-height: 1.5;
    color: var(--theme-text-color, var(--text-color, #222));
}

/* English / LTR: premium sans (BBW-style) */
html:not([dir="rtl"]) body {
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, var(--theme-font-sans, sans-serif);
    letter-spacing: 0.03em;
}

/* Arabic / RTL: Cairo + Tajawal — readable, no artificial letter-spacing */
html[dir="rtl"] body {
    font-family: "Cairo", "Tajawal", var(--theme-font-sans, sans-serif);
    letter-spacing: 0.02em;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: inherit;
    font-weight: 600;
    line-height: 1.35;
    color: var(--theme-text-color, var(--text-color, #222));
}

html:not([dir="rtl"]) h1,
html:not([dir="rtl"]) h2,
html:not([dir="rtl"]) h3,
html:not([dir="rtl"]) h4,
html:not([dir="rtl"]) h5,
html:not([dir="rtl"]) h6,
html:not([dir="rtl"]) .h1,
html:not([dir="rtl"]) .h2,
html:not([dir="rtl"]) .h3,
html:not([dir="rtl"]) .h4,
html:not([dir="rtl"]) .h5,
html:not([dir="rtl"]) .h6 {
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: 0.045em;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .h1,
html[dir="rtl"] .h2,
html[dir="rtl"] .h3,
html[dir="rtl"] .h4,
html[dir="rtl"] .h5,
html[dir="rtl"] .h6 {
    font-family: "Cairo", "Tajawal", sans-serif;
    letter-spacing: 0;
}

.btn {
    font-weight: 600;
}

html:not([dir="rtl"]) .btn {
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: 0.04em;
}

html[dir="rtl"] .btn {
    font-family: "Cairo", "Tajawal", sans-serif;
    letter-spacing: 0;
}

.btn-primary {
    background-color: var(--theme-primary-color, var(--primary, #d43533)) !important;
    border-color: var(--theme-primary-color, var(--primary, #d43533)) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--theme-primary-hover-color, var(--hov-primary, #9d1b1a)) !important;
    border-color: var(--theme-primary-hover-color, var(--hov-primary, #9d1b1a)) !important;
}

.btn-outline-primary {
    color: var(--theme-primary-color, var(--primary, #d43533)) !important;
    border-color: var(--theme-primary-color, var(--primary, #d43533)) !important;
}

.btn-outline-primary:hover {
    background-color: var(--theme-primary-color, var(--primary, #d43533)) !important;
    border-color: var(--theme-primary-color, var(--primary, #d43533)) !important;
}

.form-control,
.custom-file-label,
.form-select {
    font-family: inherit;
    font-size: 0.9375rem;
    letter-spacing: 0.03em;
    line-height: 1.5;
    border-color: rgba(0, 0, 0, 0.12);
}

.form-control:focus {
    border-color: var(--theme-accent-color, #1a73e8) !important;
}

/* Primary / accent text utilities aligned with dashboard */
.text-primary {
    color: var(--theme-primary-color, var(--primary, #d43533)) !important;
}

.hov-text-primary:hover {
    color: var(--theme-accent-color, #1a73e8) !important;
}

/* Product cards — base emphasis (card-specific sizing in custom-style.css) */
.aiz-card-box .fw-600,
.aiz-card-box .fw-700 {
    font-family: inherit;
}

/* Rich text / editor content links */
.aiz-text-editor a:hover,
.ck-content a:hover {
    color: var(--theme-accent-color, #1a73e8);
}

/* لا تُطبَّق على كل الروابط — يكسر transform الخاص بأيقونات/سلة بطاقة المنتج */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .form-control {
        transition-duration: 0.01ms !important;
    }
}
