/* EFS shortlist (EFS-325). Markup: inc/product-shortlist.php, behaviour: assets/js/efs-shortlist.js.
   Page frame, help panel and browse links come from efs-compare.css. */

/* ---------- Heart toggle ---------- */
body.efs .efs-save {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--efs-navy);
  cursor: pointer;
  box-shadow: none;
}
body.efs .efs-save:focus-visible { outline: 2px solid var(--efs-green); outline-offset: 2px; }
.efs-save-heart { width: 20px; height: 20px; flex: 0 0 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; transition: fill .15s ease, stroke .15s ease, transform .15s ease; }
body.efs .efs-save[aria-pressed="true"] .efs-save-heart { fill: var(--efs-green); stroke: var(--efs-green); }
.efs-save.is-pop .efs-save-heart { animation: efs-save-pop .32s ease; }
@keyframes efs-save-pop { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .efs-save.is-pop .efs-save-heart { animation: none; } }

/* Cards: round button on the image's top-right corner (Bricks shop cards and Woo related-product cards). */
.efs-product-card, ul.products li.product { position: relative; }
body.efs .efs-product-card > .efs-save--card,
body.efs ul.products li.product > .efs-save--card {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 2px rgba(17, 35, 55, .08), 0 4px 14px -6px rgba(17, 35, 55, .32);
}
body.efs .efs-product-card > .efs-save--card:hover, body.efs ul.products li.product > .efs-save--card:hover { background: #fff; }
@media (hover: hover) { body.efs .efs-save--card:hover .efs-save-heart { stroke: var(--efs-green); } }
@media (max-width: 767px) {
  body.efs .efs-product-card > .efs-save--card, body.efs ul.products li.product > .efs-save--card { top: 6px; right: 6px; width: 40px; height: 40px; }
}

/* Product page: round heart beside Add to compare. */
body.efs .efs-save--pdp {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  min-height: 0;
  padding: 0;
  border: 1.5px solid var(--efs-line);
  border-radius: 50%;
  background: #fff;
}
body.efs .efs-save--pdp:hover { border-color: var(--efs-green); color: var(--efs-green); }
body.efs .efs-save--pdp[aria-pressed="true"] { border-color: rgba(0, 104, 56, .45); background: var(--efs-tint); }

/* ---------- Header icon (beside the basket) ---------- */
body.efs a.efs-saved-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 999px;
  color: var(--efs-navy);
  text-decoration: none;
}
body.efs a.efs-saved-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
body.efs a.efs-saved-link.has-items svg { fill: var(--efs-green); stroke: var(--efs-green); }
body.efs a.efs-saved-link:hover { background: var(--efs-tint); color: var(--efs-green); }
body.efs a.efs-saved-link:focus-visible { outline: 2px solid var(--efs-green); outline-offset: 2px; }
.efs-saved-dot {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--efs-lime);
  color: var(--efs-navy);
  font: 600 11px/18px var(--efs-head);
  text-align: center;
}
.efs-saved-dot[hidden] { display: none !important; }
/* Phones: the header has no spare room (it overflowed by 31px at 390px), so the shortlist lives in the phone menu
   (mobile-only 'Your shortlist' item after Log in, with its count). */
@media (max-width: 767px) { body.efs a.efs-saved-link { display: none; } }
.efs-menu-shortlist__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 10px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--efs-lime); color: var(--efs-navy); font: 600 12px/22px var(--efs-head); vertical-align: 1px; }
.efs-menu-shortlist__n[hidden] { display: none !important; }

/* ---------- Shortlist page ---------- */
body.efs .efs-prose .efs-sl-lead a { color: var(--efs-green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.efs-sl-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 0 0 28px; }
.efs-sl-tools { display: flex; flex-wrap: wrap; gap: 10px; }
body.efs .efs-prose .efs-sl-tools .efs-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; }
.efs-sl-share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
body.efs .efs-sl-shared { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin: 0 0 22px; padding: 14px 16px 14px 20px; border-radius: var(--efs-radius); background: var(--efs-tint); border: 1px solid var(--efs-tint-2); color: var(--efs-navy); font-weight: 600; font-size: 15.5px; }
.efs-sl-shared[hidden] { display: none !important; }
.efs-sl-page.is-shared .efs-sl-lead[data-efs-sl-lead] { display: none; }

