/* ==========================================
   مزاد سوريا - Mazad Syria
   Styles CSS
   ========================================== */

/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
  /* Primary Colors - Green (Syrian Flag) */
  --primary-green: #002623;
  --primary-green-light: #054239;
  --primary-green-accent: #428177;
  
  /* White */
  --white: #ffffff;
  --off-white: #f8faf9;
  --light-gray: #e8ebe9;
  
  /* Black */
  --black: #161616;
  --dark-gray: #2a2a2a;
  --medium-gray: #666666;
  --text-gray: #888888;
  
  /* Accent Colors */
  --accent-red: #6b1f2a;
  --gold: #b9a779;
  
  /* WhatsApp */
  --whatsapp: #25D366;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease-out;
  --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Font */
  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Inter', sans-serif;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ar);
  background-color: var(--off-white);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   Utility Classes
   ========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.rtl {
  direction: rtl;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green-light), var(--primary-green));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(5, 66, 57, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 66, 57, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
  background: var(--primary-green);
  color: var(--white);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-gray);
}

.btn-ghost:hover {
  background: var(--light-gray);
  color: var(--black);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.85rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================
   Form Elements
   ========================================== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--dark-gray);
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-fast);
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-green-accent);
  box-shadow: 0 0 0 3px rgba(66, 129, 119, 0.1);
}

.form-input.error {
  border-color: var(--accent-red);
}

.form-input::placeholder {
  color: var(--text-gray);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left var(--space-md) center;
  background-size: 18px;
  padding-left: var(--space-2xl);
}

.form-error {
  color: var(--accent-red);
  font-size: 0.8rem;
  margin-top: var(--space-xs);
}

/* Radio/Checkbox */
.form-radio-group, .form-checkbox-group {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.form-radio, .form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.form-radio input, .form-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-green);
}

/* ==========================================
   Header
   ========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-green-light), var(--primary-green));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-green);
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-top: -4px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary-green-accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.header-avatar:hover {
  transform: scale(1.05);
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--light-gray);
  border-radius: var(--radius-md);
  color: var(--dark-gray);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ==========================================
   Bottom Navigation (Mobile)
   ========================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding: var(--space-sm) 0;
  padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0));
  z-index: 100;
  display: none;
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm);
  color: var(--text-gray);
  font-size: 0.7rem;
  transition: all var(--transition-fast);
  border-radius: var(--radius-md);
}

.bottom-nav-item.active {
  color: var(--primary-green);
}

.bottom-nav-item:hover {
  background: var(--off-white);
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav-item.active svg {
  stroke-width: 2.5;
}

/* ==========================================
   Auth Pages
   ========================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + 80px);
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl);
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-logo {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-green-light), var(--primary-green));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  margin: 0 auto var(--space-md);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: var(--space-xs);
}

.auth-subtitle {
  color: var(--text-gray);
  font-size: 0.95rem;
}

.auth-tabs {
  display: flex;
  background: var(--off-white);
  border-radius: var(--radius-md);
  padding: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.auth-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-gray);
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--white);
  color: var(--primary-green);
  box-shadow: var(--shadow-sm);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--text-gray);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary-green);
  font-weight: 600;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
  color: var(--white);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.05);
  transform: rotate(-15deg);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.hero-stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   Categories
   ========================================== */
.categories {
  padding: var(--space-xl) 0;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: var(--space-lg);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--space-md);
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.category-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-green-accent), var(--primary-green-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.4rem;
}

.category-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-gray);
  text-align: center;
}

/* ==========================================
   Product Cards
   ========================================== */
.products-section {
  padding: var(--space-lg) 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card.featured {
  border: 2px solid var(--gold);
}

.product-card.featured::before {
  content: '⭐ مميز';
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--gold);
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.product-image {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--light-gray);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  font-size: 3rem;
}

.product-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--primary-green);
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.product-wishlist {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.product-wishlist:hover {
  color: var(--accent-red);
  transform: scale(1.1);
}

.product-wishlist.active {
  color: var(--accent-red);
}

.product-wishlist.active svg {
  fill: var(--accent-red);
}

.product-info {
  padding: var(--space-md);
}

.product-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: var(--space-sm);
}

