@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-Thin.woff") format("woff"); font-style: normal; font-weight: 100; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-UltraLight.woff") format("woff"); font-style: normal; font-weight: 200; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-Light.woff") format("woff"); font-style: normal; font-weight: 300; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-Regular.woff") format("woff"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-Medium.woff") format("woff"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-DemiBold.woff") format("woff"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-Bold.woff") format("woff"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-ExtraBold.woff") format("woff"); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("../fonts/IRANYekanX-Black.woff") format("woff"); font-style: normal; font-weight: 900; font-display: swap; }

.estehkam-auth {
    --eh-primary: #242f9b;
    --eh-primary-dark: #171f63;
    --eh-accent: #f0bb40;
    --eh-accent-dark: #f43904;
    --eh-ink: #1c1c25;
    --eh-muted: #717171;
    --eh-line: #e9ebef;
    --eh-surface: #f7f8fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--eh-surface);
    color: var(--eh-ink);
    font-family: "IRANYekanX", Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.7;
}

.estehkam-auth *, .estehkam-auth *::before, .estehkam-auth *::after { box-sizing: border-box; font-family: "IRANYekanX", Tahoma, sans-serif; }
.estehkam-auth a { color: inherit; text-decoration: none; }
.estehkam-auth button, .estehkam-auth input { font: inherit; }
.estehkam-auth img { display: block; max-width: 100%; }

