/* ============================================
   XUI Connector - Modern Light Theme
   ============================================ */
:root {
    --xui-primary: #37517D;
    --xui-primary-dark: #2c4063;
    --xui-success: #10b981;
    --xui-danger: #ef4444;
    --xui-text: #1f2937;
    --xui-text-muted: #6b7280;
    --xui-border: #e5e7eb;
    --xui-bg: #f8fafc;
    --xui-card: #ffffff;
    --xui-radius: 12px;
    --xui-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --xui-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
}

.xui-dashboard, .erm-wrap, .xui-shop-grid, .xui-orders-list {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    color: var(--xui-text);
    font-size: 14px;
    line-height: 1.6;
}
.xui-dashboard { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
.xui-icon { display: inline-block; vertical-align: middle; }

/* ---------- هدر ---------- */
.xui-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 18px 20px; background: var(--xui-card); border-radius: var(--xui-radius); box-shadow: var(--xui-shadow); border: 1px solid var(--xui-border); }
.xui-header-content { display: flex; align-items: center; gap: 12px; }
.xui-header-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--xui-primary), #5a6b8c); color: #fff; border-radius: 10px; flex-shrink: 0; }
.xui-header h2 { font-size: 17px; font-weight: 700; margin: 0; }
.xui-subtitle { font-size: 12px; color: var(--xui-text-muted); margin: 2px 0 0; }
.xui-ping { font-size: 12px; color: var(--xui-text-muted); background: var(--xui-bg); padding: 5px 10px; border-radius: 20px; }

