/* Storedeck - Product comparison, front end (2.4.0).
   The theme gives the design: everything is in the layer "storedeck", after the layer "bricks", so the CSS of a theme
   (not in a layer) wins without !important. No shadows. The markup carries the classes of the design (cmp-t, lab,
   grp, grp-b, best, yes, no, same, only-diff, cmp-x, addcol, crumbs, phead, cmp-tools, cmp-diff, pc, pc-im, pc-b,
   pc-t, pc-p, pc-pr, price, was, stock, badges, badge, add) next to the sdk-cmp-* ones.
   Variables:
     --sdk-cmp-accent   blue: the dot of the best value, the cart, the count   --sdk-cmp-ink      text
     --sdk-cmp-muted    labels, second text                                      --sdk-cmp-line     row lines
     --sdk-cmp-line-2   the dashed box, the empty slots                          --sdk-cmp-surface  groups, images
     --sdk-cmp-ok       the tick, "In stock"                                     --sdk-cmp-radius   corners
     --sdk-cmp-lab      width of the first column (200px, 112px on the phone)
     --sdk-cmp-bar-bottom  room under the bar (e.g. the phone's tab bar: calc(64px + env(safe-area-inset-bottom)))
   e.g. .bb2 { --sdk-cmp-accent: var(--blue); --sdk-cmp-surface: var(--surface); } */
@layer bricks, storedeck;

@layer storedeck {
:root {
	--sdk-cmp-accent: #2357ff;
	--sdk-cmp-ink: #0b0b0f;
	--sdk-cmp-muted: #6b6b76;
	--sdk-cmp-line: #efeff2;
	--sdk-cmp-line-2: #dcdce2;
	--sdk-cmp-surface: #f5f5f7;
	--sdk-cmp-ok: #0a8a4a;
	--sdk-cmp-radius: 18px;
	--sdk-cmp-lab: 200px;
	--sdk-cmp-bar-bottom: 0px;
}

/* Button and count ------------------------------------------------------------------- */
.sdk-cmp-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 999px; background: none; color: var(--sdk-cmp-ink); font: inherit; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; }
.sdk-cmp-btn.is-on { background: color-mix(in srgb, var(--sdk-cmp-accent) 10%, #fff); color: var(--sdk-cmp-accent); }
.sdk-cmp-btn:focus-visible, .sdk-cmp-x:focus-visible, .sdk-cmp-add:focus-visible { outline: 2px solid var(--sdk-cmp-accent); outline-offset: 2px; }
.sdk-cmp-icon { width: 18px; height: 18px; flex: none; }
.sdk-cmp-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4em; height: 1.4em; padding: 0 .35em; border-radius: 999px; background: var(--sdk-cmp-accent); color: #fff; font-size: .75em; font-weight: 700; line-height: 1; }
.sdk-cmp-count.is-empty { display: none; }

/* Bar at the bottom -------------------------------------------------------------------- */
.sdk-cmp-bar { position: fixed; left: 50%; bottom: calc(var(--sdk-cmp-bar-bottom) + 12px); z-index: 90; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; width: min(760px, calc(100% - 24px)); padding: 10px 10px 10px 14px; border: 1px solid var(--sdk-cmp-line-2); border-radius: 999px; background: #fff; color: var(--sdk-cmp-ink); box-sizing: border-box; }
.sdk-cmp-bar[hidden] { display: none; }
.sdk-cmp-bar-items { display: flex; gap: 8px; min-width: 0; flex: 1; overflow-x: auto; }
.sdk-cmp-bar-item, .sdk-cmp-bar-slot { position: relative; flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--sdk-cmp-surface); }
.sdk-cmp-bar-slot { background: none; border: 1.5px dashed var(--sdk-cmp-line-2); box-sizing: border-box; }
.sdk-cmp-bar-item a { display: grid; place-items: center; width: 100%; height: 100%; }
.sdk-cmp-bar-item img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; }
.sdk-cmp-bar-x { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 1px solid var(--sdk-cmp-line-2); border-radius: 50%; background: #fff; color: var(--sdk-cmp-ink); font-size: 14px; line-height: 1; cursor: pointer; }
.sdk-cmp-bar-end { display: flex; align-items: center; gap: 6px; flex: none; }
.sdk-cmp-bar-go { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--sdk-cmp-accent); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sdk-cmp-bar-go.is-disabled { opacity: .5; pointer-events: none; }
.sdk-cmp-bar-n { opacity: .8; font-weight: 600; }
.sdk-cmp-bar-clear { height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--sdk-cmp-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
@media (max-width: 767px) {
	.sdk-cmp-bar { border-radius: 20px; gap: 10px; padding: 8px; }
	.sdk-cmp-bar-item, .sdk-cmp-bar-slot { width: 40px; height: 40px; }
	.sdk-cmp-bar-go { height: 40px; padding: 0 14px; }
	.sdk-cmp-bar-go > span:not(.sdk-cmp-bar-n) { display: none; }
	.sdk-cmp-bar-clear { padding: 0 8px; }
}

/* Page ------------------------------------------------------------------------------- */
.sdk-cmp { color: var(--sdk-cmp-ink); }
.sdk-cmp[aria-busy="true"] { min-height: 320px; }
.sdk-cmp-empty { padding: 48px 0; text-align: center; color: var(--sdk-cmp-muted); }
.sdk-cmp-empty .btn, .sdk-cmp-empty a { display: inline-flex; margin-top: 12px; }
.sdk-cmp .crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 18px 0 0; color: var(--sdk-cmp-muted); font-size: 13px; font-weight: 600; }
.sdk-cmp .crumbs a { color: inherit; text-decoration: none; }
.sdk-cmp .crumbs b { color: var(--sdk-cmp-ink); }
.sdk-cmp .phead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 18px 0 22px; }
.sdk-cmp .phead h1 { margin: 0; }
.sdk-cmp .phead p { max-width: 62ch; margin: 8px 0 0; color: var(--sdk-cmp-muted); }
.cmp-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sdk-cmp .btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 17px; border: 0; border-radius: 999px; background: var(--sdk-cmp-surface); color: var(--sdk-cmp-ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; text-decoration: none; }
.sdk-cmp .btn svg { width: 17px; height: 17px; }
.cmp-diff { display: flex; align-items: center; gap: 10px; margin-right: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cmp-diff input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cmp-diff .toggle { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--sdk-cmp-line-2); transition: background .2s; }
.cmp-diff .toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; }
.cmp-diff input:checked + .toggle { background: var(--sdk-cmp-accent); }
.cmp-diff input:checked + .toggle::after { left: 19px; }
.cmp-diff input:focus-visible + .toggle { outline: 2px solid var(--sdk-cmp-accent); outline-offset: 2px; }

