/* assets/css/style.css - تم جدید: سبز نفتی و طلایی */
@font-face {
    font-family: 'IranSans'; 
    src: url('../fonts/IRANSansWeb.woff') format('woff'); 
    font-weight: normal;
    font-style: normal;
}

:root {
    /* پالت رنگی لوکس */
    --color-primary-dark: #008080; /* سبز نفتی تیره - اصلی */
    --color-primary-light: #4cafa5; /* سبز نفتی روشن */
    --color-accent: #ff9900; /* طلایی/کهربایی - برای جلب توجه و دکمه‌ها */
    --color-success: #28a745;
    --color-error: #dc3545;
    
    --color-background: #f1f8f8; /* پس زمینه بسیار روشن (کمی متمایل به سبز) */
    --color-card-bg: #ffffff; 
    --color-header-bg: #1e3c45; /* سورمه‌ای/سبز بسیار تیره برای هدر */
    
    --color-text-dark: #212529; 
    --color-text-light: #6c757d;
    
    /* هندلینگ طراحی */
    --radius-lg: 15px; /* گوشه‌های گردتر */
    --radius-sm: 8px;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-deep: 0 12px 40px rgba(0, 0, 0, 0.2);
    --transition-speed: 0.3s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'IranSans', Tahoma, sans-serif;
    direction: rtl; 
    text-align: right;
    background-color: var(--color-background);
    line-height: 1.6;
    color: var(--color-text-dark);
    overflow-x: hidden; 
}

a {
    text-decoration: none;
    color: var(--color-primary-dark);
    transition: color 0.3s;
}

.container {
    width: 95%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 10px;
}

/* --- Typography & Headings --- */
h1, h2, h3 {
    color: var(--color-text-dark);
    margin-bottom: 20px;
    font-weight: 700;
}
h2 {
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: 5px;
}

/* --- Header/Navigation (تم لوکس) --- */
.main-header {
    background-color: var(--color-header-bg); 
    color: var(--color-card-bg); 
    padding: 20px 0;
    box-shadow: var(--shadow-deep);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-accent); 
    letter-spacing: 1px;
}

.main-menu {
    list-style: none;
    display: flex;
}

.main-menu li a {
    color: var(--color-card-bg); 
    text-decoration: none;
    padding: 8px 15px;
    display: block;
    margin: 0 5px;
    border-radius: var(--radius-sm);
    transition: background-color 0.3s;
    position: relative;
}

.main-menu li a::after {
    content: '';
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-accent); /* خط زیرین طلایی */
    transition: var(--transition-speed);
    border-radius: 2px;
}

.main-menu li a:hover::after {
    width: 100%;
}

.auth-area a {
    margin-right: 10px;
}

/* --- Buttons --- */
.btn-primary, a.btn-primary {
    display: inline-block;
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    
    background-color: var(--color-accent);
    color: var(--color-header-bg); /* متن دکمه به رنگ تیره */
    box-shadow: 0 4px 10px rgba(255, 153, 0, 0.4);
}

.btn-primary:hover, a.btn-primary:hover {
    background-color: #e58a00;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 153, 0, 0.6);
}

.btn-secondary, a.btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    text-decoration: none;
    transition: var(--transition-speed);
    
    background-color: var(--color-primary-dark);
    color: var(--color-card-bg);
}
.btn-secondary:hover, a.btn-secondary:hover {
    background-color: var(--color-primary-light);
}

/* --- Cards/Forms --- */
.card {
    background-color: var(--color-card-bg);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    margin-bottom: 25px;
    transition: transform 0.3s ease;
    border-right: 5px solid var(--color-primary-dark); 
}

.card:hover {
    box-shadow: var(--shadow-deep);
    transform: translateY(-3px);
}

/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--color-text-dark);
}

input[type="text"], input[type="tel"], input[type="password"], textarea, input[type="file"], select, input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: var(--radius-sm);
    font-family: 'IranSans', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 4px rgba(0, 128, 128, 0.25);
    outline: none;
}

/* Message Boxes */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    font-weight: bold;
    text-align: center;
    box-shadow: var(--shadow-light);
}

.message.success {
    background-color: #d4edda;
    color: var(--color-success);
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: var(--color-error);
    border: 1px solid #f5c6cb;
}
.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* --- Login/Register Card Style (شیک با انیمیشن) --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px); 
    padding: 30px 0;
}

.auth-card {
    max-width: 420px;
    width: 100%;
    padding: 40px;
    background-color: var(--color-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-deep);
    animation: slideInDown 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    border-right: 8px solid var(--color-accent); /* خط کنار طلایی */
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Product Grid & Card --- */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    text-align: center;
    border-bottom: 4px solid var(--color-accent); 
    border-right: none; 
}

.best-price {
    font-size: 1.6rem;
    color: var(--color-error); 
    background-color: rgba(220, 53, 69, 0.05);
    padding: 10px;
    margin: 15px 0;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* --- جدول‌ها (مرتب و خوانا) --- */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; 
}

table th, table td {
    padding: 12px 15px;
    text-align: right;
    border: none;
}

table tbody tr {
    background-color: var(--color-card-bg);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); 
    transition: background-color 0.3s;
}

table tbody tr:hover {
    background-color: #e9f5f5; 
}


/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-menu {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Footer Styling */
.main-footer {
    background-color: var(--color-header-bg);
    color: var(--color-card-bg);
    padding: 30px 0;
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
}