/* The new store page (store.php, templates/store.html; store plan phase 7,
   step 5). Loaded after css/checkout.css, whose header, footer and
   variables it shares: a dark page in Metric Halo's look (B.J. 2026-11-18),
   so the light checkout reads as the next step. Each tile is a card whose
   foot holds its own price and buttons. js/store.js filters and animates. */

.st-page {
	--page: #111113;
	--surface: #1c1c1f;
	/* A tile: one lighter card, its image a black window inside it, so
	   each reads as a unit apart from its neighbors (B.J. 2026-11-18). */
	--tile: #232328;
	--tile-line: #3a3a42;
	--tile-edge: #4b4b55;
	/* Text fields' edges (the search, the sign-in dialog) and the dialog
	   itself, a step lighter than the page (B.J. 2026-11-18). */
	--field-edge: #5c5c67;
	--dialog: #2c2c32;
	--text: #f5f5f7;
	--muted: #c2c2c7;
	--line: #34343a;
	--filter-line: #5e5e66;
	--focus: #4da3ff;
	--button-bg: #f5f5f7;
	--button-text: #111113;
	--header-bg: #111113;
	--header-text: #f5f5f7;
	--header-line: #26262a;
	--footer-bg: #000000;
	--header-logo-light: none;
	--header-logo-dark: block;
	--column: 1200px;
	--radius: 12px;
	--motion: 260ms;
	/* The filter's timing, read by js/store.js: tiles fade out, fade in
	   and move to their new places together, over one time on one curve. */
	--filter-time: 500ms;
	--filter-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	color-scheme: dark;
}

/* The header's cart: always in view, beside the menu button once the
   links fold into it. The store's five links plus the cart need about
   600px, so they fold below 760px rather than the checkout's 600px. */
.co-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 -10px var(--nav-raise) 8px; color: var(--header-text); }
.co-cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--header-text); color: var(--header-bg); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.co-cart-count.st-bump { animation: st-bump 400ms ease; }
@keyframes st-bump { 30% { transform: scale(1.35); } }
@media (max-width: 759px) {
	.st-page .co-nav { display: none; }
	.st-page .co-menu { display: block; margin-left: 4px; }
	.co-cart { margin-left: auto; }
}
/* On a desktop the header and footer stay put while the tiles scroll
   between them (B.J. 2026-11-18); the footer folds into one short row so
   it takes little of the screen. The phone is decided separately. */
@media (min-width: 900px) {
	.st-page .co-header { position: sticky; top: 0; z-index: 20; }
	.st-page .co-footer { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 8px 24px; padding: 12px max(16px, calc((100% - var(--column)) / 2 + 16px)); text-align: left; border-top: 1px solid var(--header-line); }
	.st-page .co-footer-links { margin: 0; justify-content: flex-start; }
	.st-page .co-footer-contact { margin: 0 0 0 auto; }
	.st-page .co-footer-bottom { margin: 0; font-size: 14px; }
}
@media (min-width: 900px) {
	.st-page .co-header { padding-left: max(var(--column-inset), calc((100% - var(--column)) / 2 + var(--column-inset))); padding-right: max(var(--column-inset), calc((100% - var(--column)) / 2 + var(--column-inset))); }
}

/* The page always fills the window, so with only a tile or two left the
   footer stays at the bottom rather than rising under them; and the
   scroll bar's room is kept on both sides whether or not it shows, so
   filtering to a short page shifts nothing and the page stays centered.
   Overlay scroll bars (phones, most Macs) take no room either way. */
html { overflow-y: auto; scrollbar-gutter: stable both-edges; }
.st-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.st-main { flex: 1 0 auto; width: 100%; max-width: var(--column); margin: 0 auto; padding: 0 16px 48px 16px; }
/* The title with the search beside it, then the category filters, which
   wrap onto as many rows as they need rather than run off the edge. */
.st-top { display: flex; align-items: center; gap: 16px; margin: 28px 0 16px 0; }
.st-title { font-size: 28px; margin: 0; }
.st-search { flex: 0 1 280px; min-width: 0; margin-left: auto; }
/* Beside the title: a guest's "Sign in for your price", or the signed-in
   owner's greeting with Sign out. */
.st-account { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--button-bg); border-radius: 999px; background: var(--button-bg); color: var(--button-text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity var(--motion); }
.st-account:hover { opacity: 0.85; }
.st-account:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.st-account-line { margin: 0; color: var(--muted); font-size: 14px; }
.st-page .co-dialog-box { background: var(--dialog); border: 1px solid var(--tile-edge); }
.st-page .co-dialog input { border-color: var(--field-edge); }
/* The dialog's notes (Forgot your password?) on the dark page; the
   checkout's own --panel is light. */
