/* Collection pages (and the FAQ shared with product pages). Builds on styles.css + product.css. */

/* hero: answer first, then the oil chart */
.c-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: 140px; padding-bottom: clamp(48px, 6vw, 80px); }
.c-hero__title { font-family: var(--serif); font-size: clamp(3.25rem, 7.4vw, 6rem); line-height: 0.96; letter-spacing: -0.035em; margin-top: 20px; text-wrap: balance; }
.c-hero__lede { margin: 22px 0 30px; color: var(--fg-1); font-size: 1.1875rem; max-width: 46ch; }
.c-hero--solo { grid-template-columns: 1fr; }

/* which oils are in which rollers */
.oilmap { margin: 0; padding: clamp(20px, 2.6vw, 32px); border-radius: var(--r); background: var(--bg-2); min-width: 0; }
.oilmap h2 { font-family: var(--serif); font-size: 2rem; line-height: 1.05; }
.oilmap figcaption p { color: var(--fg-2); font-size: 0.9375rem; margin-top: 6px; }
.oilmap__scroll { position: relative; margin-top: 18px; overflow-x: auto; scrollbar-width: thin; }
.oilmap th, .oilmap td { position: relative; }
.oilmap table { border-collapse: separate; border-spacing: 0; font-size: 0.8125rem; width: 100%; }
.oilmap thead th { font-weight: 500; color: var(--fg-2); padding: 0 0 10px; vertical-align: bottom; }
.oilmap thead th span { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.oilmap thead th:first-child { text-align: left; }
.oilmap tbody th { text-align: left; font-weight: 500; white-space: nowrap; padding: 0; }
.oilmap tbody th button { all: unset; display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 12px 6px 8px; margin-left: -8px; border-radius: 8px; cursor: pointer; font-size: 0.875rem; transition: background-color 200ms ease; }
.oilmap tbody th button:focus-visible { outline: 2px solid var(--fg); }
.oilmap tbody th small { color: var(--fg-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.oilmap td { text-align: center; padding: 3px 2px; }
.oilmap td i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: rgb(var(--ink) / 0.07); vertical-align: middle; }
.oilmap td i.on { background: var(--c); }
.oilmap tr.is-on th button { background: var(--fg); color: var(--on-fg); }
.oilmap tr.is-on th small { color: rgb(var(--paper) / 0.7); }
@media (hover: hover) and (pointer: fine) { .oilmap tbody tr:not(.is-on) th button:hover { background: rgb(var(--ink) / 0.07); } }

/* filters: pinned to the very top; drop below the nav only while the nav is showing */
.nav:not(.is-hidden) ~ main .filters { top: 72px; }
.results { scroll-margin-top: 90px; }
.filters { position: sticky; top: 0; z-index: 30; transition: top 450ms var(--ease-out); display: grid; gap: 12px; padding: 14px 0 16px; margin-bottom: 28px; background: rgb(var(--paper) / 0.95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 100vmax rgb(var(--paper) / 0.95), 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax); }
.f-safe { display: grid; grid-template-columns: auto repeat(4, 1fr); align-items: center; gap: 4px; padding: 5px 5px 5px 18px; border-radius: 999px; background: var(--bg-2); }
.f-safe__lab { font-size: 0.875rem; font-weight: 500; color: var(--fg-2); padding-right: 10px; white-space: nowrap; }
.f-sbtn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border: 0; border-radius: 999px; background: transparent; color: var(--fg-1); cursor: pointer; font-size: 0.9375rem; font-weight: 500; transition: background-color 250ms ease, color 250ms ease, transform 160ms var(--ease-out); }
.f-sbtn::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: rgb(var(--ink) / 0.14); transition: background-color 250ms ease; }
.f-sbtn:active { transform: scale(0.97); }
.f-sbtn:disabled { opacity: 0.35; cursor: not-allowed; }
.f-sbtn[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); }
.f-sbtn[aria-pressed="true"]::before { background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .f-sbtn:not([aria-pressed="true"]):not(:disabled):hover { background: rgb(var(--ink) / 0.07); } }
.f-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.f-select { position: relative; display: inline-flex; align-items: center; }
.f-select select { appearance: none; -webkit-appearance: none; height: 44px; padding: 0 40px 0 18px; border-radius: 999px; border: 1px solid rgb(var(--ink) / 0.18); background: var(--bg); color: var(--fg); font: inherit; font-size: 0.9375rem; cursor: pointer; }
.f-select select:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.f-select i { position: absolute; right: 16px; pointer-events: none; font-size: 13px; color: var(--fg-2); }
.view { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-2); }
.view__btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--fg-2); cursor: pointer; font-size: 0.875rem; font-weight: 500; transition: background-color 250ms ease, color 250ms ease; }
.view__btn[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); }
.f-count { margin-left: auto; color: var(--fg-2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.f-count span { color: var(--fg); }
.f-clear { border: 0; background: none; color: var(--fg); font: inherit; font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 10px 4px; }

/* grid */
.grid { position: relative; z-index: 0; isolation: isolate; display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 16px; }

/* compare table */
.compare { overflow-x: auto; border-radius: var(--r); background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.ctable { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 880px; }
.ctable th, .ctable td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ctable thead th { font-weight: 500; font-size: 0.8125rem; color: var(--fg-2); background: var(--bg-2); }
.ctable tbody th { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; white-space: nowrap; }
.ctable tbody th a { display: inline-flex; align-items: center; gap: 10px; }
.ctable tbody th a::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.ctable tbody td { color: var(--fg-1); }
.ctable td.y, .ctable td.n { text-align: center; }
.ctable td.y::before, .ctable td.n::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); vertical-align: middle; }
.ctable td.n::before { background: rgb(var(--ink) / 0.12); }
.ctable tbody tr:last-child > * { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .ctable tbody tr:hover { background: rgb(var(--ink) / 0.03); } }

.empty { padding: 80px 0; text-align: center; display: grid; justify-items: center; gap: 20px; }
.empty__title { font-family: var(--serif); font-size: 2rem; }

/* FAQ (collections and product pages) */
.c-faq { display: grid; grid-template-columns: 0.9fr 1.3fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.c-faq__head { position: sticky; top: 140px; }
.c-faq__head .h2 { font-size: clamp(2.5rem, 4.4vw, 4rem); }
.c-faq__fda { margin-top: 24px; font-size: 0.8125rem; color: var(--fg-2); max-width: 46ch; }
.faq { border-top: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-family: var(--serif); font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.2; }
.faq__icon { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-2); transition: background-color 250ms ease, color 250ms ease; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; translate: -50% -50%; }
.faq__icon::after { rotate: 90deg; transition: rotate 400ms var(--ease-out); }
.faq[open] .faq__icon { background: var(--fg); color: var(--on-fg); }
.faq[open] .faq__icon::after { rotate: 0deg; }
@media (hover: hover) and (pointer: fine) { .faq summary:hover .faq__icon { background: var(--bg-3); } .faq[open] summary:hover .faq__icon { background: #000; } }
.faq summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.faq::details-content { height: 0; overflow: clip; transition: height 450ms var(--ease-out), content-visibility 450ms allow-discrete; }
.faq[open]::details-content { height: auto; }
.faq__a p { color: var(--fg-1); padding: 0 56px 28px 0; max-width: 62ch; }
.c-faq--coll { margin-top: clamp(96px, 12vw, 168px); padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(96px, 12vw, 168px); border-top: 1px solid var(--line); }

/* more ways to shop */
.more__grid { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.more__tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 280px; padding: 22px; border-radius: var(--r); background: color-mix(in srgb, var(--c) 16%, var(--bg)); overflow: clip; isolation: isolate; }
.more__tile img { aspect-ratio: 1; position: absolute; right: -18%; top: -6%; width: 78%; z-index: -1; mix-blend-mode: multiply; transition: transform 600ms var(--ease-out); }
.more__tile > span { display: grid; gap: 2px; font-size: 0.875rem; color: var(--fg-2); }
.more__name { font-family: var(--serif); font-size: 1.75rem; line-height: 1.05; color: var(--fg); }
.more__tile > i { position: absolute; right: 18px; bottom: 22px; font-size: 20px; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .more__tile:hover img { transform: translateY(-6px); } .more__tile:hover > i { transform: translate(3px, -3px); } }

@media (max-width: 1100px) {
  .c-hero { grid-template-columns: 1fr; padding-top: 112px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .more__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .c-faq { grid-template-columns: 1fr; }
  .c-faq__head { position: static; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .c-hero { padding-top: 96px; }
  .filters { position: static; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; clip-path: none; }
  .f-safe { grid-template-columns: repeat(4, 1fr); padding: 5px; border-radius: 20px; }
  .f-safe__lab { grid-column: 1 / -1; padding: 6px 10px 2px; }
  .f-sbtn { flex-direction: column; gap: 4px; height: 58px; font-size: 0.8125rem; border-radius: 16px; }
  .f-count { margin-left: 0; width: 100%; }
  .grid { gap: 28px 12px; }
  .ccard__name { font-size: 1.375rem; }
  .ccard__foot { flex-direction: column; align-items: stretch; }
  .ccard__add { justify-content: center; }
  .faq__a p { padding-right: 0; }
  .more__grid { grid-template-columns: 1fr 1fr; }
  .more__tile { min-height: 210px; padding: 16px; }
  .more__name { font-size: 1.375rem; }
}
