@charset "UTF-8";

/* تعریف فونت بومی صفحه پروفایل */
@font-face { 
    font-family: "Vazirmatn"; 
    src: url("fonts/Vazirmatn.woff2") format("woff2"); 
    font-weight: normal; 
    font-style: normal; 
}

:root { 
    --gold-color: #d4af37; 
    --bg-color: #f4f6f8; 
    --header-padding: 120px;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
}

/* اصلاحات پایه و ساختار کلی بدنه */
body { 
    font-family: 'Vazirmatn', Tahoma, sans-serif; 
    background: var(--bg-color); 
    margin: 0; 
    padding-top: var(--header-padding); 
}

/* ساختار کانتینر کلی به جای ایجاد محدودیت روی body */
.site-wrapper { 
    overflow-x: hidden; 
    width: 100%; 
    position: relative;
}

/* ساختار داشبورد کاربری */
.dashboard-wrapper { 
    display: flex; 
    min-height: calc(100vh - var(--header-padding)); 
    max-width: 1400px; 
    margin: 0 auto; 
    background: #fff; 
    border-radius: 8px; 
    margin-bottom: 40px; 
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* سایدبار منوی پروفایل */
.sidebar { 
    width: 260px; 
    background: #fff; 
    border-left: 1px solid #eee; 
    padding: 20px 0; 
    display: flex; 
    flex-direction: column; 
    position: relative;
}

.nav-menu { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    flex: 1; 
}

.nav-menu button { 
    width: 100%; 
    text-align: right; 
    padding: 12px 15px; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    font-family: inherit; 
    font-size: 14px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@media (hover: hover) {
    .nav-menu button:hover { 
        background: #f8f9fa; 
        color: #000; 
        font-weight: bold; 
        padding-right: 20px; /* ایجاد افکت حرکت به چپ در هاور */
    }
    
    .nav-menu button[onclick*="logout"]:hover {
        background: #fff5f5;
        color: var(--error-color) !important;
    }
}

.nav-menu button.active { 
    background: #000; 
    color: #fff; 
    font-weight: bold; 
}
.nav-menu button.active:hover {
    padding-right: 15px; /* جلوگیری از حرکت دکمه اکتیو */
    background: #000;
}

/* باکس محتوای اصلی */
.main-content { 
    flex: 1; 
    padding: 25px; 
    background: #fafbfc; 
    overflow-y: auto; 
    border-radius: 8px 0 0 8px; 
}

/* مدیریت تب‌ها و انیمیشن سوئیچ */
.tab-pane { 
    display: none; 
    animation: fadeIn 0.4s ease-out forwards; 
}

.tab-pane.active { 
    display: block; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(15px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.section-title { 
    font-size: 20px; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
    font-weight: bold; 
}

/* استایل عمومی فرم‌ها و فیلدها */
.grid-form { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin-bottom: 20px;
}

.form-row { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 15px; 
}

.form-row .form-group { 
    flex: 1; 
    min-width: 0; 
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
}

.form-group label { 
    font-size: 13px; 
    font-weight: bold; 
    color: #555; 
}

.form-group input, 
.form-group textarea, 
.form-group select { 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-family: inherit; 
    font-size: 13px; 
    outline: none; 
    transition: border 0.3s, box-shadow 0.3s;
    width: 100%; 
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { 
    border-color: #000; 
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.btn-primary { 
    background: #000; 
    color: #fff; 
    border: none; 
    padding: 10px 25px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-family: inherit; 
    font-weight: bold; 
    font-size: 14px; 
    transition: background 0.3s, transform 0.1s; 
}

.btn-primary:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .btn-primary:hover { 
        background: var(--gold-color); 
        color: #000; 
    }
}

/* ساختار بخش تسویه حساب (Checkout) */
.checkout-layout { 
    display: flex; 
    gap: 20px; 
    align-items: flex-start; 
}

.checkout-form-sec { 
    flex: 2; 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    border: 1px solid #eee; 
    box-sizing: border-box; 
}

.checkout-summary-sec { 
    flex: 1; 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    border: 1px solid #eee; 
    position: sticky; 
    top: 120px; 
    box-sizing: border-box; 
}

/* باکس گزینه‌های انتخابی (رادیو و چک‌باکس) */
.radio-group-box { 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    padding: 12px; 
    margin-bottom: 12px; 
    transition: border-color 0.3s;
}
.radio-group-box:hover {
    border-color: #ccc;
}

.radio-option { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 8px; 
    font-size: 13px; 
    cursor: pointer;
}

.radio-option input { 
    width: 16px; 
    height: 16px; 
    cursor: pointer; 
    flex-shrink: 0;
}

/* فاکتور و قیمت نهایی */
.summary-row { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 12px; 
    font-size: 13px; 
    color: #555; 
}

.summary-total { 
    display: flex; 
    justify-content: space-between; 
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 2px solid #eee; 
    font-size: 16px; 
    font-weight: bold; 
    color: #000; 
}

.btn-pay { 
    width: 100%; 
    padding: 12px; 
    background: var(--error-color); 
    color: #fff; 
    border: none; 
    border-radius: 6px; 
    font-size: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: 15px; 
    transition: background 0.3s, transform 0.1s; 
    font-family: inherit;
}
.btn-pay:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .btn-pay:hover { 
        background: #c8101f; 
    }
}

/* شبکه کارتهای سبد خرید */
.basket-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    margin-bottom: 25px; 
    align-items: stretch; 
}

.basket-grid .order-card { 
    margin-bottom: 0; 
    height: 100%; 
    box-sizing: border-box; 
}

/* کارت‌های آثار داخل سبد و سفارشات */
.order-card { 
    display: flex; 
    gap: 15px; 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    padding: 12px; 
    align-items: center; 
    flex-wrap: wrap; 
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s; 
}

@media (hover: hover) {
    .order-card:hover { 
        box-shadow: 0 6px 15px rgba(0,0,0,0.06); 
        border-color: #ddd;
        transform: translateY(-2px);
    }
}

.order-card img { 
    width: 85px; 
    height: 85px; 
    border-radius: 6px; 
    object-fit: cover; 
    border: 1px solid #f0f0f0; 
}

.order-info { 
    flex: 1; 
    min-width: 200px; 
}

.order-info h4 { 
    margin: 0 0 6px 0; 
    font-size: 15px; 
    color: #111; 
}

.order-meta { 
    font-size: 12.5px; 
    color: #555; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    align-items: center; 
}

.order-meta > span { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
}

/* وضعیت‌های سفارش */
.order-status { 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: bold; 
    text-align: center; 
    white-space: nowrap; 
}

.status-processing { 
    background: #fff3cd; 
    color: #856404; 
}

.status-shipped { 
    background: #d4edda; 
    color: #155724; 
}

.tracking-box { 
    margin-top: 8px; 
    font-size: 12px; 
    background: #f8f9fa; 
    border: 1px dashed #ccc; 
    padding: 8px; 
    border-radius: 6px; 
    color: #333; 
}

.timer-box { 
    background: #fff8e1; 
    color: #b78103; 
    padding: 3px 6px; 
    border-radius: 4px; 
    border: 1px dashed #ffb300; 
    font-weight: bold; 
    display: inline-block;
}

.btn-remove-cart { 
    background: var(--error-color); 
    color: #fff; 
    border: none; 
    padding: 6px 10px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-family: inherit; 
    font-size: 11px; 
    font-weight: bold; 
    transition: background 0.3s, transform 0.1s;
}
.btn-remove-cart:active {
    transform: scale(0.95);
}

@media (hover: hover) {
    .btn-remove-cart:hover { 
        background: #c82333; 
    }
}

/* دستورات واکنش‌گرایی و بهینه‌سازی نمایش موبایل و تبلت */
@media (max-width: 992px) { 
    .checkout-layout { 
        flex-direction: column; 
    } 
    .checkout-summary-sec, 
    .checkout-form-sec { 
        position: static; 
        width: 100%; 
        box-sizing: border-box;
    } 
}

@media (max-width: 768px) { 
    .basket-grid { 
        grid-template-columns: 1fr; 
    }
    .form-row, 
    .grid-form { 
        flex-direction: column; 
        grid-template-columns: 1fr;
    } 
    .dashboard-wrapper { 
        flex-direction: column; 
    } 
    .sidebar { 
        width: 100%; 
        border-left: none; 
        border-bottom: 1px solid #eee;
    } 
    
    /* سایه محو برای نشان دادن قابلیت اسکرول افقی در موبایل */
    .sidebar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0; /* در قالب RTL سمت چپ یعنی انتهای اسکرول */
        width: 30px;
        height: 100%;
        background: linear-gradient(to right, #fff 10%, transparent);
        pointer-events: none;
        z-index: 5;
    }
    
    /* اسکرول افقی نرم منوی پروفایل کاربری در حالت موبایل */
    .nav-menu { 
        display: flex; 
        overflow-x: auto; 
        white-space: nowrap;
        -ms-overflow-style: none;
        scrollbar-width: none;
        padding-bottom: 10px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    } 
    .nav-menu::-webkit-scrollbar { 
        display: none; 
    } 
    .nav-menu button {
        text-align: center;
        padding: 10px 15px; 
        font-size: 13px;
        flex: 0 0 auto;
        border-radius: 6px;
        margin: 0 2px;
    } 
    
    .order-meta { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 6px; 
    }
    .order-card { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 12px; 
    }
    .order-card img { 
        width: 100%; 
        height: 160px; 
    }
    .order-status { 
        align-self: flex-start; 
    }
}