/* Celebrity Auctions: celebrity-auctions.com and .co.uk only (MasterPage.master.vb loads it).
   The other sites in this project use styles1.css and menu1.css.
   Concept: an auction-house catalogue under a premiere spotlight. Ink masthead with a marquee
   bulb rule, ivory pages, each eBay listing presented as a numbered lot. */

:root {
  --ink: #14110e;
  --ink-soft: #221d18;
  --on-ink: #f4ecdf;
  --on-ink-muted: #c4b8a6;
  --gold: #c9a45c;
  --bulb: #f6d98a;

  --bg: #f6f1e7;
  --surface: #fffdf8;
  --plate: #f3ede2;
  --text: #1b1713;
  --muted: #6c6156;
  --rule: #e4d8c4;
  --rule-strong: #cdbd9f;
  --accent-text: #7a5a24;
  --crimson: #9b1c22;
  --crimson-hover: #7e1519;
  --shadow: 0 24px 44px -26px rgba(20, 17, 14, .5);

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Bodoni MT", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --wrap: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110f0d;
    --surface: #1b1815;
    --plate: #efe8dc; /* photos stay on a lit plate, like a display case */
    --text: #f1e9dc;
    --muted: #a99c8a;
    --rule: #2f2924;
    --rule-strong: #4a4037;
    --accent-text: #d9b874;
    --crimson: #c4343a;
    --crimson-hover: #d9484e;
    --shadow: 0 24px 44px -24px rgba(0, 0, 0, .8);
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

form { margin: 0; padding: 0; }
img { border: 0; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Masthead ---------- */

#header {
  position: relative;
  margin: 0;
  padding: 48px 16px 0;
  text-align: center;
  color: var(--on-ink);
  background:
    radial-gradient(60% 120% at 50% -10%, rgba(201, 164, 92, .26), transparent 62%),
    linear-gradient(180deg, #0d0b09 0%, var(--ink) 55%, var(--ink-soft) 100%);
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.wordmark-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font: 500 11px/1 var(--sans);
  letter-spacing: .38em;
  text-transform: uppercase;
}

.wordmark-kicker::before,
.wordmark-kicker::after {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

.wordmark-name {
  margin-top: 18px;
  font: 400 clamp(40px, 7.2vw, 88px)/.95 var(--serif);
  letter-spacing: -.015em;
}

.wordmark-name em {
  font-style: italic;
  color: var(--gold);
}

.wordmark:hover .wordmark-name em { color: var(--bulb); }

.masthead-tagline {
  max-width: 36em;
  margin: 18px auto 0;
  color: var(--on-ink-muted);
  font: 400 15px/1.55 var(--sans);
  letter-spacing: .01em;
}

/* ---------- Navigation ---------- */

#nav {
  position: relative;
  max-width: var(--wrap);
  margin: 34px auto 0;
  padding: 14px 0 70px; /* room for the search card that overlaps the masthead */
  font-family: var(--sans);
}

/* Marquee bulbs */
#nav::before {
  content: "";
  display: block;
  height: 6px;
  margin: 0 auto 6px;
  max-width: 760px;
  background: radial-gradient(circle, var(--bulb) 0 1.6px, rgba(246, 217, 138, .25) 2.2px, transparent 3px) center / 16px 6px repeat-x;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
          mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

#nav > a { display: none; } /* the old show/hide toggle links */

#nav > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#nav > ul > li { position: relative; }

#nav > ul > li > a {
  display: block;
  padding: 14px 20px;
  color: var(--on-ink);
  font: 500 12px/1 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
}

#nav > ul > li > a::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 9px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s ease;
}

#nav > ul > li:hover > a::after,
#nav > ul > li:focus-within > a::after { transform: scaleX(1); }

#nav > ul ul {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 50%;
  min-width: 230px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

#nav > ul > li:hover > ul,
#nav > ul > li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

#nav > ul ul a {
  display: block;
  padding: 8px 22px;
  font: 400 16px/1.3 var(--serif);
  text-decoration: none;
}

#nav > ul ul a:hover,
#nav > ul ul a:focus-visible {
  color: var(--crimson);
  background: var(--plate);
}

/* Lists longer than eight names open in two columns */
#nav > ul ul:has(> li:nth-child(9)) {
  min-width: 460px;
  columns: 2;
  column-gap: 0;
}

#nav > ul ul li { break-inside: avoid; }

/* Keep the first and last lists inside the page */
#nav > ul > li:first-child > ul { left: 0; transform: translate(0, 8px); }
#nav > ul > li:last-child > ul { left: auto; right: 0; transform: translate(0, 8px); }

