/* CiMora Store Kit: shopping tools (core/shoptools.php, assets/shoptools.js). Works on the engine's pages and on the designs'. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Instant search panel */
.bx-sg { position: fixed; z-index: 2147483000; background: #fff; color: #1f2122; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.06); overflow: auto; overscroll-behavior: contain; padding: 8px; font-size: 14px; line-height: 1.4; text-align: start; }
.bx-sg[hidden] { display: none; }
.bx-sg a { color: inherit; text-decoration: none; }
.bx-sg-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 4px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #6b6f72; text-transform: uppercase; }
.bx-sg-h button { background: none; border: 0; color: #6b6f72; font: inherit; font-weight: 600; text-transform: none; cursor: pointer; text-decoration: underline; }
.bx-sg-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 8px; }
.bx-sg-chips a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: #f2f3f4; font-size: 13px; font-weight: 600; }
.bx-sg-chips a small { color: #6b6f72; font-weight: 500; }
.bx-sg-chips a:hover, .bx-sg-chips a.on { background: var(--primary, #1f2122); color: var(--on-primary, #fff); }
.bx-sg-p { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.bx-sg-p:hover, .bx-sg-p.on { background: #f2f3f4; }
.bx-sg-p img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #eee; }
.bx-sg-n { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; }
.bx-sg-n small { display: block; color: #b42318; font-weight: 600; font-size: 12px; }
.bx-sg mark, .bx-sg-n mark { background: none; color: var(--primary, #1f2122); text-decoration: underline; text-underline-offset: 3px; }
.bx-sg-pr { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.bx-sg-pr s { color: #8a8f93; font-size: 12px; }
.bx-sg-all { display: block; margin: 6px 0 0; padding: 11px; border-radius: 10px; text-align: center; font-weight: 700; background: var(--primary, #1f2122); color: var(--on-primary, #fff) !important; }
.bx-sg-none { margin: 0; padding: 14px 10px; color: #6b6f72; }
html[data-mode="dark"] .bx-sg { background: #1d1f21; color: #f2f3f4; box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); }
html[data-mode="dark"] .bx-sg-chips a { background: #2a2d30; }
html[data-mode="dark"] .bx-sg-p:hover, html[data-mode="dark"] .bx-sg-p.on { background: #2a2d30; }
html[data-mode="dark"] .bx-sg-n mark { color: inherit; }

/* Compare tray */
.bx-cmp { position: fixed; z-index: 60; inset-inline: 0; margin-inline: auto; bottom: calc(16px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 8px; background: #1f2122; color: #fff; border-radius: 999px; box-shadow: 0 12px 40px rgba(0,0,0,.3); font-size: 14px; }
.bx-cmp[hidden] { display: none; }
.bx-cmp-imgs { display: flex; gap: 6px; min-width: 0; }
.bx-cmp-i { position: relative; flex: none; }
.bx-cmp-i img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid #fff; background: #444; }
.bx-cmp-i button { position: absolute; top: -5px; inset-inline-end: -5px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #fff; color: #1f2122; font-size: 13px; line-height: 18px; padding: 0; cursor: pointer; }
.bx-cmp-go { display: inline-flex; gap: 8px; align-items: center; padding: 9px 16px; border-radius: 999px; background: var(--primary, #fff); color: var(--on-primary, #1f2122) !important; font-weight: 700; text-decoration: none; white-space: nowrap; }
.bx-cmp-go.off { background: transparent; color: #fff !important; font-weight: 600; pointer-events: none; padding-inline: 4px; white-space: normal; font-size: 13px; }
.bx-cmp-go b { font-weight: 600; opacity: .75; font-size: 12px; }
.bx-cmp-x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer; }
body.layout-market .bx-cmp { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (max-width: 860px) {
  .bx-cmp { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.layout-market .bx-cmp { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .bx-cmp-i img { width: 32px; height: 32px; }
}
.bx-toast { position: fixed; z-index: 2147483001; inset-inline: 0; margin-inline: auto; top: 18px; width: max-content; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 12px; background: #1f2122; color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transform: translateY(-8px); transition: .2s; pointer-events: none; }
.bx-toast.show { opacity: 1; transform: none; }

/* Product page: compare button beside share */
.pd-share .pd-compare { width: auto !important; display: inline-flex; gap: 6px; align-items: center; padding: 0 12px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.pd-share .pd-compare.on { background: var(--primary, #1f2122); color: var(--on-primary, #fff); border-color: transparent; }

/* Shop page */
.price-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.price-steps .chip { font-size: 12.5px; }
.price-steps .chip.on { background: var(--text, #1f2122); color: var(--bg, #fff); }
.facet-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary, #1f2122); color: var(--on-primary, #fff); font-size: 11px; font-weight: 700; }
.recent-strip .sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Size guide */
.size-units { display: inline-flex; margin: 4px 0 12px; border: 1px solid var(--line, #ddd); border-radius: 999px; padding: 3px; }
.size-units button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: inherit; }
.size-units button.on { background: var(--text, #1f2122); color: var(--bg, #fff); }

/* Compare page */
.cmp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 18px; }
.cmp-top .page-title { margin: 0; margin-inline-end: auto; }
.cmp-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line, #e4e4e4); border-radius: 16px; -webkit-overflow-scrolling: touch; }
.cmp-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: calc(120px + var(--cmp-n) * 180px); font-size: 14px; }
.cmp-table th, .cmp-table td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line, #eee); }
.cmp-table tbody th { position: sticky; inset-inline-start: 0; z-index: 1; width: 120px; background: var(--card, var(--bg, #fff)); font-weight: 700; color: var(--muted, #6b6f72); font-size: 13px; }
.cmp-table thead th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--card, var(--bg, #fff)); }
.cmp-table tbody tr:nth-child(even) td { background: rgba(127,127,127,.05); }
.cmp-table.only-diff tr[data-same] { display: none; }
.cmp-prod { position: relative; min-width: 160px; }
.cmp-prod a { display: block; color: inherit; text-decoration: none; }
.cmp-prod img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 10px; background: #f2f2f2; }
.cmp-prod b { display: block; font-size: 14.5px; line-height: 1.35; }
.cmp-price { display: block; margin: 6px 0 10px; font-weight: 700; }
.cmp-price s { color: var(--muted, #8a8f93); font-weight: 400; font-size: 12.5px; }
.cmp-x { position: absolute; top: 18px; inset-inline-end: 20px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #1f2122; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
@media (max-width: 600px) {
  .cmp-table { min-width: calc(96px + var(--cmp-n) * 150px); font-size: 13px; }
  .cmp-table tbody th { width: 96px; }
  .cmp-table th, .cmp-table td { padding: 10px; }
  .cmp-prod { min-width: 130px; }
}
/* Above the product page's sticky "Add to cart" bar while it shows. */
body:has(.sticky-buy.show) .bx-cmp { bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (max-width: 860px) { body:has(.sticky-buy.show) .bx-cmp { bottom: calc(146px + env(safe-area-inset-bottom)); } }
/* Out of the way while a window or drawer is open. */
body:has(.modal.open, .drawer.open, .search-layer.open, #filters.open) .bx-cmp { display: none; }

/* Designs with their own shop and product views (assets/shoptools-page.js). The tools take the design's colours,
   font and corners through --bx-acc (its main button), --bx-on, --bx-r, --bx-bg, --bx-fg and --bx-font. */
.bx-op-off { display: none !important; }
html.bx-op-sg #sr { display: none !important; }
html.bx-op-lock, html.bx-op-lock body { overflow: hidden; }
.bx-op-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; width: 100%; flex-basis: 100%; }
.bx-op-b { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 16px; border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: var(--bx-r, 999px); background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.bx-op-b:hover { border-color: var(--bx-acc, currentColor); }
.bx-op-b.on { background: var(--bx-acc, #1f2122); border-color: var(--bx-acc, #1f2122); color: var(--bx-on, #fff); }
.bx-op-b:focus-visible, .bx-op-fb:focus-visible, .bx-op-layer button:focus-visible, .bx-op-c:focus-within { outline: 2px solid var(--bx-acc, #1f2122); outline-offset: 2px; }
.bx-op-fb { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 14px; border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap; box-sizing: border-box; flex: none; }
.bx-op-fb b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bx-acc, #1f2122); color: var(--bx-on, #fff); font-size: 11.5px; font-weight: 700; }
.bx-op-fb b[hidden] { display: none; }
.bx-op-empty { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 24px 0; padding: 26px 16px; text-align: center; border: 1.5px dashed color-mix(in srgb, currentColor 20%, transparent); border-radius: 14px; }
.bx-op-empty button { padding: 8px 16px; border: 0; border-radius: 999px; background: var(--bx-acc, #1f2122); color: var(--bx-on, #fff); font: inherit; font-weight: 600; cursor: pointer; }
.bx-op-layer { position: fixed; inset: 0; z-index: 2147482990; font-family: var(--bx-font, inherit); color: var(--bx-fg, #1f2122); text-align: start; }
.bx-op-bg { position: absolute; inset: 0; background: rgba(10, 12, 14, .5); opacity: 0; transition: opacity .2s; }
.bx-op-layer.open .bx-op-bg { opacity: 1; }
.bx-op-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.bx-op-hd b { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; }
.bx-op-x { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; cursor: pointer; flex: none; }
/* Filters: a panel from the side */
.bx-op-pn { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(380px, 100vw); display: flex; flex-direction: column; background: var(--bx-bg, #fff); box-shadow: 0 0 40px rgba(0,0,0,.25); transform: translateX(-104%); transition: transform .22s ease; }
[dir="rtl"] .bx-op-pn { transform: translateX(104%); }
.bx-op-layer.open .bx-op-pn { transform: none; }
.bx-op-bd { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 18px; }
.bx-op-bd section { padding: 16px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.bx-op-bd section:last-child { border-bottom: 0; }
.bx-op-bd h4 { margin: 0 0 10px; font-size: 14.5px; font-weight: 700; }
.bx-op-bd h4 small { font-weight: 500; opacity: .6; }
.bx-op-pr { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.bx-op-pr input { width: 100%; min-width: 0; box-sizing: border-box; height: 42px; padding: 0 12px; border: 1.5px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 14px; }
.bx-op-pr input:focus { outline: none; border-color: var(--bx-acc, currentColor); }
.bx-op-cs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.bx-op-pr + .bx-op-cs { margin-top: 12px; }
h4 + .bx-op-cs { margin-top: 0; }
.bx-op-c { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1.5px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; user-select: none; }
.bx-op-c input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bx-op-c i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); flex: none; }
.bx-op-c.on { background: var(--bx-acc, #1f2122); border-color: var(--bx-acc, #1f2122); color: var(--bx-on, #fff); }
.bx-op-st { color: #f5a623; letter-spacing: 1px; }
.bx-op-c.on .bx-op-st { color: inherit; }
.bx-op-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bx-op-ck { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.bx-op-ck input { width: 18px; height: 18px; accent-color: var(--bx-acc, #1f2122); }
.bx-op-ft { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.bx-op-ft button { min-height: 46px; padding: 0 18px; border-radius: var(--bx-r, 12px); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.bx-op-clr { border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); background: transparent; color: inherit; }
.bx-op-go { border: 0; background: var(--bx-acc, #1f2122); color: var(--bx-on, #fff); }
/* Size guide: a window in the middle */
.bx-op-md { display: grid; place-items: center; padding: 16px; }
.bx-op-mp { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; overscroll-behavior: contain; box-sizing: border-box; background: var(--bx-bg, #fff); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.3); opacity: 0; transform: translateY(10px) scale(.98); transition: .2s; }
.bx-op-layer.open .bx-op-mp { opacity: 1; transform: none; }
.bx-op-mp > p { margin: 0 18px 12px; font-size: 13px; line-height: 1.6; opacity: .75; }
.bx-op-units { display: inline-flex; margin: 14px 18px 0; padding: 3px; border: 1.5px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 999px; }
.bx-op-units button { padding: 5px 16px; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.bx-op-units button.on { background: var(--bx-acc, #1f2122); color: var(--bx-on, #fff); }
.bx-op-tw { margin: 14px 18px; overflow-x: auto; border: 1px solid color-mix(in srgb, currentColor 12%, transparent); border-radius: 12px; }
.bx-op-tw table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bx-op-tw th, .bx-op-tw td { padding: 10px 12px; text-align: center; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, currentColor 8%, transparent); }
.bx-op-tw th { font-weight: 700; background: color-mix(in srgb, currentColor 6%, transparent); }
.bx-op-tw tr:last-child td { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .bx-op-pn, .bx-op-mp, .bx-op-bg { transition: none; } }
@media (max-width: 600px) {
  .bx-op-b { flex: 1 1 auto; justify-content: center; }
  .bx-op-fb span { display: none; }
  .bx-op-fb { padding-inline: 10px; }
}
/* The compare tray stays clear of an open panel. */
html.bx-op-lock .bx-cmp { display: none; }
.wq-sort:has(.bx-op-fb) { display: flex; align-items: center; gap: 8px; }
.bx-sg-chips a:hover mark, .bx-sg-chips a.on mark { color: inherit; }