/* ---------- تب‌های ناوبری ---------- */
.xui-tabs-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; background: var(--xui-card); padding: 6px; border-radius: var(--xui-radius); box-shadow: var(--xui-shadow); border: 1px solid var(--xui-border); }
.xui-nav-tab { flex: 1; min-width: 90px; text-align: center; padding: 9px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--xui-text-muted); text-decoration: none; transition: all .2s; }
.xui-nav-tab:hover { background: var(--xui-bg); color: var(--xui-text); }
.xui-nav-tab.active { background: var(--xui-primary); color: #fff; }
.xui-nav-tab.xui-logout { color: var(--xui-danger); }
.xui-nav-tab.xui-logout:hover { background: #fee2e2; }

/* ---------- تب‌های کانفیگ ---------- */
.xui-tab-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--xui-border); background: var(--xui-card); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; color: var(--xui-text); }
.xui-tab-btn:hover { border-color: var(--xui-primary); }
.xui-tab-btn.active { background: var(--xui-primary); color: #fff; border-color: var(--xui-primary); }

/* ---------- هدر کارت ---------- */
.xui-detail-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; background: var(--xui-card); border-radius: var(--xui-radius); border: 1px solid var(--xui-border); margin-bottom: 16px; }
.xui-detail-title { display: flex; align-items: center; gap: 12px; }
.xui-detail-title h2 { font-size: 16px; font-weight: 700; margin: 0; }
.xui-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.xui-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.xui-badge-active { background: #d1fae5; color: #065f46; }
.xui-badge-inactive { background: #fee2e2; color: #991b1b; }

/* ---------- کارت‌های آماری ---------- */
.xui-stats { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 12px !important; margin-bottom: 20px !important; }
.xui-stat-card { background: #f3f4f6 !important; color: #1f2937 !important; border: 1px solid #e5e7eb !important; border-radius: 12px !important; padding: 10px 14px !important; display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important; transition: all 0.2s ease !important; min-height: 60px !important; }
.xui-stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important; transform: translateY(-1px) !important; }
.xui-stat-label { font-size: 12px !important; font-weight: 500 !important; color: #6b7280 !important; white-space: nowrap !important; }
.xui-stat-value { font-size: 15px !important; font-weight: 700 !important; color: #1f2937 !important; white-space: nowrap !important; text-align: left !important; }
.xui-stat-value small { font-size: 11px !important; font-weight: 400 !important; color: #6b7280 !important; margin-right: 2px !important; }

/* ---------- نوار پیشرفت ---------- */
.xui-progress-card { background: var(--xui-card); border-radius: var(--xui-radius); padding: 16px; box-shadow: var(--xui-shadow); border: 1px solid var(--xui-border); margin-bottom: 16px; }
.xui-progress-header { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.xui-progress-bar { height: 8px; background: var(--xui-border); border-radius: 10px; overflow: hidden; }
.xui-progress-fill { height: 100%; background: linear-gradient(90deg, var(--xui-primary), #5a6b8c); border-radius: 10px; transition: width .6s ease; }
.xui-progress-footer { display: flex; justify-content: space-between; font-size: 11px; color: var(--xui-text-muted); margin-top: 8px; flex-wrap: wrap; gap: 6px; }

/* ---------- لینک‌ها و QR ---------- */
.xui-links-card { background: #f8fafc !important; border: 1px solid #e5e7eb !important; border-radius: 14px !important; padding: 16px !important; margin-bottom: 16px !important; box-shadow: 0 2px 6px rgba(0,0,0,.04) !important; }
.xui-links-card h3 { font-size: 14px !important; font-weight: 700 !important; color: #1f2937 !important; margin: 0 0 12px !important; padding-bottom: 8px !important; border-bottom: 1px solid #e5e7eb !important; }
.xui-link-row { display: flex !important; align-items: stretch !important; gap: 14px !important; margin-bottom: 14px !important; flex-wrap: nowrap !important; width: 100% !important; box-sizing: border-box !important; }
.xui-link-code-box, .xui-link-qr-box { flex: 1 1 50% !important; min-height: 160px !important; display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; background: #fff !important; border: 1px solid #e5e7eb !important; border-radius: 12px !important; padding: 14px !important; box-shadow: 0 1px 3px rgba(0,0,0,.04) !important; box-sizing: border-box !important; min-width: 0 !important; overflow: hidden !important; }
.xui-link-code-box code { width: 100% !important; font-size: 11px !important; color: #374151 !important; word-break: break-all !important; direction: ltr !important; text-align: left !important; background: #f9fafb !important; padding: 8px 10px !important; border-radius: 8px !important; border: 1px solid #f1f5f9 !important; display: block !important; line-height: 1.6 !important; margin-bottom: 10px !important; box-sizing: border-box !important; }
.xui-link-code-box .xui-copy-btn { background: #37517D !important; color: #fff !important; border: none !important; border-radius: 8px !important; padding: 8px 18px !important; font-size: 12px !important; font-weight: 600 !important; cursor: pointer !important; transition: all 0.2s !important; width: 100% !important; max-width: 160px !important; }
.xui-link-code-box .xui-copy-btn:hover { background: #2c4063 !important; }
.xui-link-qr-box img { width: 150px !important; height: 150px !important; max-width: 100% !important; border-radius: 8px !important; display: block !important; background: #fff !important; object-fit: contain !important; }

/* ---------- دکمه‌ها ---------- */
.xui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; font-family: inherit; transition: all .2s; min-height: 36px; }
.xui-btn-primary { background: #37517D; color: #fff; }
.xui-btn-primary:hover { background: #2c4063; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(55,81,125,.25); }
.xui-btn-secondary { background: var(--xui-bg); color: var(--xui-text); border: 1px solid var(--xui-border); }
.xui-btn-secondary:hover { background: var(--xui-border); }
.xui-btn-danger { background: var(--xui-danger); color: #fff; }
.xui-btn-danger:hover { background: #dc2626; }
.xui-copy-btn { background: #37517D; color: #fff; border: none; border-radius: 8px; padding: 5px 12px; font-size: 11px; font-weight: 500; min-height: 28px; cursor: pointer; transition: all .2s; font-family: inherit; }
.xui-copy-btn:hover { background: #2c4063; }
.xui-copy-btn.copied { background: #10b981; }
.xui-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- فروشگاه ---------- */
.xui-shop-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; gap: 14px !important; }
.xui-shop-card { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; padding: 12px 16px !important; background: #f8fafc !important; border-radius: 12px !important; border: 1px solid #e5e7eb !important; box-shadow: 0 2px 6px rgba(0,0,0,.04) !important; text-align: right !important; min-height: 70px !important; transition: all 0.2s ease !important; }
.xui-shop-card:hover { background: #f1f5f9 !important; box-shadow: 0 4px 12px rgba(0,0,0,.08) !important; transform: translateY(-1px) !important; }
.xui-shop-card > h3 { font-size: 14px !important; font-weight: 700 !important; color: #1f2937 !important; flex: 1 !important; margin: 0 !important; }
.xui-shop-card > .xui-shop-price { font-size: 13px !important; font-weight: 600 !important; color: #37517D !important; white-space: nowrap !important; margin: 0 10px !important; }
.xui-shop-card > form { margin: 0 !important; flex-shrink: 0 !important; display: flex !important; align-items: center !important; }
.xui-shop-card .xui-btn { background: #37517D !important; color: #fff !important; border: none !important; border-radius: 8px !important; padding: 7px 14px !important; font-size: 12px !important; font-weight: 600 !important; min-height: 32px !important; cursor: pointer !important; white-space: nowrap !important; transition: all 0.2s !important; }
.xui-shop-card .xui-btn:hover { background: #2c4063 !important; }

/* ---------- سفارشات ---------- */
.xui-orders-table { width: 100%; border-collapse: collapse; background: var(--xui-card); border-radius: var(--xui-radius); overflow: hidden; box-shadow: var(--xui-shadow); border: 1px solid var(--xui-border); }
.xui-orders-table th, .xui-orders-table td { padding: 10px 12px; text-align: right; font-size: 12px; border-bottom: 1px solid var(--xui-border); }
.xui-orders-table th { background: var(--xui-bg); font-weight: 600; color: var(--xui-text-muted); }
.xui-orders-table tr:last-child td { border-bottom: none; }

/* ---------- پروفایل ---------- */
.xui-profile-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; gap: 16px !important; width: 100% !important; box-sizing: border-box !important; }
.xui-profile-card { background: #fff !important; border-radius: 14px !important; padding: 18px !important; box-shadow: 0 2px 8px rgba(0,0,0,.05) !important; border: 1px solid #e5e7eb !important; width: 100% !important; box-sizing: border-box !important; overflow: hidden !important; }
.xui-profile-card h3 { font-size: 14px !important; font-weight: 700 !important; margin: 0 0 12px !important; padding-bottom: 10px !important; border-bottom: 1px solid #e5e7eb !important; color: #1f2937 !important; }
.xui-profile-card p { margin: 6px 0 !important; font-size: 13px !important; color: #374151 !important; word-break: break-word !important; }
.xui-profile-card .xui-link-row { display: flex !important; align-items: center !important; gap: 8px !important; background: #f9fafb !important; border: 1px solid #e5e7eb !important; border-radius: 8px !important; padding: 8px 10px !important; margin-bottom: 8px !important; flex-wrap: wrap !important; width: 100% !important; box-sizing: border-box !important; }
.xui-profile-card .xui-link-row code { flex: 1 !important; min-width: 0 !important; font-size: 11px !important; color: #374151 !important; word-break: break-all !important; direction: ltr !important; text-align: left !important; background: transparent !important; padding: 0 !important; }
.xui-profile-card .xui-copy-btn { background: #37517D !important; color: #fff !important; border: none !important; border-radius: 6px !important; padding: 5px 12px !important; font-size: 11px !important; cursor: pointer !important; flex-shrink: 0 !important; }

/* ---------- حالت خالی ---------- */
.xui-empty { text-align: center; padding: 50px 20px; background: var(--xui-card); border-radius: var(--xui-radius); border: 1px solid var(--xui-border); }
.xui-empty h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.xui-empty p { color: var(--xui-text-muted); font-size: 13px; margin: 0 0 16px; }
.xui-muted { color: var(--xui-text-muted); font-size: 12px; }

/* ---------- فرم ورود/ثبت‌نام (erm-*) ---------- */
.erm-wrap { --erm-primary: #37517D; --erm-primary-dark: #2c4063; --erm-text: #1f2937; --erm-muted: #6b7280; --erm-border: #e5e7eb; direction: rtl; font-family: 'Vazirmatn', Tahoma, Arial, sans-serif; color: var(--erm-text); width: 100%; box-sizing: border-box; }
.erm-wrap * { box-sizing: border-box; font-family: inherit; }
.erm-card { max-width: 520px; margin: 24px auto; padding: 30px; background: #fff; border: 1px solid var(--erm-border); border-radius: 18px; box-shadow: 0 12px 40px rgba(20,35,70,.08); }
.erm-brand { text-align: center; margin-bottom: 22px; }
.erm-brand-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 15px; background: #eaf1ff; color: var(--erm-primary); font-size: 25px; font-weight: 800; }
.erm-brand h2 { font-size: 23px; font-weight: 800; margin: 12px 0 5px; color: var(--erm-text); }
.erm-brand p { font-size: 13px; color: var(--erm-muted); margin: 0; }
.erm-tabs { display: flex; gap: 8px; padding: 5px; background: #f3f6fb; border-radius: 12px; margin: 0 0 22px; }
.erm-tab { flex: 1; border: 0; border-radius: 9px; padding: 11px; background: transparent; color: #667085; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.erm-tab.is-active { background: #fff; color: var(--erm-primary); box-shadow: 0 2px 8px rgba(20,35,70,.08); }
.erm-form[hidden] { display: none !important; }
.erm-field { margin: 0 0 15px; }
.erm-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--erm-text); }
.erm-field input { width: 100%; height: 47px; border: 1px solid #dce3ed; border-radius: 10px; padding: 0 13px; background: #fff; color: var(--erm-text); font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; font-family: inherit; }
.erm-field input:focus { border-color: var(--erm-primary); box-shadow: 0 0 0 3px rgba(55,81,125,.1); }
.erm-field small { display: block; margin-top: 6px; color: var(--erm-muted); font-size: 11px; }
.erm-check { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 5px 0 16px; }
.erm-check a, .erm-lost { color: var(--erm-primary); text-decoration: none; }
.erm-submit { width: 100%; border: 0; border-radius: 10px; background: var(--erm-primary); color: #fff; padding: 13px 18px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; font-family: inherit; }
.erm-submit:hover { background: var(--erm-primary-dark); }
.erm-submit:disabled { opacity: .65; cursor: wait; }
.erm-response { font-size: 12px; margin-top: 12px; line-height: 1.9; }
.erm-response.is-error { color: #dc2626; }
.erm-response.is-success { color: #15803d; }
.erm-lost { display: block; text-align: center; font-size: 12px; margin-top: 15px; }
.erm-notice, .erm-empty { padding: 14px; background: #f6f8fc; border-radius: 10px; color: var(--erm-muted); font-size: 13px; text-align: center; }
.erm-code-box { position: relative; padding: 17px; margin: 14px 0; background: #f5f8ff; border: 1px dashed #b8cdfb; border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.erm-code-box span { font-size: 12px; color: var(--erm-muted); }
.erm-code-box strong { font-size: 23px; letter-spacing: 1px; color: var(--erm-primary); direction: ltr; text-align: right; }
.erm-copy { align-self: flex-start; border: 0; background: #e4edff; color: #1d4ed8; padding: 7px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.erm-link-box input { width: 100%; height: 38px; border: 1px solid var(--erm-border); border-radius: 8px; padding: 0 9px; direction: ltr; text-align: left; font-size: 11px; background: #fff; }
.erm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.erm-stats > div { padding: 14px; background: #f8fafc; border-radius: 11px; text-align: center; }
.erm-stats strong, .erm-stats span { display: block; }
.erm-stats strong { font-size: 20px; color: var(--erm-text); }
.erm-stats span { font-size: 11px; color: var(--erm-muted); margin-top: 4px; }
.erm-section-title { font-size: 15px; margin: 22px 0 12px; font-weight: 800; }
.erm-table-wrap { overflow-x: auto; }
.erm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.erm-table th, .erm-table td { padding: 10px 8px; border-bottom: 1px solid var(--erm-border); text-align: right; white-space: nowrap; }
.erm-table th { background: #f8fafc; font-weight: 700; }
.erm-logout { display: block; text-align: center; color: #dc2626; text-decoration: none; font-size: 12px; margin-top: 22px; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 768px) {
    .xui-stats { grid-template-columns: repeat(2, 1fr) !important; }
    .xui-header { flex-direction: column; align-items: flex-start; }
    .xui-header h2 { font-size: 15px; }
    .xui-nav-tab { flex: 1 1 45%; }
}
@media (max-width: 600px) {
    .xui-link-row { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
    .xui-link-code-box, .xui-link-qr-box { width: 100% !important; flex: 1 1 auto !important; min-height: auto !important; padding: 14px !important; }
    .xui-link-qr-box img { width: 100% !important; max-width: 200px !important; height: auto !important; aspect-ratio: 1 / 1 !important; margin: 0 auto !important; }
    .xui-link-code-box code { font-size: 11px !important; text-align: center !important; }
    .xui-link-code-box .xui-copy-btn { max-width: 100% !important; width: 100% !important; }
    .xui-profile-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
    .xui-profile-card { padding: 14px !important; }
    .xui-profile-card .xui-link-row { flex-direction: column !important; align-items: stretch !important; }
    .xui-profile-card .xui-copy-btn { width: 100% !important; }
    .xui-shop-card { flex-direction: column !important; align-items: stretch !important; text-align: center !important; }
    .xui-shop-card > h3, .xui-shop-card > .xui-shop-price { text-align: center !important; }
    .xui-shop-card > form { width: 100% !important; justify-content: center !important; }
    .xui-shop-card .xui-btn { width: 100% !important; }
    .xui-stats { grid-template-columns: 1fr !important; }
    .xui-stat-card { padding: 8px 12px !important; min-height: 50px !important; }
    .erm-card { padding: 21px 16px; margin: 12px auto; border-radius: 14px; }
    .erm-brand h2 { font-size: 20px; }
    .erm-table { font-size: 11px; }
}
@media (max-width: 480px) {
    .xui-link-qr-box img { max-width: 170px !important; }
    .xui-link-code-box code { font-size: 10px !important; padding: 6px 8px !important; }
    .xui-link-code-box .xui-copy-btn { padding: 7px 14px !important; font-size: 11px !important; }
}
@media (max-width: 375px) {
    .xui-link-row { gap: 6px !important; }
    .xui-link-code-box, .xui-link-qr-box { padding: 8px !important; border-radius: 10px !important; }
    .xui-link-qr-box img { max-width: 150px !important; }
    .xui-link-code-box code { font-size: 9px !important; padding: 5px 6px !important; }
    .xui-link-code-box .xui-copy-btn { padding: 6px 12px !important; font-size: 10px !important; }
}
@media (max-width: 320px) {
    .xui-link-code-box, .xui-link-qr-box { padding: 6px !important; }
    .xui-link-qr-box img { max-width: 130px !important; }
    .xui-link-code-box code { font-size: 8px !important; padding: 4px 5px !important; }
    .xui-link-code-box .xui-copy-btn { padding: 5px 10px !important; font-size: 9px !important; }
}

/* ---------- جلوگیری از زوم خودکار در آیفون و دستگاه‌های لمسی ---------- */
@media (hover: none) and (pointer: coarse) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="url"],
    textarea,
    select,
    .erm-field input,
    .erm-field select,
    .erm-field textarea,
    .xui-field input,
    .xui-auth-form input {
        font-size: 16px !important;
    }
}
@media (max-width: 768px) {
    .erm-field input,
    .erm-field select,
    .erm-field textarea,
    .xui-field input,
    .xui-auth-form input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
    
    .erm-card {
        max-width: 100% !important;
        margin: 12px auto !important;
        padding: 20px 16px !important;
    }
    
    .erm-tab.is-active {
        background: #37517D !important;
        color: #fff !important;
    }
    
    .xui-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
/* ============================================
   صفحه تکمیل خرید (پرداخت) - هماهنگ با سبد خرید
   ============================================ */

/* کانتینر اصلی صفحه پرداخت */
.woocommerce-checkout .woocommerce {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 10px;
    direction: rtl;
    color: #1f2937;
    font-size: 14px;
}

/* بخش اطلاعات صورتحساب */
.woocommerce-checkout #customer_details {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.04) !important;
    margin-bottom: 20px !important;
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    float: none !important;
}

.woocommerce-checkout h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 0 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* فرم‌ها */
.woocommerce-checkout .form-row {
    margin-bottom: 14px !important;
}

.woocommerce-checkout .form-row label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 6px !important;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select {
    width: 100% !important;
    height: 46px !important;
    border: 1px solid #dce3ed !important;
    border-radius: 10px !important;
    padding: 0 12px !important;
    background: #fff !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    box-sizing: border-box !important;
    outline: none !important;
}

.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .form-row select:focus {
    border-color: #37517D !important;
    box-shadow: 0 0 0 3px rgba(55,81,125,.1) !important;
}

/* جدول سفارش */
.woocommerce-checkout #order_review {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.04) !important;
    margin-bottom: 20px !important;
}

.woocommerce-checkout #order_review_heading {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 0 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.woocommerce-checkout #order_review table.shop_table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #fff !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    margin-bottom: 15px !important;
}

.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td {
    padding: 10px 12px !important;
    text-align: right !important;
    font-size: 13px !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #1f2937 !important;
}

.woocommerce-checkout #order_review table.shop_table th {
    background: #f3f4f6 !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
}

.woocommerce-checkout #order_review table.shop_table tr.order-total td {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #37517D !important;
}

/* بخش پرداخت */
.woocommerce-checkout #payment {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.04) !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #e5e7eb !important;
    padding: 0 0 15px !important;
    margin: 0 0 15px !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
    font-size: 13px !important;
    margin-bottom: 8px !important;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #1f2937 !important;
}

/* دکمه پرداخت */
.woocommerce-checkout #payment button#place_order {
    width: 100% !important;
    background: #37517D !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.woocommerce-checkout #payment button#place_order:hover {
    background: #2c4063 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(55,81,125,.25) !important;
}

/* پیام‌های ووکامرس */
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error {
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 12px !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1e40af !important;
    margin-bottom: 15px !important;
}

/* ========== ریسپانسیو موبایل ========== */
@media (max-width: 600px) {
    .woocommerce-checkout .woocommerce {
        padding: 0 8px;
        margin: 10px auto;
    }
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review,
    .woocommerce-checkout #payment {
        padding: 14px !important;
        border-radius: 10px !important;
    }
    .woocommerce-checkout #order_review table.shop_table th,
    .woocommerce-checkout #order_review table.shop_table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    .woocommerce-checkout #order_review table.shop_table tr.order-total td {
        font-size: 13px !important;
    }
    .woocommerce-checkout #payment button#place_order {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
}

/* جلوگیری از زوم آیفون */
@media (hover: none) and (pointer: coarse) {
    .woocommerce-checkout .form-row input.input-text,
    .woocommerce-checkout .form-row textarea,
    .woocommerce-checkout .form-row select {
        font-size: 16px !important;
    }
}
/* ============================================
   آیکون سبد خرید شناور - صفحه پرداخت
   ============================================ */

.xui-floating-cart {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    cursor: pointer;
    transition: all 0.2s;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.xui-floating-cart:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
    transform: translateY(-2px);
    border-color: #37517D;
}

.xui-floating-cart-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #37517D;
    color: #fff;
    border-radius: 10px;
    flex-shrink: 0;
}

.xui-floating-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.xui-floating-cart-text {
    display: flex;
    flex-direction: column;
}

.xui-floating-cart-title {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.xui-floating-cart-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    direction: rtl;
    font-size: 12px;
}

.xui-floating-cart:hover .xui-floating-cart-tooltip {
    opacity: 1;
    visibility: visible;
}

.xui-floating-cart-item {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-size: 11px;
    color: #e5e7eb;
}

.xui-floating-cart-item:last-child {
    border-bottom: none;
}

.xui-floating-cart-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.2);
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}

.xui-floating-cart-link {
    display: block;
    margin-top: 8px;
    padding: 6px 10px;
    background: #37517D;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    transition: background 0.2s;
}

.xui-floating-cart-link:hover {
    background: #2c4063;
}

/* در موبایل */
@media (max-width: 600px) {
    .xui-floating-cart {
        top: 70px;
        left: 10px;
        padding: 8px 12px;
        gap: 8px;
    }
    .xui-floating-cart-icon {
        width: 34px;
        height: 34px;
    }
    .xui-floating-cart-title {
        font-size: 10px;
    }
    .xui-floating-cart-tooltip {
        min-width: 200px;
        left: auto;
        right: 0;
    }
}
/* ============================================
   نوار بالای همه صفحات (Global Header)
   ============================================ */
.xui-global-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.xui-global-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* منوی سمت راست */
.xui-global-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.xui-global-nav-item {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
}

.xui-global-nav-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.xui-global-nav-item.active {
    background: #37517D;
    color: #fff;
}

/* سمت چپ: نام کاربر + ترولی */
.xui-global-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.xui-global-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
}

.xui-global-user-name {
    font-weight: 500;
}

.xui-global-logout {
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
}

.xui-global-logout:hover {
    text-decoration: underline;
}

/* ترولی - بدون حاشیه، خاکستری، با متن کوچک زیرش */
.xui-global-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #6b7280;
    transition: color 0.2s;
    background: transparent;
    border: none;
    padding: 0;
}

.xui-global-cart:hover {
    color: #37517D;
}

.xui-global-cart svg {
    display: block;
    fill: #9ca3af;
    transition: fill 0.2s;
}

.xui-global-cart:hover svg {
    fill: #37517D;
}

.xui-global-cart-count {
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

.xui-global-cart:hover .xui-global-cart-count {
    color: #37517D;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .xui-global-header {
        padding: 10px 12px;
    }
    .xui-global-header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .xui-global-nav {
        justify-content: center;
    }
    .xui-global-nav-item {
        padding: 7px 12px;
        font-size: 12px;
    }
    .xui-global-left {
        justify-content: space-between;
        width: 100%;
    }
    .xui-global-user-name {
        font-size: 11px;
    }
}
/* ============================================
   هدر سراسری - نسخه شکیل
   ============================================ */
.xui-global-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px 18px;
    margin: 0 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.xui-global-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* منوی سمت راست */
.xui-global-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.xui-global-nav-item {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
}

.xui-global-nav-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.xui-global-nav-item.active {
    background: #37517D;
    color: #fff;
}

/* سمت چپ: نام کاربر + ترولی */
.xui-global-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.xui-global-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
}

.xui-global-user-name {
    font-weight: 500;
    color: #1f2937;
}

.xui-global-logout {
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
}

.xui-global-logout:hover {
    text-decoration: underline;
}

/* ترولی - بدون حاشیه، خاکستری */
.xui-global-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #6b7280;
    transition: color 0.2s;
    background: transparent;
    border: none;
    padding: 0;
}

.xui-global-cart:hover {
    color: #37517D;
}

.xui-global-cart svg {
    display: block;
    fill: #9ca3af;
    transition: fill 0.2s;
}

.xui-global-cart:hover svg {
    fill: #37517D;
}

.xui-global-cart-count {
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

.xui-global-cart:hover .xui-global-cart-count {
    color: #37517D;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .xui-global-header {
        padding: 10px 12px;
        border-radius: 12px;
    }
    .xui-global-header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .xui-global-nav {
        justify-content: center;
    }
    .xui-global-nav-item {
        padding: 7px 12px;
        font-size: 12px;
    }
    .xui-global-left {
        justify-content: space-between;
        width: 100%;
    }
    .xui-global-user-name {
        font-size: 11px;
    }
}
/* ============================================
   سبد خرید - لیست کارتی (نسخه قبل)
   ============================================ */
.xui-cart-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.xui-cart-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.04); transition: all 0.2s; flex-wrap: wrap; }
.xui-cart-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: #37517D; }
.xui-cart-item-info { flex: 1; min-width: 150px; }
.xui-cart-item-info h3 { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: #1f2937; }
.xui-cart-item-price { font-size: 12px; color: #6b7280; }
.xui-cart-item-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.xui-cart-item-qty { font-size: 12px; color: #6b7280; display: flex; align-items: center; gap: 4px; }
.xui-cart-item-qty strong { color: #1f2937; font-size: 14px; }
.xui-cart-item-subtotal { font-size: 14px; font-weight: 700; color: #37517D; }
.xui-cart-remove { display: inline-flex; align-items: center; background: #fee2e2; color: #dc2626; border: none; border-radius: 8px; padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; font-family: inherit; }
.xui-cart-remove:hover { background: #fecaca; color: #b91c1c; }
.xui-cart-totals { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.xui-cart-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
.xui-cart-total-row span { color: #6b7280; }
.xui-cart-total-row strong { color: #37517D; font-size: 18px; font-weight: 800; }
.xui-cart-checkout-btn { display: block; width: 100%; text-align: center; background: #37517D; color: #fff; padding: 14px 20px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 14px; transition: all 0.2s; }
.xui-cart-checkout-btn:hover { background: #2c4063; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(55,81,125,.25); }

@media (max-width: 600px) {
    .xui-cart-item { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
    .xui-cart-item-actions { flex-wrap: wrap; justify-content: space-between; gap: 10px; }
    .xui-cart-remove { width: 100%; justify-content: center; }
    .xui-cart-totals { padding: 16px; }
    .xui-cart-total-row { font-size: 14px; }
    .xui-cart-total-row strong { font-size: 16px; }
}
/* ============================================
   Tooltip آجاکسی ترولی هدر
   ============================================ */
.xui-global-cart-wrapper {
    position: relative;
    display: inline-block;
}

.xui-global-cart-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s;
    z-index: 9999;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.xui-global-cart-wrapper.open .xui-global-cart-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.xui-global-cart-tooltip-loading {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding: 10px;
}

.xui-global-cart-empty {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding: 10px;
}

.xui-global-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
}

.xui-global-cart-item:last-of-type {
    border-bottom: none;
}

.xui-global-cart-item-name {
    flex: 1;
    color: #1f2937;
    font-weight: 500;
    margin-left: 8px;
}

.xui-global-cart-item-qty {
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
}

.xui-global-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
}

.xui-global-cart-total span {
    color: #6b7280;
}

.xui-global-cart-total strong {
    color: #37517D;
    font-weight: 800;
}

.xui-global-cart-view-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #37517D;
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    margin-top: 10px;
    transition: background 0.2s;
}

.xui-global-cart-view-btn:hover {
    background: #2c4063;
}

/* در موبایل */
@media (max-width: 600px) {
    .xui-global-cart-tooltip {
        min-width: 200px;
        left: auto;
        right: 0;
    }
}
/* ============================================
   ترولی هدر - بدون حاشیه، خاکستری، با Tooltip
   ============================================ */
.xui-global-cart-wrapper {
    position: relative;
    display: inline-block;
}

.xui-global-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #6b7280;
    transition: color 0.2s;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.xui-global-cart svg {
    display: block;
    fill: #9ca3af;
    transition: fill 0.2s;
}

.xui-global-cart:hover svg {
    fill: #37517D;
}

.xui-global-cart-count {
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

.xui-global-cart:hover .xui-global-cart-count {
    color: #37517D;
}

/* Tooltip */
.xui-global-cart-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 9999;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.xui-global-cart-tooltip-loading {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding: 10px;
}

.xui-global-cart-empty {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding: 10px;
}

.xui-global-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
}

.xui-global-cart-item:last-of-type {
    border-bottom: none;
}

.xui-global-cart-item-name {
    flex: 1;
    color: #1f2937;
    font-weight: 500;
    margin-left: 8px;
}

.xui-global-cart-item-qty {
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
}

.xui-global-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
}

.xui-global-cart-total span {
    color: #6b7280;
}

.xui-global-cart-total strong {
    color: #37517D;
    font-weight: 800;
}

.xui-global-cart-view-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #37517D;
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    margin-top: 10px;
    transition: background 0.2s;
}

.xui-global-cart-view-btn:hover {
    background: #2c4063;
}

@media (max-width: 600px) {
    .xui-global-cart-tooltip {
        min-width: 200px;
        left: auto;
        right: 0;
    }
}
/* ============================================
   آیکون شناور سبد خرید در هدر (بدون حاشیه، خاکستری)
   ============================================ */
.xui-floating-cart {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.xui-floating-cart:hover {
    box-shadow: none;
    transform: none;
}

.xui-floating-cart-icon {
    position: relative;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #9ca3af;
    border-radius: 0;
    flex-shrink: 0;
}

.xui-floating-cart-icon svg {
    fill: #9ca3af;
    transition: fill 0.2s;
}

.xui-floating-cart:hover .xui-floating-cart-icon svg {
    fill: #37517D;
}

.xui-floating-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.xui-floating-cart-text {
    display: flex;
    flex-direction: column;
}

.xui-floating-cart-title {
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
}

.xui-floating-cart-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    direction: rtl;
    font-size: 12px;
    z-index: 9999;
}

.xui-floating-cart:hover .xui-floating-cart-tooltip {
    opacity: 1;
    visibility: visible;
}

.xui-floating-cart-item {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-size: 11px;
    color: #e5e7eb;
}

.xui-floating-cart-item:last-child {
    border-bottom: none;
}

.xui-floating-cart-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.2);
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}

.xui-floating-cart-link {
    display: block;
    margin-top: 8px;
    padding: 6px 10px;
    background: #37517D;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    transition: background 0.2s;
}

.xui-floating-cart-link:hover {
    background: #2c4063;
}
/* ============================================
   اصلاح کامل استایل موبایل - هدر، سبد خرید، پرداخت
   ============================================ */
@media (max-width: 768px) {

    /* ---------- هدر سراسری ---------- */
    .xui-global-header {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        margin: 0 8px 12px !important;
    }
    .xui-global-header-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .xui-global-nav {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .xui-global-nav-item {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    .xui-global-left {
        justify-content: space-between !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .xui-global-user-name {
        font-size: 10px !important;
    }
    .xui-global-logout {
        font-size: 10px !important;
    }
    .xui-floating-cart-title {
        font-size: 9px !important;
    }
    .xui-floating-cart-tooltip {
        min-width: 200px !important;
        left: auto !important;
        right: 0 !important;
    }

    /* ---------- سبد خرید ---------- */
    .xui-cart-list {
        gap: 8px !important;
        margin-bottom: 14px !important;
    }
    .xui-cart-item {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 12px !important;
        border-radius: 10px !important;
    }
    .xui-cart-item-info h3 {
        font-size: 13px !important;
    }
    .xui-cart-item-price {
        font-size: 11px !important;
    }
    .xui-cart-item-actions {
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }
    .xui-cart-item-qty {
        font-size: 11px !important;
    }
    .xui-cart-item-subtotal {
        font-size: 13px !important;
    }
    .xui-cart-remove {
        width: 100% !important;
        justify-content: center !important;
        padding: 6px 12px !important;
        font-size: 11px !important;
    }
    .xui-cart-totals {
        padding: 14px !important;
        border-radius: 10px !important;
    }
    .xui-cart-total-row {
        font-size: 13px !important;
    }
    .xui-cart-total-row strong {
        font-size: 15px !important;
    }
    .xui-cart-checkout-btn {
        padding: 12px 16px !important;
        font-size: 13px !important;
    }

    /* ---------- صفحه پرداخت (تکمیل خرید) ---------- */
    .woocommerce-checkout .woocommerce {
        padding: 0 8px !important;
        margin: 10px auto !important;
    }
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review,
    .woocommerce-checkout #payment {
        padding: 14px !important;
        border-radius: 10px !important;
        margin-bottom: 14px !important;
    }
    .woocommerce-checkout h3,
    .woocommerce-checkout #order_review_heading {
        font-size: 14px !important;
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
    }
    .woocommerce-checkout .form-row {
        margin-bottom: 12px !important;
    }
    .woocommerce-checkout .form-row label {
        font-size: 12px !important;
        margin-bottom: 5px !important;
    }
    .woocommerce-checkout .form-row input.input-text,
    .woocommerce-checkout .form-row textarea,
    .woocommerce-checkout .form-row select {
        height: 44px !important;
        font-size: 16px !important;
        padding: 0 10px !important;
        border-radius: 8px !important;
    }
    .woocommerce-checkout #order_review table.shop_table th,
    .woocommerce-checkout #order_review table.shop_table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    .woocommerce-checkout #order_review table.shop_table tr.order-total td {
        font-size: 13px !important;
    }
    .woocommerce-checkout #payment ul.payment_methods li,
    .woocommerce-checkout #payment ul.payment_methods li label {
        font-size: 12px !important;
    }
    .woocommerce-checkout #payment button#place_order {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }

    /* ---------- جدول سفارشات ---------- */
    .xui-orders-table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    .xui-orders-table th,
    .xui-orders-table td {
        padding: 8px 6px !important;
        font-size: 11px !important;
    }

    /* ---------- پروفایل ---------- */
    .xui-profile-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .xui-profile-card {
        padding: 14px !important;
    }
    .xui-profile-card h3 {
        font-size: 13px !important;
    }
    .xui-profile-card p {
        font-size: 12px !important;
    }
    .xui-profile-card .xui-link-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
    }
    .xui-profile-card .xui-copy-btn {
        width: 100% !important;
    }

    /* ---------- کارت‌های آماری ---------- */
    .xui-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .xui-stat-card {
        padding: 8px 10px !important;
        min-height: 50px !important;
    }
    .xui-stat-label {
        font-size: 11px !important;
    }
    .xui-stat-value {
        font-size: 13px !important;
    }

    /* ---------- لینک‌ها و QR ---------- */
    .xui-link-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .xui-link-code-box,
    .xui-link-qr-box {
        width: 100% !important;
        min-height: auto !important;
        padding: 12px !important;
    }
    .xui-link-qr-box img {
        max-width: 180px !important;
        margin: 0 auto !important;
    }
    .xui-link-code-box code {
        font-size: 10px !important;
        text-align: center !important;
    }
    .xui-link-code-box .xui-copy-btn {
        width: 100% !important;
        max-width: 100% !important;
    }
}
/* ============================================
   استایل موبایل - سبد خرید و پرداخت (شورت‌کد اختصاصی)
   ============================================ */
@media (max-width: 768px) {

    /* هدر سراسری */
    .xui-global-header {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        margin: 0 8px 12px !important;
    }
    .xui-global-header-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .xui-global-nav {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .xui-global-nav-item {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    .xui-global-left {
        justify-content: space-between !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .xui-global-user-name {
        font-size: 10px !important;
    }
    .xui-global-logout {
        font-size: 10px !important;
    }

    /* سبد خرید (شورت‌کد xui_cart) */
    .xui-cart-list {
        gap: 8px !important;
        margin-bottom: 14px !important;
    }
    .xui-cart-item {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 12px !important;
        border-radius: 10px !important;
    }
    .xui-cart-item-info h3 {
        font-size: 13px !important;
    }
    .xui-cart-item-price {
        font-size: 11px !important;
    }
    .xui-cart-item-actions {
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }
    .xui-cart-item-qty {
        font-size: 11px !important;
    }
    .xui-cart-item-subtotal {
        font-size: 13px !important;
    }
    .xui-cart-remove {
        width: 100% !important;
        justify-content: center !important;
        padding: 6px 12px !important;
        font-size: 11px !important;
    }
    .xui-cart-totals {
        padding: 14px !important;
        border-radius: 10px !important;
    }
    .xui-cart-total-row {
        font-size: 13px !important;
    }
    .xui-cart-total-row strong {
        font-size: 15px !important;
    }
    .xui-cart-checkout-btn {
        padding: 12px 16px !important;
        font-size: 13px !important;
    }

    /* ---------- صفحه پرداخت (شورت‌کد xui_checkout) ---------- */
    .xui-woo-content .woocommerce {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 13px !important;
    }
    .xui-woo-content #customer_details,
    .xui-woo-content #order_review,
    .xui-woo-content #payment,
    .xui-woo-content .woocommerce-billing-fields {
        background: #f8fafc !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        padding: 14px !important;
        box-shadow: 0 2px 6px rgba(0,0,0,.04) !important;
        margin-bottom: 14px !important;
    }
    .xui-woo-content h3,
    .xui-woo-content #order_review_heading {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        margin: 0 0 12px !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid #e5e7eb !important;
    }
    .xui-woo-content .form-row {
        margin-bottom: 12px !important;
    }
    .xui-woo-content .form-row label {
        font-size: 12px !important;
        font-weight: 600 !important;
        margin-bottom: 5px !important;
        display: block !important;
        color: #1f2937 !important;
    }
    .xui-woo-content .form-row input.input-text,
    .xui-woo-content .form-row textarea,
    .xui-woo-content .form-row select {
        width: 100% !important;
        height: 44px !important;
        font-size: 16px !important;
        padding: 0 10px !important;
        border: 1px solid #dce3ed !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }
    .xui-woo-content #order_review table.shop_table {
        width: 100% !important;
        border-collapse: collapse !important;
        background: #fff !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        border: 1px solid #e5e7eb !important;
        margin-bottom: 10px !important;
    }
    .xui-woo-content #order_review table.shop_table th,
    .xui-woo-content #order_review table.shop_table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
        text-align: right !important;
        border-bottom: 1px solid #e5e7eb !important;
        color: #1f2937 !important;
    }
    .xui-woo-content #order_review table.shop_table th {
        background: #f3f4f6 !important;
        color: #6b7280 !important;
        font-weight: 600 !important;
    }
    .xui-woo-content #order_review table.shop_table tr.order-total td {
        font-size: 13px !important;
        font-weight: 800 !important;
        color: #37517D !important;
    }
    .xui-woo-content #payment ul.payment_methods {
        border-bottom: 1px solid #e5e7eb !important;
        padding: 0 0 12px !important;
        margin: 0 0 12px !important;
    }
    .xui-woo-content #payment ul.payment_methods li,
    .xui-woo-content #payment ul.payment_methods li label {
        font-size: 12px !important;
    }
    .xui-woo-content #payment button#place_order {
        width: 100% !important;
        background: #37517D !important;
        color: #fff !important;
        border: none !important;
        border-radius: 10px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        font-family: inherit !important;
    }
    .xui-woo-content #payment button#place_order:hover {
        background: #2c4063 !important;
    }
}
/* ============================================
   منوی بالای صفحه در موبایل - بزرگ‌تر و مرتب‌تر
   ============================================ */
@media (max-width: 768px) {

    /* کانتینر هدر */
    .xui-global-header {
        padding: 14px 12px !important;
        border-radius: 14px !important;
        margin: 0 6px 14px !important;
    }
    .xui-global-header-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    /* منو - دکمه‌های بزرگ‌تر و مرتب */
    .xui-global-nav {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .xui-global-nav-item {
        padding: 12px 8px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        text-align: center !important;
        border-radius: 10px !important;
        background: #f3f4f6 !important;
        color: #374151 !important;
        border: 1px solid #e5e7eb !important;
        transition: all 0.2s !important;
    }
    .xui-global-nav-item.active {
        background: #37517D !important;
        color: #fff !important;
        border-color: #37517D !important;
        box-shadow: 0 2px 6px rgba(55, 81, 125, 0.25) !important;
    }

    /* بخش نام کاربر و ترولی */
    .xui-global-left {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 10px !important;
        padding-top: 10px !important;
        border-top: 1px solid #e5e7eb !important;
    }
    .xui-global-user {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .xui-global-user-name {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }
    .xui-global-logout {
        font-size: 11px !important;
        padding: 5px 10px !important;
        background: #fee2e2 !important;
        color: #dc2626 !important;
        border-radius: 6px !important;
        text-decoration: none !important;
    }

    /* ترولی */
    .xui-floating-cart-title {
        font-size: 10px !important;
    }
}
.xui-bottom-menu-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}
.xui-bottom-menu-list li a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.xui-bottom-menu-list li a:hover {
    color: #37517D;
}
.xui-bottom-menu-wrapper {
    margin-top: 24px;
    padding: 14px 18px;
    background: #f8fafc;      /* پس‌زمینه خاکستری روشن */
    border: 1px solid #e5e7eb; /* حاشیه */
    border-radius: 12px;       /* گوشه‌های گرد */
}
/* ============================================
   اصلاح فرم ورود / ثبت‌نام
   ============================================ */

/* فیلدهای فرم */
.erm-field input,
.erm-field select,
.erm-field textarea {
    width: 100% !important;
    height: 48px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 0 14px !important;
    background: #fff !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    outline: none !important;
}

.erm-field input:focus,
.erm-field select:focus,
.erm-field textarea:focus {
    border-color: #37517D !important;
    box-shadow: 0 0 0 3px rgba(55, 81, 125, 0.12) !important;
    background: #fff !important;
}

/* حذف قرمزی border در حالت خطا (اگر قالب اعمال کرده) */
.erm-field input.error,
.erm-field input:invalid,
.erm-field input.wpcf7-not-valid {
    border-color: #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* تب‌ها */
.erm-tabs {
    display: flex !important;
    gap: 8px !important;
    padding: 6px !important;
    background: #f3f6fb !important;
    border-radius: 14px !important;
    margin: 0 0 24px !important;
    border: none !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04) !important;
}

.erm-tab {
    flex: 1 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px !important;
    background: transparent !important;
    color: #6b7280 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.erm-tab:hover {
    color: #1f2937 !important;
    background: #e5e7eb !important;
}

/* تب فعال - آبی سرمه‌ای مثل دکمه تمدید */
.erm-tab.is-active {
    background: #37517D !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(55, 81, 125, 0.25) !important;
}

.erm-tab.is-active:hover {
    background: #2c4063 !important;
    color: #fff !important;
}

/* دکمه ارسال (ورود / ثبت‌نام) */
.erm-submit {
    width: 100% !important;
    border: none !important;
    border-radius: 12px !important;
    background: #37517D !important;
    color: #fff !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 14px rgba(55, 81, 125, 0.25) !important;
    margin-top: 6px !important;
}

.erm-submit:hover {
    background: #2c4063 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(55, 81, 125, 0.35) !important;
}

.erm-submit:disabled {
    opacity: 0.65 !important;
    cursor: wait !important;
    transform: none !important;
}

/* کارت اصلی فرم */
.erm-card {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(20, 35, 70, 0.08) !important;
    padding: 32px !important;
}

/* برچسب فیلدها */
.erm-field label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: #1f2937 !important;
}

/* پیام خطا */
.erm-response.is-error {
    color: #dc2626 !important;
    font-size: 12px !important;
    margin-top: 10px !important;
    padding: 8px 12px !important;
    background: #fef2f2 !important;
    border-radius: 8px !important;
    border-right: 3px solid #dc2626 !important;
}

/* پیام موفقیت */
.erm-response.is-success {
    color: #15803d !important;
    font-size: 12px !important;
    margin-top: 10px !important;
    padding: 8px 12px !important;
    background: #f0fdf4 !important;
    border-radius: 8px !important;
    border-right: 3px solid #15803d !important;
}

/* لینک‌های داخل فرم */
.erm-lost,
.erm-check a {
    color: #37517D !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

.erm-lost:hover,
.erm-check a:hover {
    text-decoration: underline !important;
}

/* چک‌باکس قوانین */
.erm-check {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 12px !important;
    margin: 4px 0 18px !important;
}

/* ریسپانسیو */
@media (max-width: 600px) {
    .erm-card {
        padding: 22px 16px !important;
        border-radius: 16px !important;
    }
    .erm-field input,
    .erm-field select {
        height: 46px !important;
        font-size: 16px !important; /* جلوگیری از زوم آیفون */
    }
    .erm-tab {
        padding: 10px !important;
        font-size: 13px !important;
    }
    .erm-submit {
        padding: 13px 16px !important;
        font-size: 14px !important;
    }
}
/* ============================================
   وسط‌چین کردن کامل فرم لاگین
   ============================================ */

/* کانتینر اصلی صفحه لاگین */
.xui-dashboard .erm-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100vh - 120px) !important;
    width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* کارت فرم */
.xui-dashboard .erm-wrap .erm-card {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 420px !important;
}

/* ریسپانسیو موبایل */
@media (max-width: 600px) {
    .xui-dashboard .erm-wrap {
        min-height: calc(100vh - 80px) !important;
        padding: 12px !important;
    }
    .xui-dashboard .erm-wrap .erm-card {
        max-width: 100% !important;
    }
}