/* Moonlit — collection, filters drawer, pager. Geometry from Figma 19:6942 / 19:11025 / 19:13541. */

/* ---------------------------------------------------------------- title row (p52/56/36) */
.ml-ctitle { padding: 52px 0 36px; }
.ml-ctitle__in { display: flex; align-items: flex-end; justify-content: space-between; gap: 64px; }
.ml-ctitle__c { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ml-ctitle__t { max-width: 420px; flex: 0 1 420px; }
.ml-crumb { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ml-crumb a:hover { color: var(--ml-accent); }
@media (max-width: 767px) {
  .ml-ctitle { padding: 28px 0 20px; }
  .ml-ctitle__in { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ml-ctitle__t { flex-basis: auto; }
}

/* ---------------------------------------------------------------- style tiles (125x80, gap 10) */
.ml-cstyle { padding-bottom: 24px; }
.ml-cstyle__g { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
.ml-styl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 80px; padding: 14px 6px 12px; background: var(--ml-white); border: 1px solid var(--ml-line); color: var(--ml-text); text-align: center; transition: border-color .35s ease-out; }
.ml-styl:hover { border-color: var(--ml-icon); }
.ml-styl.is-on { border: 1.5px solid var(--ml-line-strong); }
.ml-styl .ml-caption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 1023px) { .ml-cstyle__g { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .ml-cstyle { padding-bottom: 16px; }
  .ml-cstyle__g { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--ml-gutter) * -1); padding-right: var(--ml-gutter); }
  .ml-cstyle__g::-webkit-scrollbar { display: none; }
  .ml-styl { flex: 0 0 auto; min-width: 92px; padding-inline: 10px; }
}

/* ---------------------------------------------------------------- toolbar (76, hairline top) */
.ml-ctool { border-top: 1px solid var(--ml-line); }
.ml-ctool__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.ml-ctool__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ml-ctool__chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ml-ctool__chip { gap: 8px; }
.ml-ctool__clear:hover { color: var(--ml-accent); }
.ml-refbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 37px; padding: 0 16px; background: var(--ml-midnight); color: var(--ml-inverse); white-space: nowrap; }
.ml-refbtn:hover { background: var(--ml-indigo); }
.ml-refbtn__n { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 17px; padding: 0 6px; border-radius: 99px; background: var(--ml-lunar); color: var(--ml-text); }
.ml-ctool__r { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.ml-ctool__n { white-space: nowrap; }
.ml-sort { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--ml-line); }
.ml-sort__m { display: none; }
.ml-sort select { appearance: none; -webkit-appearance: none; border: 0; background: none; padding-right: 2px; cursor: pointer; color: var(--ml-text); }
@media (max-width: 767px) {
  .ml-ctool__in { min-height: 64px; gap: 10px; }
  .ml-ctool__chips { display: none; }
  .ml-ctool__n { font-size: 13px; }
  .ml-ctool__sw { display: none; }
  .ml-ctool__r { gap: 10px; }
  /* Figma 19:11025: "48 rings" + a bare "SORT ▾"; the real select sits over the label, invisible */
  .ml-sort__m { display: inline; }
  .ml-sort select { position: absolute; inset: 0; width: 100%; opacity: 0; }
}

/* ---------------------------------------------------------------- grid + promos */
.ml-cgrid { padding: 40px 0 64px; }
.ml-promo { position: relative; min-height: 444px; height: 100%; overflow: hidden; color: var(--ml-inverse); }
.ml-promo--event { display: flex; flex-direction: column; justify-content: flex-end; padding: 36px 32px; background: var(--ml-midnight); }
.ml-promo--img { background: var(--ml-midnight); }
.ml-promo--img a { position: absolute; inset: 0; display: block; }
.ml-promo--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease-out; }
.ml-promo--img:hover img { transform: scale(1.05); }
.ml-promo--img a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,22,38,0) 30%, rgba(14,22,38,.9) 100%); }
.ml-promo--img .ml-promo__b { position: absolute; left: 32px; right: 32px; bottom: 32px; z-index: 1; }
.ml-promo__b { display: flex; flex-direction: column; gap: 12px; }
.ml-promo__h { font-family: var(--ml-display); font-weight: 300; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.05; letter-spacing: -0.005em; }
.ml-promo--img .ml-promo__h { font-size: clamp(24px, 2.2vw, 32px); }
.ml-promo__s { color: var(--ml-muted-dark); }
.ml-promo__go { display: inline-flex; align-items: center; gap: 6px; }
.ml-cgrid__more { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 40px; }
.ml-cgrid__bar { display: block; width: 240px; height: 2px; background: var(--ml-line); }
.ml-cgrid__bar i { display: block; height: 100%; background: var(--ml-midnight); }
@media (max-width: 767px) {
  .ml-cgrid { padding: 20px 0 48px; }
  .ml-promo { min-height: 330px; }
  .ml-promo--event { padding: 20px 14px; }
  .ml-promo--img .ml-promo__b { left: 14px; right: 14px; bottom: 16px; }
}

