﻿:root {
    --primary: #2563eb;
    --secondary: #f39c12;
    --success: #059669;
    --bg: #f4f7fa;
    --card-bg: #ffffff;
    --text: #1e293b;
}

body {
    font-family: Tahoma, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    direction: rtl;
    padding-bottom: 80px; /* برای فضای نوار پایین */
}

/* هدر مدرن */
#app-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* کانتینر اصلی */
#main-container {
    padding: 15px;
    max-width: 500px; /* محدودیت برای نمایش بهتر در موبایل */
    margin: 0 auto;
}

/* کارت محصول مدرن */
.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #edf2f7;
}

.product-img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8fafc;
    margin-bottom: 10px;
}

/* برچسب سود زیبا */
.profit-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px dashed #10b981;
    margin: 10px 0;
    text-align: center;
}

/* نوار قیمت و کنترلر */
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.buy-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.consumer-price {
    font-size: 0.75rem;
    color: #64748b;
    text-decoration: line-through;
}

/* دکمه‌های افزایش/کاهش حرفه‌ای */
.controls {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
}

.btn-qty {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: white;
    color: var(--primary);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* نوار ناوبری پایین (Navigation Bar) */
#footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    height: 70px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    z-index: 1000;
}

.total-label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: #64748b;
}

.total-amount {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text);
}

.cart-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}