/* Profile Page Styles */

.profile-page {
  background: var(--bg-cream);
  padding: 48px 0 80px;
  min-height: calc(100vh - 300px);
}

/* Profile Header */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
  padding: 32px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-name {
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

.profile-location {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

.profile-joined {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.profile-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-actions .btn {
  min-width: 140px;
}

.profile-actions .btn svg {
  width: 18px;
  height: 18px;
}

/* Profile Stats */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(5, 24, 33, 0.08);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Profile Section */
.profile-section {
  margin-bottom: 48px;
}

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

.section-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
}

.sort-controls {
  display: flex;
  gap: 12px;
}

.sort-select {
  padding: 10px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sort-select:focus {
  outline: none;
  border-color: var(--secondary-color);
}

/* About Card */
.about-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 28px;
}

.about-card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0 0 20px 0;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.badge-verified {
  background: rgba(38, 104, 103, 0.1);
  color: var(--tertiary-color);
  border: 1px solid var(--tertiary-color);
}

.badge-fast {
  background: rgba(245, 136, 0, 0.1);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.badge-responsive {
  background: rgba(248, 188, 36, 0.1);
  color: #e6a000;
  border: 1px solid var(--accent-light);
}

/* Listings Grid */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.listing-card {
  display: block;
  background: var(--bg-white);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(5, 24, 33, 0.12);
  border-color: var(--secondary-color);
}

.listing-image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 128%;
  background: var(--bg-light);
  overflow: hidden;
}

.listing-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(5, 24, 33, 0.12);
  transition: transform 0.2s;
  z-index: 10;
  border: none;
}

.favorite-button:hover {
  transform: scale(1.1);
}

.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--discount-color);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.listing-content {
  padding: 14px;
}

.listing-brand {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

.listing-title {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-size {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

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

.listing-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.listing-old-price {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* Reviews List */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.reviewer-details h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px 0;
}

.review-date {
  font-size: 13px;
  color: var(--text-secondary);
}

.review-rating {
  display: flex;
  gap: 4px;
  color: var(--accent-color);
  font-size: 16px;
}

.review-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.review-item {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
  .listings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 960px) {
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .profile-page {
    padding: 24px 0 60px;
  }

  .profile-header {
    flex-direction: column;
    padding: 24px;
  }

  .profile-info {
    flex-direction: column;
    text-align: center;
  }

  .profile-details {
    align-items: center;
  }

  .profile-name {
    font-size: 24px;
  }

  .profile-actions {
    width: 100%;
    flex-direction: column;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 22px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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