.eh-auth__body { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.eh-auth__logo { width: 130px; height: auto; margin-bottom: 28px; }
.eh-auth__card { width: min(440px, 100%); padding: 36px 32px; border-radius: 20px; background: #fff; box-shadow: 0 20px 50px rgba(27,42,114,.08); text-align: center; }
.eh-auth__title { margin: 0 0 24px; font-size: 19px; font-weight: 700; }
.eh-auth__description { margin: -12px 0 24px; color: var(--eh-muted); font-size: 13px; line-height: 2; }
.eh-auth__description b { color: var(--eh-ink); font-weight: 700; direction: ltr; unicode-bidi: embed; }

.eh-auth__field { width: 100%; height: 54px; margin-bottom: 18px; padding: 0 20px; border: 1px solid var(--eh-line); border-radius: 14px; background: var(--eh-surface); text-align: center; font-size: 15px; font-weight: 600; letter-spacing: .5px; transition: .2s ease; }
.eh-auth__field:focus { outline: 0; border-color: var(--eh-primary); background: #fff; box-shadow: 0 0 0 3px rgba(36,47,155,.08); }
.eh-auth__field::placeholder { color: #a7abb3; font-weight: 400; letter-spacing: 0; }

.eh-auth__submit { width: 100%; height: 54px; margin-bottom: 18px; border: 0; border-radius: 14px; background: var(--eh-primary); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.eh-auth__submit:hover { background: var(--eh-primary-dark); }
.eh-auth__submit:disabled { opacity: .6; cursor: default; }

.eh-auth__terms { margin-bottom: 18px; color: var(--eh-muted); font-size: 12px; line-height: 2; }
.eh-auth__terms a { color: var(--eh-primary); font-weight: 700; }

.eh-auth__password-link { display: inline-block; color: var(--eh-primary); font-size: 13px; font-weight: 700; }

.eh-auth__actions { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 12px; }
.eh-auth__actions a, .eh-auth__actions button { border: 0; background: none; color: var(--eh-primary); font-size: 12px; font-weight: 700; cursor: pointer; }
.eh-auth__actions button:disabled { color: var(--eh-muted); cursor: default; }

.eh-auth__alert { width: min(440px, 100%); margin-bottom: 16px; padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; text-align: center; }
.eh-auth__alert--error { background: #fdeceb; color: var(--eh-accent-dark); }
.eh-auth__alert--info { background: #eef1fb; color: var(--eh-primary); }

.eh-auth__footer { padding: 22px 0; border-top: 1px solid var(--eh-line); text-align: center; }
.eh-auth__footer nav { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--eh-muted); font-size: 12px; }
.eh-auth__footer a:hover { color: var(--eh-primary); }
.eh-auth__footer span { color: var(--eh-line); }

@media (max-width: 480px) {
    .eh-auth__card { padding: 28px 22px; }
}

/* Mobile-first registration and optional profile onboarding ---------------- */
.eh-register,
.eh-onboarding {
    background:
        radial-gradient(circle at 78% 8%, rgba(240,187,64,.18), transparent 24rem),
        radial-gradient(circle at 10% 84%, rgba(36,47,155,.13), transparent 28rem),
        linear-gradient(145deg, #f9faff, #f4f6fb);
}

.eh-register .eh-auth__body,
.eh-onboarding .eh-auth__body { padding-block: 28px; }
.eh-register .eh-auth__logo,
.eh-onboarding .eh-auth__logo { width: 158px; margin-bottom: 20px; }
.eh-register__card { width: min(510px, 100%); padding: 30px 38px 32px; border: 1px solid rgba(36,47,155,.08); }
.eh-onboarding__card { width: min(620px, 100%); padding: 30px 42px 34px; border: 1px solid rgba(36,47,155,.08); }

.eh-auth__progress { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: start; gap: 7px; margin-bottom: 28px; }
.eh-auth__progress > span { display: grid; min-width: 68px; justify-items: center; gap: 6px; color: #969aa5; }
.eh-auth__progress b { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #dfe2ea; border-radius: 50%; background: #fff; font-size: 11px; font-weight: 900; }
.eh-auth__progress small { font-size: 9px; font-weight: 700; white-space: nowrap; }
.eh-auth__progress i { height: 2px; margin-top: 14px; border-radius: 2px; background: #e9ebf0; }
.eh-auth__progress .is-active { color: var(--eh-primary); }
.eh-auth__progress .is-active b { border-color: var(--eh-primary); background: var(--eh-primary); color: #fff; box-shadow: 0 5px 14px rgba(36,47,155,.2); }
.eh-auth__progress .is-done { color: #1b9065; }
.eh-auth__progress .is-done b { border-color: #d6f0e6; background: #e8f8f2; color: #16805a; }

.eh-register__icon { display: grid; width: 62px; height: 62px; margin: 0 auto 17px; place-items: center; border-radius: 20px; background: linear-gradient(145deg, #eef1ff, #fff8e6); color: var(--eh-primary); }
.eh-register__icon svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.eh-register .eh-auth__title,
.eh-onboarding .eh-auth__title { margin-bottom: 9px; font-size: 23px; font-weight: 900; }
.eh-register .eh-auth__description,
.eh-onboarding .eh-auth__description { max-width: 430px; margin: 0 auto 24px; font-size: 12px; }
.eh-auth__label { display: block; margin-bottom: 8px; color: #424650; font-size: 12px; font-weight: 800; text-align: right; }
.eh-auth__phone-field { display: grid; grid-template-columns: 62px 1fr; height: 57px; margin-bottom: 14px; overflow: hidden; border: 1px solid #dfe2e9; border-radius: 15px; background: #f9fafc; transition: .2s ease; direction: ltr; }
.eh-auth__phone-field:focus-within { border-color: var(--eh-primary); background: #fff; box-shadow: 0 0 0 3px rgba(36,47,155,.08); }
.eh-auth__phone-field span { display: grid; place-items: center; border-right: 1px solid #e3e5ec; color: #737782; font-size: 12px; font-weight: 800; }
.eh-auth__phone-field input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--eh-ink); text-align: center; font-size: 16px; font-weight: 800; letter-spacing: 1.1px; direction: ltr; }
.eh-auth__phone-field input::placeholder { color: #adb0b8; font-weight: 500; }
.eh-register .eh-auth__submit { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; background: linear-gradient(135deg, #2c3db3, #202b8b); box-shadow: 0 10px 22px rgba(36,47,155,.2); }
.eh-register .eh-auth__submit span { font-size: 19px; }
.eh-register__benefits { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 4px 0 18px; }
.eh-register__benefits span { padding: 6px 9px; border-radius: 9px; background: #f6f7fb; color: #6d717c; font-size: 9px; font-weight: 700; }

.eh-onboarding__success { display: grid; width: 58px; height: 58px; margin: 0 auto 15px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #e3f8f0, #f4fcf9); color: #188861; font-size: 22px; font-weight: 900; box-shadow: 0 8px 22px rgba(24,136,97,.12); }
.eh-onboarding__step[hidden] { display: none; }
.eh-onboarding__step { animation: ehAuthStep .28s ease both; }
@keyframes ehAuthStep { from { opacity: 0; transform: translateX(-9px); } to { opacity: 1; transform: none; } }
.eh-onboarding__step-head { display: grid; grid-template-columns: 43px 1fr; align-items: center; gap: 12px; margin: 3px 0 20px; padding: 14px; border-radius: 15px; background: linear-gradient(135deg, #f1f3ff, #fff9eb); text-align: right; }
.eh-onboarding__step-head > span { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; background: #fff; color: var(--eh-primary); font-size: 15px; font-weight: 900; box-shadow: 0 5px 14px rgba(36,47,155,.08); }
.eh-onboarding__step-head h2 { margin: 0; font-size: 14px; font-weight: 900; }
.eh-onboarding__step-head p { margin: 2px 0 0; color: #777b86; font-size: 10px; line-height: 1.8; }
.eh-onboarding__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eh-onboarding__grid label,
.eh-onboarding__email { display: block; color: #424650; font-size: 11px; font-weight: 800; text-align: right; }
.eh-onboarding .eh-auth__field { margin: 7px 0 16px; text-align: right; letter-spacing: 0; }
.eh-onboarding__email .eh-auth__field { direction: ltr; text-align: left; }
.eh-onboarding .eh-auth__submit { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 2px 0 0; box-shadow: 0 9px 20px rgba(36,47,155,.17); }
.eh-onboarding__buttons { display: grid; grid-template-columns: 115px 1fr; gap: 10px; }
.eh-auth__back { height: 54px; border: 1px solid #dde0e8; border-radius: 14px; background: #fff; color: #5f636d; font-weight: 800; cursor: pointer; }
.eh-onboarding__skip-form { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #eef0f4; }
.eh-onboarding__skip-form button { border: 0; background: none; color: var(--eh-primary); font-size: 12px; font-weight: 900; cursor: pointer; }
.eh-onboarding__skip-form small { color: #8c9099; font-size: 9.5px; }

@media (max-width: 560px) {
    .eh-register .eh-auth__body,
    .eh-onboarding .eh-auth__body { justify-content: flex-start; padding: 20px 13px; }
    .eh-register .eh-auth__logo,
    .eh-onboarding .eh-auth__logo { width: 135px; margin-bottom: 14px; }
    .eh-register__card,
    .eh-onboarding__card { padding: 24px 17px 25px; border-radius: 20px; }
    .eh-auth__progress { gap: 3px; margin-bottom: 23px; }
    .eh-auth__progress > span { min-width: 62px; }
    .eh-auth__progress small { font-size: 8px; }
    .eh-register .eh-auth__title,
    .eh-onboarding .eh-auth__title { font-size: 19px; }
    .eh-register__benefits { display: grid; grid-template-columns: 1fr; text-align: right; }
    .eh-onboarding__grid { grid-template-columns: 1fr; gap: 0; }
    .eh-onboarding__buttons { grid-template-columns: 90px 1fr; }
    .eh-onboarding__skip-form small { max-width: 290px; line-height: 1.8; }
}

/* Bagisto customer screens -------------------------------------------------- */
body:has(.eh-auth-marker) {
    min-width: 0;
    background:
        radial-gradient(circle at 82% 10%, rgba(240, 187, 64, .11), transparent 25rem),
        radial-gradient(circle at 13% 80%, rgba(36, 47, 155, .08), transparent 28rem),
        #f7f8fa;
}

body:has(.eh-auth-marker) #main {
    min-height: 100vh;
    overflow: hidden;
    background: transparent;
}

body:has(.eh-auth-marker) #main > .container {
    width: 100%;
    max-width: none;
    margin-top: 0 !important;
    padding: 48px 20px 24px !important;
}

body:has(.eh-auth-marker) #main > .container > .flex.items-center {
    justify-content: center;
}

body:has(.eh-auth-marker) #main > .container > .flex.items-center a {
    min-height: 0;
    margin: 0 auto 26px !important;
}

body:has(.eh-auth-marker) #main > .container > .flex.items-center img {
    width: 172px;
    height: 70px;
    object-fit: contain;
    content: url("/themes/shop/default/images/estehkam/logo.png");
}

body:has(.eh-auth-marker) .eh-auth-marker {
    display: none;
}

body:has(.eh-auth-marker) #main > .container > .m-auto {
    width: min(500px, 100%);
    max-width: 500px !important;
    padding: 34px 42px 32px !important;
    border: 1px solid #e8eaf0 !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 55px rgba(24, 35, 90, .08);
}

body:has(.eh-auth-marker) #main h1 {
    text-align: center;
    font-family: "IRANYekanX", Tahoma, sans-serif !important;
    font-size: 25px !important;
    font-weight: 800;
}

body:has(.eh-auth-marker) #main h1 + p {
    margin-top: 7px !important;
    text-align: center;
    color: #777b86 !important;
    font-size: 13px !important;
}

.eh-phone-priority {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding: 15px 16px;
    border: 1px solid rgba(36, 47, 155, .16);
    border-radius: 15px;
    background: linear-gradient(135deg, #f0f3ff, #fff9eb);
    color: #1c1c25;
}

.eh-phone-priority__icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #242f9b; color: #fff; font-size: 14px; font-weight: 900; direction: ltr; }
.eh-phone-priority strong, .eh-phone-priority small { display: block; }
.eh-phone-priority strong { font-size: 14px; font-weight: 800; }
.eh-phone-priority small { margin-top: 2px; color: #777b86; font-size: 11px; }
.eh-phone-priority em { padding: 8px 13px; border-radius: 10px; background: #fff; color: #242f9b; font-size: 12px; font-style: normal; font-weight: 800; box-shadow: 0 4px 14px rgba(36,47,155,.08); }

body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto {
    position: relative;
    width: min(920px, 100%);
    max-width: 920px !important;
    min-height: 610px;
    padding: 48px 330px 42px 54px !important;
    overflow: hidden;
}

body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto {
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, rgba(36,47,155,.32), rgba(240,187,64,.36)) border-box !important;
    border: 1px solid transparent !important;
}

body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto::before {
    position: absolute;
    inset: 0 0 0 auto;
    width: 275px;
    padding: 66px 34px;
    background:
        radial-gradient(circle at 20% 15%, rgba(240,187,64,.35), transparent 10rem),
        linear-gradient(155deg, #2737ad, #111a59);
    color: #fff;
    content: "عضویت در ثنابای\A\Aخرید سریع‌تر، پیگیری سفارش‌ها و دسترسی به سوابق خرید در یک حساب امن و ساده.\A\A✓ ثبت و مدیریت نشانی‌ها\A✓ مشاهده فاکتور و وضعیت سفارش\A✓ پشتیبانی سریع‌تر";
    font-size: 13px;
    font-weight: 500;
    line-height: 2.25;
    white-space: pre-line;
}

body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main h1,
body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main h1 + p,
body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main form,
body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main .m-auto > p { position: relative; z-index: 1; }

body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main form .flex.flex-wrap.gap-4 { justify-content: center; }
body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main form .flex.flex-wrap.gap-4 a { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #e6e9f1; border-radius: 12px; background: #fff; color: #2636aa; transition: .18s ease; }
body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main form .flex.flex-wrap.gap-4 a:hover { border-color: rgba(36,47,155,.35); background: #f5f7ff; transform: translateY(-1px); }

body:has(.eh-auth-marker) #main .mt-14,
body:has(.eh-auth-marker) #main .mt-8.rounded {
    margin-top: 28px !important;
}

body:has(.eh-auth-marker) #main label:not([class*="icon-"]) {
    color: #343640;
    font-size: 13px;
    font-weight: 700;
}

body:has(.eh-auth-marker) #main input:not([type="checkbox"]) {
    min-height: 52px;
    margin-top: 7px;
    padding: 0 16px !important;
    border: 1px solid #e2e4e9;
    border-radius: 12px !important;
    background: #fafbfc;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

body:has(.eh-auth-marker) #main input:not([type="checkbox"]):focus {
    border-color: #3343b9;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(36, 47, 155, .08);
}

body:has(.eh-auth-marker) #main .primary-button {
    width: 100%;
    max-width: none !important;
    min-height: 52px;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #2737ad, #18236e) !important;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(36, 47, 155, .18);
}

body:has(.eh-auth-marker) #main a.text-navyBlue,
body:has(.eh-auth-marker) #main .text-navyBlue {
    color: #2636aa !important;
}

body:has(.eh-auth-marker) #main > .container > p:last-child {
    margin: 24px auto 0 !important;
    color: #8a8d96;
}

@media (max-width: 600px) {
    body:has(.eh-auth-marker) #main > .container {
        padding: 26px 14px 18px !important;
    }

    body:has(.eh-auth-marker) #main > .container > .flex.items-center img {
        width: 148px;
        height: 58px;
    }

    body:has(.eh-auth-marker) #main > .container > .m-auto {
        padding: 27px 20px 24px !important;
        border: 1px solid #e8eaf0 !important;
        border-radius: 16px !important;
    }

    body:has(.eh-auth-marker) #main h1 {
        font-size: 21px !important;
    }

    .eh-phone-priority { gap: 10px; padding: 12px; }
    .eh-phone-priority__icon { width: 42px; height: 42px; }
    .eh-phone-priority em { display: none; }

    body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto {
        min-height: 0;
        padding: 28px 20px 24px !important;
    }

    body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto::before { display: none; }
}

@media (max-width: 900px) {
    body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto {
        width: min(560px, 100%);
        min-height: 0;
        padding: 34px 34px 30px !important;
    }

    body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto::before { display: none; }
}

@media (max-width: 600px) {
    body:has(.eh-auth-marker):has(form[action*="customer/register"]) #main > .container > .m-auto { padding: 28px 20px 24px !important; }
}
