/* Product compare tray + entry buttons — engineer-oriented, low chrome */

/* Self-contained toast (do not rely on .tips_dom / iconfont) */
.lp-compare-toast {
  position: fixed;
  left: 50%;
  top: 16%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 10080;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 4px;
  background: rgba(32, 38, 44, 0.94);
  color: #fff;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(20, 28, 36, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lp-compare-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.lp-compare-toast__mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #5a6570;
  color: #fff;
}
.lp-compare-toast.is-ok .lp-compare-toast__mark { background: #2f9e5b; }
.lp-compare-toast.is-err .lp-compare-toast__mark { background: #d64545; }
.lp-compare-toast__text { flex: 1; min-width: 0; }

.lp-compare-tray {
  position: fixed;
  right: 0;
  top: calc(42% + 64px);
  bottom: auto;
  z-index: 2147483000;
  font-family: Helvetica, Arial, sans-serif;
  display: none;
  width: auto;
  max-width: none;
  pointer-events: auto;
}
.lp-compare-tray.is-visible { display: block; }
.lp-compare-tray__bar { position: relative; }
.lp-compare-tray__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-height: 40px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid rgba(26, 31, 38, 0.1);
  border-right: 0;
  background: #fff;
  color: #1a1f26;
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  box-shadow: -2px 4px 16px rgba(26, 31, 38, 0.1);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-sizing: border-box;
  white-space: nowrap;
}
.lp-compare-tray__toggle:hover {
  background: #f7f9fb;
  box-shadow: -4px 6px 20px rgba(26, 31, 38, 0.14);
}
.lp-compare-tray__icon {
  display: inline-flex;
  color: #0a4578;
  flex: 0 0 auto;
}
.lp-compare-tray__icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.lp-compare-tray__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
}
.lp-compare-tray__text {
  display: none;
}
.lp-compare-tray__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 280px;
  max-width: calc(100vw - 16px);
  background: #fff;
  border: 1px solid #d5dbe1;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(20, 28, 36, 0.16);
  overflow: hidden;
}
.lp-compare-tray__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #e6ebf0;
  background: #f5f7f9;
  color: #2b333b;
  font-size: 13px;
}
.lp-compare-tray__meta { color: #6a7580; font-size: 12px; font-weight: 600; }
.lp-compare-tray__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
}
.lp-compare-tray__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #eef1f4;
}
.lp-compare-tray__thumb {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid #e1e6eb;
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lp-compare-tray__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lp-compare-tray__ph {
  display: block;
  width: 18px;
  height: 18px;
  background: #dde3e9;
}
.lp-compare-tray__info {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
}
.lp-compare-tray__info a {
  color: #2b333b;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-compare-tray__info a:hover { color: #1a5f96; }
.lp-compare-tray__remove {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #8a949e;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lp-compare-tray__remove:hover { color: #c0392b; }
.lp-compare-tray__actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e6ebf0;
  background: #fafbfc;
}
.lp-compare-tray__clear,
.lp-compare-tray__go {
  flex: 1;
  height: 34px;
  line-height: 34px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid #c5ccd3;
  cursor: pointer;
  box-sizing: border-box;
}
.lp-compare-tray__clear {
  background: #fff;
  color: #4a5560;
}
.lp-compare-tray__clear:hover { background: #f0f3f6; }
.lp-compare-tray__go {
  background: #2b6a9b;
  border-color: #2b6a9b;
  color: #fff;
}
.lp-compare-tray__go:hover { background: #235880; color: #fff; }

/* List entry — icon beside Add to Cart */
.lp-compare-add--list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid #c5ccd3;
  background: #fff;
  color: #4a5560;
  border-radius: 2px;
  cursor: pointer;
  vertical-align: middle;
  box-sizing: border-box;
  flex: 0 0 38px;
  transition: border-color .2s, color .2s, background .2s;
}
.lp-compare-add--list:hover {
  border-color: #DC3737;
  color: #DC3737;
  background: #fff8f8;
}
.lp-compare-add--list.is-in-compare {
  border-color: #2b6a9b;
  background: #eef5fb;
  color: #1a5f96;
}
.lp-compare-add--list svg {
  display: block;
}
.product_list_btn {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: auto !important;
  overflow: visible !important;
}
.product_list_btn .new_pro_addCart_btn {
  float: none;
}
.product_list_btn .lp-compare-add--list {
  float: none;
}
.new_proList_mainListLi .picture_array_from .product_list_btn .new_pro_addCart_btn,
.new_proList_mainListTli .product_list_btn .new_pro_addCart_btn {
  flex: 1 1 auto;
  width: auto !important;
  max-width: none;
}
@media (max-width: 800px) {
  .lp-compare-add--list { width: 32px; height: 32px; flex-basis: 32px; }
  .lp-compare-tray {
    top: calc(42% + 56px);
  }
  .lp-compare-tray__toggle {
    min-height: 36px;
    padding: 6px 10px;
  }
}

/* Detail entry — next to wish */
.pd-wish-share__compare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4a5560;
  text-decoration: none;
  font-size: 14px;
  line-height: 36px;
  cursor: pointer;
}
.pd-wish-share__compare:hover { color: #1a5f96; }
.pd-wish-share__compare.is-in-compare { color: #1a5f96; }
.pd-wish-share__compare.is-in-compare:hover .lp-compare-add__label {
  font-size: 0;
}
.pd-wish-share__compare.is-in-compare:hover .lp-compare-add__label::after {
  content: 'Added';
  font-size: 14px;
  line-height: 36px;
  letter-spacing: normal;
}
.pd-wish-share__compare svg { flex: 0 0 auto; }

/* Model Comparison H2 — Add all models to Compare */
.lp-pcm-compare-titlebar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  clear: both;
  margin: 15px 0 0;
}
.lp-pcm-compare-titlebar > .product-module__title,
.product-module__body .lp-pcm-compare-titlebar > h2.product-module__title {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 !important;
  float: none !important;
}
.lp-pcm-compare-add-all,
.product-module__body .lp-pcm-compare-titlebar > h2.product-module__title + .lp-pcm-compare-add-all,
.lp-pcm-compare-titlebar > .lp-pcm-compare-add-all {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  flex: 0 0 auto;
  margin: 0 0 0 40px !important;
  padding: 7px 12px;
  border: 1px solid rgba(26, 31, 38, 0.14);
  border-radius: 4px;
  background: #fff;
  color: #2a3440;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.lp-pcm-compare-add-all:hover {
  border-color: rgba(26, 95, 150, 0.45);
  color: #1a5f96;
  background: #f5f9fc;
}
.lp-pcm-compare-add-all.is-in-compare {
  border-color: rgba(26, 95, 150, 0.55);
  color: #1a5f96;
  background: #eef5fb;
}
.lp-pcm-compare-add-all svg {
  display: block;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  overflow: visible;
}
.lp-pcm-compare-titlebar + * {
  margin-top: 15px;
}
@media (max-width: 800px) {
  .lp-pcm-compare-add-all,
  .lp-pcm-compare-titlebar > .lp-pcm-compare-add-all {
    margin-left: 40px !important;
    padding: 6px 10px;
    font-size: 12px;
  }
}
