/* ==========================================
   style.css - استایل اصلی وب اپ آریا تراک
   ========================================== */

:root {
    --primary: #A62C2C;
    --primary-dark: #8B2222;
    --secondary: #D94A4A;
    --accent: #E63946;
    --bg: #F5F5F5;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #777777;
    --border: #E0E0E0;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'YekanBakh', 'Tahoma', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    padding-bottom: 75px;
    -webkit-tap-highlight-color: transparent;
    font-size: 14px;
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== اسپلش اسکرین ===== */
.splash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #FFF 0%, #F8F8F8 100%);
    padding: 30px;
    text-align: center;
}

.splash-logo {
    width: 120px;
    height: 120px;
    background: var(--primary);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(166, 44, 44, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.splash-logo i {
    font-size: 50px;
    color: white;
}

.splash-title {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.splash-brand {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 30px;
}

.splash-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 14px 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(166, 44, 44, 0.3);
}

.splash-btn:active {
    transform: scale(0.95);
}

/* ===== صفحه ورود/ثبت‌نام ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.auth-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.auth-logo {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo i {
    font-size: 45px;
    color: var(--primary);
}

.auth-logo h3 {
    font-size: 18px;
    color: var(--text);
    margin-top: 10px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 25px;
    background: #F0F0F0;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
    border: none;
    background: transparent;
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: #FAFAFA;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(166, 44, 44, 0.08);
}

.form-input::placeholder {
    color: #BDBDBD;
}

.forgot-link {
    display: block;
    text-align: left;
    font-size: 13px;
    color: var(--primary);
    margin-top: -5px;
    margin-bottom: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(166, 44, 44, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary);
    font-weight: bold;
}

/* ===== هدر ===== */
.header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-weight: bold;
    font-size: 16px;
}

.header-user {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== بنر تخفیف ===== */
.discount-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius);
    padding: 20px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.discount-banner::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.discount-banner h5 {
    font-size: 20px;
    font-weight: 900;
}

/* ===== تب‌های دسته‌بندی ===== */
.category-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 0;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    flex: 0 0 auto;
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--white);
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--border);
    transition: var(--transition);
    white-space: nowrap;
}

.category-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== سرویس‌ها ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.service-card:active {
    transform: scale(0.94);
    background: #FFF5F5;
}

.service-icon {
    width: 50px;
    height: 50px;
    background: #FFF0F0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
}

.service-label {
    font-size: 12px;
    font-weight: 600;
}

/* ===== کارت خودرو ===== */
.vehicle-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.vehicle-card:active {
    transform: scale(0.98);
}

.vehicle-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #EEE;
    flex-shrink: 0;
}

.vehicle-info {
    flex: 1;
}

.vehicle-name {
    font-weight: bold;
    font-size: 14px;
}

.vehicle-plaque {
    background: #F0F0F0;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    display: inline-block;
    margin: 5px 0;
}

.warranty-badge {
    font-size: 12px;
    font-weight: bold;
}