/* ---------------------------------------------------------------- pager */
.ml-pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 28px; }
.ml-pager__a, .ml-pager__n { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding-inline: 10px; border: 1px solid transparent; font-size: 13px; }
.ml-pager__a { border-color: var(--ml-line); }
.ml-pager__a:hover { border-color: var(--ml-line-strong); }
.ml-pager__a.is-off { opacity: .3; }
.ml-pager__n:hover { border-color: var(--ml-line); }
.ml-pager__n.is-on { border-color: var(--ml-line-strong); font-weight: 600; }
.ml-pager__e { padding-inline: 4px; color: var(--ml-text-2); }

/* ---------------------------------------------------------------- about this collection (mist, p80/56) */
.ml-cabout { background: var(--ml-mist); }
.ml-cabout__in { display: flex; gap: 96px; justify-content: space-between; padding-block: 80px; }
.ml-cabout__c { display: flex; flex-direction: column; gap: 14px; max-width: 864px; }
.ml-cabout__h { font-family: var(--ml-display); font-weight: 300; font-size: clamp(28px, 2.36vw, 34px); line-height: 1.1; letter-spacing: -0.005em; }
.ml-cabout__c .ml-link { align-self: flex-start; }
.ml-cabout__links { display: flex; gap: 40px; flex: 0 0 auto; }
.ml-cabout__links ul { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ml-cabout__links a:hover { color: var(--ml-accent); }
@media (max-width: 1023px) { .ml-cabout__in { flex-direction: column; gap: 40px; } }
@media (max-width: 767px) {
  .ml-cabout__in { padding-block: 48px; gap: 28px; }
  .ml-cabout__links { flex-direction: column; gap: 24px; }
}

/* ---------------------------------------------------------------- filters drawer (left, 440) */
.ml-dw--refine { right: auto; left: 0; width: min(440px, 100vw); transform: translateX(-100%); }
.ml-dw--refine.is-on { transform: none; }
.ml-dw--refine .ml-dw__head { min-height: 73px; }
.ml-ref { display: flex; flex-direction: column; gap: 26px; padding: 24px; }
.ml-ref__g { border: 0; margin: 0; padding: 0; min-width: 0; }
.ml-ref__h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; margin-bottom: 12px; color: var(--ml-text); }
.ml-ref__h svg { transition: transform .3s ease; }
.ml-ref__h[aria-expanded='true'] svg { transform: rotate(45deg); }
.ml-ref__o { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-ref__o--shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ml-ref__shape { min-width: 0; padding: 10px 4px 8px; }
.ml-ref__o--metals { gap: 14px; }
.ml-ref__m { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ml-text); }
.ml-ref__sw { width: 28px; height: 28px; border-radius: 99px; border: 1px solid var(--ml-line); background: var(--ml-metal-white); }
.ml-ref__m.is-on .ml-ref__sw { border: 2px solid var(--ml-line-strong); }
.ml-ref__sw--yellow { background: var(--ml-metal-yellow); }
.ml-ref__sw--rose { background: var(--ml-metal-rose); }
.ml-ref__sw--platinum { background: var(--ml-metal-platinum); }
.ml-ref__sw--silver { background: var(--ml-metal-silver); }
.ml-ref__n { font-style: normal; font-size: 11px; color: var(--ml-text-2); }
.ml-chip.is-on .ml-ref__n { color: var(--ml-muted-dark); }
.ml-ref__track { position: relative; height: 16px; margin: 4px 0 10px; }
.ml-ref__track::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--ml-line); }
.ml-ref__track i { position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--ml-midnight); }
.ml-ref__price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ml-ref__price input { width: 100%; height: 40px; padding-inline: 12px; border: 1px solid var(--ml-line); background: var(--ml-white); font-size: 13px; }
.ml-ref__foot { position: sticky; bottom: -24px; display: flex; gap: 12px; margin: auto -24px -24px; padding: 16px 24px 24px; background: var(--ml-white); border-top: 1px solid var(--ml-line); }
.ml-ref__foot > * { flex: 1 1 0; padding-inline: 12px; }

/* ---------------------------------------------------------------- FAQ (used by theme pages) */
.ml-faq__head { text-align: center; margin-bottom: 40px; }
.ml-faq__qs { max-width: 860px; margin-inline: auto; }
.ml-acc { border-bottom: 1px solid var(--ml-line); }
.ml-acc:first-child { border-top: 1px solid var(--ml-line); }
.ml-acc__h { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 65px; padding: 20px 0; text-align: left; font-size: 15px; font-weight: 600; transition: background .35s ease-out, padding .35s ease-out; }
.ml-acc__h:hover { background: var(--ml-mist); padding-inline: 10px; }
.ml-acc__h:hover svg { color: var(--ml-lunar); }
.ml-acc__h svg { flex: 0 0 auto; transition: transform .25s ease; }
.ml-acc__h[aria-expanded='true'] svg { transform: rotate(45deg); }
.ml-acc__in { padding-bottom: 22px; max-width: 70ch; color: var(--ml-text-2); }
.ml-acc__in p { margin: 0 0 10px; }
.ml-acc__in p:last-child { margin-bottom: 0; }

