/* =====================================================================
   AUCTIONS — nav tab, list view, detail modal
   =====================================================================
   Gold palette throughout — auctions are the "elite" channel and should
   read as prestige.  Three distinct UIs:
     1. The nav tab (a 5th item in the seasons pill, pulsing gold)
     2. The full-screen list panel (`/auktionen`) with auction cards
     3. The detail modal (single auction, live countdown, bid form)
   ===================================================================== */

/* ---------- 1. Nav tab ---------- */
.nav__auctions-toggle {
  /* Champagne-gold gradient — the same family as the original Sur Mesure
     button used to be, but cleaner.  Distinctive enough that the eye
     reads it as "premium / time-sensitive" without screaming. */
  background: linear-gradient(135deg,
    rgba(244, 224, 179, 0.55) 0%,
    rgba(212, 171, 104, 0.55) 50%,
    rgba(236, 209, 160, 0.55) 100%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.nav__auctions-toggle:hover {
  background: linear-gradient(135deg,
    rgba(244, 224, 179, 0.85) 0%,
    rgba(212, 171, 104, 0.85) 50%,
    rgba(236, 209, 160, 0.85) 100%);
}
.nav__auctions-toggle .nav__season-icon {
  display: inline-flex;
  align-items: center;
  color: #8a6a2a;
}
/* Pulsing red dot when any auction is live — needs to be set by JS
   on the toggle via `data-has-live="true"`.  Without the attribute
   the dot stays hidden.  Same rule covers the mobile-drawer
   entrance so the live-indicator is visible in both places. */
.nav__auctions-toggle[data-has-live="true"]::after,
.mobile-menu__auctions-toggle[data-has-live="true"]::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d44848;
  box-shadow: 0 0 0 0 rgba(212, 72, 72, 0.6);
  animation: auctionPulse 1.6s ease-out infinite;
}
/* The mobile drawer's Auktionen item needs `position: relative` so
   the absolutely-positioned ::after dot anchors to it. */
.mobile-menu__auctions-toggle {
  position: relative;
}
@keyframes auctionPulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 72, 72, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(212, 72, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 72, 72, 0); }
}

/* ---------- 2. List panel (/auktionen) ---------- */
.auctions-list {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(180deg, #fdfaf4 0%, #f5efe5 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
}
.auctions-list[data-open="true"] {
  display: block;
  animation: auctionsListIn 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes auctionsListIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auctions-list__head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 120px 32px 24px;
  background: linear-gradient(180deg, rgba(253, 250, 244, 0.96) 75%, rgba(253, 250, 244, 0));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: center;
}
.auctions-list__title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, #8a6a2a 0%, #c89c52 50%, #8a6a2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auctions-list__sub {
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(74, 57, 32, 0.7);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.55;
}
.auctions-list__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(22, 22, 22, 0.10);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--color-text);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}
.auctions-list__close:hover { background: #fff; transform: scale(1.04); }

.auctions-list__grid {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.auctions-loader,
.auctions-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 18px;
  color: rgba(74, 57, 32, 0.7);
}
.auctions-empty h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  margin: 0 0 8px;
  color: var(--color-text);
}
.auctions-empty p { font-size: 15px; max-width: 480px; margin: 0 auto; line-height: 1.6; }

/* ---------- Auction card ---------- */
.auctions-card {
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 18px 40px -22px rgba(22, 22, 22, 0.25),
    inset 0 0 0 1px rgba(181, 142, 76, 0.18);
  cursor: pointer;
  transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
  display: flex;
  flex-direction: column;
}
.auctions-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 28px 56px -22px rgba(181, 142, 76, 0.4),
    inset 0 0 0 1px rgba(181, 142, 76, 0.4);
}
.auctions-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5efe5;
}
.auctions-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.auctions-card__badge--live {
  background: rgba(212, 72, 72, 0.95);
  color: #fff;
  position: relative;
  padding-left: 22px;
}
.auctions-card__badge--live::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: auctionPulse 1.6s ease-out infinite;
}
.auctions-card__badge--soon  { background: rgba(212, 171, 104, 0.95); color: #2a1d09; }
.auctions-card__badge--ended { background: rgba(120, 120, 120, 0.85); color: #fff; }
.auctions-card__badge--sold  { background: rgba(40, 96, 60, 0.92); color: #fff; }

.auctions-card__body { padding: 18px 20px 22px; }
.auctions-card__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 10px;
  line-height: 1.2;
  color: var(--color-text);
}
.auctions-card__price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px;
}
.auctions-card__price-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(74, 57, 32, 0.6);
}
.auctions-card__price-value {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  color: #8a6a2a;
}
.auctions-card__bidders {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(74, 57, 32, 0.7);
  margin: 0 0 12px;
}
.auctions-card__countdown {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(181, 142, 76, 0.15);
}
.auctions-card__countdown-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(74, 57, 32, 0.6);
}
.auctions-card__countdown-value {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.auctions-card__countdown[data-expired="true"] .auctions-card__countdown-value {
  color: rgba(74, 57, 32, 0.5);
}

/* ---------- 3. Detail modal ---------- */
.auctions-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
}
.auctions-modal[data-open="true"] {
  display: block;
  animation: auctionsModalIn 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes auctionsModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.auctions-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 8, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.auctions-modal__sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(960px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 40px 80px -28px rgba(0, 0, 0, 0.5);
}
.auctions-modal__body {
  display: contents;
}
.auctions-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(22, 22, 22, 0.10);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--color-text);
  transition: background 160ms var(--ease);
}
.auctions-modal__close:hover { background: #fff; }

.auctions-modal__media {
  position: relative;
  background-color: #f5efe5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 360px;
}
.auctions-modal__badge {
  position: absolute;
  top: 18px;
  left: 18px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  background: rgba(212, 72, 72, 0.95);
  color: #fff;
  padding: 6px 14px;
  padding-left: 26px;
  border-radius: 999px;
  position: absolute;
}
.auctions-modal__badge::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: auctionPulse 1.6s ease-out infinite;
}

