/* Shared styles for pages that are not part of the templates (checkout) and the CMS preview bar.
   They inherit fonts and colors from the active theme. */
.apx{max-width:1100px;margin:0 auto;padding:clamp(24px,6vw,80px) clamp(16px,4vw,48px)}
.apx-h{font-size:clamp(28px,4vw,44px);margin:0 0 1.2em}
/* the template's own page heading (withThemeTitle) brings its own top space */
.apx:has(> :first-child:is(.ttl,.ph,.phd,.big)){padding-top:0}
.apx>:first-child:is(.ttl,.ph,.phd,.big){margin-bottom:clamp(24px,4vw,48px)}
.apx-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:clamp(24px,5vw,64px);align-items:start}
@media (max-width:760px){.apx-grid{grid-template-columns:1fr}}
.apx-form{display:grid;gap:14px}
.apx-form label{display:grid;gap:6px;font-size:.9em}
.apx-form input,.apx-form textarea{width:100%;padding:12px 14px;border:1px solid currentColor;border-radius:0;background:transparent;opacity:.9}
.apx-form button{justify-self:start}
/* the template's .btn wins (:where has no weight); this is only for templates without one */
:where(.apx-btn){padding:12px 22px;border:1px solid currentColor;background:transparent}
.apx-btn{cursor:pointer}
.apx-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
.apx-note{font-size:.85em;opacity:.7}
.apx-error{color:#b00020;font-size:.9em}
.apx-alert{border:1px solid currentColor;padding:.75em 1em;margin:0 0 1.5em;color:#8a5a00}
.apx-sum{border:1px solid currentColor;padding:20px;border-color:color-mix(in srgb,currentColor 25%,transparent)}
.apx-sum h2{font-size:1.1em;margin:0 0 12px}
.apx-sum ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.apx-sum li,.apx-total{display:flex;justify-content:space-between;gap:12px}
.apx-total{margin-top:16px;padding-top:12px;border-top:1px solid color-mix(in srgb,currentColor 25%,transparent);font-weight:600}
.apx-preview{position:fixed;z-index:99999;left:50%;bottom:16px;transform:translateX(-50%);background:#41464d;color:#fff;font:600 13px/1.2 "PT Sans",system-ui,sans-serif;padding:10px 16px;border-radius:999px;box-shadow:0 6px 24px rgba(0,0,0,.25);white-space:nowrap}
.apx-preview a{color:#fff;text-decoration:underline}
#ap-toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;transition:.25s;z-index:9999;pointer-events:none}
#ap-toast.on{opacity:1;transform:translate(-50%,0)}

/* About page and the search box of the lists */
.apx-rich{max-width:720px;line-height:1.7}
.apx-about .apx-rich{margin:0 auto}
.apx-rich h2,.apx-rich h3{margin:1.6em 0 .5em;line-height:1.25}
.apx-rich p,.apx-rich ul,.apx-rich ol,.apx-rich blockquote{margin:0 0 1em}
.apx-rich blockquote{padding-left:1em;border-left:2px solid currentColor;opacity:.85}
.apx-rich a{color:inherit;text-decoration:underline}
/* the artist's CV as written, in the place of the template's CV blocks (also inside their grids) */
.apx-cv{grid-column:1/-1;max-width:none}
/* copies left of a series, before the Add to basket button (often in a wrapping flex row) */
.apx-series{flex:0 0 100%;width:100%;margin:0 0 4px;font-size:.95em;opacity:.85}
.apx-cv>:first-child{margin-top:0}
.apx-cv ul,.apx-cv ol{padding-left:1.2em}
.apx-findbar{display:flex;justify-content:flex-end;margin:0 0 28px}
.apx-find{box-sizing:border-box;display:flex;align-items:center;width:100%;max-width:360px;margin:0;text-align:left;border:1px solid var(--line,color-mix(in srgb,currentColor 22%,transparent));border-radius:4px;background:var(--bg,transparent);color:inherit;transition:border-color .15s}
.apx-find:focus-within{border-color:currentColor}
.apx-find input{flex:1;min-width:0;border:0;background:none;padding:12px 0 12px 16px;font:inherit;font-size:15px;line-height:1.3;color:inherit;outline:0;-webkit-appearance:none;appearance:none}
.apx-find input::placeholder{color:inherit;opacity:.5}
.apx-find input::-webkit-search-cancel-button{display:none}
.apx-find button,.apx-find-x{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border:0;background:none;color:inherit;cursor:pointer;text-decoration:none}
.apx-find-x{width:28px;font-size:20px;opacity:.5}
.apx-find-x:hover{opacity:1}
.apx-none{opacity:.75;margin:0 0 48px}
.t-kinetic .apx-find{border:1.5px solid var(--fg);border-radius:14px}
.t-prism .apx-findbar{margin-top:24px}
.t-prism .apx-find{border:2px solid var(--ink);border-radius:var(--r);background:var(--white)}
.t-prism .apx-find input{padding-left:22px}
.t-nocturne .apx-find{background:var(--bg2)}
.t-margin .apx-find{border-radius:0;font-family:var(--mono)}
.t-lumen .apx-find{border-radius:0}
/* Blog (not part of the templates) */
.apx-blog{max-width:900px}
.apx-meta{font-size:.85em;opacity:.7;margin:0 0 .6em}
.apx-meta a,.apx-tags a,.apx-back a,.apx-pager a,.apx-more{color:inherit}
.apx-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 32px}
.apx-chips a{padding:6px 14px;border:1px solid color-mix(in srgb,currentColor 25%,transparent);border-radius:999px;color:inherit;text-decoration:none;font-size:.9em}
.apx-chips a.on,.apx-chips a:hover{border-color:currentColor}
.apx-post{display:grid;grid-template-columns:minmax(0,280px) 1fr;gap:28px;align-items:start;padding:28px 0;border-top:1px solid color-mix(in srgb,currentColor 15%,transparent)}
.apx-post:not(:has(.apx-post-img)){grid-template-columns:1fr}
.apx-post-img img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.apx-post h2{margin:0 0 .4em;font-size:clamp(20px,2.4vw,28px);line-height:1.2}
.apx-post h2 a{color:inherit;text-decoration:none}
.apx-post p{margin:0 0 .8em;line-height:1.6}
.apx-more{font-size:.9em}
.apx-blog-post .apx-h{margin-bottom:.3em}
.apx-cover{display:block;width:100%;max-height:70vh;object-fit:cover;margin:24px 0 32px}
.apx-blog-post .apx-rich{max-width:none}
.apx-rich img{max-width:100%;height:auto}
.apx-tags{display:flex;flex-wrap:wrap;gap:12px;margin:32px 0 0;font-size:.9em}
.apx-pager{display:flex;justify-content:space-between;gap:24px;margin-top:48px;padding-top:24px;border-top:1px solid color-mix(in srgb,currentColor 15%,transparent)}
.apx-back{margin:0 0 24px;font-size:.9em}
@media (max-width:640px){.apx-post{grid-template-columns:1fr;gap:16px}}
/* store: grid / list switch (next to the search box) and the list */
.apx-findbar{align-items:center;gap:16px}
.apx-views{display:flex;gap:4px;margin-right:auto}
.apx-views a{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:inherit;opacity:.35;border-radius:4px;text-decoration:none}
.apx-views a:hover,.apx-views a.on{opacity:1}
.apx-tabs{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;margin:0 0 32px;font-style:italic;font-size:1.15em}
.apx-tabs a{color:inherit;opacity:.65;text-decoration:none;padding-bottom:4px;border-bottom:2px solid transparent}
.apx-tabs a:hover{opacity:1}
.apx-tabs a.on{opacity:1;color:var(--acc,inherit);border-bottom-color:currentColor}
.apx-tabs span{opacity:.4}
/* with the kinds above, the Available / Sold filter is a second, smaller row */
.apx-kinds{margin-bottom:14px}
.apx-kinds+.apx-tabs{font-size:1em;margin-bottom:32px}
.apx-sort{display:flex;align-items:center;gap:6px;margin-right:auto;font-size:14px}
.apx-views+.apx-sort{margin-left:-8px}
.apx-views:has(+.apx-sort){margin-right:0}
.apx-sort:has(+.apx-sort){margin-right:0}
.apx-sort+.apx-sort{margin-left:4px}
.apx-sort label{display:flex;align-items:center;gap:8px;white-space:nowrap;opacity:.85}
.apx-sort select{font:inherit;color:inherit;background:transparent;border:1px solid color-mix(in srgb,currentColor 25%,transparent);border-radius:4px;padding:7px 28px 7px 10px;appearance:none;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 15px) 52%,calc(100% - 10px) 52%;background-size:5px 5px;background-repeat:no-repeat;cursor:pointer}
.apx-dir{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;background:none;color:inherit;cursor:pointer;opacity:.7}
.apx-dir:hover{opacity:1}
@media (max-width:640px){.apx-findbar{flex-wrap:wrap}.apx-sort{order:3;width:100%;margin:0}.apx-sort label span{display:none}}
.apx-list{width:100%;margin:0 0 48px;text-align:left}
.apx-lr{display:grid;grid-template-columns:minmax(220px,2.4fr) repeat(var(--apx-cols,4),minmax(70px,1fr));gap:20px;align-items:center;padding:16px 4px;border-bottom:1px solid var(--line,color-mix(in srgb,currentColor 15%,transparent));color:inherit;text-decoration:none}
a.apx-lr:hover{background:color-mix(in srgb,currentColor 4%,transparent)}
.apx-lh{padding-top:0;font-size:12px;letter-spacing:.08em;text-transform:uppercase;opacity:.6}
.apx-li{display:flex;align-items:center;gap:16px;min-width:0}
.apx-li img{width:84px;height:84px;object-fit:contain;flex:none}
.apx-li b{display:block;font-weight:600}
.apx-li span span,.apx-li small{display:block;opacity:.75}
.apx-li small{margin-top:4px;font-size:.85em}
.apx-lp{font-weight:600;white-space:nowrap}
@media (max-width:760px){
  .apx-lh{display:none}
  .apx-lr{grid-template-columns:1fr auto;gap:6px 16px}
  .apx-lr>span:not(.apx-li):not(.apx-lp){grid-column:1;font-size:.9em;opacity:.8}
  .apx-lr>span[data-h]::before{content:attr(data-h) ": ";opacity:.7}
  .apx-lp{grid-row:1;grid-column:2}
}
@media (max-width:640px){.apx-find{max-width:none}}

/* language switcher (sites with more than one language) */
.apx-lang{position:fixed;z-index:9990;left:16px;bottom:16px;display:flex;gap:2px;padding:3px;background:rgba(255,255,255,.92);border:1px solid rgba(0,0,0,.12);border-radius:999px;box-shadow:0 4px 16px rgba(0,0,0,.08);font:600 12px/1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.04em;backdrop-filter:blur(6px)}
.apx-lang a{display:block;padding:7px 10px;border-radius:999px;color:#41464d;text-decoration:none}
.apx-lang a:hover{background:rgba(0,0,0,.06)}
.apx-lang a[aria-current]{background:#1f1f1f;color:#fff}
@media print{.apx-lang{display:none}}
/* Site logo in the header (replaces the gallery name when the site has one) */
.ap-logo{display:inline-block;vertical-align:middle;height:auto;width:auto;max-height:clamp(36px,5vw,64px);max-width:min(260px,60vw);object-fit:contain}
.logo:has(.ap-logo) small{display:block}
/* News: author and link to the original article */
.ap-news-credits{margin-top:2em;font-size:.9em;opacity:.8}
.ap-news-credits a{text-decoration:underline;text-underline-offset:3px}
/* Shop filter and cart for templates without their own (artist templates on a gallery's site) */
.apg-tabs{display:flex;flex-wrap:wrap;gap:6px 18px;margin:18px 0 28px}
.apg-tabs a{text-decoration:none;opacity:.6;padding-bottom:3px;border-bottom:1px solid transparent}
.apg-tabs a:hover,.apg-tabs a.on{opacity:1;border-bottom-color:currentColor}
.apg-cart{display:grid;gap:0;max-width:820px}
.apg-ci{display:grid;grid-template-columns:72px minmax(0,1fr) auto auto;gap:16px;align-items:center;padding:14px 0;border-bottom:1px solid color-mix(in srgb,currentColor 18%,transparent)}
.apg-ci img{width:72px;height:72px;object-fit:cover}
.apg-ci small{opacity:.7}
.apg-qty{display:inline-flex;align-items:center;gap:10px}
.apg-qty button{width:28px;height:28px;border:1px solid color-mix(in srgb,currentColor 35%,transparent);background:transparent;color:inherit;cursor:pointer;border-radius:0}
.apg-total{display:flex;justify-content:space-between;font-weight:600;margin:18px 0 6px}
.apg-note{font-size:.85em;opacity:.7;margin:0 0 18px}
.apg-cart .btn{justify-self:start}
@media (max-width:640px){.apg-ci{grid-template-columns:56px minmax(0,1fr) auto;gap:10px}.apg-ci img{width:56px;height:56px}.apg-ci>span:last-child{grid-column:2/-1}}
