/* =========================================================================
   Amati Maker Page Enhancements — brand layer
   Palette: Amati Brand Guidelines 1.0 (Newwave, Aug 2024).
   Headings: Lora as the agreed stand-in for P22 Mackinac Pro. Swap the
   font-family lines if/when the licensed webfont is added.
   Everything is scoped to body.amp-maker so nothing leaks elsewhere.
   ========================================================================= */

body.amp-maker {
  --amp-bay: #44482E;
  --amp-mallard: #616450;
  --amp-taupe: #B3B399;
  --amp-sienna: #BB6E33;
  --amp-sycamore: #947437;
  --amp-ink: #272820;
  --amp-taupe-20: #E1E1D6;
  --amp-syc-20: #D4C7AF;
  --amp-cream: #EDE9E0;
  --amp-paper: #F6F4EF;
  --amp-serif: 'Lora', Georgia, serif;
}

/* ---- light-touch restyle of existing blocks (verify visually in QA) ---- */
body.amp-maker .divider-heading {
  font-family: var(--amp-serif);
  color: var(--amp-bay);
}
body.amp-maker #amati-auction-price table thead th,
body.amp-maker .table-responsive thead th {
  background: var(--amp-bay);
  color: var(--amp-cream);
  font-family: var(--amp-serif);
  font-weight: 500;
}
body.amp-maker .accordion_heading { color: var(--amp-bay); }
body.amp-maker .highestAuctionPrice { color: var(--amp-bay); }

