@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/IRANSansX/IRANSansXFaNum-Regular.woff2) format('woff2'), url(../fonts/IRANSansX/IRANSansXFaNum-Regular.woff) format('woff'), url(../fonts/IRANSansX/IRANSansXFaNum-Regular.ttf) format('truetype');
}

@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(../fonts/IRANSansX/IRANSansXFaNum-Medium.woff2) format('woff2'), url(../fonts/IRANSansX/IRANSansXFaNum-Medium.woff) format('woff'), url(../fonts/IRANSansX/IRANSansXFaNum-Medium.ttf) format('truetype');
}

@font-face {
    font-family: IRANSansX;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/IRANSansX/IRANSansXFaNum-Bold.woff2) format('woff2'), url(../fonts/IRANSansX/IRANSansXFaNum-Bold.woff) format('woff'), url(../fonts/IRANSansX/IRANSansXFaNum-Bold.ttf) format('truetype');
}

/* پنل کاربر جهیزیار - صفحه‌ی معمولی (هوم‌پیج و سایت بعداً جدا طراحی می‌شوند) */
* {
    font-family: IRANSansX, Tahoma, sans-serif;
}

body.userBody {
    background: #eef0f3;
    font-family: IRANSansX, Tahoma, sans-serif;
    margin: 0;
}

.phoneFrame {
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.phoneHeader {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-size: 1.05rem;
}

.phoneContent {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 160px;
    flex: 1;
}

.userCard {
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 12px;
    padding: 16px;
}

/*آیکون بالای کارت: ظرف بلوکی وسط‌چین و آیکون داخل آن*/
.userCardIcon {
    font-size: 2.6rem;
    line-height: 1;
    text-align: center;
    margin-bottom: 12px;
}

    .userCardIcon i {
        display: inline-block;
        margin: 0;
    }

.userInfo {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: .9rem;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* نوار وضعیت */
.statusBar {
    display: flex;
    justify-content: space-between;
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    background: #fafbfc;
}

.statusStep {
    flex: 1;
    text-align: center;
    color: #a0a6ae;
}

.statusStep small {
    display: block;
    font-size: .68rem;
    margin-top: 4px;
}

.statusDot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #d5d9de;
    font-size: .75rem;
    background: #fff;
}

.statusStep.done {
    color: #198754;
}

.statusStep.done .statusDot {
    border-color: #198754;
    background: #198754;
    color: #fff;
}

.statusStep.current {
    color: #0d6efd;
    font-weight: bold;
}

.statusStep.current .statusDot {
    border-color: #0d6efd;
    color: #0d6efd;
}

.statusStep.failed {
    color: #dc3545;
    font-weight: bold;
}

.statusStep.failed .statusDot {
    border-color: #dc3545;
    background: #dc3545;
    color: #fff;
}

/* لیست کالا */
.productList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.productItem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #eceef1;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.productItem:hover {
    border-color: #cfd6de;
}

.productThumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b5bbc3;
    overflow: hidden;
}

.productThumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.productInfo {
    flex: 1;
    min-width: 0;
}

.productTitle {
    font-weight: bold;
    margin-bottom: 4px;
}

.productPrice {
    color: #198754;
    font-weight: bold;
    font-size: .95rem;
}

.productArrow {
    color: #b5bbc3;
}

/* صفحه‌ی داخلی کالا */
.galleryMain {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    background: #f3f4f6;
}

.galleryThumbs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
}

.galleryThumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.galleryThumb.active {
    border-color: #0d6efd;
}

.galleryEmpty {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b5bbc3;
    font-size: 3rem;
}

.productDescription {
    font-size: .92rem;
    line-height: 1.9;
}

/* سبد و پیش‌فاکتور */
.summaryRow {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    font-size: .92rem;
}

.summaryTotal {
    font-weight: bold;
    font-size: 1rem;
    color: #198754;
    border-top: 1px dashed #dfe3e8;
    margin-top: 6px;
    padding-top: 8px;
}

.bankAccount {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.warehouseCode {
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #198754;
    text-align: center;
}

/* صفحه‌ی اصلی */
.homeBox {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8px;
}

/* منوی سمت راست پنل کاربر */
.phoneHeader {
    position: relative;
}

.menuToggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    font-size: 1.2rem;
    color: #444;
}

.cartToggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #444;
}

.backChevron {
    color: #0d6efd;
    font-size: 1.1rem;
    margin-left: 8px;
    text-decoration: none;
}

.backChevronSm {
    font-size: .8rem;
}

/*کادر ورود/تایید کد: هم‌اندازه‌ی ورود پنل ادمین*/
.authBox {
    max-width: 440px;
    margin: 0 auto;
}

.userMenuBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1040;
}

.userMenu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 16px rgba(0, 0, 0, .15);
    z-index: 1050;
    transition: right .2s ease;
    padding: 12px;
}

.userMenu.open {
    right: 0;
}

.userMenuBackdrop.open {
    display: block;
}

.userMenuHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.userMenuItem {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    text-align: right;
    border-radius: 8px;
}

.userMenuItem:hover {
    background: #f3f4f6;
}


/* اعلان‌ها (ShowAlert) - پایین راست */
#pageAlert {
    position: fixed;
    z-index: 2000;
    right: 20px;
    bottom: 20px;
}

#pageAlert span {
    min-width: 280px;
    max-width: 92vw;
    text-align: center;
    padding: 14px 16px;
    color: #fff;
    border-radius: 10px;
    position: relative;
    display: block;
    margin-bottom: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    overflow: hidden;
}

#pageAlert span.success { background-color: #157347; }
#pageAlert span.danger { background-color: #dc3545; }

#pageAlert span.success::after,
#pageAlert span.danger::after {
    background: rgba(255,255,255,.7);
    bottom: 0;
    position: absolute;
    right: 0;
    left: 0;
    content: '';
    height: 3px;
    animation: userRunProgress 5s linear forwards;
}

#pageAlert span.fade-out { opacity: 0; transition: opacity .2s; }

@keyframes userRunProgress {
    0% { left: 0; }
    100% { left: 100%; }
}

@media (min-width: 576px) {
    .statusBar {
        max-width: 900px;
        margin: 0 auto;
        width: 100%;
    }
}
