:root {
  --primary-color: #FF6D14;
  --primary-light: #FFEADC;
  --background-color: #F9F9F9;
  --card-background: #FFFFFF;
  --text-primary: #333333;
  --text-secondary: #777777;
  --border-color: #ECECEC;
  --shadow-color: rgba(0, 0, 0, 0.05);
  --status-active: #FF6D14;
  --status-sold: #4CAF50;
  --status-ended: #F44336;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #FF6D14;
    --primary-light: #4F2000;
    --background-color: #121212;
    --card-background: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #BBBBBB;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --status-active: #FF6D14;
    --status-sold: #4CAF50;
    --status-ended: #F44336;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
}

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

/* Header */
header {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  margin-bottom: 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
}

/* Loading state */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
}

.spinner {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error message */
.error-message {
  background-color: #FEE6E6;
  border: 1px solid #F44336;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin-top: 30px;
}

/* Listing container */
.listing-container {
  background-color: var(--card-background);
  border-radius: 16px;
  box-shadow: 0 6px 12px var(--shadow-color);
  overflow: hidden;
  margin-bottom: 40px;
}

/* Image carousel */
.image-carousel {
  position: relative;
  background-color: #f0f0f0;
  height: 400px;
  overflow: hidden;
}

.carousel-images {
  display: flex;
  transition: transform 0.3s ease;
  height: 100%;
}

.carousel-image {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.carousel-dot.active {
  background-color: white;
}

/* Listing details */
.listing-details {
  padding: 24px;
}

.listing-header {
  margin-bottom: 24px;
}

.listing-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

.status-pill::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: white;
  margin-right: 6px;
}

.status-pill.active {
  background-color: var(--status-active);
}

.status-pill.sold {
  background-color: var(--status-sold);
}

.status-pill.ended {
  background-color: var(--status-ended);
}

.price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Stats row */
.stats-row {
  display: flex;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background-color: var(--border-color);
}

.stat-icon {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Details section */
.details-section, .description-section, .marketplace-links {
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.details-section h3, .description-section h3, .marketplace-links h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.detail-card {
  display: flex;
  align-items: flex-start;
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 5px var(--shadow-color);
}

.detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-light);
  border-radius: 50%;
  margin-right: 12px;
  font-size: 1.2rem;
}

.detail-content {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Description */
#listing-description {
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Marketplace links */
.links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.marketplace-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: white;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.marketplace-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.ebay-button {
  background-color: #E53238;
}

.facebook-button {
  background-color: #4267B2;
}

.marketplace-icon {
  margin-right: 8px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Media queries */
@media (max-width: 600px) {
  .container {
    padding: 12px;
  }
  
  .image-carousel {
    height: 280px;
  }
  
  .listing-header h2 {
    font-size: 1.5rem;
  }
  
  .price {
    font-size: 1.4rem;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-item {
    padding: 12px 0;
  }
} 