.auctions-modal__info {
  padding: 36px 34px 30px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auctions-modal__eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8a6a2a;
  font-weight: 600;
  margin: 0;
}
.auctions-modal__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  margin: 0;
  line-height: 1.15;
  color: var(--color-text);
}
.auctions-modal__desc {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(74, 57, 32, 0.85);
  margin: 0;
}

.auctions-modal__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid rgba(181, 142, 76, 0.18);
  border-bottom: 1px solid rgba(181, 142, 76, 0.18);
}
.auctions-modal__stat-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(74, 57, 32, 0.6);
  margin-bottom: 4px;
}
.auctions-modal__stat-value {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: #8a6a2a;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.auctions-modal__stat-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(74, 57, 32, 0.7);
  margin-top: 4px;
}
.auctions-modal__stat--countdown .auctions-modal__stat-value {
  color: var(--color-text);
  font-size: 22px;
}

.auctions-bid-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auctions-bid-form__label {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(74, 57, 32, 0.85);
}
.auctions-bid-form__label strong {
  color: #8a6a2a;
  font-weight: 600;
}
.auctions-bid-form__row {
  display: flex;
  gap: 10px;
}
.auctions-bid-form__row input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(181, 142, 76, 0.35);
  background: rgba(253, 250, 244, 0.9);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.auctions-bid-form__row input:focus {
  border-color: #b58e4c;
  background: #fff;
}
.auctions-bid-form__submit {
  height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #d4ab68 0%, #b58e4c 50%, #8a6a2a 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 22px -10px rgba(138, 106, 42, 0.5);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.auctions-bid-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(138, 106, 42, 0.6);
}
.auctions-bid-form__hint {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(74, 57, 32, 0.6);
  margin: 4px 0 0;
}
.auctions-bid-form__feedback {
  font-family: var(--font-sans);
  font-size: 13px;
  margin: 4px 0 0;
  min-height: 18px;
}
.auctions-bid-form__feedback[data-kind="error"]   { color: #d44848; }
.auctions-bid-form__feedback[data-kind="success"] { color: #2a7048; }
.auctions-bid-form__feedback[data-kind="info"]    { color: rgba(74, 57, 32, 0.7); }

.auctions-buy-now {
  margin-top: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg,
    rgba(244, 224, 179, 0.45) 0%,
    rgba(212, 171, 104, 0.25) 100%);
  border: 1px solid rgba(181, 142, 76, 0.25);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
.auctions-buy-now__label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(74, 57, 32, 0.7);
  margin: 0;
  grid-column: 1;
}
.auctions-buy-now__price {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: #8a6a2a;
  margin: 0;
  grid-column: 1;
}
.auctions-buy-now__btn {
  grid-column: 2;
  grid-row: 1 / span 2;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid #8a6a2a;
  background: transparent;
  color: #8a6a2a;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.auctions-buy-now__btn:hover {
  background: #8a6a2a;
  color: #fff;
}

.auctions-scheduled-notice,
.auctions-ended-notice {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(74, 57, 32, 0.75);
  padding: 14px 16px;
  background: rgba(181, 142, 76, 0.08);
  border-radius: 12px;
  margin: 0;
}
.auctions-scheduled-notice p,
.auctions-ended-notice p { margin: 0; }

.auctions-bid-history,
.auctions-terms {
  font-family: var(--font-sans);
  font-size: 13px;
  border-top: 1px solid rgba(181, 142, 76, 0.18);
  padding-top: 14px;
}
.auctions-bid-history summary,
.auctions-terms summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(74, 57, 32, 0.85);
  padding: 4px 0;
}
.auctions-bid-history__list { margin-top: 10px; max-height: 220px; overflow-y: auto; }
.auctions-bid-history__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(22, 22, 22, 0.05);
}
.auctions-bid-history__bidder { color: rgba(74, 57, 32, 0.85); }
.auctions-bid-history__amount {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: #8a6a2a;
  font-variant-numeric: tabular-nums;
}
.auctions-bid-history__row[data-status="winning"] .auctions-bid-history__amount,
.auctions-bid-history__row:first-child .auctions-bid-history__amount {
  color: #2a7048;
}
.auctions-bid-history__time { color: rgba(74, 57, 32, 0.55); font-size: 11px; }
.auctions-bid-history__empty { color: rgba(74, 57, 32, 0.6); font-style: italic; }
.auctions-terms p {
  margin: 10px 0 0;
  line-height: 1.55;
  color: rgba(74, 57, 32, 0.75);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .auctions-modal__sheet {
    grid-template-columns: 1fr;
    grid-template-rows: 300px 1fr;
    width: calc(100vw - 12px);
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }
  .auctions-modal__media { min-height: 0; }
  .auctions-modal__info { padding: 22px 22px 24px; gap: 12px; }
  .auctions-list__head { padding: 90px 20px 18px; }
  .auctions-list__grid { padding: 0 16px 60px; gap: 18px; }
  .auctions-modal__stats { grid-template-columns: 1fr 1fr; }
  .auctions-buy-now { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .auctions-buy-now__btn { grid-column: 1; grid-row: 3; width: 100%; }
}
