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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: #1a1a1a;
}

/* ANNOUNCEMENT BANNER */
.announcement {
  background: #FFDD94;
  text-align: center;
  padding: 10px 20px;
  font-size: 14px;
  color: #1a1a1a;
}
.announcement a { color: #1a1a1a; font-weight: 600; }

/* HEADER */
header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo img {
  height: 44px;
  width: auto;
}
.header-inner input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 14px;
  background: #f7f7f7;
}
.header-inner input:focus {
  outline: none;
  border-color: #FFDD94;
  background: #fff;
}
.header-btns, .header-user { display: flex; gap: 8px; align-items: center; }
.header-user span {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}
.header-btns button, .header-user button {
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
}
.header-btns button:hover { background: #f7f7f7; }
.btn-primary {
  background: #FFDD94 !important;
  color: #1a1a1a !important;
  border-color: #FFDD94 !important;
  font-weight: 600 !important;
}
.btn-primary:hover { background: #f5c97a !important; border-color: #f5c97a !important; }
.btn-primary.large {
  padding: 13px 32px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary.full {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 4px;
  font-weight: 600;
}

/* CATEGORY GRID */
.categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 16px;
}
.categories-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-width: 100px;
  text-decoration: none;
}
.category-img {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}
.category-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-item:hover .category-img {
  border-color: #FFDD94;
  transform: translateY(-2px);
}
.category-item span {
  font-size: 13px;
  color: #1a1a1a;
  font-weight: 500;
  text-align: center;
}

/* HERO BANNER */
.hero {
  margin: 16px 24px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  height: 320px;
  background: #1a1a1a;
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
}
.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.hero-content p {
  color: #FFDD94;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-content h1 {
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
}

/* FILTERS */
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.chip {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid #ddd;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  transition: all 0.15s;
}
.chip:hover { border-color: #FFDD94; }
.chip.active { background: #FFDD94; color: #1a1a1a; border-color: #FFDD94; font-weight: 600; }

/* LISTINGS GRID */
main { max-width: 1200px; margin: 0 auto; padding: 8px 24px 80px; }
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a1a;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

/* LISTING CARD */
.card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: #faf9f6;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px 14px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; color: #1a1a1a; }
.card-seller { font-size: 12px; color: #999; margin-bottom: 8px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.price { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.cond { font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 500; }
.cond-new { background: #d1fae5; color: #065f46; }
.cond-good { background: #dbeafe; color: #1e40af; }
.cond-fair { background: #fef3c7; color: #92400e; }

/* FLOATING BUTTON */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #FFDD94;
  color: #1a1a1a;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245,197,24,0.5);
  z-index: 200;
}
.fab:hover { background: #f5c97a; }

/* MODALS */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.modal input, .modal select, .modal textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.modal input:focus, .modal select:focus, .modal textarea:focus {
  outline: none;
  border-color: #FFDD94;
}
.modal textarea { height: 90px; resize: vertical; }
.close-btn {
  position: absolute;
  top: 16px; right: 18px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #aaa;
}
.close-btn:hover { color: #333; }
.switch-link { font-size: 13px; color: #888; text-align: center; }
.switch-link a { color: #1a1a1a; cursor: pointer; text-decoration: underline; font-weight: 600; }

.error-msg {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.toast {
  position: fixed;
  bottom: 90px;
  right: 28px;
  background: #1a1a1a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 400;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* DETAIL VIEW */
.detail-img { width: 100%; height: 240px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.detail-emoji { font-size: 64px; text-align: center; padding: 16px 0; }
.detail-title { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.detail-price { font-size: 26px; font-weight: 800; color: #1a1a1a; }
.detail-meta { font-size: 13px; color: #888; }
.detail-desc { font-size: 14px; line-height: 1.7; color: #444; }
.detail-cta {
  background: #FFDD94;
  color: #1a1a1a;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
}
.detail-cta:hover { background: #f5c97a; }
.detail-cta.secondary {
  background: #f5f5f5;
  color: #1a1a1a;
  margin-top: 0;
}
.detail-cta.secondary:hover { background: #ebebeb; }

/* PROFILE PAGE */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #FFDD94;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-username { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.profile-name { font-size: 15px; color: #666; margin-top: 2px; }
.profile-joined { font-size: 13px; color: #999; margin-top: 4px; }
.profile-stats { display: flex; gap: 12px; }
.stat-card {
  background: #faf9f6;
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
  border: 1px solid #ebebeb;
}
.stat-number { font-size: 28px; font-weight: 800; color: #1a1a1a; }
.stat-label { font-size: 12px; color: #888; margin-top: 2px; }