/* Table: the head is not sticky -------------------------------------------------------- */
/* A narrow content column (a theme without Bricks): the table scrolls inside its box instead of squeezing the cards. */
.cmp-wrap { max-width: 100%; margin-bottom: 64px; overflow-x: auto; }
.cmp-t { width: 100%; min-width: calc(var(--sdk-cmp-lab) + var(--sdk-cmp-n, 2) * 180px + var(--sdk-cmp-add, 0px)); table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.cmp-t th, .cmp-t td { padding: 14px 16px; border-bottom: 1px solid var(--sdk-cmp-line); text-align: left; vertical-align: top; font-size: 14px; font-weight: 400; }
.cmp-t thead th { position: static; padding-bottom: 20px; border-bottom: 0; }
.cmp-t th.lab, .cmp-t td.lab { width: var(--sdk-cmp-lab); color: var(--sdk-cmp-muted); font-size: 13px; font-weight: 700; }
.cmp-t thead th:last-child.sdk-cmp-addcol { width: 180px; }
.cmp-t tbody tr.grp td { padding: 22px 0 8px; border-bottom: 0; }
.cmp-t tbody tr.grp:first-child td { padding-top: 4px; }
.cmp-t .grp-b { padding: 13px 16px; border-radius: 12px; background: var(--sdk-cmp-surface); color: var(--sdk-cmp-ink); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cmp-t.only-diff tr.same { display: none; }
.cmp-t .best { display: inline-flex; align-items: center; gap: 5px; color: var(--sdk-cmp-accent); font-weight: 800; }
.cmp-t .best::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sdk-cmp-accent); }
.cmp-t .yes { color: var(--sdk-cmp-ok); font-weight: 800; }
.cmp-t .no { color: #9a9aa3; }

/* The product card (the theme's own, through sdk_cmp_product_html) ------------------- */
.cmp-t .pc { position: relative; display: flex; flex-direction: column; gap: 12px; }
.cmp-t .pc-im { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: var(--sdk-cmp-radius); background: var(--sdk-cmp-surface); overflow: hidden; }
.cmp-t .pc-a { display: contents; }
.cmp-t .pc-im img { width: 78%; height: 78%; object-fit: contain; mix-blend-mode: multiply; }
.cmp-t .cmp-x { position: absolute; top: 10px; right: 10px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: #fff; color: var(--sdk-cmp-ink); cursor: pointer; }
.cmp-t .cmp-x svg { width: 16px; height: 16px; }
.cmp-t .badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.cmp-t .badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: #fff; color: var(--sdk-cmp-ink); font-size: 11.5px; font-weight: 800; }
.cmp-t .badge.dark { background: var(--sdk-cmp-ink); color: #fff; }
.cmp-t .add { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--sdk-cmp-accent); color: #fff; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.cmp-t .add svg { width: 17px; height: 17px; }
.cmp-t .add .sdk-cmp-cart-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cmp-t .pc:hover .add, .cmp-t .add:focus-visible, .cmp-t .add.loading, .cmp-t .add.added { opacity: 1; transform: none; }
.cmp-t .add.loading { opacity: .6; }
.cmp-t .added_to_cart { display: none; }
.cmp-t .pc-b { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 0; }
.cmp-t .pc-t { display: -webkit-box; min-height: 2.7em; overflow: hidden; color: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.35; text-decoration: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cmp-t .pc-p { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-height: 22px; }
.cmp-t .pc-pr { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; font-size: 16px; }
.cmp-t .price { font-weight: 800; }
.cmp-t .was { color: var(--sdk-cmp-muted); font-size: .86em; font-weight: 500; text-decoration: line-through; }
.cmp-t .stock { display: inline-flex; align-items: center; gap: 6px; color: var(--sdk-cmp-ok); font-size: 12px; font-weight: 700; white-space: nowrap; }
.cmp-t .stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cmp-t .stock.low, .cmp-t .stock.is-backorder { color: #9a5b00; }
.cmp-t .stock.is-out { color: var(--sdk-cmp-muted); }
.cmp-t .pc-p .stock .sh, .cmp-t td .stock .sh { display: none; }

/* The last column: a product from the same category ---------------------------------- */
.cmp-t .addcol { display: grid; place-content: center; gap: 6px; aspect-ratio: 1 / 1; padding: 16px; border: 1.5px dashed var(--sdk-cmp-line-2); border-radius: var(--sdk-cmp-radius); color: var(--sdk-cmp-muted); font-size: 13.5px; font-weight: 700; text-align: center; text-decoration: none; box-sizing: border-box; }
.cmp-t .addcol svg { justify-self: center; width: 22px; height: 22px; }
.cmp-t .addcol .xs { font-size: 12px; font-weight: 600; }
.cmp-t .addcol:hover { border-color: var(--sdk-cmp-accent); color: var(--sdk-cmp-accent); }

@media (prefers-reduced-motion: reduce) {
	.cmp-t .add, .cmp-diff .toggle, .cmp-diff .toggle::after { transition: none; }
}

/* Phone: the table scrolls inside its box, the page does not --------------------------- */
@media (max-width: 767px) {
	.sdk-cmp { --sdk-cmp-lab: 112px; }
	.sdk-cmp .phead { padding: 10px 0 16px; }
	.cmp-tools { width: 100%; }
	.cmp-diff { width: 100%; margin: 0 0 4px; }
	.cmp-wrap { -webkit-overflow-scrolling: touch; }
	.cmp-t { min-width: max(760px, calc(var(--sdk-cmp-lab) + var(--sdk-cmp-n, 2) * 150px + var(--sdk-cmp-add, 0px))); }
	.cmp-t th.lab, .cmp-t td.lab { padding-right: 8px; padding-left: 12px; }
	.cmp-t .pc-im { border-radius: 14px; }
	.cmp-t .add, .cmp-t .pc-p .stock { display: none; }
	.cmp-t .pc-t { font-size: 13.5px; font-weight: 500; }
	.cmp-t .pc-pr { font-size: 15px; }
}
}