.product-location {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}

.product-location svg {
  width: 14px;
  height: 14px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--light-gray);
}

.product-seller {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.product-seller-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary-green-accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-seller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.product-seller-name {
  font-size: 0.8rem;
  color: var(--text-gray);
}

.product-stats {
  display: flex;
  gap: var(--space-md);
  color: var(--text-gray);
  font-size: 0.8rem;
}

.product-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-stats svg {
  width: 14px;
  height: 14px;
}

/* ==========================================
   Post Card (Feed)
   ========================================== */
.feed {
  padding: var(--space-lg) 0;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.feed-filters {
  display: flex;
  gap: var(--space-sm);
}

.feed-filter {
  padding: var(--space-sm) var(--space-md);
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-gray);
  transition: all var(--transition-fast);
}

.feed-filter:hover, .feed-filter.active {
  border-color: var(--primary-green);
  color: var(--primary-green);
  background: rgba(66, 129, 119, 0.05);
}

.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
}

.post-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary-green-accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  overflow: hidden;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta {
  display: flex;
  flex-direction: column;
}

.post-username {
  font-weight: 600;
  color: var(--dark-gray);
}

.post-location {
  font-size: 0.8rem;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-location svg {
  width: 12px;
  height: 12px;
}

.post-time {
  font-size: 0.8rem;
  color: var(--text-gray);
}

.post-more {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  transition: all var(--transition-fast);
}

.post-more:hover {
  background: var(--light-gray);
}

.post-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--light-gray);
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-media-layer {
  width: 100%;
  height: 100%;
  position: relative;
}

.product-media-type {
  position: absolute;
  left: var(--space-sm);
  bottom: var(--space-sm);
  background: rgba(0, 0, 0, 0.65);
  color: var(--white);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  z-index: 2;
}

.post-content {
  padding: var(--space-md);
}

.post-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: var(--space-xs);
}

.post-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: var(--space-sm);
}

.post-description {
  color: var(--medium-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.post-tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.post-tag {
  padding: var(--space-xs) var(--space-sm);
  background: var(--off-white);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-gray);
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border-top: 1px solid var(--light-gray);
}

.post-actions-left {
  display: flex;
  gap: var(--space-lg);
}

.post-action {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-gray);
  font-size: 0.9rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.post-action:hover {
  background: var(--off-white);
}

.post-action.liked {
  color: var(--accent-red);
}

.post-action.liked svg {
  fill: var(--accent-red);
}

.post-action svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-bounce);
}

