:root {
  --primary: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1, #a855f7);
  --accent: #06d6a0;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border: #334155;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  font-size: 15px;
}


body {
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ================= HEADER ================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo{
  width: 120px;
}
.logo-img{
  width: 100%
}

.logo h1 {
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* ================= PROFILE HEADER ================= */
.profile-header {
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  border-bottom: 1px solid var(--border);
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.profile-details h2 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.profile-verified {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ================= PROFILE TABS ================= */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
  position: sticky;
  top: 73px;
  z-index: 90;
  overflow-x: auto;          /* ✅ allows small screens */
  scrollbar-width: none;     /* Firefox */
}

.profile-tabs::-webkit-scrollbar {
  display: none;             /* Chrome/Safari */
}


.tab-btn {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ================= TAB CONTENT ================= */
.tab-content {
  display: none;
  padding: 20px;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================= MY LISTINGS TAB ================= */
.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.profile-listing-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}

.profile-listing-card:hover {
  border-color: var(--primary);
}

.listing-status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: var(--accent);
  color: #000;
}

.status-sold {
  background: var(--text-secondary);
  color: white;
}

.listing-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.listing-emoji {
  font-size: 2rem;
  background: rgba(99, 102, 241, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-preview-info {
  flex: 1;
}

.listing-preview-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-preview-price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.listing-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.profile-listing-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  display: block;
}
.profile-listing-emoji {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: rgba(99,102,241,0.08);
  border-radius: 12px 12px 0 0;
}
.listing-info {
  padding: 12px;
}
.listing-preview-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.listing-preview-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}


.action-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

.action-btn.edit:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.action-btn.delete:hover {
  background: rgba(239, 71, 111, 0.1);
  color: #ef476f;
  border-color: #ef476f;
}

/* ================= REVIEWS TAB ================= */
.reviews-container {
  max-width: 600px;
}

.review-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.9rem;
}

.reviewer-details h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.review-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.review-stars {
  display: flex;
  gap: 2px;
  color: #fbbf24;
}

.review-content {
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 0.95rem;
}

.review-item {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ================= SAVED TAB ================= */
.saved-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.saved-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ================= SETTINGS TAB ================= */
.settings-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.settings-section h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
}

.setting-label {
  font-weight: 500;
  margin-bottom: 4px;
}

.setting-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Danger zone */
.danger-zone {
  border-color: #ef476f;
}

.danger-btn {
  background: rgba(239, 71, 111, 0.1);
  color: #ef476f;
  border: 1px solid #ef476f;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 8px;
}

.danger-btn:hover {
  background: rgba(239, 71, 111, 0.2);
}

/* ================= BOTTOM NAV ================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 0;
  z-index: 200;
  border-top: 1px solid var(--border);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  padding: 4px 8px;
}

.nav-item:hover, .nav-item.active {
  color: white;
  transform: translateY(-2px);
}

.nav-item i {
  font-size: 20px;
}

.sell-btn-nav {
  position: relative;
  top: -10px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.sell-btn-nav:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.7);
}


/* ===================== Mark as Sold button styling ===============*/
.action-btn.mark-sold {
  background: rgba(6, 214, 160, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.action-btn.mark-sold:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

.action-btn.mark-sold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============= Sold status overlay styling ================== */
.status-sold {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

/* ======== Better action button layout ==================*/
.listing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1;
  min-width: 90px;
  padding: 8px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.action-btn.reactivate {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}

.action-btn.reactivate:hover {
  background: #fbbf24;
  color: var(--bg-dark);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

    html {
    font-size: 14.5px;
  }

  .profile-info {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  
  .profile-verified {
    justify-content: center;
  }


  .profile-stats {
    justify-content: center;
    margin-top: 4px;
  }

  .profile-stats {
  flex-wrap: wrap;
  gap: 12px;
}

.stat {
  flex: 1 1 45%;
}

  
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
  
  .tab-btn {
    padding: 12px 8px;
    font-size: 0.9rem;
  }
  
  .tab-btn i {
    font-size: 16px;
  }
  
  .bottom-nav {
    padding: 10px 0;
  }
  
  .sell-btn-nav {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {

     html {
    font-size: 14px;
  }

    body {
  font-size: 15px;
}

.review-content {
  font-size: 0.9rem;
}

.setting-description {
  font-size: 0.8rem;
}

  .listings-grid {
    grid-template-columns: 1fr;
  }
  
  .tab-btn span {
    display: none;
  }
  
  .tab-btn {
    padding: 12px 4px;
  }
  
  .tab-btn i {
    font-size: 20px;
  }
  
  .profile-avatar {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
  
  .profile-details h2 {
    font-size: 1.5rem;
  }
}


@media (max-width: 600px) {
  .listing-actions {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
  }
}