.efs-sl-group { margin: 0 0 12px; }
body.efs .efs-prose .efs-sl-group__title { margin: 0 0 4px !important; font-family: var(--efs-head); font-size: 24px; line-height: 1.25; color: var(--efs-navy); }
.efs-sl-group__n { color: var(--efs-muted); font-weight: 400; }
body.efs .efs-prose .efs-sl-group__hint { margin: 0 0 18px; font-size: 15px; color: var(--efs-muted); }

body.efs .efs-prose ul.efs-sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
body.efs .efs-prose .efs-sl-card { position: relative; display: flex; flex-direction: column; margin: 0; padding: 0; border: 1px solid var(--efs-line); border-radius: var(--efs-radius); background: #fff; overflow: hidden; }
body.efs .efs-prose .efs-sl-card::before { display: none; content: none; }
.efs-sl-card__img { display: block; padding: 18px; border-bottom: 1px solid #f0f3ee; background: #fff; }
body.efs .efs-prose .efs-sl-card__img img { display: block; width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: contain; margin: 0 !important; border-radius: 0; box-shadow: none; }
.efs-sl-card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 18px; }
body.efs .efs-prose a.efs-sl-card__title { color: var(--efs-navy); font-family: var(--efs-head); font-weight: 500; font-size: 16px; line-height: 1.35; text-decoration: none; text-wrap: balance; }
body.efs .efs-prose a.efs-sl-card__title:hover { color: var(--efs-green); }
.efs-sl-card__price { margin-top: auto; font-family: var(--efs-head); font-weight: 600; font-size: 18px; color: var(--efs-navy); }
.efs-sl-card__price small { font-family: var(--efs-body); font-weight: 400; font-size: 13px; color: var(--efs-muted); }
.efs-sl-card__price ins { text-decoration: none; }
body.efs .efs-prose .efs-sl-card__atc a.button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border-radius: 999px; background: var(--efs-green); color: #fff; font-family: var(--efs-head); font-weight: 500; font-size: 15px; text-decoration: none; border: 1px solid transparent; padding: 8px 14px; }
body.efs .efs-prose .efs-sl-card__atc a.button:hover { background: var(--efs-green-d); color: #fff; }
body.efs .efs-prose .efs-sl-card__atc a.added_to_cart { display: block; text-align: center; font-size: 14px; margin-top: 6px; }
.efs-sl-card .efs-cmp-toggle--card { align-self: flex-start; margin: -4px 0 -6px; }
body.efs .efs-sl-remove {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--efs-navy);
  box-shadow: 0 1px 2px rgba(17, 35, 55, .08), 0 4px 14px -6px rgba(17, 35, 55, .32);
  cursor: pointer;
}
body.efs .efs-sl-remove:hover { background: var(--efs-green); color: #fff; }
.efs-sl-remove svg { width: 12px; height: 12px; display: block; }
.efs-sl-page.is-shared .efs-sl-remove { display: none; }

@media (max-width: 767px) {
  .efs-sl-bar { margin-bottom: 22px; }
  .efs-sl-tools { width: 100%; }
  body.efs .efs-prose .efs-sl-tools .efs-btn { flex: 1 1 auto; justify-content: center; }
  body.efs .efs-prose ul.efs-sl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .efs-sl-card__img { padding: 12px; }
  .efs-sl-card__body { padding: 12px 12px 14px; }
  body.efs .efs-prose a.efs-sl-card__title { font-size: 14.5px; }
  body.efs .efs-prose .efs-sl-group__title { font-size: 21px; }
  body.efs .efs-sl-remove { top: 6px; right: 6px; }
}
