:root {
  --primary: #1e3a8a;
  --primary-dark: #172554;
  --primary-light: #3b82f6;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.1);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.logo { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.logo-icon { font-size: 24px; }

.header-actions { display: flex; gap: 8px; align-items: center; }

.btn-post {
  background: #fff;
  color: var(--primary);
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s;
}
.btn-post:hover { transform: scale(1.05); }

.btn-login { 
  color: #fff; 
  font-size: 13px; 
  padding: 8px 10px; 
  border: 1px solid rgba(255,255,255,0.3); 
  border-radius: 20px; 
  transition: background 0.2s; 
}
.btn-login:hover { background: rgba(255,255,255,0.1); }

.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 12px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--muted);
  padding: 4px 8px;
  transition: color 0.2s;
}
.nav-item.active, .nav-item:hover { color: var(--primary); }
.nav-item svg { width: 22px; height: 22px; }

.nav-add {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -24px;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
  border: 3px solid var(--bg);
}
.nav-add svg { width: 24px; height: 24px; }

.footer {
  background: #fff;
  padding: 20px 14px 90px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.footer strong { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-block { display: flex; width: 100%; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 10px;
  display: flex;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}
.card:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 8px 15px rgba(30, 58, 138, 0.15); 
  border-color: var(--primary-light); 
}

.card-img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--bg);
}

.card-body { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  justify-content: space-between; 
  min-width: 0; 
}

.card-title { 
  font-weight: 700; 
  font-size: 14px; 
  margin-bottom: 4px; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

.card-meta { 
  font-size: 12px; 
  color: var(--muted); 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.card-price { 
  color: var(--primary); 
  font-weight: 800; 
  font-size: 15px; 
  margin-top: 6px; 
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

@media(min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(4, 1fr); }
}