/* Global Styles */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #DED7D0;
}

/* Layout */
.dashboard {
  width: 100%;
  padding: 20px;
}

/* Navigation */
.tab-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-nav button {
  margin: 0 10px;
  background: #F1A208;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

.tab-nav button:hover {
  background: #E69500;
}

/* Forms */
.invite-form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.invite-list {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #CCC;
  border-radius: 4px;
}

/* Buttons */
button {
  background: #F24333;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #D32F2F;
}

/* Sections */
.section {
  margin-bottom: 30px;
}

/* Scrolling */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
  max-width: 100%;
}

.vertical-scroll {
  height: 500px;
  overflow-y: auto;
  padding: 10px;
}

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

/* Cards */
.card {
  width: 250px;
  flex-shrink: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
}

/* Listings Specific */
.listings-layout {
  display: flex;
  flex-direction: column;
}

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

.sidebar {
  width: 100%;
  padding: 20px 10px; /* More top/bottom spacing */
  background: #6E7E85; /* Updated color */
  border-right: 1px solid white; /* Thin white line */
  border-radius: 10px;
  height: auto;
  align-self: flex-start;
}

@media (min-width: 768px) {
  .sidebar {
    width: 300px;
  }
}

.main-content {
  flex: 1;
  padding: 10px 120px 10px 10px; /* 100px margin on right */
  overflow: hidden; /* Prevent overflow */
}

@media (min-width: 768px) {
  .sidebar {
    margin-right: 20px; /* More padding between divs */
  }
}

.search-bar {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  margin-bottom: 10px;
}

.category-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 0;
}

.category-item .material-icons {
  margin-right: 18px;
  background: #DED7D0;
  border-radius: 5px;
  padding: 5px;
}

.category-item .arrow {
  margin-left: auto;
  cursor: pointer;
}

.category-icon,
.category-text {
  cursor: pointer;
}

.subcategory-item {
  display: flex;
  align-items: center;
  padding-left: 20px;
  cursor: pointer;
  padding: 3px 0;
}

.subcategory-item .material-icons {
  margin-right: 8px;
  font-size: 16px;
}

.image-placeholder {
  height: 150px;
  background: #CCC;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.image-placeholder img {
  border-radius: 5px;
}

.thumbnail {
  width: 30px;
  height: 30px;
  background: #DDD;
  margin: 2px;
  cursor: pointer;
}

.thumbnail img {
  border: 2px solid white;
}

.selected-category {
  background: #698996;
}

.sort-select {
  padding: 5px;
}

.filter-button {
  background: #F1A208;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.filter-button:hover {
  background: #E69500;
}

/* Single Listing View */
.single-listing-container {
  display: flex;
  padding: 20px;
}

.image-section {
  flex: 2;
  margin-right: 20px;
}

.main-image {
  width: 100%;
  height: 400px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.thumbnails {
  display: flex;
  margin-top: 10px;
  gap: 5px;
}

.thumbnail-single {
  width: 60px;
  height: 60px;
  border: 1px solid #ccc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumbnail-single.selected {
  border: 2px solid blue;
}

.details-section {
  flex: 1;
}

.seller-info {
  margin-bottom: 20px;
}

.contact-form {
  margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.contact-form button {
  margin-top: 10px;
}

.seller-details {
  flex: 1;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.seller-avatar-section {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.seller-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 10px;
}

.seller-initials {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #6E7E85;
  color: #DED7D0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 10px;
}

.contact-textarea {
  width: 100%;
  margin-bottom: 10px;
}

.report-select {
  width: 100%;
  margin-bottom: 10px;
}

.report-button {
  width: 100%;
  padding: 10px;
  background: #FFA500;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.report-button:hover {
  background: #E69500;
}

.full-width-button {
  width: 100%;
  padding: 10px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-rules {
  font-size: 12px;
  color: #666;
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Profile */
.profile-section {
  padding: 20px;
}

.profile-pic-section {
  margin-bottom: 20px;
}

.profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.upload-section {
  margin-top: 10px;
}

.user-info {
  margin-top: 20px;
}

/* Messages */
.messages-container {
  padding: 20px;
}

.conversation {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  background: #fff;
}

.listing-info {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.listing-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 15px;
}

.message-list {
  margin-bottom: 15px;
}

.message {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.message.sent {
  background: #e3f2fd;
  text-align: right;
}

.message.received {
  background: #f5f5f5;
}

.reply-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reply-section textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.reply-section button {
  align-self: flex-end;
  padding: 8px 16px;
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.reply-section button:hover {
  background: #1565c0;
}

.user-info p {
  margin: 5px 0;
}

/* Invites */
.invites-section {
  padding: 20px;
}

.invite-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.invite-status {
  font-weight: bold;
}

/* Voting */
.voting-section {
  padding: 20px;
}

.vote-item {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.vote-buttons {
  margin-top: 10px;
}

.vote-buttons button {
  margin-right: 10px;
}

/* Messages */
.messages-section {
  padding: 20px;
}

.message-item {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.message-form {
  margin-top: 20px;
}

.message-form textarea {
  width: 100%;
  height: 100px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Moderator */
.moderator-section {
  padding: 20px;
}

.report-item {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.report-actions {
  margin-top: 10px;
}

/* Listings Container */
.listings-container {
  /* No specific styles, just a wrapper */
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Filter Menu */
.filter-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  z-index: 10;
}

.filter-menu button {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}

.filter-menu button:hover {
  background: #f5f5f5;
}

.filter-menu button:hover {
  background: #f5f5f5;
}

/* Loading */
.loading {
  text-align: center;
  padding: 20px;
}

/* Alert */
.alert {
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}