.st-page .co-note { background: #3a3a42; color: var(--text); }
.st-login-text { margin: 0 0 16px 0; color: var(--muted); font-size: 14px; }
/* On a phone (B.J. 2026-11-18, "the layout of the top is not good"): the
   title and the search share the first row, and Sign in and the offer code
   share the second in equal halves, rather than one button stranded on a
   line of its own. */
@media (max-width: 520px) {
	.st-top { flex-wrap: wrap; gap: 10px 8px; margin-top: 20px; }
	.st-title { order: 0; font-size: 26px; margin-right: 8px; }
	.st-search { order: 1; flex: 1 1 0; }
	.st-top::after { content: ''; order: 2; flex-basis: 100%; height: 0; }
	.st-top > .st-account, .st-top > .st-account-line, .st-top > .st-offer-line { order: 3; flex: 1 1 0; text-align: center; }
	.st-top > .st-account { padding: 9px 8px; font-size: 13px; }
}
/* Offers: the applied code beside the title (or "Have an offer code?",
   which opens its dialog, as Sign in does), and the applied offer's
   message above the tiles (the old page's own fragments,
   templates/fragment_<key>_intro.html, or a plain line). A code that does
   not work says why in the dialog. */
.st-offer-line { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 14px; }
.st-offer-line strong { color: var(--text); }
.st-offer-why p { margin: 0 0 12px 0; }
.st-offer-why a { color: inherit; }
.st-offer { margin: 0 auto 20px auto; max-width: 720px; padding: 14px 20px; border-radius: 12px; text-align: center; color: var(--text); }
.st-offer-active { background: linear-gradient(135deg, #15183d 0%, #1d2a6b 60%, #3557c4 100%); border: 1.5px solid #5ec4cb; }
.st-offer-problem { background: #3a3a42; border: 1px solid var(--tile-edge); }
.st-offer h1 { font-size: 20px; margin: 0 0 6px 0; }
.st-offer p { margin: 4px 0; }
.st-offer a { color: inherit; }
.st-offer .dark, .st-offer center { display: block; background: none; padding: 0; margin: 0; }
/* A partner's handoff: what it left out, and the way back to its cart. */
.st-handoff { margin: 0 auto 20px auto; max-width: 720px; padding: 12px 20px; border-radius: 12px; background: #3a3a42; border: 1px solid var(--tile-edge); text-align: center; color: var(--text); }
.st-handoff p { margin: 4px 0; }
.st-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.st-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 24px; }
.st-filter { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--filter-line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; transition: background var(--motion), color var(--motion), border-color var(--motion); }
.st-filter:hover { border-color: var(--muted); }
.st-filter-break { flex-basis: 100%; height: 0; }
/* The filters are a menu instead of rows of buttons on a phone (B.J.
   2026-11-18), and at any width where the buttons would wrap (B.J.
   2026-11-19): js/store.js sets st-filters-menu on the page then. */
.st-filter-pick { display: none; position: relative; margin-bottom: 20px; }
.st-filter-pick::after { content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg); pointer-events: none; }
.st-filter-menu { width: 100%; padding: 10px 44px 10px 16px; border: 1px solid var(--filter-line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.st-filter-menu:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.st-filters-menu .st-filters { display: none; }
.st-filters-menu .st-filter-pick { display: block; max-width: 360px; margin-left: auto; margin-right: auto; }
@media (max-width: 520px) {
	.st-filters { display: none; }
	.st-filter-pick { display: block; }
}
}
.st-filter[aria-pressed='true'] { background: var(--text); color: var(--page); border-color: var(--text); }
.st-filter:focus-visible, .st-button:focus-visible, .st-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.st-search input { width: 100%; padding: 10px 14px; border: 1px solid var(--field-edge); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.st-search input::placeholder { color: var(--muted); }

/* The grid: one column on a phone, up to four on a wide screen. */
.st-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.st-tile { display: flex; flex-direction: column; background: var(--tile); border: 1px solid var(--tile-edge); border-radius: var(--radius); overflow: hidden; transition: opacity var(--filter-time) var(--filter-ease), transform var(--filter-time) var(--filter-ease), border-color var(--motion); }
.st-tile:hover { border-color: #64646f; }
.st-tile.st-leaving { opacity: 0; transform: scale(0.94); }
.st-tile.st-entering { opacity: 0; transform: scale(0.94); }
.st-tile.st-gone { display: none; }
.st-image { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
a.st-image img { transition: transform var(--motion) ease; }
/* An award centered along the top of the image: NAMM's badge, or until its
   file is given, the award as a small label. */
.st-media { position: relative; margin: 10px 10px 0 10px; border-radius: 8px; overflow: hidden; }
.st-award, .st-award-badge { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); pointer-events: none; }
/* The label in the TEC badge's colors: its navy center, its blue ring
   and its teal edge. */
.st-award { padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #15183d 0%, #1d2a6b 60%, #3557c4 100%); border: 1.5px solid #5ec4cb; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); color: #ffffff; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.st-award-badge { width: 64px; height: 64px; object-fit: contain; }
a.st-image:hover img { transform: scale(1.03); }
.st-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
/* A picture far wider than the tile (the mkIV front panels): its left
   third, across the tile's width, centered top to bottom. */
.st-image-wide img { inset: auto; left: 0; top: 50%; width: 300%; height: auto; max-width: none; padding: 0; transform: translateY(-50%); transform-origin: left center; }
a.st-image-wide:hover img { transform: translateY(-50%) scale(1.03); }
.st-body { padding: 16px 16px 12px 16px; }
.st-name { font-size: 19px; margin: 0; }
.st-tagline { margin: 6px 0 0 0; color: var(--muted); font-size: 15px; }

/* The foot: the price and every button for this product, ruled off. */
.st-foot { margin: auto 16px 0 16px; padding: 14px 0 16px 0; border-top: 1px solid var(--tile-line); }
/* The MB|MH mark sits at the price row's far end, leaving the name the
   tile's whole width (B.J. 2026-11-18); many of these screenshots show the
   mark in the plug-in's own window too, so it stays out of the image. */
.st-price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 0 0 12px 0; }
/* Three columns (B.J. 2026-11-18): the list price at the left, the price
   centered on the tile, the MB|MH mark at the right. */
.st-price { display: contents; }
.st-was { grid-column: 1; justify-self: start; }
.st-price-now { grid-column: 2; }
.st-badge { grid-column: 3; justify-self: end; position: relative; display: inline-flex; cursor: help; border-radius: 4px; }
.st-badge img { width: 58px; height: auto; opacity: 0.9; }
/* The mark explains itself (B.J. 2026-11-18): on hover, keyboard focus or
   a tap, a tip opens above it, toward the tile's middle so the tile's
   edge does not cut it off. */
.st-badge::after { content: attr(data-tip); position: absolute; right: -6px; bottom: calc(100% + 10px); z-index: 5; width: max-content; max-width: 200px; padding: 8px 10px; border: 1px solid var(--tile-edge); border-radius: 8px; background: #000000; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.35; text-align: center; white-space: normal; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 150ms ease, transform 150ms ease, visibility 150ms; pointer-events: none; }
.st-badge:hover::after, .st-badge:focus::after { opacity: 1; visibility: visible; transform: none; }
.st-badge:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.st-price-now { font-size: 22px; }
.st-was { color: var(--muted); font-size: 15px; }
.st-your-price { margin: -4px 0 12px 0; color: #7ee2a8; font-size: 14px; text-align: center; }
.st-your-price strong { font-size: 16px; }
.st-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Add to Cart across the foot, then Buy Now and Learn More; Buy Now takes
   the row alone when there is no page, so every foot is the same height. */
.st-buttons .st-button-primary { grid-column: 1 / -1; }
.st-buttons .st-button:last-child:nth-child(2) { grid-column: 1 / -1; }
.st-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 10px; white-space: nowrap; border: 1px solid var(--text); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 120ms ease, background var(--motion); }
.st-button:active { transform: scale(0.97); }
.st-button-primary { background: var(--button-bg); color: var(--button-text); }
.st-button[disabled] { opacity: 0.5; cursor: default; }
.st-button.st-done, .st-button.st-done[disabled] { background: #7ee2a8; border-color: #7ee2a8; color: #111113; opacity: 1; }

.st-none { margin: 48px 0; text-align: center; color: var(--muted); }
.st-error { margin: 24px 0 0 0; color: #ff8a80; text-align: center; }
.st-page .co-link { color: var(--text); }

/* Reduce Motion: no animation at all; tiles appear and vanish at once. */
@media (prefers-reduced-motion: reduce) {
	.st-page { --motion: 0ms; --filter-time: 0ms; }
	.st-tile.st-leaving, .st-tile.st-entering { transform: none; }
	.co-cart-count.st-bump { animation: none; }
}