.post-action.liked svg {
  animation: heartBeat 0.4s ease;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ==========================================
   Comments
   ========================================== */
.post-comments {
  padding: var(--space-md);
  background: var(--off-white);
  border-top: 1px solid var(--light-gray);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.comments-count {
  font-weight: 600;
  color: var(--dark-gray);
}

.comments-list {
  max-height: 300px;
  overflow-y: auto;
}

.comment-item {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-green-accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.comment-content {
  flex: 1;
  background: var(--white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
}

.comment-username {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark-gray);
  margin-bottom: 2px;
}

.comment-text {
  font-size: 0.9rem;
  color: var(--medium-gray);
  line-height: 1.5;
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-top: var(--space-xs);
}

.comment-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.comment-input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.comment-input:focus {
  outline: none;
  border-color: var(--primary-green-accent);
}

.comment-submit {
  width: 40px;
  height: 40px;
  background: var(--primary-green);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.comment-submit:hover {
  background: var(--primary-green-light);
  transform: scale(1.05);
}

.comment-submit svg {
  width: 18px;
  height: 18px;
}

/* ==========================================
   Add Product Modal
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--light-gray);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark-gray);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--light-gray);
  color: var(--dark-gray);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-top: 1px solid var(--light-gray);
  position: sticky;
  bottom: 0;
  background: var(--white);
}

/* Image Upload */
.image-upload {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.image-upload-item {
  aspect-ratio: 1;
  border: 2px dashed var(--light-gray);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
  position: relative;
}

.image-upload-item:hover {
  border-color: var(--primary-green-accent);
}

.image-upload-item.has-image {
  border: none;
}

.image-upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload-placeholder {
  color: var(--text-gray);
  font-size: 1.5rem;
}

.image-upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.image-upload-item:hover .image-upload-remove {
  opacity: 1;
}

.image-upload-meta {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
}

.cover-image-picker {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--off-white);
  border-radius: var(--radius-md);
}

.cover-image-picker-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: var(--space-sm);
}

.cover-image-options {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.cover-image-option {
  width: 84px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  transition: all var(--transition-fast);
}

.cover-image-option.active {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(66, 129, 119, 0.12);
}

.cover-image-option button {
  width: 100%;
  display: block;
}

.cover-image-option img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  display: block;
}

.cover-image-option span {
  display: block;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--medium-gray);
}

/* ==========================================
   Profile Page
   ========================================== */
.profile-page {
  padding-bottom: 100px;
}

.profile-header {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
  padding: var(--space-xl) 0;
  padding-top: calc(var(--space-xl) + 20px);
  color: var(--white);
}

.profile-cover {
  position: relative;
  text-align: center;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: var(--white);
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-green);
  border: 4px solid var(--white);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.profile-username {
  opacity: 0.8;
  margin-bottom: var(--space-sm);
}

.profile-location {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255,255,255,0.2);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
}

.profile-stat {
  text-align: center;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.profile-stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.profile-content {
  padding: var(--space-lg) 0;
}

.profile-tabs {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-xs);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.profile-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-gray);
  transition: all var(--transition-fast);
}

.profile-tab.active {
  background: var(--primary-green);
  color: var(--white);
}

/* ==========================================
   Admin Panel
   ========================================== */
.admin-page {
  min-height: 100vh;
  background: var(--off-white);
}

.admin-auth-shell {
  padding-bottom: var(--space-lg);
}

.admin-auth-container {
  max-width: 440px;
}

.admin-auth-card {
  width: 100%;
}

.admin-auth-error {
  margin-bottom: var(--space-md);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(107, 31, 42, 0.08);
  color: var(--accent-red);
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-panel-shell {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--primary-green);
  color: var(--white);
  padding: var(--space-lg);
  z-index: 50;
  transition: transform var(--transition-normal);
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.admin-logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-logo-text {
  font-size: 1.2rem;
  font-weight: 700;
}

.admin-session-card {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.08);
}

.admin-session-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  margin-bottom: var(--space-xs);
}

.admin-session-card strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  height: calc(100vh - 180px);
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.7);
  transition: all var(--transition-fast);
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.admin-nav-item.active {
  font-weight: 600;
}

.admin-nav-item svg {
  width: 20px;
  height: 20px;
}

.admin-nav-logout {
  width: 100%;
  text-align: right;
}

.admin-main {
  margin-left: 260px;
  padding: var(--space-xl);
  min-height: 100vh;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.admin-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-gray);
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.admin-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.admin-card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.admin-card-icon.users {
  background: rgba(66, 129, 119, 0.15);
  color: var(--primary-green);
}

.admin-card-icon.posts {
  background: rgba(185, 167, 121, 0.15);
  color: var(--gold);
}

.admin-card-icon.comments {
  background: rgba(107, 31, 42, 0.15);
  color: var(--accent-red);
}

.admin-card-icon.revenue {
  background: rgba(66, 129, 119, 0.15);
  color: var(--primary-green);
}

.admin-card-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: var(--space-xs);
}

.admin-card-label {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.admin-card-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--primary-green-accent);
}

.admin-card-change.negative {
  color: var(--accent-red);
}

/* Admin Table */
.admin-table-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--light-gray);
}

.admin-table-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-gray);
}

.admin-table-actions {
  display: flex;
  gap: var(--space-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th, .admin-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: right;
}

.admin-table th {
  background: var(--off-white);
  font-weight: 600;
  color: var(--text-gray);
  font-size: 0.85rem;
}

.admin-table tr {
  border-bottom: 1px solid var(--light-gray);
}

.admin-table tr:last-child {
  border-bottom: none;
}

.admin-table tr:hover {
  background: var(--off-white);
}

.admin-table-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.admin-table-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary-green-accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  overflow: hidden;
}

