/* ============================================
   GUINÉ-VENDAS - Classified Ads Marketplace
   Main Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #61616B;
  --primary-dark: #4A4A54;
  --primary-light: #8A8A94;
  --accent: #F78302;
  --accent-hover: #E07600;
  --accent-light: #FFF3E0;
  --success: #4CAF50;
  --danger: #F44336;
  --warning: #FF9800;
  --info: #2196F3;
  --bg: #F5F5F6;
  --bg-white: #FFFFFF;
  --text-dark: #1A1A2E;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E0E0E0;
  --border-light: #F0F0F0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.3s ease;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.header {
  background: var(--bg-white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary);
  color: white;
  padding: 6px 0;
  font-size: 0.8rem;
}

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

.header-top a {
  color: rgba(255,255,255,0.85);
  margin-left: 16px;
}

.header-top a:hover {
  color: white;
}

.header-main {
  padding: 12px 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.2rem;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--accent);
}

.search-bar {
  flex: 1;
  display: flex;
  max-width: 680px;
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.95rem;
  background: var(--bg);
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--accent);
  background: white;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar select {
  padding: 12px 10px;
  border: 2px solid var(--border);
  border-left: none;
  border-right: none;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  max-width: 150px;
  transition: var(--transition);
  appearance: auto;
}

.search-bar select:focus {
  border-color: var(--accent);
  background: white;
}

.search-bar button {
  padding: 12px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.search-bar button:hover {
  background: var(--accent-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  border: 2px solid transparent;
}

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

.btn-accent:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(247,131,2,0.3);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

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

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

.btn-success:hover {
  background: #43A047;
  color: white;
}

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

.btn-danger:hover {
  background: #D32F2F;
  color: white;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.header-user {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.header-user:hover {
  background: var(--bg);
}

.header-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.header-user .user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.header-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Abas Email / WhatsApp no login e registo */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 6px;
  margin-bottom: 24px;
}

.auth-tabs .dashboard-tab {
  flex: 1;
  text-align: center;
  justify-content: center;
}

/* Acessibilidade: foco visível em elementos clicáveis */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(247,131,2,0.55);
  outline-offset: 2px;
}

/* --- Mobile Menu --- */
.mobile-menu-btn {
  display: none;
  background: none;
  padding: 8px;
  color: var(--text);
  font-size: 1.5rem;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(247,131,2,0.1);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: rgba(247,131,2,0.08);
  border-radius: 50%;
}

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

.hero h1 {
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.15rem;
  margin-bottom: 30px;
}

.hero-search {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-search input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  font-size: 1rem;
}

.hero-search select {
  padding: 16px;
  border: none;
  border-left: 2px solid var(--border-light);
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}

.hero-search button {
  padding: 16px 32px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search button:hover {
  background: var(--accent-hover);
}

/* --- Categories Section --- */
.section {
  padding: 50px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
}

.section-title span {
  color: var(--accent);
}

.section-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  gap: 8px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  box-shadow: var(--shadow);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.category-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

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

.category-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Listings --- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.listing-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.listing-image {
  width: 100%;
  height: 200px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.listing-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-featured {
  background: var(--accent);
  color: white;
}

.badge-urgent {
  background: var(--danger);
  color: white;
}

.listing-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.listing-favorite:hover,
.listing-favorite.active {
  background: var(--danger);
  color: white;
}

.listing-info {
  padding: 16px;
}

.listing-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}

.listing-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.listing-location {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Filters Sidebar --- */
.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px 0;
}

.filters-panel {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 10px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select,
.filter-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
  font-size: 0.9rem;
}

.filter-group input:focus,
.filter-group select:focus,
.filter-group textarea:focus {
  border-color: var(--accent);
  background: white;
}

.price-inputs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.price-inputs input {
  flex: 1;
}

.price-inputs span {
  color: var(--text-muted);
  font-weight: 600;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-count {
  font-size: 0.95rem;
  color: var(--text-light);
}

.results-count strong {
  color: var(--text-dark);
}

.sort-select {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
}

/* --- Ad Detail Page --- */
.ad-detail {
  padding: 30px 0;
}

.ad-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
}

.ad-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow);
}

.ad-main-image {
  width: 100%;
  height: 450px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--text-muted);
  position: relative;
}

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

.ad-thumbnails {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
}

.ad-thumb {
  width: 70px;
  height: 55px;
  background: var(--bg);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.ad-thumb:hover,
.ad-thumb.active {
  border-color: var(--accent);
}

.ad-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
}

.ad-category-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ad-category-breadcrumb a {
  color: var(--accent);
}

.ad-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.ad-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 20px;
}

.ad-description {
  margin-bottom: 24px;
}

.ad-description h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.ad-description p {
  color: var(--text-light);
  line-height: 1.8;
  white-space: pre-wrap;
}