#nav > ul > li:first-child:hover > ul,
#nav > ul > li:first-child:focus-within > ul,
#nav > ul > li:last-child:hover > ul,
#nav > ul > li:last-child:focus-within > ul { transform: translate(0, 0); }

/* ---------- Content and search ---------- */

#content {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 72px;
  text-align: left;
}

#content > h1:empty { display: none; }

#searchoptions {
  position: relative;
  z-index: 5;
  margin: -46px auto 0;
  padding: 0;
  background: none;
  font-size: inherit;
}

#searchtop {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: auto;
  max-width: 780px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--rule);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  color: var(--muted);
  font-size: 12px;
}

#searchtop input[type="text"] {
  flex: 1 1 260px;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1 var(--sans);
  -webkit-appearance: none;
          appearance: none;
}

#searchtop input[type="text"]::placeholder { color: var(--muted); opacity: 1; }

#searchtop input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 92, .28);
}

#searchtop input[type="submit"] {
  flex: 0 0 auto;
  height: 54px;
  padding: 0 30px;
  border: 0;
  border-radius: 0;
  background: var(--crimson);
  color: #fff;
  font: 500 12px/1 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
  transition: background-color .2s ease;
}

#searchtop input[type="submit"]:hover { background: var(--crimson-hover); }

#searchtop .searchlocation,
#searchtop p {
  flex: 1 1 100%;
  margin: 0;
  line-height: 1.5;
}

#searchtop .searchlocation { padding-top: 2px; letter-spacing: .04em; }

#searchtop .searchlocation a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

#searchtop p { font-style: italic; }

/* "You could also try:" line from DisplayRelatedItems */
#content > b {
  color: var(--accent-text);
  font: 500 11px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* ---------- Results: the catalogue ---------- */
/* The container's ID is rendered as ctl00_ContentPlaceHolder1_SearchResults, so match its ending */

[id$="SearchResults"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 30px 24px;
  width: auto;
  margin: 48px 0 0;
  counter-reset: lot;
}

[id$="SearchResults"] > .header {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--rule-strong);
  background: none;
  text-align: left;
}

[id$="SearchResults"] > .header h1 {
  display: block;
  margin: 0;
  color: var(--text);
  font: 400 clamp(26px, 3.4vw, 42px)/1.1 var(--serif);
  letter-spacing: -.01em;
}

[id$="SearchResults"] > .header p { margin: 0; }

[id$="SearchResults"] > .header a {
  color: var(--accent-text);
  font: 500 11px/1.4 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}

[id$="SearchResults"] > .header a:hover { color: var(--crimson); }

.sr_clear { display: none; }

.result {
  position: relative;
  display: flex;
  flex-direction: column;
  float: none;
  clear: none !important;
  width: auto;
  max-width: none;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  counter-increment: lot;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.result:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

/* Lot number, from the order on the page */
.result::before {
  content: "Lot " counter(lot, decimal-leading-zero);
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 16px;
  color: #6c6156;
  font: 500 10px/1 var(--sans);
  letter-spacing: .26em;
  text-transform: uppercase;
  pointer-events: none;
}

.result .pic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  width: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 40px 22px 22px !important;
  border-bottom: 1px solid var(--rule);
  background: var(--plate);
}

.result .pic a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.result .pic img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply; /* white photo backgrounds melt into the plate */
  transition: transform .5s ease;
}

.result:hover .pic img { transform: scale(1.035); }

/* Listing type tag (browsers without :has() simply don't show it) */
.result:has(.ic_bid) .pic::after,
.result:has(.cost p + p) .pic::after {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 5px 8px 4px;
  font: 600 9.5px/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
}

.result:has(.ic_bid) .pic::after {
  content: "Auction";
  color: #fff;
  background: var(--crimson);
}

.result:has(.cost p + p) .pic::after {
  content: "Buy it now";
  color: var(--on-ink);
  background: var(--ink);
}

.result .ttl {
  flex: 1 1 auto;
  float: none;
  width: auto !important;
  padding: 18px 18px 0 !important;
  text-align: left;
  overflow: visible !important;
}

.result h2 {
  margin: 0;
  padding: 0;
  font: 400 17px/1.32 var(--serif);
}

.result h2 a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}

/* The whole card opens the listing */
.result h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.result:hover h2 a { color: var(--crimson); }

.result .ttl p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 12px 0 0;
  color: var(--muted);
  font: 500 10.5px/1.45 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.result .ttl p span {
  padding: 0;
  background: none;
  color: inherit;
  text-transform: inherit;
}

.result .ttl .ic_bid { color: var(--crimson); font-weight: 600; }
.result .ttl .icontime { color: var(--text); }
.result .ttl .ic_del2 { color: var(--accent-text); }

