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

/* Dark Mode Theme */
:root {
  --bg-color: #121212;
  --bg-secondary: #1e1e1e;
  --text-color: #e0e0e0;
  --text-muted: #aaaaaa;
  --accent-color: #4d9fff;
  --border-color: #333333;
  --status-for-sale: #4caf50;
  --status-sold: #f44336;
}

/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

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

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

/* Header */
header {
  background-color: var(--bg-secondary);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

header h1 {
  font-size: 24px;
  font-weight: 600;
}

header a {
  color: var(--text-color);
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  padding: 20px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 14px;
}

/* Content Layout */
.content-wrapper {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .content-wrapper {
    flex-direction: row;
  }
}

/* Sidebar Filters */
.filters {
  background-color: var(--bg-secondary);
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .filters {
    width: 250px;
    margin-right: 30px;
    margin-bottom: 0;
  }
}

.filters h2 {
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

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

.filter-group h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.filter-options {
  display: flex;
  flex-direction: column;
}

.filter-options label {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.filter-options input[type="checkbox"] {
  margin-right: 8px;
}

.filter-options .count {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

.button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.button:hover {
  opacity: 0.9;
}

/* Items Container */
.items-container {
  flex: 1;
}

.items-count {
  margin-bottom: 20px;
  color: var(--text-muted);
}

/* Items List */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.category-section {
  margin-bottom: 20px;
}

.category-title {
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--accent-color);
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.item-card {
  background-color: var(--bg-secondary);
  border-radius: 5px;
  overflow: hidden;
  transition: transform 0.2s;
  border: 1px solid var(--border-color);
}

.item-card:hover {
  transform: translateY(-5px);
}

.item-card a {
  color: var(--text-color);
  display: block;
}

.item-image {
  height: 200px;
  position: relative;
  background-color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.image-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.quantity-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(70, 130, 180, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.no-image {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--text-muted);
}

.item-info {
  padding: 15px;
}

.item-title {
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: 500;
}

.item-price {
  font-weight: 600;
  font-size: 18px;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.item-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-transform: uppercase;
}

.item-condition {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-transform: uppercase;
  background-color: rgba(75, 75, 75, 0.7);
  color: white;
}

.item-condition.New {
  background-color: #4CAF50;
}

.item-condition.Like.New {
  background-color: #8BC34A;
}

.item-condition.Lightly.used {
  background-color: #00BCD4;
}

.item-condition.Medium {
  background-color: #FF9800;
}

.item-condition.Used {
  background-color: #FF5722;
}

.item-status[class*="for sale"] {
  background-color: var(--status-for-sale);
  color: white;
}

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

/* Item Detail Page */
.item-detail {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .item-detail {
    flex-direction: row;
    gap: 30px;
  }
}

.item-images {
  width: 100%;
}

@media (min-width: 768px) {
  .item-images {
    flex: 0 0 50%;
  }
}

.main-image {
  margin-bottom: 15px;
  background-color: var(--bg-secondary);
  border-radius: 5px;
  overflow: hidden;
}

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

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

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-detail .item-info {
  padding: 0;
}

.item-detail .item-title {
  font-size: 24px;
  margin-bottom: 15px;
}

.item-detail .item-price {
  font-size: 22px;
  margin-bottom: 15px;
}

.item-metadata {
  margin-top: 20px;
  margin-bottom: 20px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.metadata-item {
  margin-bottom: 10px;
}

.metadata-item .label {
  font-weight: 500;
  margin-right: 5px;
}

.item-description {
  margin-bottom: 30px;
}

.item-description h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.item-description .description-content {
  line-height: 1.6;
  max-width: 100%;
  overflow-wrap: break-word;
}

.item-description .description-content ul,
.item-description .description-content ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.item-description .description-content p {
  margin-bottom: 0.5em;
}

.contact-info {
  background-color: var(--bg-secondary);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.contact-info h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.back-button {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 16px;
  background-color: var(--bg-secondary);
  border-radius: 4px;
} 