/* Stand Central product compare (SC-168). Markup: inc/product-compare.php, behaviour: assets/js/sc-compare.js */

/* ---------- Toggle on product cards ---------- */
.sc-compare-toggle {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink, #0b0b0f);
  font: 700 13px/1.2 var(--body, "Hanken Grotesk", sans-serif);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  box-shadow: none;
}
@media (hover: hover) { .sc-compare-toggle--card:hover .sc-compare-toggle__label { text-decoration: underline; text-underline-offset: 4px; } }
.sc-compare-toggle:focus-visible { outline: 2px solid var(--ink, #0b0b0f); outline-offset: 2px; border-radius: 6px; }
.sc-compare-toggle__box {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid #858594;
  border-radius: 5px;
  background: #fff;
  color: transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.sc-compare-toggle__box svg { width: 13px; height: 13px; display: block; }
.sc-compare-toggle:hover .sc-compare-toggle__box { border-color: var(--ink, #0b0b0f); }
.sc-compare-toggle[aria-pressed="true"] .sc-compare-toggle__box { background: var(--ink, #0b0b0f); border-color: var(--ink, #0b0b0f); color: #fff; }
.sc-compare-toggle.is-full { opacity: .55; }

/* Cards: own line under Add to basket, aligned with the card's text. */
.woocommerce ul.products li.product .sc-compare-toggle--card,
ul.products li.product .sc-compare-toggle--card {
  align-self: flex-start;
  margin: -8px 16px 12px;
  padding-left: 0;
  width: auto;
}
@media (max-width: 760px) {
  .woocommerce ul.products li.product .sc-compare-toggle--card,
  ul.products li.product .sc-compare-toggle--card { margin: -6px 12px 8px; min-height: 40px; padding-right: 12px; }
}

/* ---------- Toggle on product pages ---------- */
.sc-compare-pdp { margin: 2px 0 0; grid-column: 1 / -1; }
form.cart .sc-compare-pdp { width: 100%; }
.sc-compare-pdp--summary { order: 65; margin: 4px 0 0; }
.sc-compare-toggle--pdp {
  width: 100%;
  justify-content: center;
  min-height: 42px;
  margin-top: 4px;
  padding: 8px 16px;
  border: 1.5px solid #c4c4ce;
  border-radius: 999px;
  background: #fff;
  font-size: 14.5px;
}
.sc-compare-toggle--pdp:hover { border-color: var(--ink, #0b0b0f); }
.sc-compare-toggle--pdp:hover .sc-compare-toggle__label { text-decoration: none; }
.sc-compare-toggle--pdp[aria-pressed="true"] { border-color: #6fcfc4; background: #e9f8f6; }

/* ---------- Tray ---------- */
.sc-compare-tray {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sc-compare-offset, 0px) + 14px);
  z-index: 950;
  width: min(820px, calc(100% - 24px));
  transform: translateX(-50%);
  background: var(--ink, #0b0b0f);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px -18px rgba(11, 11, 15, .55), 0 2px 8px rgba(11, 11, 15, .18);
  font-family: var(--body, "Hanken Grotesk", sans-serif);
}
.sc-compare-tray[hidden] { display: none !important; }
body.sc-modal-open .sc-compare-tray { visibility: hidden; }
.sc-compare-tray__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 12px 10px 10px;
}
.sc-compare-tray__items { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sc-compare-tray__items li {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  overflow: visible;
}
.sc-compare-tray__items li.is-empty { display: grid; place-items: center; border: 1.5px dashed rgba(255, 255, 255, .5); color: rgba(255, 255, 255, .6); }
.sc-compare-tray__items li.is-empty svg { width: 16px; height: 16px; }
.sc-compare-tray__items li.is-filled img {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}
.sc-compare-tray__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sc-compare-tray__rm {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink, #0b0b0f);
  border-radius: 50%;
  background: #fff;
  color: var(--ink, #0b0b0f);
  cursor: pointer;
}
.sc-compare-tray__rm::after { content: ""; position: absolute; inset: -10px; }
.sc-compare-tray__rm svg { width: 10px; height: 10px; display: block; }
.sc-compare-tray__count { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.3; color: #fff; }
.sc-compare-tray__count.is-warn { color: #ffd2e4; }
.sc-compare-tray__actions { display: flex; align-items: center; gap: 6px; }
.sc-compare-tray__go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--teal, #12b5a6);
  color: var(--ink, #0b0b0f) !important;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none !important;
  white-space: nowrap;
}
.sc-compare-tray__go:hover { background: #3fd0c2; }
.sc-compare-tray__go.is-disabled { background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .7) !important; cursor: default; }
.sc-compare-tray__clear {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .88);
  font: 700 14px/1 var(--body, "Hanken Grotesk", sans-serif);
  cursor: pointer;
  box-shadow: none;
}
.sc-compare-tray__clear:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Keep the chat button clear of the tray. */
html.sc-compare-tray-on #cs-chat-btn { bottom: calc(var(--sc-compare-offset, 0px) + 100px) !important; }

@media (max-width: 640px) {
  .sc-compare-tray { width: calc(100% - 16px); bottom: calc(var(--sc-compare-offset, 0px) + 6px); border-radius: 16px; }
  .sc-compare-tray__inner { grid-template-columns: 1fr auto; grid-template-areas: "items go" "count clear"; gap: 2px 10px; padding: 10px 10px 2px 12px; }
  .sc-compare-tray__items { grid-area: items; gap: 9px; padding-top: 4px; }
  .sc-compare-tray__items li, .sc-compare-tray__items li.is-filled img { width: 40px; height: 40px; border-radius: 10px; }
  .sc-compare-tray__rm { top: -6px; right: -6px; width: 20px; height: 20px; }
  .sc-compare-tray__actions { display: contents; }
  .sc-compare-tray__go { grid-area: go; min-height: 44px; padding: 0 16px; font-size: 14px; align-self: center; }
  .sc-compare-tray__count { grid-area: count; align-self: center; font-size: 12.5px; padding: 0; }
  .sc-compare-tray__clear { grid-area: clear; justify-self: end; min-height: 36px; padding: 0 4px 0 8px; margin-right: -4px; font-size: 13px; }
  /* Above a bottom bar (product page quote bar): dock flush on it so no page text shows in a gap. */
  html.sc-compare-docked .sc-compare-tray { bottom: var(--sc-compare-offset, 0px); width: 100%; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px -16px rgba(11, 11, 15, .45); }
  html.sc-compare-tray-on #cs-chat-btn { bottom: calc(var(--sc-compare-offset, 0px) + 112px) !important; }
}

/* Room at the end of the page so the tray never hides the footer. */
html.sc-compare-tray-on body { padding-bottom: 96px; }

/* ---------- Compare page ---------- */
/* Same width as the header so the page title, tools and table line up with the logo. */
body.sc-compare-template #brx-content { width: min(1280px, 100% - (var(--pad, 24px) * 2)) !important; max-width: 1280px !important; padding-top: 40px !important; }
body.sc-compare-template #brx-content > h1 { margin: 0 0 10px !important; }
@media (max-width: 760px) { body.sc-compare-template #brx-content { padding-top: 24px !important; } }
.sc-compare-page {
  width: 100%;
  margin: 0;
  padding: 0 0 72px;
  font-family: var(--body, "Hanken Grotesk", sans-serif);
  color: var(--ink, #0b0b0f);
}
.sc-compare-page__head { margin: 0 0 18px; }
.sc-compare-page__lead { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted, #6c6c7a); max-width: 680px; }
.sc-compare-page__tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.sc-compare-diff {
  color: var(--ink, #0b0b0f);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1.5px solid #d6d6de;
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.sc-compare-diff:hover { border-color: var(--ink, #0b0b0f); }
.sc-compare-diff input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink, #0b0b0f); }
.sc-compare-page__hint { display: none; font-size: 13.5px; color: var(--muted, #6c6c7a); }

.sc-compare-scroll {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line, #e9e9ef);
  border-radius: 20px;
  background: #fff;
}
.sc-compare-scroll:focus-visible { outline: 2px solid var(--ink, #0b0b0f); outline-offset: 2px; }
.sc-compare-table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  margin: 0 !important;
  font-size: 15px;
  line-height: 1.45;
}
.sc-compare-table th, .sc-compare-table td {
  box-sizing: border-box;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid var(--line, #e9e9ef);
  text-align: left;
  vertical-align: top;
  background: #fff;
}
.sc-compare-table tbody th[scope="row"], .sc-compare-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 220px;
  font-weight: 700;
  color: #3b3b46;
  border-right: 1px solid var(--line, #e9e9ef);
}
.sc-compare-table.sc-compare-table--n2 { min-width: 760px; }
.sc-compare-table.sc-compare-table--n3 { min-width: 960px; }
.sc-compare-table.sc-compare-table--n4 { min-width: 1160px; }
.sc-compare-scroll.is-scrolled tbody th[scope="row"], .sc-compare-scroll.is-scrolled .sc-compare-corner { box-shadow: 8px 0 14px -10px rgba(11, 11, 15, .28); }

.sc-compare-products th { padding-top: 20px; padding-bottom: 6px; border-bottom: 0; font-weight: 400; }
.sc-compare-product__media { position: relative; margin: 0 0 12px; }
.sc-compare-product__img { display: block; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--soft, #f6f6f9); }
.sc-compare-product__img img { width: 100% !important; height: 100% !important; object-fit: contain; display: block; margin: 0 !important; }
.sc-compare-remove {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line, #e9e9ef);
  border-radius: 50%;
  background: #fff;
  color: var(--ink, #0b0b0f);
  box-shadow: 0 4px 12px -6px rgba(11, 11, 15, .35);
  cursor: pointer;
}
.sc-compare-remove::after { content: ""; position: absolute; inset: -5px; }
.sc-compare-remove svg { width: 13px; height: 13px; display: block; }
.sc-compare-remove:hover { background: var(--ink, #0b0b0f); border-color: var(--ink, #0b0b0f); color: #fff; }
.sc-compare-product__link { display: block; color: var(--ink, #0b0b0f) !important; text-decoration: none !important; }
.sc-compare-product__name { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.sc-compare-product__link:hover .sc-compare-product__name { text-decoration: underline; text-underline-offset: 3px; }
.sc-compare-product__price { display: block; margin: 0 0 12px; font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--ink, #0b0b0f); }
.sc-compare-product__price del { font-size: 14px; font-weight: 600; color: var(--muted, #6c6c7a); }
.sc-compare-product__price .sc-vat-switch { display: none !important; }

.sc-compare-actions td { padding-top: 8px; padding-bottom: 20px; vertical-align: bottom; }
.sc-compare-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--teal, #12b5a6);
  color: var(--ink, #0b0b0f) !important;
  font-weight: 800;
  font-size: 14.5px;
  text-decoration: none !important;
  white-space: nowrap;
}
.sc-compare-view:hover { background: #3fd0c2; }

.sc-compare-section th {
  position: static;
  padding: 12px 18px;
  background: var(--soft, #f6f6f9) !important;
  border-right: 0 !important;
}
.sc-compare-section th > span {
  position: sticky;
  left: 18px;
  font-family: var(--display, "Archivo", sans-serif);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--ink, #0b0b0f);
}
.sc-compare-row td { color: #22222b; overflow-wrap: anywhere; }
.sc-compare-row td.is-empty { color: #7c7c8a; font-size: 14px; }
.sc-compare-row.is-more { display: none; }
.sc-compare-page.is-more-open .sc-compare-row.is-more { display: table-row; }
.sc-compare-more {
  -webkit-appearance: none;
  appearance: none;
  position: sticky;
  left: 18px;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink, #0b0b0f);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.sc-compare-section--more th { background: #fff !important; padding-top: 10px; padding-bottom: 10px; }
.sc-compare-more { min-height: 44px !important; padding: 0 18px !important; border: 1.5px solid #d6d6de !important; border-radius: 999px !important; align-items: center !important; }
.sc-compare-more:hover { border-color: var(--ink, #0b0b0f) !important; }
.sc-compare-more__label { font-size: 14.5px; font-weight: 800; }
.sc-compare-more__label::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 2px 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); vertical-align: middle; }
.sc-compare-more[aria-expanded="true"] .sc-compare-more__label::after { transform: rotate(-135deg); margin-bottom: -2px; }
.sc-compare-more__note { font-size: 13.5px; font-weight: 500; color: var(--muted, #6c6c7a); }

.sc-compare-foot th, .sc-compare-foot td { border-bottom: 0; padding-top: 18px; padding-bottom: 22px; }

.sc-compare-page.is-diff-only .sc-compare-row.is-same,
.sc-compare-page.is-diff-only .sc-compare-section.is-same { display: none; }

.sc-compare-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 24px 28px;
  border: 1px solid var(--line, #e9e9ef);
  border-radius: 20px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.sc-compare-help::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--pink, #f6377e); }
.sc-compare-help h2 { margin: 0 0 6px; font-family: var(--display, "Archivo", sans-serif); font-size: 24px; line-height: 1.1; }
.sc-compare-help p { margin: 0; color: #3b3b46; font-size: 15.5px; line-height: 1.5; max-width: 640px; }
.sc-compare-help__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--teal, #12b5a6);
  color: var(--ink, #0b0b0f) !important;
  font-weight: 800;
  text-decoration: none !important;
}
.sc-compare-help__cta:hover { background: #3fd0c2; }

/* Empty and single states */
.sc-compare-single { position: relative; display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; padding: 14px 60px 14px 14px; border: 1px solid var(--line, #e9e9ef); border-radius: 18px; background: #fff; max-width: 640px; }
.sc-compare-single a { display: flex; align-items: center; gap: 14px; color: var(--ink, #0b0b0f) !important; font-weight: 800; text-decoration: none !important; }
.sc-compare-single img { width: 72px !important; height: 72px !important; object-fit: contain; border-radius: 12px; background: var(--soft, #f6f6f9); margin: 0 !important; flex: 0 0 72px; }
.sc-compare-single .sc-compare-remove { top: 50%; transform: translateY(-50%); }
.sc-compare-browse { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sc-compare-browse a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid #d6d6de;
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #0b0b0f) !important;
  font-weight: 700;
  text-decoration: none !important;
}
.sc-compare-browse a:hover { border-color: var(--ink, #0b0b0f); }

@media (max-width: 760px) {
  .sc-compare-page { padding-bottom: 56px; }
  .sc-compare-page__lead { font-size: 15.5px; }
  .sc-compare-page.has-overflow .sc-compare-page__hint { display: inline; }
  .sc-compare-scroll { margin: 0 calc(var(--pad, 18px) * -1); border-left: 0; border-right: 0; border-radius: 0; }
  .sc-compare-table { font-size: 14px; }
  .sc-compare-table th, .sc-compare-table td { padding: 11px 12px; }
  .sc-compare-table tbody th[scope="row"], .sc-compare-corner { width: 104px; font-size: 13px; padding-left: var(--pad, 18px); }
  .sc-compare-table.sc-compare-table--n2 { min-width: 100%; }
  .sc-compare-table.sc-compare-table--n3 { min-width: 494px; }
  .sc-compare-table.sc-compare-table--n4 { min-width: 624px; }
  .sc-compare-product__name { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .sc-compare-product__name { font-size: 14px; }
  .sc-compare-product__price { font-size: 17px; margin-bottom: 10px; }
  .sc-compare-view { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
  .sc-compare-remove { top: 6px; right: 6px; width: 32px; height: 32px; }
  .sc-compare-section th { padding: 11px 12px; }
  .sc-compare-section th { padding-left: var(--pad, 18px); }
  .sc-compare-section th > span, .sc-compare-more { left: var(--pad, 18px); }
  .sc-compare-more__note { display: none; }
  .sc-compare-help { flex-direction: column; align-items: flex-start; padding: 20px; }
  .sc-compare-help__cta { width: 100%; justify-content: center; }
}
