/* فایل: styles/main.css */

/* ================= Variables ================= */
:root {
    --primary-color: #3b82f6; /* آبی مدرن */
    --primary-hover: #2563eb;
    --success-color: #10b981; /* سبز ملایم */
    --success-hover: #059669;
    --danger-color: #ef4444;  /* قرمز */
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --border-color: #d1d5db;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ================= Fonts ================= */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazir-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

/* ================= Reset & Base ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ================= Layout Utilities ================= */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.min-h-screen { min-height: 100vh; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.dir-ltr { direction: ltr; text-align: left; }
.w-full { width: 100%; }

/* ================= Typography ================= */
.title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ================= Components ================= */

/* Auth Card */
.auth-wrapper {
    padding: 1rem;
    width: 100%;
}
.auth-card {
    background-color: var(--bg-surface);
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    text-align: right;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    background-color: #f9fafb;
}
.form-input:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-input-code {
    text-align: center;
    letter-spacing: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
}
.btn:active {
    transform: translateY(1px);
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-success {
    background-color: var(--success-color);
    color: white;
}
.btn-success:hover { background-color: var(--success-hover); }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.auth-divider::before { margin-left: 0.5rem; }
.auth-divider::after { margin-right: 0.5rem; }
/* ================= Layout & Grid (Added for Profile & Search) ================= */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}
.page-wrapper { margin: 3rem 0; }

.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .grid-layout { grid-template-columns: 1fr; }
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ================= Cards ================= */
.card {
    background-color: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}
.card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.card-header h3 { font-size: 1.25rem; color: var(--text-main); }

/* ================= Profile Specific ================= */
.profile-header-card {
    text-align: center;
    background: linear-gradient(to bottom right, #ffffff, #f9fafb);
}
.profile-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-surface);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}
.store-title { font-size: 1.5rem; font-weight: bold; margin-bottom: 0.25rem; }
.store-category { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

/* ================= Badges & Tiers ================= */
.tier-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: bold;
}
.tier-red { background-color: var(--danger-color); color: white; }
.tier-blue { background-color: var(--primary-color); color: white; }
.tier-green { background-color: var(--success-color); color: white; }
.tier-gold { background-color: #fbbf24; color: #78350f; }

/* ================= Verification Items ================= */
.verify-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.verify-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.icon-success { color: var(--success-color); }
.icon-danger { color: var(--danger-color); }

/* ================= Comments & Stars ================= */
.comment-box {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}
.comment-box:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;}
.comment-author { font-weight: bold; font-size: 0.95rem; }
.comment-date { font-size: 0.75rem; color: var(--text-muted); }

.stars { display: flex; gap: 0.15rem; }
.stars svg { width: 16px; height: 16px; fill: #d1d5db; }
.stars svg.filled { fill: #fbbf24; }

/* ================= Forms Extras ================= */
textarea.form-input { min-height: 100px; resize: vertical; }
select.form-input { padding-right: 1rem; cursor: pointer; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 150px; }
.checkbox-group { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.checkbox-group input { width: 1.1rem; height: 1.1rem; cursor: pointer;}
.checkbox-group label { cursor: pointer; font-size: 0.9rem;}

/* Search Input */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.search-bar input { flex: 2; }
.search-bar select { flex: 1; }
.search-bar button { flex: 0 0 120px; }
@media (max-width: 600px) { .search-bar { flex-direction: column; } }

/* Store Card (Search Results) */
.store-card { text-align: center; text-decoration: none; color: inherit; display: block; transition: transform 0.2s; }
.store-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.store-card img { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 1rem; }