/* ------------------------- stats tiles (injected) ----------------------- */
.amp-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin: 0 0 26px;
}
.amp-tile {
  background: var(--amp-paper); border: 1px solid var(--amp-taupe);
  border-radius: 12px; padding: 18px 20px;
}
.amp-tile .k {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--amp-mallard);
}
.amp-tile .v {
  font-family: var(--amp-serif); font-size: 30px; line-height: 1.1;
  margin: 8px 0 4px; color: var(--amp-bay);
}
.amp-tile .s { font-size: 12.5px; color: var(--amp-mallard); }
.amp-tile.hi { background: var(--amp-sycamore); border-color: var(--amp-sycamore); }
.amp-tile.hi .k, .amp-tile.hi .s { color: rgba(255,255,255,.85); }
.amp-tile.hi .v { color: #fff; }
.amp-caveat {
  font-size: 13px; color: var(--amp-mallard);
  margin: 0 0 22px; font-style: italic;
}

/* ------------------------ consignment band (injected) ------------------- */
.amp-consign {
  background: var(--amp-sienna); color: #fff;
  border-radius: 14px; padding: 34px 36px; margin: 34px 0;
}
.amp-consign h3 {
  font-family: var(--amp-serif); font-weight: 500;
  font-size: 28px; color: #fff; margin: 0 0 12px;
}
.amp-consign p { color: rgba(255,255,255,.92); max-width: 44em; margin: 0 0 20px; }
.amp-consign .amp-btn {
  display: inline-block; background: var(--amp-cream); color: var(--amp-ink);
  font-family: var(--amp-serif); font-size: 16px; text-decoration: none;
  border-radius: 999px; padding: 13px 26px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.amp-consign .amp-btn:hover { background: #fff; }
.amp-consign ul {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 13.5px; color: rgba(255,255,255,.88);
}
.amp-consign li::before { content: '\2713\00a0'; color: var(--amp-syc-20); }

/* -------------------- empty-state instruments panel --------------------- */
.amp-wanted {
  display: grid; grid-template-columns: 1.1fr .9fr;
  background: var(--amp-paper); border: 1px solid var(--amp-taupe);
  border-radius: 14px; overflow: hidden; margin: 34px 0;
}
.amp-wanted .amp-copy { padding: 30px 34px; }
.amp-wanted h3 {
  font-family: var(--amp-serif); font-weight: 500;
  font-size: 24px; color: var(--amp-bay); margin: 0 0 12px;
}
.amp-wanted p { margin: 0 0 14px; }
.amp-wanted .amp-side { background: var(--amp-bay); color: var(--amp-cream); padding: 28px 30px; }
.amp-wanted .amp-side h4 {
  font-family: var(--amp-serif); font-weight: 500; color: #fff; margin: 0 0 12px;
}
.amp-wanted .amp-side a {
  display: block; color: #fff; font-family: var(--amp-serif);
  text-decoration: none; padding: 9px 0;
  border-bottom: 1px solid rgba(237,233,224,.22);
}
.amp-wanted .amp-side a:hover { color: var(--amp-syc-20); }
.amp-wanted .amp-btn {
  display: inline-block; background: var(--amp-sienna); color: #fff;
  font-family: var(--amp-serif); border-radius: 999px;
  padding: 12px 24px; text-decoration: none;
}

/* --------------------------- sticky consign bar ------------------------- */
.amp-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  background: var(--amp-bay); color: var(--amp-cream);
  border-top: 2px solid var(--amp-sycamore);
  transform: translateY(110%); transition: transform .28s ease;
  box-shadow: 0 -8px 24px rgba(0,0,0,.22);
}
.amp-sticky.on { transform: translateY(0); }
.amp-sticky .amp-in {
  max-width: 1180px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 18px;
}
.amp-sticky .amp-msg { font-family: var(--amp-serif); font-size: 16px; }
.amp-sticky .amp-btn {
  margin-left: auto; background: var(--amp-sienna); color: #fff;
  font-family: var(--amp-serif); border-radius: 999px;
  padding: 10px 22px; text-decoration: none; white-space: nowrap;
}
.amp-sticky .amp-x {
  background: none; border: 0; color: var(--amp-taupe);
  font-size: 20px; cursor: pointer; padding: 4px 8px;
}

/* ------------------------------ 360 viewer ------------------------------ */
/* Component styles for <amati-spin>, retinted to brand. */
amati-spin { display: block; width: 100%; max-width: 400px; }
.as-frame { position: relative; background: #fff; border: 1px solid var(--amp-taupe-20, #e0dcd3); border-radius: 6px; overflow: hidden; touch-action: pan-y; }
.as-frame canvas { display: block; width: 100%; height: auto; cursor: grab; -webkit-user-select: none; user-select: none; }
.as-frame.as-dragging canvas { cursor: grabbing; }
.as-veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(246,244,239,.84); backdrop-filter: blur(2px); transition: opacity .35s ease; }
.as-veil[hidden] { display: none; }
.as-veil.as-fade { opacity: 0; pointer-events: none; }
.as-cta { font-family: var(--amp-serif, serif); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; background: var(--amp-bay, #44482E); color: #fff; border: 0; border-radius: 100px; padding: 13px 26px; cursor: pointer; }
.as-cta:hover { background: var(--amp-mallard, #616450); }
.as-bar { width: 132px; height: 2px; background: var(--amp-taupe, #B3B399); border-radius: 2px; overflow: hidden; }
.as-bar i { display: block; height: 100%; width: 0; background: var(--amp-sycamore, #947437); transition: width .12s linear; }
.as-pct { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--amp-mallard, #616450); }
.as-ui { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.as-btn { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid var(--amp-taupe, #B3B399); background: #fff; border-radius: 50%; cursor: pointer; color: var(--amp-ink, #272820); display: flex; align-items: center; justify-content: center; padding: 0; }
.as-btn:hover { border-color: var(--amp-sycamore, #947437); color: var(--amp-sycamore, #947437); }
.as-btn svg { width: 13px; height: 13px; fill: currentColor; }
.as-scrub { flex: 1 1 auto; height: 32px; position: relative; cursor: pointer; border: 1px solid var(--amp-taupe, #B3B399); border-radius: 4px; background: #fff center/auto 100% repeat-x; overflow: hidden; touch-action: none; }
.as-carriage { position: absolute; top: 0; bottom: 0; width: 4px; background: var(--amp-sycamore, #947437); opacity: .9; transform: translateX(-50%); pointer-events: none; }
.as-hint { margin-top: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--amp-mallard, #616450); }
dialog.as-full { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: #F6F4EF; overflow: hidden; }
dialog.as-full::backdrop { background: rgba(39,40,32,.93); }
.as-full-in { position: absolute; inset: 0; }
.as-full-in canvas { display: block; touch-action: none; -webkit-user-select: none; user-select: none; }
.as-close { position: fixed; top: 16px; right: 16px; z-index: 3; font-size: 18px; line-height: 1; }
.as-zoom-ui { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.95); border: 1px solid #B3B399; border-radius: 100px; padding: 8px 16px; box-shadow: 0 2px 16px rgba(39,40,32,.16); }
.as-zrange { width: 170px; accent-color: #947437; }
.as-zlabel { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: #616450; min-width: 38px; text-align: right; }
.as-full-hint { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 3; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #616450; }

/* ------------------------------- responsive ----------------------------- */
@media (max-width: 900px) {
  .amp-tiles { grid-template-columns: repeat(2, 1fr); }
  .amp-wanted { grid-template-columns: 1fr; }
  .as-zrange { width: 100px; }
  .as-full-hint { display: none; }
}
@media (max-width: 560px) {
  .amp-tiles { grid-template-columns: 1fr; }
  .amp-sticky .amp-msg { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .amp-sticky { transition: none; }
}
