:root {
    --bg-color: #e0e5ec;
    --primary: #ff9f1a;
    --primary-dark: #e68e00;
    --text-main: #4a4a4a;
    --text-light: #8d97a5;
    --danger: #ff5e57;
    
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    
    --radius-xl: 30px;
    --radius-md: 20px;
    --radius-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; outline: none; -webkit-tap-highlight-color: transparent; user-select: none; }

body { 
    background: #cbd2d9; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    color: var(--text-main);
}

/* قاب موبایل */
.mobile-frame {
    width: 100%;
    /* max-width: 414px; */
    height: 100vh;
    max-height: 850px;
    /* background: var(--bg-color); */
    /* border-radius: 40px; */
    position: relative;
    overflow: hidden;
    /* box-shadow: 20px 20px 60px #aab2b9, -20px -20px 60px #ffffff; */
}
@media (max-width: 450px) {
    .mobile-frame { border-radius: 0; height: 100vh; max-height: none; }
}

.neu-flat {
    background: #ffffff4d;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
}
.neu-pressed {
    background: var(--bg-color);
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    border: 1px solid rgba(255,255,255,0.05);
}

.neu-icon-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
}
.neu-icon-btn:active { transform: scale(0.95); }
.neu-icon-btn.active { color: var(--primary); }

/* --- ساختار صفحات --- */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    padding: 24px;
    padding-bottom: 110px; /* فضای نوبار */
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: none;
    z-index: 1;
}
.screen::-webkit-scrollbar { display: none; }

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 10;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 10px;
}
.header h2 { font-size: 22px; font-weight: 800; color: var(--text-main); }

/* --- صفحه اصلی --- */
.search-box { position: relative; margin-bottom: 24px; }
.search-input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--bg-color);
    font-size: 15px;
    color: var(--text-main);
}
.search-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--text-light); }

.watermark-banner {
  position: fixed;
  bottom: 14%;
  left: 50%;
  transform: translate(-50%, -50%); /* وسط صفحه */
  background-color: rgba(255, 255, 255, 0.5); /* نیمه‌شفاف */
  color: #313131;
  padding: 6px 12px; /* کوچیک‌تر */
  font-size: 12px; /* کوچیک‌تر */
  font-family: 'Vazirmatn', sans-serif;
  border-radius: 6px;
  z-index: 10000;
  text-align: center;
  max-width: 80%; /* جلوگیری از بزرگ شدن بیش از حد در موبایل */
  white-space: nowrap; /* جلوگیری از شکستن خط */
}

.watermark-banner a {
  color: #bb9600;
  text-decoration: none;
}
.categories {
    display: flex; gap: 12px; overflow-x: auto; padding: 25px 20px; margin-bottom: 20px;
    scrollbar-width: none;
}
.categories::-webkit-scrollbar { display: none; }

.cat-chip {
    padding: 12px 24px;
    border-radius: var(--radius-xl);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: 0.3s;
}
.cat-chip.active {
    background: var(--primary);
    color: white;
    box-shadow: 5px 5px 12px rgba(211, 128, 8, 0.4), -5px -5px 12px rgba(255,255,255,0.6);
    border: none;
}

.product-card {
    display: flex; padding: 16px; border-radius: var(--radius-md); gap: 16px; margin-bottom: 20px;
    cursor: pointer; transition: transform 0.2s;
}
.product-card:active { transform: scale(0.98); }

.p-img-box {
    width: 90px; height: 90px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; color: white; flex-shrink: 0; position: relative;
}

/* --- صفحه جزئیات --- */
.detail-hero {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 25px;
}
.detail-img-container {
    width: 200px; height: 200px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 8px solid var(--bg-color);
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light); 
    margin-bottom: 20px;
}
.detail-img-inner {
    width: 160px; height: 160px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 65px; color: white;
    box-shadow: inset 4px 4px 10px rgba(0,0,0,0.1);
}

