/* auction.css - responsive layout et styles */

.auction-body {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden;
}

.auction-main {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-top: 1rem;
  max-width: 100%;
  padding: 0 2.5%;
  box-sizing: border-box;
}

.carousel-container {
  max-width: 50%;
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
}

.main-image {
  width: 100%;
  height: 420px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.15);
}

.thumbnails {
  margin: 0.5rem auto 1rem auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  width: 100%;
  justify-content: center;
}

.thumbnail-img {
  flex: 0 0 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.thumbnail-img:hover,
.thumbnail-img.active {
  border-color: #059669;
}

.details-panel {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.1);
}

.details-panel h2 {
  margin: 0 0 0.5rem;
  color: #0f9d58;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
  color: #444;
}

.detail-value {
  font-weight: 700;
  color: #059669;
}

#bid-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

#bid-form input[type=number] {
  flex: 1 1 auto;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1.5px solid #ccc;
  border-radius: 6px;
}

#bid-form button {
  padding: 0.6rem 1.2rem;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#bid-form button:hover:not(:disabled) {
  background-color: #047857;
}

#bid-form button:disabled {
  background-color: #a3a3a3;
  cursor: not-allowed;
}

.seller-terms {
  font-size: 0.85rem;
  color: #555;
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 0.8rem;
  border-radius: 6px;
  background: #f9f9f9;
}

.btn-other-items {
  margin-top: auto;
  background-color: #0f9d58;
  color: white;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.btn-other-items:hover {
  background-color: #047857;
}

.bid-history {
  margin: 2rem auto 2rem;
  max-width: 90vw;
  width: 90%;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  background: #fff;
}

.bid-history h2 {
  margin-bottom: 0.5rem;
  color: #0f9d58;
  font-weight: 700;
  text-align: center;
}

#bid-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

#bid-list li {
  padding: 3px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  color: #333;
}

/* Responsive */
@media (max-width: 900px) {
  .auction-main {
    flex-wrap: wrap;
    flex-direction: column;
    padding: 0 5%;
  }
  .carousel-container,
  .details-panel {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .main-image {
    height: 280px;
    width: 100%;
  }
  .thumbnails {
    width: 100%;
    justify-content: flex-start;
  }
  .bid-history {
    width: 95%;
  }
}
