/* ========================================
   Auctions
   ======================================== */

/* Countdown timer */
.auction-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #C62828;
  background: #FFEBEE;
  padding: 4px 10px;
  border-radius: 6px;
}

.auction-timer--ending {
  animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.auction-timer--ended {
  color: #999;
  background: #f5f5f5;
}

/* Bid section on listing detail */
.auction-bid-section {
  background: #fafafa;
  border-radius: 12px;
  padding: 18px;
  margin-top: 16px;
}

.auction-bid-section h3 {
  font-size: 14px;
  margin: 0 0 12px;
}

.auction-current-bid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.auction-current-bid__label {
  font-size: 12px;
  color: #999;
}

.auction-current-bid__amount {
  font-size: 24px;
  font-weight: 700;
  color: #212121;
}

.auction-bid-count {
  font-size: 11px;
  color: #999;
  margin-bottom: 12px;
}

.auction-bid-input {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.auction-bid-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.auction-bid-btn {
  padding: 10px 24px;
  background: #C62828;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.auction-bid-btn:hover { background: #B71C1C; }
.auction-bid-btn:disabled { background: #ccc; cursor: not-allowed; }

.auction-min-bid {
  font-size: 11px;
  color: #999;
}

/* Bid history */
.auction-bids-list {
  margin-top: 14px;
  max-height: 200px;
  overflow-y: auto;
}

.auction-bid-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

.auction-bid-item:last-child { border-bottom: none; }

.auction-bid-item__user {
  color: #555;
}

.auction-bid-item__amount {
  font-weight: 700;
}

.auction-bid-item__time {
  color: #999;
  font-size: 10px;
}

/* Auction card variant on homepage */
.auction-card-timer {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Homepage auctions carousel */
.auctions-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.auctions-section h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.auctions-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.auctions-scroll::-webkit-scrollbar { height: 4px; }
.auctions-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.auctions-scroll .listing-card {
  min-width: 240px;
  max-width: 240px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Duration selector in create form */
.auction-duration-options {
  display: flex;
  gap: 8px;
}

.auction-duration-option {
  padding: 8px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.auction-duration-option:hover { border-color: #212121; }
.auction-duration-option.selected {
  background: #C62828;
  color: #fff;
  border-color: #C62828;
}

/* Mobile */
@media (max-width: 600px) {
  .auction-bid-input { flex-direction: column; }
  .auctions-scroll .listing-card { min-width: 200px; max-width: 200px; }
}