.warranty-badge.success { color: #155724; }
.warranty-badge.warning { color: #856404; }
.warranty-badge.danger { color: #721C24; }

/* ===== کارت سفارش ===== */
.order-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.order-card:active {
    transform: scale(0.98);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-number {
    font-weight: bold;
    color: var(--primary);
}

.order-date {
    font-size: 12px;
    color: var(--text-light);
}

.order-product {
    font-size: 14px;
    margin-bottom: 5px;
}

.order-status {
    font-size: 12px;
    font-weight: bold;
}

.order-details {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.order-details.show {
    display: block;
}

/* ===== مراحل پیشرفت ===== */
.stage-list {
    list-style: none;
}

.stage-item {
    display: flex;
    align-items: start;
    gap: 10px;
    padding: 10px 0;
    position: relative;
}

.stage-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.stage-dot.done { background: var(--success); }
.stage-dot.current { background: var(--primary); box-shadow: 0 0 0 5px rgba(166,44,44,0.2); }
.stage-dot.pending { background: #CCC; }

.stage-text {
    font-size: 13px;
}

.stage-text.done { color: var(--success); }
.stage-text.current { color: var(--primary); font-weight: bold; }
.stage-text.pending { color: #999; }

/* ===== دسته‌بندی محصولات (گرید) ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.category-card:active {
    transform: scale(0.95);
    background: #FFF5F5;
}

.category-card i {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.category-card span {
    font-size: 13px;
    font-weight: 600;
}

/* ===== کارت محصول ===== */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.product-card:active {
    transform: scale(0.98);
}

.product-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.product-card-body {
    padding: 12px;
}

.product-card-body h6 {
    font-size: 14px;
    margin-bottom: 4px;
}

.product-card-body p {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== ویدیو ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.video-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.video-card:active {
    transform: scale(0.95);
}

.video-card-cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #DDD;
}

.video-card-title {
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    background: white;
}

/* ===== پلیر ویدیو ===== */
.video-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    z-index: 400;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-overlay.show {
    display: flex;
}

.video-overlay video {
    width: 100%;
    max-height: 80vh;
}

.video-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

/* ===== پشتیبانی ===== */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.contact-method {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.contact-method:active {
    transform: scale(0.95);
}

.contact-method i {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.contact-method span {
    font-size: 11px;
    font-weight: 600;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.info-card h6 {
    color: var(--primary);
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: var(--transition);
}

.social-link:active {
    transform: scale(0.9);
}

.social-instagram { background: #E4405F; }
.social-telegram { background: #0088CC; }
.social-whatsapp { background: #25D366; }
.social-youtube { background: #FF0000; }

/* ===== پروفایل ===== */
.profile-header {
    text-align: center;
    padding: 25px 0;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    background: #EEE;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

.profile-email {
    font-size: 13px;
    color: var(--text-light);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.profile-menu-item:active {
    background: #FFF5F5;
}

.profile-menu-item i {
    width: 24px;
    color: var(--primary);
    font-size: 16px;
    text-align: center;
}

.profile-menu-item .arrow {
    margin-right: auto;
    color: #CCC;
}

/* ===== اعلان‌ها ===== */
.notification-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    border-right: 4px solid var(--primary);
}

.notification-item.unread {
    background: #FFF8F8;
}

.notification-title {
    font-weight: bold;
    font-size: 14px;
}

.notification-message {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.notification-date {
    font-size: 10px;
    color: #AAA;
    margin-top: 8px;
}

/* ===== چت‌بات ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.bot {
    align-self: flex-start;
    background: var(--white);
    border-bottom-right-radius: 6px;
    box-shadow: var(--shadow);
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-left-radius: 6px;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: flex-start;
    max-width: 85%;
}

.chat-option {
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: right;
}

.chat-option:active {
    background: var(--primary);
    color: white;
}

.chat-option.back {
    background: #F0F0F0;
    border-color: #999;
    color: #666;
}

/* ===== منوی پایین ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #EEE;
    display: flex;
    justify-content: space-around;
    padding: 6px 0 10px;
    z-index: 200;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}

.nav-item {
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: var(--transition);
    padding: 4px 10px;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: var(--accent);
    font-weight: bold;
}

/* ===== مودال ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 300;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-box img {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
}

/* ===== یوتیلیتی ===== */
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 50px;
    margin-bottom: 15px;
    color: #CCC;
}

.alert {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-size: 13px;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
}

.alert-danger {
    background: #F8D7DA;
    color: #721C24;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

@media (min-width: 768px) {
    .container { max-width: 600px; }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
}

}
@media (min-width: 768px) {
    .items-container {
        justify-content: center;
        width: 100%;
    }
    .market-ticker {
        max-width: 600px;
        margin: 0 auto 4px;
        border-radius: 0 0 18px 18px;
    }
}
@media (min-width: 768px) {
    .market-ticker {
        max-width: 600px;
        margin: 0 auto 4px;
    }
    .ticker-item {
        min-width: 100px;
        padding: 10px 14px;
    }
    .item-name {
        font-size: 0.7rem;
    }
    .item-price {
        font-size: 0.95rem;
    }
}
@keyframes fadeOut {
    0%,70%{opacity:1}
    100%{opacity:0}
}