/* Prism Store: the shop on Amrod's pattern, in the site's own dark look
   (the colours of the approved mock-up). Every colour is set here on purpose:
   the theme's own heading, label and form colours are for light pages. */
.prism-store, .prism-shopbar, .prism-ribbon, .prism-store-preview {
	--ps-bg: #0e1117; --ps-card: #161b22; --ps-hover: #1c2230; --ps-line: #21262d; --ps-line2: #30363d;
	--ps-text: #e8eaed; --ps-sec: #9aa4ae; --ps-green: #5ee87a; --ps-ink: #0e1117;
	--ps-pink: #e84088; --ps-blue: #66ccee; --ps-amber: #f0b429; --ps-red: #ff7b72;
	--ps-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif; --ps-r: 12px;
	--ps-max: 1680px; --ps-gut: clamp(16px, 2.5vw, 40px);
	color: var(--ps-text);
}
.prism-store :focus-visible, .prism-shopbar :focus-visible, .prism-ribbon :focus-visible { outline: 2px solid var(--ps-blue); outline-offset: 2px; }
.prism-store .screen-reader-text, .prism-shopbar .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Use the whole window, not the theme's narrow content column. */
body.prism-store-wide .site-content > .ast-container,
body.prism-store-wide #content > .ast-container { max-width: none; padding-left: 0; padding-right: 0; display: block; }
.prism-store { width: 100%; }
.prism-store .ps-wrap, .ps-barwrap { max-width: var(--ps-max); margin: 0 auto; padding-left: var(--ps-gut); padding-right: var(--ps-gut); box-sizing: border-box; }
.prism-store .ps-wrap { padding-bottom: 48px; }

.prism-store h1, .prism-store h2, .prism-store h3, .prism-store summary, .prism-store legend { font-family: var(--ps-head); font-weight: 600; color: var(--ps-text); margin: 0; }
.prism-store p, .prism-store label { color: inherit; }
.prism-store a { color: var(--ps-blue); }

.prism-store-preview { background: #1b2a1f; font-size: 13px; padding: 6px 16px; text-align: center; border-bottom: 1px solid var(--ps-line); }
.prism-store-preview a { color: var(--ps-green); }

/* ---- search bar ---- */
.prism-shopbar { background: var(--ps-card); border-top: 1px solid var(--ps-line); padding: 10px 0; }
.prism-shopbar .ps-search { display: flex; width: 100%; border: 1px solid var(--ps-line2); border-radius: 999px; overflow: hidden; background: var(--ps-bg); margin: 0; }
.prism-shopbar .ps-search:focus-within { border-color: var(--ps-blue); }
.prism-shopbar .ps-search input[type="search"] { flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; color: var(--ps-text); padding: 11px 18px; margin: 0; box-shadow: none; font-size: 15px; height: auto; }
.prism-shopbar .ps-search input[type="search"]::placeholder { color: var(--ps-sec); opacity: 1; }
.prism-shopbar .ps-search input[type="search"]:focus { outline: none; }
.prism-shopbar .ps-search select { border: 0; border-left: 1px solid var(--ps-line2); border-radius: 0; background: transparent; color: var(--ps-text); max-width: 220px; padding: 0 12px; margin: 0; height: auto; box-shadow: none; }
.prism-shopbar .ps-search select option { background: var(--ps-card); color: var(--ps-text); }
.prism-shopbar .ps-search button { border: 0; border-radius: 0; background: var(--ps-green); color: var(--ps-ink); font-weight: 800; padding: 0 26px; margin: 0; cursor: pointer; }
.prism-shopbar .ps-search button:hover { filter: brightness(1.08); }

/* ---- category ribbon ---- */
.prism-ribbon { background: var(--ps-card); border-top: 1px solid var(--ps-line); border-bottom: 1px solid var(--ps-line); position: relative; z-index: 90; }
.prism-ribbon ul { list-style: none; margin: 0; padding: 0; }
.prism-ribbon .pr-items { display: flex; flex-wrap: wrap; gap: 2px; }
.prism-ribbon .pr-item { position: static; margin: 0; }
.prism-ribbon .pr-link { display: block; padding: 12px 14px; white-space: nowrap; font-weight: 700; color: var(--ps-text); text-decoration: none; border-bottom: 2px solid transparent; }
.prism-ribbon .pr-own > .pr-link { color: var(--ps-green); }
.prism-ribbon .pr-item:hover > .pr-link, .prism-ribbon .pr-item.open > .pr-link, .prism-ribbon .pr-link[aria-current="page"] { color: var(--ps-green); border-bottom-color: var(--ps-green); }
.prism-ribbon .pr-panel { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ps-card); border-top: 1px solid var(--ps-line); border-bottom: 1px solid var(--ps-line); box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.prism-ribbon .pr-item.open > .pr-panel, .prism-ribbon .pr-item:focus-within > .pr-panel { display: block; }
html:not(.ps-js) .prism-ribbon .pr-item:hover > .pr-panel { display: block; }
.prism-ribbon .pr-inner { padding-top: 18px; padding-bottom: 24px; max-height: 70vh; overflow-y: auto; }
.prism-ribbon .pr-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; margin-bottom: 12px; }
.prism-ribbon .pr-title { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ps-sec); font-weight: 800; }
.prism-ribbon .pr-all { color: var(--ps-green); font-weight: 800; text-decoration: none; }
.prism-ribbon .pr-flat { columns: 220px; column-gap: 24px; }
.prism-ribbon .pr-flat li { break-inside: avoid; }
.prism-ribbon .pr-flat a, .prism-ribbon .pr-col li a { display: block; padding: 4px 0; color: var(--ps-text); text-decoration: none; line-height: 1.35; }
.prism-ribbon .pr-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; }
.prism-ribbon .pr-sub { display: block; font-weight: 800; color: var(--ps-text); text-decoration: none; margin-bottom: 4px; }
.prism-ribbon .pr-col li a { color: var(--ps-sec); }
.prism-ribbon .pr-more { color: var(--ps-green) !important; }
.prism-ribbon .pr-panel a:hover { color: var(--ps-green); }

