.mbwl-heart{
  position:absolute; top:2px; right:8px; z-index:5;
  width:40px; height:40px; padding:0; border:0; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.85);
  border-radius:999px; box-shadow:0 6px 18px rgb(0 0 0 / 12%);
  -webkit-tap-highlight-color:transparent;
}
.mbwl-heart:hover{ transform:translateY(-1px); }

/* колір іконки береться з color */
.mbwl-heart{ color:#981711; }               /* білий контур за замовчуванням */
.mbwl-heart.in{ color:#981711; }         /* активний = червоне заповнення */

/* сам SVG/шлях */
.mbwl-ico{ display:block; overflow:visible; }
.mbwl-ico path{
  fill:transparent;
  stroke:currentColor;                    /* ключове */
  stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

/* коли вибрано — заповнюємо, контур того ж кольору */
.mbwl-heart.in .mbwl-ico path{ fill:currentColor; }

/* ===== Header icon shortcode [mb_wishlist_icon] ===== */
.mbwl-header{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  text-decoration:none !important;
  line-height:1 !important;
  color:#111 !important;
}

/* обгортка для позиціонування бейджа */
.mbwl-ico-wrap{
  position:relative !important;
  display:inline-block !important;
  width:25px !important;
  height:16px !important;
}

.mbwl-ico-wrap svg{
  display:block !important;
  width:20px !important;
  height:20px !important;
}

/* бейдж-лічильник у правому верхньому кутку */
.mbwl-count{
  position:absolute !important;
  top:-6px !important;
  right:-8px !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  min-width:14px !important;
  height:14px !important;
  padding:0 4px !important;

  font-size:12px !important;
  font-weight:700 !important;
  line-height:1 !important;

  color:white !important;
  background:black !important;
  border:1px solid #111 !important;
  border-radius:999px !important;

  box-sizing:border-box !important;
}

/* якщо треба ховати нуль (опційно) */
.mbwl-count.is-zero{
  display:none !important;
}

/* щоб клік не блокувався темою */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link .mbwl-heart{
  pointer-events:auto;
}

/* ===== Wishlist page layout ===== */
.mbwl-page{ max-width:1100px; margin:0 auto; padding:8px 12px; }

/* Share row */
.mbwl-share{
  display:grid;
  grid-template-columns: 1fr;
  gap:.5rem .75rem;
  align-items:center;
  margin:1rem 0 1.25rem;
}
.mbwl-share label{
  font-size:.85rem; color:#666; margin-bottom:.25rem;
}
.mbwl-share__group{
  position:relative; display:flex; align-items:center;
}
.mbwl-share__input{
  width:100%;
  padding:.6rem .8rem; padding-right:2.2rem;
  border:1px solid #e5e5e5; border-radius:10px;
  font-size:.9rem; color:#444; background:#fff;
}
.mbwl-open{
  position:absolute; right:.45rem; top:50%; transform:translateY(-50%);
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:999px;
  color:#666; background:#f7f7f7; text-decoration:none;
  transition:transform .15s ease, background .15s ease, color .15s ease;
}
.mbwl-open:hover{ transform:translateY(-50%) translateX(1px); background:#efefef; color:#111; }

/* ===== Grid: 2 columns cards ===== */
.mbwl-table{
  display:grid;
  gap:16px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}

/* Card */
.mbwl-row{
  display:flex; flex-direction:column; gap:10px;
  padding:12px; border:1px solid #eee; border-radius:14px; background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.03);
}

/* Image full width with ratio */
.mbwl-row .c1 a{ display:block; }
.mbwl-row .c1 img{
  width:100%; height:auto; aspect-ratio:1/1; object-fit:cover; border-radius:10px;
}

/* Title smaller */
.mbwl-row .c2 a{
  display:inline-block;
  font-size:.95rem; line-height:1.35; font-weight:600; color:#222; text-decoration:none;
}
.mbwl-row .c2 a:hover{ text-decoration:underline; }

/* Price + stock row */
.mbwl-row .c3{ font-weight:600; color:#111; }
.mbwl-row .c4{ font-size:.9rem; }
.mbwl-row .c4 .in{ color:#218838; }
.mbwl-row .c4 .out{ color:#c00; }

/* Actions */
.mbwl-row .c5{
  margin-top:4px; display:flex; gap:8px; align-items:center; justify-content:space-between;
}
.mbwl-row .c5 .mbwl-remove{
  background:none; border:0; color:#c00; font-size:22px; line-height:1; cursor:pointer; margin-right:auto;
}
.mbwl-row .c5 .button{
  padding:.5rem .8rem; border-radius:999px; font-size:.9rem;
}

/* ===== Heart in product loop (залишаємо як було) ===== */
.woocommerce ul.products li.product{ position: relative; }

/* Батьківська форма — дозволяємо перенос на новий рядок */
.single-product form.cart{ display:flex; flex-wrap:wrap; }

/* Кнопка Wishlist під "Додати в кошик" */
.single-product form.cart .mbwl-toggle{
  order: 99;                 /* після кількості й корзини */
  flex: 1 1 100%;            /* новий рядок */
  margin-top: 10px;

  display: inline-flex;      /* іконка + текст в один ряд */
  align-items: center;
  gap: .5rem;

  background: #981711 !important;
  color:#fff !important;
  border:0 !important;
  border-radius: 999px;
  padding: .6rem 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* натиснута/активна */
.single-product form.cart .mbwl-toggle:active{
  background: #000 !important;
}

/* іконка в кнопці */
.single-product form.cart .mbwl-toggle .mbwl-ico{
  width:18px; height:18px; display:block; overflow:visible;
}
.single-product form.cart .mbwl-toggle .mbwl-ico path{
  stroke: currentColor; fill: transparent;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.single-product form.cart .mbwl-goto{
  order:99; flex:1 1 100%; margin-top:10px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px; padding:.6rem 1rem;
}