/* Auction detail — shared shell for open / ended / scheduled */

body.page-auction.is-auc-detail .auc-shell {
  width: min(100% - 2rem, 44rem);
  max-width: 44rem;
}

/* Hero สูงขึ้น + การ์ดทับซ้อนด้านหน้า */
body.page-auction.is-auc-detail .auc-hero {
  padding-bottom: calc(clamp(1.25rem, 2.5vw, 2rem) + 150px);
}

body.page-auction.is-auc-detail .auc-body {
  position: relative;
  z-index: 2;
  margin-top: -70px;
  padding-top: 0;
}

body.page-auction .auc-detail {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1rem;
}

body.page-auction .auc-detail__main {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 1.5rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, .98), rgba(246, 251, 255, .96));
  box-shadow: 0 14px 36px rgba(31, 78, 133, .16);
}

body.page-auction .auc-detail__cover {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: linear-gradient(145deg, #dceeff, #f6fbff);
}

body.page-auction .auc-detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

body.page-auction .auc-detail__cover-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .7), transparent 42%),
    linear-gradient(160deg, #d7e9ff, #eef5ff 55%, #f7fbff);
}

body.page-auction .auc-detail__cover.is-ended > img,
body.page-auction .auc-detail__cover.is-ended > .auc-detail__cover-fallback {
  filter: brightness(.42) saturate(.55);
}

body.page-auction .auc-detail__ended-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: 1.1rem 1rem;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 20, 40, .16), rgba(8, 20, 40, .46));
}

body.page-auction .auc-detail__ended-avatar {
  display: grid;
  place-items: center;
  width: clamp(5.5rem, 34%, 7.5rem);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
  background: #dbe7f6;
  color: #0b3d83;
  font-size: 2rem;
  font-weight: 900;
}

body.page-auction .auc-detail__ended-avatar.is-empty {
  background: #111827;
  color: #fff;
}

body.page-auction .auc-detail__ended-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none;
}

body.page-auction .auc-detail__ended-initial {
  line-height: 1;
}

body.page-auction .auc-detail__ended-kicker {
  margin-top: .25rem;
  color: #fff;
  font-size: .9rem;
  font-weight: 750;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}

body.page-auction .auc-detail__ended-name {
  color: #fff;
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}

body.page-auction .auc-detail__ended-price {
  color: #ffe08a;
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  font-weight: 850;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}

body.page-auction .auc-detail__body {
  padding: 1.05rem 1.2rem 1.25rem;
}

body.page-auction .auc-detail__title {
  margin: .65rem 0 0;
  color: #082653;
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -.02em;
}

body.page-auction .auc-detail__lead {
  margin: .55rem 0 0;
  color: #5b7394;
  font-size: .95rem;
  line-height: 1.55;
}

body.page-auction .auc-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 1.05rem 0 0;
  padding: .55rem 0;
  list-style: none;
}

body.page-auction .auc-detail-stats__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: .45rem .35rem;
}

body.page-auction .auc-detail-stats__item + .auc-detail-stats__item {
  border-left: 1px solid rgba(39, 91, 151, .16);
}

/* ก้อนไอคอน+ข้อความ — จัดก้อนนี้ให้อยู่กลางคอลัมน์ ไม่จัดทุกชิ้น center */
body.page-auction .auc-detail-stats__cluster {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  max-width: 100%;
  text-align: left;
}

body.page-auction .auc-detail-stats__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: #0b3d83;
}

body.page-auction .auc-detail-stats__icon svg {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
}

body.page-auction .auc-detail-stats__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .08rem;
  min-width: 0;
}

body.page-auction .auc-detail-stats__value {
  color: #082653;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

body.page-auction .auc-detail-stats__label {
  color: #7186a2;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.2;
}

body.page-auction .auc-detail-deal {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: center;
  gap: 0;
  margin-top: 1rem;
  padding: 1.05rem 1.1rem;
  border-radius: 1.25rem;
  text-align: left;
}

body.page-auction .auc-detail-deal__time {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding-right: .9rem;
}

body.page-auction .auc-detail-deal__clock {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: rgba(198, 40, 40, .1);
  color: #c62828;
}

body.page-auction .auc-detail-deal__clock svg {
  display: block;
}

body.page-auction .auc-detail-deal__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .12rem;
  min-width: 0;
}

body.page-auction .auc-detail-deal__price {
  min-width: 0;
  padding-left: .95rem;
  border-left: 1px solid rgba(39, 91, 151, .16);
}

body.page-auction .auc-detail-deal__label {
  display: block;
  margin-bottom: .15rem;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.2;
}