.info-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px;
}
.info-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 12px; border-radius: 16px; gap: 6px;
}
.info-label { font-size: 11px; color: var(--text-light); }
.info-val { font-size: 13px; font-weight: 700; color: var(--text-main); }
.info-icon { font-size: 18px; margin-bottom: 4px; color: var(--primary); }

.variant-box {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding: 35px;
    flex-wrap: wrap;
}
.variant-chip {
    padding: 10px 18px; border-radius: 12px; font-size: 13px; font-weight: bold;
    color: var(--text-light); cursor: pointer; flex-shrink: 0; border: 2px solid transparent;
    transition: all 0.3s;
}
.variant-chip.active {
    border-color: var(--primary); color: var(--primary);
    background: rgba(255, 159, 26, 0.1);
}

#trackContainer {
    padding: 20px;
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* لودینگ زیبا */
.track-loading {
    text-align: center;
    color: var(--text-light);
}
.track-loading .spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--bg-color);
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* کارت اصلی سفارش */
.order-track-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 28px;
    padding: 32px 24px;
    box-shadow: 
        12px 12px 24px var(--shadow-dark),
        -12px -12px 24px var(--shadow-light),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    margin: 20px 0;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.order-ref-big {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--primary);
    background: var(--bg-color);
    padding: 14px 20px;
    border-radius: 18px;
    display: inline-block;
    margin-bottom: 24px;
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
}

/* وضعیت اصلی با آیکون بزرگ */
.order-status-main {
    margin: 30px 0;
}
.order-status-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: white;
    box-shadow: 0 15px 35px rgba(255, 159, 26, 0.5);
    animation: pulseGlow 2s infinite;
}
.order-status-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}
.order-status-subtext {
    color: var(--text-light);
    font-size: 15px;
}

/* اطلاعات جزئی */
.order-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 30px 0;
}
.info-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 18px 12px;
    text-align: center;
    box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
}
.info-item i {
    font-size: 28px;
    color: var(--bg-color);
    margin-bottom: 10px;
    display: block;
}
.info-item small {
    display: block;
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 6px;
}
.info-item .info-value {
    font-weight: 700;
    font-size: 17px;
    color: var(--text-main);
}

.total-price-highlight {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 12px;
    border-radius: 24px;
    font-size: 23px;
    font-weight: 900;
    box-shadow: 0 15px 40px rgba(255, 159, 26, 0.5);
}

/* خط زمان وضعیت‌ها (آینده) */
.status-timeline {
    margin: 40px 0;
    padding: 0 20px;
}
.timeline-item {
    display: flex;
    align-items: center;
    margin: 20px 0;
    opacity: 0.4;
    transition: all 0.4s;
}
.timeline-item.active {
    opacity: 1;
}
.timeline-item.done {
    opacity: 1;
    color: #4ade80;
}
.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--text-light);
    border-radius: 50%;
    margin-right: 16px;
    position: relative;
}
.timeline-dot::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 4px;
    height: 50px;
    background: var(--bg-color);
    transform: translateX(-50%);
}
.timeline-item:last-child .timeline-dot::after { display: none; }
.timeline-item.active .timeline-dot,
.timeline-item.done .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(255, 159, 26, 0.3);
}
.timeline-item.done .timeline-dot {
    background: #4ade80;
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.3);
}
.timeline-item.done .timeline-dot::before {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 15px 35px rgba(255, 159, 26, 0.5); }
    50% { box-shadow: 0 20px 60px rgba(255, 159, 26, 0.7); }
}

/* پیام نهایی */
.track-footer-note {
    margin-top: 40px;
    color: var(--text-light);
    font-size: 14px;
    text-align: center;
    padding: 0 20px;
    line-height: 1.6;
}