.result .cost {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  float: none;
  margin-top: auto;
  padding: 18px;
  color: var(--text);
  line-height: 1;
  text-align: left;
}

.result .cost p { margin: 0; }

.result .cost > p:first-child {
  font: 500 26px/1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.01em;
}

.result .cost > p:first-child::before {
  content: "Price";
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font: 500 10px/1 var(--sans);
  letter-spacing: .26em;
  text-transform: uppercase;
}

.result:has(.ic_bid) .cost > p:first-child::before { content: "Current bid"; }

/* Buy It Now: a real link, drawn as a button in place of the old GIF */
.result .cost p + p a {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--on-ink);
  font: 500 10.5px/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s ease;
}

.result .cost p + p a::before { content: "Buy it now"; }
.result .cost p + p a img { display: none; }
.result .cost p + p a:hover { background: var(--crimson); }

/* Auctions: the card itself is the link, so this is a visual cue only */
.result:has(.ic_bid) .cost::after {
  content: "Bid on eBay";
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--crimson);
  color: var(--crimson);
  font: 500 10.5px/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background-color .2s ease, color .2s ease;
}

.result:has(.ic_bid):hover .cost::after {
  background: var(--crimson);
  color: #fff;
}

/* ---------- Messages ---------- */

.sr_ebaylink,
.sr_noresult,
.emsg {
  grid-column: 1 / -1;
  float: none;
  margin: 0 !important;
  padding: 48px 24px !important;
  border: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
  color: var(--muted);
  text-align: center;
}

.emsg { margin-top: 48px !important; }

.sr_ebaylink p { font: 400 15px/1.5 var(--sans) !important; }

.sr_ebaylink a {
  color: var(--crimson) !important;
  font: 400 24px/1.3 var(--serif) !important;
  text-underline-offset: 4px;
}

/* Bottom text and links some sites add */
#content > p {
  max-width: 72ch;
  margin: 48px auto 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Footer ---------- */

#MainFooter {
  padding: 48px 16px;
  background: var(--ink);
  color: var(--on-ink-muted);
  font: 400 12px/1.8 var(--sans);
  letter-spacing: .08em;
  text-align: center;
}

#MainFooter a {
  margin-right: 4px;
  color: var(--on-ink);
  font: 400 italic 20px/1.2 var(--serif);
  letter-spacing: 0;
  text-decoration: none;
}

#MainFooter a:hover { color: var(--gold); }

/* ---------- Smaller screens ---------- */

@media (max-width: 720px) {
  #header { padding-top: 34px; }

  .wordmark-kicker { letter-spacing: .28em; font-size: 10px; }
  .wordmark-kicker::before,
  .wordmark-kicker::after { width: 20px; }

  .masthead-tagline { font-size: 14px; }

  #nav { margin-top: 24px; padding-bottom: 58px; }

  /* Categories become one swipeable row; the per-celebrity lists stay desktop-only */
  #nav > ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
            mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
  }

  #nav > ul::-webkit-scrollbar { display: none; }
  #nav > ul > li > a { padding: 12px 14px; white-space: nowrap; }
  #nav > ul > li > a::after { display: none; }
  #nav > ul ul { display: none; }

  #content { padding: 0 16px 56px; }

  #searchoptions { margin-top: -38px; }
  #searchtop { padding: 12px; }
  #searchtop input[type="text"] { flex-basis: 100%; height: 50px; }
  #searchtop input[type="submit"] { flex: 1 1 100%; height: 48px; }

  [id$="SearchResults"] { margin-top: 36px; }
}

@media (max-width: 560px) {
  .wordmark-kicker { gap: 0; font-size: 9.5px; letter-spacing: .2em; }
  .wordmark-kicker::before,
  .wordmark-kicker::after { display: none; }

  [id$="SearchResults"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .result::before { top: 10px; left: 10px; font-size: 9px; letter-spacing: .2em; }
  .result .pic { padding: 30px 12px 12px !important; }

  .result:has(.ic_bid) .pic::after,
  .result:has(.cost p + p) .pic::after { top: 8px; right: 8px; font-size: 8.5px; padding: 4px 6px 3px; letter-spacing: .14em; }

  .result .ttl { padding: 12px 12px 0 !important; }
  .result h2 { font-size: 15px; }
  .result .ttl p { gap: 2px 10px; font-size: 9.5px; letter-spacing: .08em; }
  .result .ttl .ic_loc { display: none; }

  .result .cost { padding: 12px; gap: 10px; }
  .result .cost > p:first-child { font-size: 21px; }
  .result .cost p + p,
  .result .cost p + p a,
  .result:has(.ic_bid) .cost::after { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .result:hover, .result:hover .pic img { transform: none; }
}
