:root {
  --primary-dark: #1f2937;
  --primary-dark-hover: #111827;
  --accent: #f97316;
  --accent-soft: #fff1e8;
  --accent-border: #fed7aa;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --border: #e5e7eb;
  --card-bg: rgba(255, 255, 255, 0.96);
  --page-bg: linear-gradient(180deg, #fff7ed 0%, #f8fafc 45%, #eef4ff 100%);
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.profile-page {
  min-height: calc(100vh - 160px);
  background: var(--page-bg);
}

.profile-section {
  padding: 48px 0 64px;
}

.profile-shell {
  max-width: 980px;
  margin: 0 auto;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--card-bg);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.profile-avatar-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  flex-shrink: 0;
}

.profile-avatar,
.profile-avatar-fallback {
  width: 116px;
  height: 116px;
  border-radius: 50%;
}

.profile-avatar {
  object-fit: cover;
  display: block;
  border: 4px solid #fff7ed;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
  background: #f3f4f6;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.24);
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.profile-kicker {
  display: inline-block;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
  width: fit-content;
}

.profile-details h1 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: -0.6px;
  color: var(--text-main);
}

.profile-meta {
  display: grid;
  gap: 12px;
}

.profile-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-label {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#profileEmail,
#profilePostcode {
  font-size: 1rem;
  color: var(--text-main);
}

/* listings */
.profile-listings-card {
  margin-top: 24px;
  background: var(--card-bg);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 28px;
  padding: 26px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.profile-section-heading {
  margin-bottom: 18px;
}

.section-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.profile-section-heading h2 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--text-main);
}

.user-listings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.listing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.07);
}

.listing-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}

.listing-content {
  padding: 16px;
}

.listing-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text-main);
}

.listing-desc {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.listing-meta {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 700;
}

/* empty state */
.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 220px;
  padding: 24px;
}

.empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.empty-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-text {
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 460px;
}

@media (max-width: 900px) {
  .user-listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .profile-section {
    padding: 30px 0 42px;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    border-radius: 22px;
  }

  .profile-details h1 {
    font-size: 1.8rem;
  }

  .profile-listings-card {
    padding: 20px;
    border-radius: 22px;
  }

  .user-listings-grid {
    grid-template-columns: 1fr;
  }
}

.btn-edit-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: var(--color-primary, #2563eb);
  color: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn-edit-profile:hover {
  background: var(--color-primary-dark, #1d4ed8);
  transform: translateY(-1px);
}