/* ============================================================
   Auction item detail page — overrides for /auction-item.html
   ============================================================ */

/* --- Breadcrumb --- */
.breadcrumb-bar {
  background: var(--color-surface-mute);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}
.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .current { color: var(--color-text); }
.breadcrumb span { color: var(--color-border-strong); }

/* --- Lot grid --- */
.lot { padding: 24px 0 32px; }
.lot-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: flex-start;
}

/* --- Gallery --- */
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.gallery-toolbar button {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
}
.gallery-toolbar button:hover { text-decoration: underline; }

.started-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff7e0;
  border: 1px solid #f5d76e;
  color: #6b5300;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}
.started-pill strong { color: #3d2f00; font-weight: 700; }

/* --- Tab badge --- */
.tab-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9px;
  margin-left: 4px;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: 1px;
}

/* --- Bid history --- */
.bid-history {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.bid-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.bid-history-head h2 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 28px;
  color: #000;
  margin: 0;
}
.bid-history-meta { font-size: 13px; color: var(--color-text-muted); margin: 0; }
.bid-history-meta strong { color: #000; font-weight: 600; }

.bid-history-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 560px;
  overflow-y: auto;
}
.bid-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bid-history-table thead {
  background: var(--color-surface-mute);
  position: sticky;
  top: 0;
  z-index: 1;
}
.bid-history-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}
.bid-history-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}
.bid-history-table tr:hover td { background: #fafbfc; }
.bid-history-table tr:last-child td { border-bottom: none; }

.bid-idx { color: var(--color-text-muted); font-variant-numeric: tabular-nums; width: 64px; }
.bid-bidder { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12px; color: #000; }
.bid-amt { font-weight: 700; color: #000; font-variant-numeric: tabular-nums; width: 130px; }
.bid-time { color: var(--color-text-muted); font-size: 12px; width: 160px; }

.bid-row-leading td {
  background: #ecfdf5 !important;
}
.bid-row-leading .bid-idx,
.bid-row-leading .bid-bidder,
.bid-row-leading .bid-amt,
.bid-row-leading .bid-time { color: #064e3b; }
.bid-row-leading .bid-amt { color: #047857; }

.bid-status-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bid-status-tag.leading { background: #047857; color: #fff; }
.bid-status-tag.outbid { background: #f3f4f6; color: var(--color-text-muted); }

.main-image {
  position: relative;
  background: var(--color-surface-mute);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  aspect-ratio: 1.3 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}
.main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  transition: all 200ms ease;
}
.zoom-btn:hover { background: #fff; color: var(--color-primary); }

.thumbs {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.thumb {
  aspect-ratio: 1;
  background: var(--color-surface-mute);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: border-color 200ms ease;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb:hover, .thumb.active { border-color: var(--color-primary); }

.gallery-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

/* --- Bid panel --- */
.bid-panel {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 16px;
}
.lot-num {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
  font-weight: 500;
}
.lot-title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 26px;
  line-height: 1.25;
  color: #000;
  margin: 0 0 8px;
}
.lot-sub {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 20px;
  font-style: italic;
}

.bid-status {
  background: var(--color-surface-mute);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.bid-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.bid-row.sub {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 6px;
}
.bid-label {
  font-size: 13px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.bid-row.sub .bid-label { text-transform: none; letter-spacing: normal; }
.bid-amount {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 32px;
  color: #000;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #876800;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.time-row strong { color: #5c4900; }

.bid-form { margin-bottom: 16px; }
.bid-form label {
  display: block;
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 6px;
}
.bid-input-row {
  position: relative;
  margin-bottom: 12px;
}
.bid-input-row .currency {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--color-text-muted);
  font-weight: 500;
}
#bid-input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  padding: 0 16px 0 32px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: #000;
  outline: none;
  transition: border-color 200ms ease;
}
#bid-input:focus { border-color: var(--color-primary); }
.btn-lg { padding: 14px 20px; font-size: 16px; font-weight: 600; }
.btn-block { width: 100%; }
.bid-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 8px 0 0;
  text-align: center;
}
.bid-meta a { color: var(--color-primary); text-decoration: underline; }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.lot-meta {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  font-size: 13px;
  line-height: 1.6;
}
.lot-meta li {
  padding: 4px 0;
  list-style: none;
}
.lot-meta strong { color: #000; font-weight: 600; }
.lot-meta a { color: var(--color-primary); text-decoration: underline; }

/* --- Tabs --- */
.tab-section { padding: 24px 0 48px; background: var(--color-bg); }
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}
.tab-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 14px 24px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  transition: color 200ms ease;
}
.tab-link.active { color: #000; border-bottom-color: var(--color-primary); }
.tab-link:hover { color: #000; }

.tab-panel h2 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 28px;
  color: #000;
  margin: 0 0 8px;
}
.tab-panel h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: #000;
  margin: 24px 0 8px;
}
.tab-panel p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
  margin: 0 0 14px;
  max-width: 820px;
}
.lead-line {
  font-weight: 600;
  font-size: 16px !important;
  color: #000 !important;
  border-left: 3px solid var(--color-primary);
  padding-left: 14px;
  margin: 16px 0 24px !important;
}
.spec-list {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 16px;
  list-style: none;
  padding: 0;
  max-width: 600px;
  background: var(--color-surface-mute);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.spec-list li {
  border-bottom: 1px dashed var(--color-border);
  padding: 6px 0;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list strong { color: #000; }
.disclaimer {
  font-size: 13px !important;
  color: var(--color-text-muted) !important;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
  margin-top: 24px !important;
}

/* --- Explore --- */
.explore { margin: 48px 0 32px; }
.explore h2 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 28px;
  color: #000;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
}
.explore-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.explore-card {
  display: block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  overflow: hidden;
  transition: box-shadow 200ms ease;
}
.explore-card:hover { box-shadow: var(--shadow-card); }
.explore-img {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  background-color: var(--color-surface-mute);
}
.explore-title {
  padding: 10px 12px 4px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}
.explore-bid {
  padding: 0 12px 12px;
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --- Auction info panel --- */
.info-panel {
  background: var(--color-surface-mute);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 32px;
}
.info-panel h2 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 28px;
  color: #000;
  margin: 0 0 8px;
}
.info-line { font-size: 16px; font-weight: 600; color: #000; margin: 0 0 4px; }
.info-meta { font-size: 13px; color: var(--color-text-muted); margin: 0 0 24px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.info-grid h4 {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
  font-weight: 600;
}
.info-grid p { font-size: 14px; color: #000; margin: 0; font-weight: 500; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .lot-grid { grid-template-columns: 1fr; }
  .bid-panel { position: static; }
  .thumbs { grid-template-columns: repeat(8, 1fr); }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .lot-title { font-size: 22px; }
  .bid-amount { font-size: 26px; }
}