.action-btn {
    background: linear-gradient(145deg, #ffb347, #ff9f1a);
    color: white; width: 100%; padding: 20px; border-radius: var(--radius-xl); border: none;
    font-size: 18px; font-weight: 800; cursor: pointer;
    box-shadow: 8px 8px 20px rgba(255, 159, 26, 0.3), -8px -8px 20px rgba(255,255,255, 0.8);
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.action-btn:active { transform: scale(0.98); box-shadow: inset 4px 4px 10px #e08e16; }
/* --- صفحه اطلاعات فروشگاه (بهبود یافته) --- */
.store-card {
    padding: 32px 24px;
    text-align: center;
    border-radius: var(--radius-md);
    margin-bottom: 28px;
}

.store-card h2 {
    font-size: 26px;
    font-weight: 900;
    margin: 16px 0 12px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.store-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 15px;
}

/* نقشه کاملاً جدید و زیبا */
#mapContainer {
    height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 24px 0;
    box-shadow: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light);
    position: relative;
    background: var(--bg-color);
}

#mapContainer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, rgba(255,159,26,0.05), rgba(255,159,26,0.15));
    z-index: 1;
    pointer-events: none;
    border-radius: var(--radius-md);
}

/* شبکه‌های اجتماعی لوکس */
.social-links-container {
    margin-top: 32px;
    text-align: center;
}

.social-links-container h3 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
}

.social-links-grid {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 10px 0;
}
/* کارت آدرس - اصلی */
.address-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-Radus: var(--radius-md);
    margin: 20px 0;
    background: var(--bg-color);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.address-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,159,26,0.05), transparent);
    pointer-events: none;
    border-radius: var(--radius-md);
}

.address-card:active {
    transform: translateY(2px);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

/* آیکون آدرس */
.address-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffb347, #ff9f1a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 6px 6px 12px rgba(255, 159, 26, 0.4),
                -4px -4px 10px rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

/* محتوای متنی */
.address-content {
    flex: 1;
    margin: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.address-text {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.5;
}

/* دکمه اکشن (نقشه) */
.address-action {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    background: var(--bg-color);
    box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.address-action:hover {
    transform: translateY(-4px) scale(1.1);
    color: white;
    background: linear-gradient(145deg, #ffb347, #ff9f1a);
    box-shadow: 0 10px 20px rgba(255, 159, 26, 0.4);
}

.address-action:active {
    transform: scale(0.94);
}
.social-link {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white !important;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.social-link:hover {
    transform: translateY(-6px) scale(1.08);
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:active {
    transform: translateY(-2px) scale(1.02);
}

/* رنگ‌های خاص هر پلتفرم */
.social-link.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-link.telegram { background: #0088cc; }
.social-link.twitter { background: #1da1f2; }
.social-link.aparat { background: #ed1c24; }
.social-link.rubika { background: linear-gradient(135deg, #6e3bff, #9d5dff); }
.social-link.eitaa { background: linear-gradient(135deg, #00a896, #00d4b8); }
.social-link.youtube { background: #ff0000; }
/* استایل‌های فرم تسویه حساب جدید */
.modal-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin: 20px 0 8px;
    color: var(--text-main);
}
/* ============== Checkout Modal - فوق‌العاده جذاب و ریسپانسیو ============== */
.checkout-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.4s ease-out;
}

.checkout-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
}

.checkout-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-color);
    border-radius: 32px;
    padding: 36px 28px;
    box-shadow: 
        25px 25px 50px var(--shadow-dark),
        -25px -25px 50px var(--shadow-light),
        inset 0 0 20px rgba(255,255,255,0.1);
    animation: modalPop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    max-height: 95vh;
    overflow-y: auto;
}

/* اسکرول نرم در موبایل */
.checkout-card::-webkit-scrollbar { width: 0; }

/* هدر */
.checkout-header {
    text-align: center;
    margin-bottom: 32px;
}

.checkout-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    animation: pulseGlow 2s infinite;
}

.checkout-icon i {
    font-size: 42px;
    color: white;
}

.checkout-title {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
}

.checkout-subtitle {
    color: var(--text-light);
    font-size: 15px;
}

/* سوییچ */
.toggle-switch-container {
    margin-bottom: 28px;
}

.toggle-switch {
    display: flex;
    background: var(--bg-color);
    border-radius: 20px;
    padding: 8px;
    box-shadow: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light);
}

.toggle-option {
    flex: 1;
    padding: 14px 16px;
    border-radius: 16px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.toggle-option i {
    margin-left: 8px;
    font-size: 16px;
}

.toggle-option.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35);
    transform: translateY(-2px);
}

/* فرم */
.checkout-form {
    space-y: 20px;
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 15px;
}

.input-wrapper {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 18px;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 16px 47px 16px 54px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-main);
    font-family: inherit;
}

.textarea-wrapper .form-input {
    padding-top: 16px;
    resize: none;
}

/* دکمه ثبت سفارش */
.checkout-submit {
    width: 100%;
    height: 64px;
    margin-top: 32px;
    border-radius: 24px;
    font-size: 19px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
}

.checkout-submit:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.5);
}

.checkout-submit:active {
    transform: translateY(-1px);
}

.submit-icon {
    font-size: 22px;
}

/* دکمه بستن */
.checkout-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-color);
    border: none;
    color: var(--text-light);
    font-size: 22px;
    cursor: pointer;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    transition: all 0.3s;
}
/* مدال موفقیت */
.success-card {
    text-align: center;
    padding: 40px 30px;
    max-width: 380px;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.4);
    animation: bounce 0.6s ease-out;
}

