/* Cheh Ming: minimal interactive touches on the original Builder design.
   No movement or decoration of its own: only hover feedback and a back-to-top
   button. Loaded on every page (see scripts/build_site.py). */

/* Header: light shadow once the page is scrolled */
.top-blocks--sticky { transition: box-shadow .3s ease; }
body.cm-scrolled .top-blocks--sticky { box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }

/* Buttons: slightly darker on hover */
.grid-button--primary, .grid-button--secondary { transition: filter .2s ease; }
@media (hover: hover) {
  .grid-button--primary:hover, .grid-button--secondary:hover { filter: brightness(.92); }
}

/* Product cards: soft shadow on hover (no movement) */
.product-list-item { transition: box-shadow .25s ease; }
@media (hover: hover) {
  .product-list-item:hover { box-shadow: 0 6px 18px rgba(60, 40, 20, .12); }
}

/* Back to top */
#cm-top {
  position: fixed; left: 20px; bottom: 24px; width: 40px; height: 40px; border: 1px solid #b48a4a;
  background: rgba(35, 27, 28, .85); color: #e9d9b8; border-radius: 4px; cursor: pointer;
  display: grid; place-items: center; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, background .2s;
}
#cm-top svg { width: 16px; height: 16px; }
#cm-top.cm-show { opacity: 1; pointer-events: auto; }
#cm-top:hover { background: #a3211f; }
#cm-top:focus-visible { outline: 2px solid #b48a4a; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .top-blocks--sticky, .grid-button--primary, .grid-button--secondary, .product-list-item, #cm-top { transition: none; }
}