.admin-table-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-table-name {
  font-weight: 600;
  color: var(--dark-gray);
}

.admin-table-email {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.admin-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-badge.active {
  background: rgba(66, 129, 119, 0.15);
  color: var(--primary-green);
}

.admin-badge.banned {
  background: rgba(107, 31, 42, 0.15);
  color: var(--accent-red);
}

.admin-badge.featured {
  background: rgba(185, 167, 121, 0.15);
  color: var(--gold);
}

.admin-btn {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.admin-btn-ban {
  background: rgba(107, 31, 42, 0.1);
  color: var(--accent-red);
}

.admin-btn-ban:hover {
  background: var(--accent-red);
  color: var(--white);
}

.admin-btn-unban {
  background: rgba(66, 129, 119, 0.1);
  color: var(--primary-green);
}

.admin-btn-unban:hover {
  background: var(--primary-green);
  color: var(--white);
}

.admin-btn-delete {
  background: rgba(107, 31, 42, 0.1);
  color: var(--accent-red);
}

.admin-btn-delete:hover {
  background: var(--accent-red);
  color: var(--white);
}

.admin-btn-feature {
  background: rgba(185, 167, 121, 0.1);
  color: var(--gold);
}

.admin-btn-feature:hover {
  background: var(--gold);
  color: var(--white);
}

/* Admin Search */
.admin-search {
  position: relative;
}

.admin-search-input {
  padding: var(--space-sm) var(--space-md);
  padding-right: var(--space-xl);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  width: 250px;
  font-size: 0.9rem;
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--primary-green-accent);
}

.admin-search-icon {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
  width: 16px;
  height: 16px;
}

/* ==========================================
   Toast Notifications
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--dark-gray);
  color: var(--white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.success {
  background: var(--primary-green);
}

.toast.error {
  background: var(--accent-red);
}

.toast.warning {
  background: var(--gold);
  color: var(--dark-gray);
}

/* ==========================================
   Empty States
   ========================================== */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-gray);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: var(--space-sm);
}

.empty-state-text {
  margin-bottom: var(--space-lg);
}

/* ==========================================
   Loading States
   ========================================== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--light-gray);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--light-gray) 25%, var(--off-white) 50%, var(--light-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 300px;
  margin-bottom: var(--space-lg);
}

/* ==========================================
   Page Transitions
   ========================================== */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .admin-auth-shell {
    padding: var(--space-md);
    padding-bottom: calc(var(--space-md) + 80px);
  }

  .header-nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .bottom-nav {
    display: block;
  }
  
  .hero {
    padding: var(--space-xl) 0;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .hero-stats {
    gap: var(--space-lg);
  }
  
  .hero-stat-number {
    font-size: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-sm);
  }
  
  .category-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .category-name {
    font-size: 0.75rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .product-info {
    padding: var(--space-sm);
  }
  
  .product-title {
    font-size: 0.9rem;
  }
  
  .product-price {
    font-size: 1rem;
  }
  
  .product-location, .product-footer {
    display: none;
  }
  
  .post-actions {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  
  .post-actions-left {
    width: 100%;
    justify-content: space-around;
  }
  
  .feed-filters {
    width: 100%;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
  }
  
  .auth-card {
    padding: var(--space-lg);
  }
  
  .admin-cards {
    grid-template-columns: 1fr 1fr;
  }
  
  .admin-table {
    font-size: 0.85rem;
  }
  
  .admin-table th, .admin-table td {
    padding: var(--space-sm) var(--space-md);
  }
  
  .image-upload {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
  
  .logo-tagline {
    display: none;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-cards {
    grid-template-columns: 1fr;
  }
  
  .admin-search-input {
    width: 100%;
  }
  
  .modal {
    max-height: 95vh;
  }
  
  .modal-body {
    padding: var(--space-md);
  }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
  .header, .bottom-nav, .modal-overlay, .toast-container {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .product-card, .post-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--light-gray);
  }
}