.success-title {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 12px 0;
}

.success-order-ref {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 2px;
    margin: 16px 0;
    font-family: monospace;
}

.success-message {
    font-size: 17px;
    margin: 16px 0;
    color: var(--text-main);
}

.success-instruction {
    font-size: 15px;
    color: var(--text-light);
    margin: 20px 0 32px;
    line-height: 1.6;
}

.success-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    height: 60px;
    font-size: 18px;
    border-radius: 20px;
}

/* انیمیشن‌ها */
.checkout-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkout-modal.show {
    opacity: 1;
    display: grid;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
/* اعتبارسنجی بصری */
.input-wrapper {
    transition: all 0.3s ease;
    position: relative;
}

.input-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-wrapper.valid::after {
    background: #22c55e;
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.input-wrapper.invalid::after {
    background: #ef4444;
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.input-wrapper.valid .input-icon {
    color: #22c55e;
}

.input-wrapper.invalid .input-icon {
    color: #ef4444;
}

/* لرزش ملایم در صورت خطا */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.screen-track,
#screen-track {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; /* خیلی مهمه برای iOS */
}

.screen.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.input-wrapper.invalid {
    animation: shake 0.4s ease;
}
.checkout-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPop {
    0% { transform: scale(0.7) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 10px 50px rgba(255, 107, 107, 0.6); }
}


.modal-input {
    width: 100%;
    padding: 18px 20px;
    border: none;
    border-radius: 18px;
    background: var(--bg-color);
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.3s;
}

.modal-input:focus {
    box-shadow: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light), 0 0 0 3px rgba(255,159,26,0.3);
    transform: translateY(-2px);
}

.toggle-option.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 6px 6px 12px rgba(255,159,26,0.4);
}


/* --- نوبار --- */
.navbar {
    position: fixed; /* فقط همین باعث میشه زیر کادر نره */
    left: 20px;
    right: 20px;

    bottom: max(20px, env(safe-area-inset-bottom));
    height: 75px;

    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 9999;

    /* اگر Parent اوورفلو داشته باشد، نیاز میشود */
    pointer-events: auto;
}

.nav-item {
    position: relative; width: 50px; height: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--text-light); cursor: pointer; transition: 0.3s;
}
.nav-item.active {
    color: var(--primary);
    background: var(--bg-color);
    box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
}
.badge {
    position: absolute; top: 8px; right: 8px; width: 10px; height: 10px;
    background: var(--danger); border-radius: 50%; display: none;
    box-shadow: 0 0 5px var(--danger);
}
/* ریسپانسیو */
@media (max-width: 480px) {
    #trackContainer{
        padding: 0px;
    }
    .checkout-card {
        padding: 28px 20px;
        border-radius: 24px;
    }
    .checkout-title { font-size: 24px; }
    .checkout-icon { width: 80px; height: 80px; }
    .checkout-icon i { font-size: 36px; }
}