#sefTempFavorites,
#sefTempFavorites *{box-sizing:border-box}

.sef-temp-favorites{
  position:fixed;
  left:22px;
  right:auto;
  bottom:22px;
  z-index:99990;
  width:min(360px,calc(100vw - 32px));
  font-family:inherit;
  color:#171717;
}

.sef-temp-favorites__toggle{
  margin-right:auto;
  min-height:46px;
  padding:0 15px;
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid rgba(17,17,17,.16);
  border-radius:0;
  background:rgba(248,245,240,.97);
  color:#111;
  box-shadow:0 9px 28px rgba(0,0,0,.12);
  font:inherit;
  cursor:pointer;
}

.sef-temp-favorites__heart{font-size:20px;line-height:1}
.sef-temp-favorites__label{font-size:11px;font-weight:600;letter-spacing:.12em}
.sef-temp-favorites__count{
  min-width:21px;height:21px;padding:0 6px;border-radius:20px;
  display:inline-flex;align-items:center;justify-content:center;
  background:#111;color:#fff;font-size:10px;font-weight:700;
}
.sef-temp-favorites__chevron{font-size:14px;transition:transform .2s ease}
.sef-temp-favorites.is-open .sef-temp-favorites__chevron{transform:rotate(180deg)}

.sef-temp-favorites__panel{
  margin-top:8px;
  background:#f8f5f0;
  border:1px solid rgba(17,17,17,.12);
  box-shadow:0 14px 42px rgba(0,0,0,.16);
  max-height:min(520px,70vh);
  overflow:hidden;
}

.sef-temp-favorites__head{
  min-height:50px;
  padding:0 14px 0 16px;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid rgba(17,17,17,.1);
}
.sef-temp-favorites__head strong{font-size:12px;letter-spacing:.12em;font-weight:600}
.sef-temp-favorites__close,.sef-temp-favorites__remove{
  appearance:none;border:0;background:transparent;color:#111;cursor:pointer;font:inherit;
}
.sef-temp-favorites__close{font-size:24px;line-height:1;padding:8px}
.sef-temp-favorites__items{max-height:calc(min(520px,70vh) - 50px);overflow:auto}
.sef-temp-favorites__empty{padding:28px 18px;text-align:center;font-size:11px;letter-spacing:.08em;color:#666}

.sef-temp-favorites__item{
  display:grid;
  grid-template-columns:72px 1fr 34px;
  gap:11px;
  align-items:center;
  min-height:92px;
  padding:10px 9px 10px 11px;
  border-bottom:1px solid rgba(17,17,17,.08);
}
.sef-temp-favorites__item:last-child{border-bottom:0}
.sef-temp-favorites__thumb{width:72px;height:72px;display:block;background:#eee9e1;overflow:hidden}
.sef-temp-favorites__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.sef-temp-favorites__info{min-width:0;text-decoration:none!important;color:#171717!important;display:flex;flex-direction:column;gap:5px}
.sef-temp-favorites__title{font-size:12px;line-height:1.25;font-weight:600;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sef-temp-favorites__price{font-size:12px;color:#555}
.sef-temp-favorites__remove{font-size:21px;line-height:1;width:34px;height:34px}

/* El estado visual de SEF manda sobre el estado persistente que pudiera traer YITH. */
.yith-wcwl-add-to-wishlist-button.sef-temp-fav-active,
.add_to_wishlist.sef-temp-fav-active{opacity:1!important}
.yith-wcwl-add-to-wishlist-button.sef-temp-fav-active .yith-wcwl-icon,
.add_to_wishlist.sef-temp-fav-active .yith-wcwl-icon{fill:currentColor!important}

@media (max-width:767px){
  .sef-temp-favorites{
    left:12px;right:12px;bottom:12px;width:auto;
  }
  .sef-temp-favorites__toggle{
    width:100%;margin:0;justify-content:center;min-height:48px;
  }
  .sef-temp-favorites__panel{
    margin-top:7px;max-height:58vh;
  }
  .sef-temp-favorites__items{max-height:calc(58vh - 50px)}
  .sef-temp-favorites__item{
    grid-template-columns:64px 1fr 32px;
    min-height:82px;
  }
  .sef-temp-favorites__thumb{width:64px;height:64px}
}

/* =========================================================
   1.0.2 · VISIBILIDAD DE FAVORITOS
   Computador: visible incluso con 0 favoritos.
   Celular: oculto hasta agregar el primer favorito.
   Si se quita el último favorito, vuelve a ocultarse.
   ========================================================= */
@media (max-width:767px){
  .sef-temp-favorites:not(.has-items){
    display:none !important;
  }
}

/* Estado visual independiente de YITH: el segundo clic representa QUITAR. */
.yith-wcwl-add-to-wishlist-button[data-sef-favorite="1"],
.add_to_wishlist[data-sef-favorite="1"]{
  color:#111 !important;
}

.yith-wcwl-add-to-wishlist-button[data-sef-favorite="1"] .yith-wcwl-icon,
.yith-wcwl-add-to-wishlist-button[data-sef-favorite="1"] svg,
.add_to_wishlist[data-sef-favorite="1"] .yith-wcwl-icon,
.add_to_wishlist[data-sef-favorite="1"] svg{
  fill:currentColor !important;
  stroke:currentColor !important;
}