/* /collections index */
.ml-collist .ml-tile { height: auto; flex: none; width: auto; background: none; color: var(--ml-text); }
.ml-collist .ml-tile::after { display: none; }

/* ---------------------------------------------------------------- collection description (collection-description-rule)
   intro beside the title (.ml-ctitle__t), then after the products: buying guide (sticky numbered index | sections) and
   FAQ (title | accordion), Moonlit's own type and colours */
.ml-cd-intro > * + * { margin-top: 10px; }
.ml-cd-intro a, .ml-cd-tx a, .ml-cd-a a { text-decoration: underline; text-underline-offset: 3px; }
.ml-cd-more { border-top: 1px solid var(--ml-line); }
.ml-cd-in { display: flex; flex-direction: column; gap: 88px; padding-block: 96px; }
.ml-cd-row { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 72px; align-items: start; }
.ml-cd-toc { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 14px; }
.ml-cd-big { font-family: var(--ml-display); font-weight: 300; font-size: clamp(34px, 3vw, 46px); line-height: 1.05; letter-spacing: -0.01em; margin: 0; }
.ml-cd-big--s { font-size: clamp(28px, 2.4vw, 36px); }
.ml-cd-toc ol { list-style: lower-roman; margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ml-text-2); }
.ml-cd-toc ol a:hover { color: var(--ml-accent); }
.ml-cd-art { display: flex; flex-direction: column; }
.ml-cd-s { padding-block: 28px; border-top: 1px solid var(--ml-line); }
.ml-cd-s:first-child { border-top: 0; padding-top: 0; }
.ml-cd-sh { font-family: var(--ml-display); font-weight: 400; font-size: clamp(24px, 1.9vw, 28px); line-height: 1.15; margin: 0 0 14px; scroll-margin-top: 160px; }
.ml-cd-tx { font-size: 15px; line-height: 1.75; color: var(--ml-text-2); }
.ml-cd-tx > * + * { margin-top: 12px; }
.ml-cd-tx ul, .ml-cd-a ul { list-style: disc; padding-left: 20px; }
.ml-cd-tx ol, .ml-cd-a ol { list-style: decimal; padding-left: 20px; }
.ml-cd-tx strong, .ml-cd-a strong { color: var(--ml-text); font-weight: 600; }
.ml-cd-qs { border-top: 1px solid var(--ml-line); }
.ml-cd-q { border-bottom: 1px solid var(--ml-line); }
.ml-cd-q summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding-block: 18px; cursor: pointer; font-family: var(--ml-display); font-size: clamp(19px, 1.5vw, 22px); line-height: 1.25; color: var(--ml-text); }
.ml-cd-q summary::-webkit-details-marker { display: none; }
.ml-cd-q summary:hover { color: var(--ml-accent); }
.ml-cd-q summary:focus-visible { outline: 2px solid var(--ml-accent); outline-offset: 2px; }
.ml-cd-pm { position: relative; flex: none; width: 14px; height: 14px; transition: transform .3s ease; }
.ml-cd-pm::before, .ml-cd-pm::after { content: ''; position: absolute; left: 0; top: 6.5px; width: 14px; height: 1px; background: currentColor; }
.ml-cd-pm::after { transform: rotate(90deg); }
.ml-cd-q[open] .ml-cd-pm { transform: rotate(45deg); }
.ml-cd-a { padding: 0 34px 22px 0; font-size: 15px; line-height: 1.75; }
.ml-cd-a > * + * { margin-top: 10px; }
@media (max-width: 900px) {
  .ml-cd-in { gap: 56px; padding-block: 64px; }
  .ml-cd-row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ml-cd-toc { position: static; }
  .ml-cd-sh { scroll-margin-top: 90px; }
}
@media (prefers-reduced-motion: reduce) { .ml-cd-pm { transition: none; } }

/* 31 Oct (user, iPhone): after "Show N results" or a page click the script scrolls the toolbar to the top of the viewport, where the
   stuck header (fixed: 50px on phones, ~114px above) covered it — the Filters button sat under the Search icon. The toolbar now
   stops below the stuck header. */
.ml-ctool { scroll-margin-top: 122px; }
@media (max-width: 767px) { .ml-ctool { scroll-margin-top: 58px; } }
.ml-refbtn__n:empty { display: none; }   /* 31 Oct (audit): before the engine counted, an empty gold pill sat beside FILTERS */