/* ---- page head ---- */
.ps-crumbs { font-size: 13px; color: var(--ps-sec); padding: 16px 0 4px; }
.ps-crumbs a, .ps-desc a { color: var(--ps-blue); text-decoration: underline; text-underline-offset: 2px; }
.ps-head { padding: 6px 0 18px; }
.ps-head h1 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; }
.ps-desc { color: var(--ps-sec); max-width: 90ch; margin-top: 6px; }
.ps-desc p { margin: 0 0 6px; }
.ps-sh { font-size: 20px; margin: 4px 0 12px !important; }
.ps-section { margin-bottom: 28px; }

/* ---- tiles (shop page) ---- */
.ps-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.prism-store .ps-tile { color: var(--ps-text); background: var(--ps-card); border: 1px solid var(--ps-line); border-radius: var(--ps-r); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s, transform .15s; }
.ps-tile:hover { border-color: var(--ps-green); transform: translateY(-2px); }
.ps-tpic { aspect-ratio: 1; background: #f3f4f6; display: grid; place-items: center; overflow: hidden; }
.ps-tpic img { width: 100%; height: 100%; object-fit: contain; }
.ps-tini { font-family: var(--ps-head); font-size: 54px; font-weight: 600; color: #9aa4ae; }
.ps-tname { padding: 10px 12px 0; font-weight: 800; color: var(--ps-text); line-height: 1.3; }
.ps-tn { padding: 2px 12px 12px; font-size: 13px; color: var(--ps-sec); }

.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ps-chips a { border: 1px solid var(--ps-line2); border-radius: 999px; padding: 5px 14px; text-decoration: none; color: var(--ps-text); background: var(--ps-card); }
.ps-chips a span { color: var(--ps-sec); font-size: 12px; margin-left: 2px; }
.ps-chips a:hover { border-color: var(--ps-green); color: var(--ps-green); }

/* ---- filters ---- */
.ps-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.ps-filterbtn { display: none; }
.ps-filters { background: var(--ps-card); border: 1px solid var(--ps-line); border-radius: var(--ps-r); padding: 10px 16px 16px; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; color: var(--ps-text); margin: 0; }
.ps-fhead { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; }
.ps-fh { font-size: 19px !important; }
.ps-clearlink { font-size: 13px; color: var(--ps-blue); }
.ps-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--ps-line); font-weight: 700; cursor: pointer; color: var(--ps-text) !important; margin: 0; }
.ps-toggle small { display: block; color: var(--ps-sec); font-weight: 400; font-size: 12px; }
.ps-toggle input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--ps-line2); position: relative; flex: none; cursor: pointer; margin: 0; border: 0; }
.ps-toggle input::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: var(--ps-sec); transition: left .15s; }
.ps-toggle input:checked { background: var(--ps-green); }
.ps-toggle input:checked::after { left: 21px; background: var(--ps-ink); }
.ps-group { border-top: 1px solid var(--ps-line); padding: 10px 0; margin: 0; }
.ps-group summary { cursor: pointer; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ps-group summary::-webkit-details-marker { display: none; }
.ps-group summary::after { content: "+"; color: var(--ps-sec); font-family: system-ui, sans-serif; }
.ps-group[open] summary::after { content: "–"; }
.ps-opts { display: grid; gap: 2px; margin-top: 8px; max-height: 300px; overflow-y: auto; }
.ps-check { display: flex; justify-content: space-between; gap: 8px; align-items: center; cursor: pointer; padding: 3px 0; color: var(--ps-text) !important; font-weight: 400; margin: 0; }
.ps-check span:first-child { display: flex; gap: 8px; align-items: center; }
.ps-check input { accent-color: var(--ps-green); width: 16px; height: 16px; margin: 0; }
.ps-n { color: var(--ps-sec) !important; font-size: 12px; font-variant-numeric: tabular-nums; }
.ps-price-in { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; margin-top: 8px; color: var(--ps-sec); }
.prism-store .ps-price-in input[type="number"] { width: 100%; background: var(--ps-bg); border: 1px solid var(--ps-line2); border-radius: 8px; padding: 7px 9px; color: var(--ps-text); margin: 0; height: auto; box-shadow: none; }
.prism-store .ps-price-in input[type="number"]::placeholder { color: var(--ps-sec); opacity: 1; }
.prism-store .ps-price-in input[type="number"]:focus { border-color: var(--ps-blue); }
.ps-apply { width: 100%; margin-top: 12px; }

/* ---- toolbar ---- */
.ps-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; background: var(--ps-card); border: 1px solid var(--ps-line); border-radius: var(--ps-r); padding: 10px 14px; margin-bottom: 16px; }
.ps-count { margin: 0 !important; color: var(--ps-sec) !important; }
.ps-on { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.ps-on a { display: inline-block; border: 1px solid var(--ps-green); color: var(--ps-green); border-radius: 999px; padding: 2px 10px; font-size: 13px; text-decoration: none; }
.ps-sort { display: flex; gap: 8px; align-items: center; margin: 0 0 0 auto; color: var(--ps-sec); }
.ps-sort label { color: var(--ps-sec) !important; margin: 0; font-size: 14px; }
.prism-store .ps-sort select { background: var(--ps-bg); border: 1px solid var(--ps-line2); border-radius: 8px; padding: 6px 30px 6px 10px; color: var(--ps-text); margin: 0; height: auto; box-shadow: none; }
.prism-store .ps-sort select option { background: var(--ps-card); color: var(--ps-text); }

/* ---- product cards ---- */
.ps-grid { list-style: none; margin: 0 !important; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ps-card { background: var(--ps-card); border: 1px solid var(--ps-line); border-radius: var(--ps-r); overflow: hidden; display: flex; flex-direction: column; margin: 0 !important; transition: border-color .15s, transform .15s; }
.ps-card:hover { border-color: var(--ps-line2); transform: translateY(-2px); }
.ps-pic { display: grid; place-items: center; aspect-ratio: 26 / 25; background: #f3f4f6; position: relative; overflow: hidden; }
.ps-pic img { width: 100%; height: 100%; object-fit: contain; margin: 0 !important; }
.ps-noimg { color: #5f6b76 !important; font-size: 12px; }
.ps-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.ps-badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; }
.ps-clear { background: var(--ps-pink); color: #fff !important; }
.ps-new { background: var(--ps-blue); color: var(--ps-ink) !important; }
.ps-promo { background: var(--ps-amber); color: var(--ps-ink) !important; }
.ps-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ps-brand { font-size: 12px; color: var(--ps-sec) !important; text-transform: uppercase; letter-spacing: .06em; }
.prism-store .ps-name { font-size: 16px; line-height: 1.3; font-family: var(--ps-head); }
.ps-name a { color: var(--ps-text); text-decoration: none; }
.ps-name a:hover { color: var(--ps-green); }
.ps-dots { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.ps-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.ps-more { font-size: 12px; color: var(--ps-sec) !important; }
.ps-price { font-family: var(--ps-head); font-size: 19px; font-weight: 600; margin-top: auto; color: var(--ps-text) !important; }
.ps-price small { font-size: 13px; color: var(--ps-sec); font-weight: 400; }
.ps-price .woocommerce-Price-amount { color: var(--ps-text); }
.ps-avail { font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.ps-avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.ps-ok { color: var(--ps-green) !important; }
.ps-out { color: var(--ps-red) !important; }
.ps-hint { font-size: 12px; color: var(--ps-sec) !important; }

/* ---- paging, empty ---- */
.ps-pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 0; margin: 28px 0 0; }
.ps-pager a, .ps-pager span { display: block; min-width: 38px; text-align: center; padding: 7px 11px; border: 1px solid var(--ps-line2); border-radius: 8px; background: var(--ps-card); color: var(--ps-text); text-decoration: none; }
.ps-pager .current { border-color: var(--ps-green); color: var(--ps-green); font-weight: 800; }
.ps-empty { background: var(--ps-card); border: 1px dashed var(--ps-line2); border-radius: var(--ps-r); padding: 40px 24px; text-align: center; }
.ps-btn { display: inline-block; background: var(--ps-green); color: var(--ps-ink) !important; font-weight: 800; border-radius: 10px; padding: 10px 16px; text-decoration: none; border: 0; }

@media (max-width: 921px) {
	.prism-ribbon .pr-items { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.prism-ribbon .pr-items::-webkit-scrollbar { display: none; }
	/* Phones and small tablets: each ribbon item opens its category page. */
	.prism-ribbon .pr-panel { display: none !important; }
	.ps-layout { grid-template-columns: 1fr; }
	.ps-filterbtn { display: block; width: 100%; background: var(--ps-card); color: var(--ps-text); border: 1px solid var(--ps-line2); border-radius: var(--ps-r); padding: 11px; font-weight: 800; cursor: pointer; }
	.ps-filters { display: none; position: static; max-height: none; }
	.ps-filters.ps-open { display: block; }
	.ps-sort { margin-left: 0; }
}
@media (max-width: 640px) {
	.prism-shopbar .ps-search select { display: none; }
	.prism-shopbar .ps-search button { padding: 0 16px; }
	.ps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ps-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ps-body { padding: 10px; }
	.prism-store .ps-name { font-size: 14px; }
	.ps-price { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.prism-store *, .prism-ribbon * { transition: none !important; }
	.ps-card:hover, .ps-tile:hover { transform: none; }
}

/* Category tiles on phones only (the ribbon lists them on a computer). */
@media (min-width: 922px) { .ps-home.ps-phones-only { display: none; } }
/* Filter lists scroll in the dark theme's colours, not a white track. */
.ps-opts { color-scheme: dark; scrollbar-width: thin; scrollbar-color: var(--ps-line2) transparent; }
.ps-opts::-webkit-scrollbar { width: 8px; }
.ps-opts::-webkit-scrollbar-track { background: transparent; }
.ps-opts::-webkit-scrollbar-thumb { background: var(--ps-line2); border-radius: 4px; }
/* Category links in the filters. */
.ps-links .ps-check { text-decoration: none; }
.ps-links .ps-check:hover span:first-child, .ps-links .ps-check.on span:first-child { color: var(--ps-green); }
.ps-links .ps-check.on { font-weight: 600; }