body.page-auction .auc-detail-deal__value {
  display: block;
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

body.page-auction .auc-detail-form {
  margin-top: 1.1rem;
}

body.page-auction .auc-detail-form__label {
  display: block;
  margin-bottom: .45rem;
  color: #173b6b;
  font-size: .9rem;
  font-weight: 800;
}

body.page-auction .auc-detail-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

body.page-auction .auc-detail-input {
  width: 100%;
  min-height: 3.2rem;
  padding: .7rem 9.5rem .7rem 1rem;
  border: 1.5px solid rgba(48, 105, 169, .28);
  border-radius: 1rem;
  background: #fff;
  color: #082653;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
}

body.page-auction .auc-detail-input:focus {
  outline: 3px solid rgba(34, 125, 220, .28);
  border-color: #2787df;
}

body.page-auction .auc-detail-input-hint {
  position: absolute;
  right: .85rem;
  color: #8aa0bb;
  font-size: .78rem;
  font-weight: 650;
  pointer-events: none;
  white-space: nowrap;
}

body.page-auction .auc-detail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  min-height: 3.4rem;
  margin-top: .85rem;
  padding: .75rem 1.1rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

body.page-auction .auc-detail-cta:hover {
  transform: translateY(-1px);
}

body.page-auction .auc-detail-cta.is-primary {
  background: linear-gradient(180deg, #2589ed, #0753b0);
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 89, 177, .24);
}

body.page-auction .auc-detail-cta.is-ghost {
  border: 1.5px solid #1b64b5;
  background: rgba(255, 255, 255, .9);
  color: #104887;
}

body.page-auction .auc-detail-hint {
  margin: .7rem 0 0;
  color: #7186a2;
  font-size: .82rem;
  line-height: 1.45;
}

body.page-auction .auc-detail-winner {
  display: grid;
  grid-template-columns: minmax(4.5rem, 6.5rem) minmax(0, 1fr);
  gap: .9rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1.35rem;
  background: linear-gradient(135deg, #fff8e8, #fffdf6);
}

body.page-auction .auc-detail-winner__art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #dbe7f6;
  color: #0b3d83;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(31, 78, 133, .16);
}

body.page-auction .auc-detail-winner__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-auction .auc-detail-winner__initial {
  line-height: 1;
}

body.page-auction .auc-detail-winner__label {
  display: block;
  color: #8a6a20;
  font-size: .78rem;
  font-weight: 750;
}

body.page-auction .auc-detail-winner__name {
  display: block;
  margin-top: .2rem;
  color: #082653;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.page-auction .auc-detail-winner__price-label {
  display: block;
  margin-top: .55rem;
  color: #7186a2;
  font-size: .78rem;
  font-weight: 650;
}

body.page-auction .auc-detail-winner__price {
  display: block;
  margin-top: .12rem;
  color: #0b3d83;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

body.page-auction .auc-detail-winner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .85rem;
  min-height: 2.6rem;
  padding: .55rem 1.05rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #2589ed, #0753b0);
  color: #fff;
  font-size: .92rem;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(16, 89, 177, .22);
}

body.page-auction .auc-detail-winner__cta:hover {
  filter: brightness(1.04);
}

body.page-auction .auc-related__media-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #d7e9ff, #eef5ff 55%, #f7fbff);
}

body.page-auction .auc-detail-schedule {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 1.25rem;
  background: linear-gradient(145deg, #fff8eb, #fffdf8);
  color: #b45309;
}

body.page-auction .auc-detail-schedule__label {
  display: block;
  font-size: .82rem;
  font-weight: 750;
}

body.page-auction .auc-detail-schedule__value {
  display: block;
  margin-top: .3rem;
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  font-weight: 900;
  line-height: 1.3;
}

/* สินค้า Active รหัสเดียวกับรอบประมูล — ทางเลือกสั่งซื้อ */
body.page-auction .auc-related__lead {
  margin: 0 0 .85rem;
  color: #5b7394;
  font-size: .9rem;
  line-height: 1.45;
}

body.page-auction .auc-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

body.page-auction .auc-related__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 1.15rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, .98), rgba(246, 251, 255, .96));
  box-shadow: 0 8px 20px rgba(31, 78, 133, .1);
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease;
}

body.page-auction .auc-related__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(31, 78, 133, .14);
}

body.page-auction .auc-related__media {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(145deg, #dceeff, #f6fbff);
}

body.page-auction .auc-related__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-auction .auc-related__body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .75rem .8rem .85rem;
}

body.page-auction .auc-related__name {
  color: #082653;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.page-auction .auc-related__price {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  flex-wrap: wrap;
}

body.page-auction .auc-related__price-sale {
  color: #0b3d83;
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

body.page-auction .auc-related__price-was {
  color: #8aa0bb;
  font-size: .78rem;
  font-weight: 650;
  text-decoration: line-through;
}

body.page-auction .auc-related__cta {
  margin-top: .15rem;
  color: #15549a;
  font-size: .78rem;
  font-weight: 750;
}

@media (max-width: 760px) {
  body.page-auction.is-auc-detail .auc-shell {
    width: calc(100% - 1rem);
  }

  body.page-auction .auc-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }

  body.page-auction .auc-detail__main {
    border-radius: 1.25rem;
  }

  body.page-auction .auc-detail__body {
    padding: .9rem .9rem 1.05rem;
  }

  body.page-auction.is-auc-detail .auc-hero {
    padding-bottom: calc(1.1rem + 110px);
  }

  body.page-auction.is-auc-detail .auc-body {
    margin-top: -56px;
  }

  body.page-auction .auc-detail-stats__item {
    padding: .35rem .2rem;
  }

  body.page-auction .auc-detail-stats__cluster {
    gap: .4rem;
  }

  body.page-auction .auc-detail-stats__icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  body.page-auction .auc-detail-stats__value {
    font-size: 1rem;
  }

  body.page-auction .auc-detail-deal {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    padding: .9rem .85rem;
  }

  body.page-auction .auc-detail-deal__value {
    font-size: clamp(1.25rem, 5.2vw, 1.7rem);
  }

  body.page-auction .auc-detail-input {
    padding-right: 7.8rem;
    font-size: .98rem;
  }

  body.page-auction .auc-detail-input-hint {
    font-size: .68rem;
    max-width: 7.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.page-auction .auc-detail-winner {
    grid-template-columns: 4.6rem minmax(0, 1fr);
    gap: .7rem;
    padding: .85rem;
  }
}

@media (max-width: 390px) {
  body.page-auction .auc-detail-stats__label {
    font-size: .68rem;
  }

  body.page-auction .auc-detail-deal__clock {
    width: 1.85rem;
    height: 1.85rem;
  }

  body.page-auction .auc-detail-deal__label {
    font-size: .8rem;
  }

  body.page-auction .auc-detail-deal__value {
    font-size: 1.15rem;
  }
}
