/* Additive catalogue layouts. Original colours, typography and template art are in style.css. */
[hidden]{display:none!important}
.catalog,.controls,.pagination,.tabs,.link-row,.detail,.resource{box-sizing:border-box}
.catalog *,.controls *,.pagination *,.tabs *,.link-row *,.detail *,.resource *{box-sizing:border-box}
.catalog{display:grid;gap:1em;align-items:stretch;font-size:14px;line-height:1.5}
.catalog.small{grid-template-columns:repeat(4,minmax(0,1fr))}
.catalog.medium{grid-template-columns:repeat(3,minmax(0,1fr))}
.catalog.large{grid-template-columns:repeat(2,minmax(0,1fr))}
.catalog.extra{grid-template-columns:1fr}
.catalog .card{border:1px solid #ccc;border-radius:5px;padding:1em;background:#fff;display:flex;flex-direction:column;min-width:0}
/* Card titles. The store's tiles are h3 and the JV hub's are h2, and both
   pages load this file, so every title rule below lists the pair. h3 is the
   truer tag for a tile on the store page: the headline is the h1 and the
   scrolling straplines above the catalogue are h2, so a product title is a
   level below them, not alongside. The two tags look identical here anyway --
   style.css gives h2 and h3 the same family, weight, tracking, colour and
   spacing, and differ only in font-size, which these rules set themselves. */
.catalog .card h2,.catalog .card h3{font-size:20px;text-align:left;line-height:1.2;margin:0 0 20px;font-weight:900}
.catalog .thumbnail{display:flex;justify-content:center;align-items:flex-start;margin-bottom:20px}
.catalog .thumbnail img{width:200px;max-width:100%;height:auto;object-fit:contain}
/* The tile pictures grow a little under the pointer, so a tile reads as
   something to press. The 5% and the 0.8 opacity are the admin's own numbers,
   from img.light:hover in its style.css; the DURATION is deliberately not --
   the admin runs its zoom in 0.3s and that read as a snap on these larger tile
   pictures, so this takes twice as long over the same curve.

   .card .thumbnail rather than .catalog .thumbnail: the store and the
   affiliate hub both build their tiles this way and both load this file, so
   one rule covers the two of them.

   The transition is on the image, not on :hover. Declared on the hover state
   alone -- which is how the admin's rule is written -- it eases in and then
   snaps back the moment the pointer leaves. */
.card .thumbnail img{transition:transform .6s ease, opacity .6s ease}
.card .thumbnail:hover img{transform:scale(1.05);opacity:.8}
/* The picture has to be allowed the room it grows into. #catalog .thumbnail
   further down this file is a fixed square that clips, so the extra 5% was
   being shaved off all four sides and the "growth" was a picture getting
   cropped: measured at 6px gone top and bottom. The clipping is lifted for as
   long as the pointer is on it, and the tile is raised while that is true so
   the larger picture draws over its neighbours rather than under the next tile
   along.
   Written with #catalog, not .card alone: the rule it has to beat carries an
   id, and three classes still lose to one of those. */
#catalog .thumbnail:hover{overflow:visible}
.card .thumbnail{position:relative}
.card .thumbnail:hover{z-index:3}
@media(prefers-reduced-motion:reduce){.card .thumbnail img{transition:none}}
.catalog .description{overflow-wrap:anywhere}
.catalog .description p:first-child{margin-top:0}
.catalog .actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:20px}
.catalog .price{white-space:nowrap;font-size:20px}
.button{display:inline-block;cursor:pointer;text-align:center;text-decoration:none;padding:8px 12px;border:0;font:inherit;line-height:1.4}
.button:not(.btnzaxaa){color:#fff;background:linear-gradient(to bottom,#3498db,#2980b9)}
.button:not(.btnzaxaa):hover{color:#fff;background:linear-gradient(to bottom,#3cb0fd,#3498db)}
.catalog .actions .button{font-size:16px;font-weight:normal;margin:0;max-width:250px}
.catalog.large .card,.catalog.extra .card{display:grid;grid-template-columns:minmax(0,300px) minmax(0,1fr);grid-template-rows:auto 1fr auto;column-gap:20px}
.catalog.large .card h2,.catalog.large .card h3,.catalog.extra .card h2,.catalog.extra .card h3{grid-column:1/-1}
.catalog.large .thumbnail,.catalog.extra .thumbnail{grid-column:1;grid-row:2/4}
.catalog.large .thumbnail img,.catalog.extra .thumbnail img{width:300px}
.catalog.large .description,.catalog.extra .description{grid-column:2;grid-row:2}
.catalog.large .actions,.catalog.extra .actions{grid-column:2;grid-row:3;flex-direction:column;align-items:flex-end}
.controls{display:flex;gap:14px;align-items:center;justify-content:center;flex-wrap:wrap;margin:24px 0;padding:15px;border:1px solid #ccc;background:#fff}
.controls label{display:flex;align-items:center;gap:8px;font-weight:bold;min-width:0}
.controls input,.controls select{width:auto;max-width:100%;margin:0;padding:10px;border:1px solid #ccc;border-radius:4px;font:inherit;color:#333;background:#fff}
.controls input{width:190px}
.controls input::placeholder{color:#888;opacity:1}
.pagination{display:flex;justify-content:center;gap:1px;flex-wrap:wrap;margin:16px 0}
.pagination button{border:0;background:transparent;color:#09f;font:inherit;cursor:pointer;padding:4px 5px}
.pagination button:hover{color:#0cf}
.pagination button[aria-current]{font-weight:bold;text-decoration:underline}
.pagination button:disabled{color:#999;cursor:default}
.muted{color:#777;font-size:14px}
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 25px}
.tabs a{padding:10px 16px;text-decoration:none;border:1px solid #ccc;background:#eee;font-size:16px}
.tabs a[aria-current]{background:linear-gradient(to bottom,#3498db,#2980b9);color:#fff}
:where(a,button,input,select,textarea):focus-visible{outline:2px solid #09f;outline-offset:3px}
/* Allow all lines of the scrolling headline to fit, including after fonts load. */
#benefits{position:relative;width:100%;margin:0 auto 20px}
#benefits>div{width:100%;margin:0;padding:4px 0}
#benefits>div h2{position:static;left:auto;width:100%;box-sizing:border-box;margin:0;line-height:1.4;padding:3px 0}
/* The box clips, and every panel fills it and centres its own content.

   Panels are rarely the same height: one headline runs to a line, the next to
   two. The box is held open at the height of the TALLEST of them, and a short
   panel used to sit at the top of it with the leftover space hanging below --
   which reads as a gap under the words rather than as a headline. Stretched to
   the full height and centred inside it, a one-line panel sits in the middle
   of the same space a two-line one fills, and the two look like the same
   object rather than two different ones.

   flex-direction:column, not a plain centring row: a row would make the
   panel's contents a shrink-to-fit flex item and justify-content would centre
   it horizontally whatever alignment the client chose. In a column the content
   is full width and its own text-align decides, as it should.

   bottom:0 does nothing while a panel is in flow. It takes effect for the one
   panel the script lifts to position:absolute mid swipe, which would otherwise
   be its own content height at top:0 and so not centred while it travels. */
.ssm-scroller{position:relative;overflow:hidden;display:flex;align-items:stretch}
.ssm-scroller>div{width:100%;bottom:0;display:flex;flex-direction:column;justify-content:center}
/* display:flex above is an AUTHOR rule and [hidden] is a user agent one, so
   without this every panel waiting its turn would be on screen at once. */
.ssm-scroller>div[hidden]{display:none}
.ssm-scroller.is-animating>div{will-change:transform}
/* Testimonials. These now come from the same source the affiliate hub uses --
   a heading with a star rating above the quote -- rather than the short italic
   lines the store shipped with, so the old 55px floated portrait rule would
   shrink the stars to a smudge. */
/* The testimonial block reads at the affiliate hub's base size, not the store's.
   Both pages share the `calc(1em - 2px)` rule on the quote below, but 1em is
   whatever the page inherits, and the two pages do not agree: jv/style.css sets
   body to 13pt (17.33px) while store/style.css sets 14px. The same rule was
   therefore landing on 15.33px in the hub and 12px here -- noticeably smaller
   under a 36px title. Fixing the base rather than the quote keeps one rule for
   both and lets line-height follow on its own.
   The hub loads this file too, where 13pt is exactly what #testimonials already
   inherits, so stating it changes nothing there. */
#testimonials{width:auto;margin:0;font-size:13pt;font-style:normal;color:#333;text-align:left}
#testimonials>div{display:flow-root;margin:0;padding:4px 0 10px;width:100%;box-sizing:border-box}
#testimonials p{margin:0 0 1em;font-size:calc(1em - 2px)}
#testimonials img{float:none;width:auto;max-width:100%;height:auto;padding:0}
#testimonials img.profile{float:left;width:100px;height:auto;padding:4px 14px 8px 0;box-sizing:content-box}
#testimonials h2,#testimonials h3,#testimonials h4{
  font-size:36px;font-weight:400;line-height:1;letter-spacing:-0.03em;margin:0 0 .5em;text-align:center}
#testimonials h2 strong,#testimonials h3 strong,#testimonials h4 strong,
#testimonials h2 b,#testimonials h3 b,#testimonials h4 b{font-weight:700}
#testimonials h2 img,#testimonials h3 img,#testimonials h4 img{display:block;margin:0 auto 6px;width:250px;max-width:100%;height:auto}
/* The source markup is <img><br>the quote; with the stars set to block the
   <br> would add a whole empty line between them. */
#testimonials h2 img + br,#testimonials h3 img + br,#testimonials h4 img + br{display:none}
#testimonials{cursor:grab}
#testimonials.is-dragging{cursor:grabbing;user-select:none}
#testimonials.is-dragging *{user-select:none}
/* "Show all": every testimonial one under another, nothing moving. */
/* "Show all" reads at the same size as the one-at-a-time view. */
.testimonials-all{width:auto;margin:0;font-size:13pt;color:#333;text-align:left}
.testimonials-all>div{display:flow-root;width:100%;padding:4px 0 26px;box-sizing:border-box}
.testimonials-all p{margin:0 0 1em;font-size:calc(1em - 2px)}
.testimonials-all img{float:none;width:auto;max-width:100%;height:auto;padding:0}
.testimonials-all img.profile{float:left;width:100px;height:auto;padding:4px 14px 8px 0;box-sizing:content-box}
.testimonials-all h2,.testimonials-all h3,.testimonials-all h4{
  font-size:36px;font-weight:400;line-height:1;letter-spacing:-0.03em;margin:0 0 .5em;text-align:center}
.testimonials-all h2 strong,.testimonials-all h3 strong,.testimonials-all h4 strong,
.testimonials-all h2 b,.testimonials-all h3 b,.testimonials-all h4 b{font-weight:700}
.testimonials-all h2 img,.testimonials-all h3 img,.testimonials-all h4 img{display:block;margin:0 auto 6px;width:250px;max-width:100%;height:auto}
.testimonials-all h2 img + br,.testimonials-all h3 img + br,.testimonials-all h4 img + br{display:none}
.testimonials{margin:30px auto}
#header,#footer{max-width:100%;background-position:center top}
#content .footer{padding:20px 0}
@media(max-width:1100px){.catalog.large .card{grid-template-columns:minmax(0,200px) minmax(0,1fr);column-gap:15px}}
@media(max-width:850px){.catalog.small,.catalog.medium{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog.large{grid-template-columns:1fr}.catalog.extra .card{grid-template-columns:minmax(0,240px) minmax(0,1fr)}}
@media(max-width:540px){.controls{gap:14px}.controls label{width:100%;justify-content:space-between}.controls input,.controls select{width:72%}.catalog.small,.catalog.medium,.catalog.large{grid-template-columns:1fr}.catalog.large .card,.catalog.extra .card{display:flex}.catalog.large .actions,.catalog.extra .actions{align-items:flex-end}#content{padding:1em}#testimonials{margin:0}.tabs a{flex:1;text-align:center}}
@media(prefers-reduced-motion:reduce){.ssm-scroller{overflow:visible}}

/* Show one headline before script initialization, rather than a static stack. */
#benefits:not(.ssm-scroller)>div:not(:first-child){display:none}

/* Testimonials are a separate single-panel slideshow, never a stacked list. */
#testimonials:not(.ssm-scroller)>div:not(:first-child){display:none}

/* Compact pagination and product count share one horizontal toolbar. */
.pagination-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0}
.pagination-row .pagination{flex:1 1 auto;min-width:0;margin:0}
.pagination-row #results{flex:0 0 auto;margin:0;text-align:right;white-space:nowrap}
@media(max-width:540px){.pagination-row{flex-wrap:wrap;gap:4px 10px}.pagination-row #results{margin-left:auto;font-size:12px}}

/* Store tile size rules. The JV catalogue retains its own layout. */
#catalog{--thumbnail-size:250px;opacity:1;transition:opacity 160ms ease-in-out}
#catalog.is-fading{opacity:0;pointer-events:none}
#catalog.small{--thumbnail-size:200px}
#catalog.large,#catalog.extra{--thumbnail-size:300px}
#catalog .card h2,#catalog .card h3{grid-row:auto}
#catalog .thumbnail{display:block;width:var(--thumbnail-size);max-width:100%;aspect-ratio:1;overflow:hidden;margin:0 auto 20px;align-self:start}
#catalog .thumbnail img{display:block;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center}
#catalog .description{text-align:left}
#catalog .price{color:#333;font-size:18px;line-height:1.5;white-space:normal}
#catalog.small .card h2,#catalog.small .card h3{text-align:center}
#catalog.small .actions{flex-direction:column;justify-content:flex-end;align-items:center;text-align:center}
#catalog.medium .card h2,#catalog.medium .card h3{text-align:left}
#catalog.medium .actions{flex-direction:row;justify-content:space-between;align-items:center}
#catalog.large .card,#catalog.extra .card{grid-template-columns:300px minmax(0,1fr);grid-template-rows:auto 1fr auto;column-gap:20px}
#catalog.large .card h2,#catalog.large .card h3{grid-column:1/-1;grid-row:1;text-align:left}
#catalog.large .thumbnail{grid-column:1;grid-row:2/4;margin-left:0;margin-right:0}
#catalog.large .description{grid-column:2;grid-row:2;text-align:left}
#catalog.large .actions{grid-column:2;grid-row:3;flex-direction:column;align-items:flex-end;justify-content:flex-end}
#catalog.extra .thumbnail{grid-column:1;grid-row:1/4;margin-left:0;margin-right:0}
#catalog.extra .card h2,#catalog.extra .card h3{grid-column:2;grid-row:1;text-align:left}
#catalog.extra .description{grid-column:2;grid-row:2;text-align:left}
#catalog.extra .actions{grid-column:2;grid-row:3;flex-direction:row;justify-content:space-between;align-items:center}
@media(max-width:1100px){#catalog.large{grid-template-columns:1fr}}
@media(max-width:650px){#catalog.large .card,#catalog.extra .card{display:flex}#catalog.large .thumbnail,#catalog.extra .thumbnail{margin-left:auto;margin-right:auto}#catalog.extra .actions{flex-wrap:wrap;justify-content:space-between}}
@media(prefers-reduced-motion:reduce){#catalog{transition:none}}

/* Keep controls compact; selected values use normal weight. */
.controls{gap:10px;padding:12px}
.controls label{gap:6px;white-space:nowrap}
.controls input,.controls select{font-weight:400;padding:8px 6px}
.controls input{width:160px}
.controls #per-page{width:83px}
/* Equal side tracks keep the pager centered on the catalogue, independent of status width. */
.pagination-row{display:grid;grid-template-columns:180px minmax(0,1fr) 180px;gap:8px}
.pagination-row .pagination{grid-column:2;justify-content:center}
.pagination-row #results{grid-column:3;white-space:normal}
.pagination-row.no-pagination{grid-template-columns:1fr;margin:4px 0}
.pagination-row.no-pagination #results{grid-column:1}
.pagination:empty{display:none}
#catalog .free-price{color:#c00;font-weight:bold}
#catalog.extra .card h2,#catalog.extra .card h3{font-size:28px;line-height:1.25}
#catalog.extra .description{font-size:18px;line-height:1.6}
@media(max-width:850px){
  .pagination-row{grid-template-columns:1fr;gap:4px}
  .pagination-row .pagination,.pagination-row #results{grid-column:1}
  .pagination-row #results{justify-self:end}
}
@media(max-width:540px){.controls #per-page{width:72%}}

/* The search field fills the space left by the fixed-width dropdown controls. */
.controls label[for="search"]{flex:1 1 220px}
.controls #search{flex:1 1 0;width:0;min-width:100px}
.controls label:not([for="search"]){flex:0 0 auto}
@media(max-width:540px){.controls label[for="search"]{flex-basis:100%}}

#catalog.large .actions{text-align:right}

/* Optional registry comparison price follows each size's price alignment. */
#catalog .price-stack{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
#catalog .normal-price{color:#999;font-size:16px;line-height:1.5;font-weight:600}
#catalog.small .price-stack{align-items:center}
#catalog.large .price-stack{align-items:flex-end;text-align:right}
#catalog.extra .price-stack{flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 12px}

/* The saving worked out from the registry's was-price. It sits beside the price
   in every view but medium, where it drops onto its own line underneath, left
   aligned. .price-line is what makes that one switch: the price and the saving
   are a row inside it, and medium turns that row into a column. Without the
   wrapper the saving would be a third child of .price-stack, which is already a
   column, and there would be no way to put it beside the price at all. */
#catalog .price-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 10px;min-width:0}
#catalog .save-price{color:#c00;font-weight:bold;font-size:18px;white-space:nowrap}
/* The tight setting is on every view, not just the ones that stack on purpose.
   Large wraps of its own accord -- its price column is narrow and right
   aligned -- and when it does the saving has to sit against the price there
   too. The default 1.5 line height plus a row gap left 29px between the two
   lines, which read as two separate things rather than one price and its
   saving; 1.2 with no gap is 21.6px, close enough to be a pair without the
   descenders touching. On the views where the two sit side by side the row gap
   never applies and the line height only tightens the one line they share. */
#catalog .price-line .price,#catalog .price-line .save-price{line-height:1.2}
/* Small and medium stack it deliberately rather than waiting for a wrap: a
   small card is too narrow to hold both on one line at any useful size.
   Each follows its own card's alignment -- small is centred throughout,
   medium is left aligned. */
#catalog.small .price-line{flex-direction:column;align-items:center;justify-content:center}
#catalog.medium .price-line{flex-direction:column;align-items:flex-start}
#catalog.large .price-line{justify-content:flex-end}

/* Match the larger JV pagination text in the store as well. */
.pagination{font-size:18px;line-height:1.4}
.pagination button{white-space:nowrap}

/* Headline scrollers (Store Settings "---" panels). Same mechanics as #benefits:
   the shared .ssm-scroller rules above clip and animate; these keep each panel
   full width and stop all but the first showing before the script runs. */
.headline-scroll{position:relative;width:100%;margin:0 auto}
.headline-scroll>div{width:100%;margin:0;padding:0}
.headline-scroll>div h1,.headline-scroll>div h2,.headline-scroll>div h3{width:100%;box-sizing:border-box;margin:0 0 20px}
/* Once there is more than one panel the 20px under the heading has to move
   off the heading and onto the box around it. Inside the panel it is part
   of what gets centred, so a one-line panel sat 20px high in its own space
   with the gap hanging underneath -- which is the gap that made a short
   headline look wrong beside a long one. On the scroller instead, the same
   space still separates the headline from whatever follows it, and the
   words themselves centre properly. A single panel never gets
   .ssm-scroller, so a page with one headline is untouched. */
.headline-scroll.ssm-scroller{margin-bottom:20px}
.headline-scroll.ssm-scroller>div h1,.headline-scroll.ssm-scroller>div h2,
.headline-scroll.ssm-scroller>div h3{margin-bottom:0}
.headline-scroll:not(.ssm-scroller)>div:not(:first-child){display:none}

/* The bar across the very top of the page (Store Settings > Add header strip).
   The element is only printed when the client has changed one of its settings,
   and the inline override that comes with it carries the chosen colour and
   height -- these are the fallback values, matching the bar the shipped header
   graphics have always drawn. */
#topstrip{display:flex;align-items:center;justify-content:center;width:100%;min-height:30px;background-color:#666666}
#topstrip p,#topstrip div,#topstrip h1,#topstrip h2,#topstrip h3{margin:0}