.ad-specs {
  margin-bottom: 24px;
}

.ad-specs h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

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

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
}

.spec-label {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.85rem;
}

.spec-value {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.85rem;
}

.ad-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.ad-actions .btn {
  flex: 1;
  padding: 14px;
  font-size: 1rem;
}

.ad-safety {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 16px;
}

.ad-safety h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}

.ad-safety p {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Sidebar */
.ad-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.seller-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
}

.seller-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-dark);
}

.seller-since {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.seller-contact-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-display {
  text-align: center;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.phone-display .phone-number {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 1px;
}

.phone-display .phone-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ad-location-info {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.ad-location-info h4 {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.location-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.ad-date-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 0;
}

/* --- Auth Pages --- */
.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-container {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
  font-size: 0.95rem;
}

.form-input:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(247,131,2,0.1);
}

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

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

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-select:focus {
  border-color: var(--accent);
  background-color: white;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.form-check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.form-divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}

.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.form-divider span {
  background: var(--bg-white);
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.form-footer a {
  color: var(--accent);
  font-weight: 600;
}

/* --- Post Ad Page --- */
.post-ad-page {
  padding: 30px 0;
}

.post-ad-form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow);
}

.post-ad-header {
  text-align: center;
  margin-bottom: 30px;
}

.post-ad-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.post-ad-header p {
  color: var(--text-muted);
}

.steps-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
}

.step-dot {
  width: 40px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  transition: var(--transition);
}

.step-dot.active {
  background: var(--accent);
}

.step-dot.completed {
  background: var(--success);
}

.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
}

.image-upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.image-upload-area .upload-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.image-upload-area h4 {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.image-upload-area p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.image-preview-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.image-preview-item {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

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

.image-preview-item .remove-img {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
}

/* --- Dashboard --- */
.dashboard {
  padding: 30px 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-welcome {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
}

.dashboard-welcome span {
  color: var(--accent);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon.orange {
  background: var(--accent-light);
  color: var(--accent);
}

.stat-icon.green {
  background: #E8F5E9;
  color: var(--success);
}

.stat-icon.blue {
  background: #E3F2FD;
  color: var(--info);
}

.stat-icon.purple {
  background: #F3E5F5;
  color: #9C27B0;
}

.stat-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow-x: auto;
}

.dashboard-tab {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  color: var(--text-light);
  background: transparent;
  border: none;
}

.dashboard-tab:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.dashboard-tab.active {
  background: var(--accent);
  color: white;
}

.my-listings-table {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.my-listings-table th {
  background: var(--bg);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.my-listings-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  vertical-align: middle;
}

.my-listings-table tr:last-child td {
  border-bottom: none;
}

.my-listings-table tr:hover td {
  background: var(--accent-light);
}

.listing-thumb {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-active {
  background: #E8F5E9;
  color: var(--success);
}

.status-pending {
  background: #FFF3E0;
  color: var(--warning);
}

.status-expired {
  background: #FFEBEE;
  color: var(--danger);
}

.status-sold {
  background: #E3F2FD;
  color: var(--info);
}

.table-actions {
  display: flex;
  gap: 6px;
}

.table-actions .btn {
  padding: 6px 10px;
  font-size: 0.75rem;
}

/* --- Footer --- */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
}

.footer-main {
  padding: 50px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo-text {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.footer-brand .logo-text span {
  color: var(--accent);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  color: white;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom-links a:hover {
  color: var(--accent);
}

/* --- Modals --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
  font-size: 1.1rem;
  color: var(--text-light);
}

.modal-close:hover {
  background: var(--danger);
  color: white;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: toastIn 0.3s ease;
  border-left: 4px solid var(--accent);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

.toast-close {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
}

.pagination button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 2px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
}

.pagination button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Loading Spinner --- */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

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

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  
  .filters-panel {
    position: static;
  }
  
  .ad-detail-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .header-main .container {
    flex-wrap: wrap;
  }
  
  .search-bar {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 10px;
  }
  
  .header-actions {
    margin-left: auto;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-search {
    flex-direction: column;
  }
  
  .hero-search select {
    border-left: none;
    border-top: 2px solid var(--border-light);
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .listing-image {
    height: 150px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
  
  .ad-title {
    font-size: 1.4rem;
  }
  
  .ad-price {
    font-size: 1.5rem;
  }
  
  .auth-container {
    padding: 24px;
  }
  
  .post-ad-form-container {
    padding: 24px;
  }
  
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .listings-grid {
    grid-template-columns: 1fr;
  }
  
  .listing-image {
    height: 200px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .ad-actions {
    flex-direction: column;
  }
  
  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.hidden { display: none !important; }
.w-full { width: 100%; }
