/* =========================
   COMMON (ОБЩЕЕ)
========================= */

.cmp-count {
  font-weight: 600;
  margin-bottom: 6px;
}

.cmp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 6px 10px;
  background: #222;
  border-radius: 8px;
  margin-bottom: 6px;
}

.cmp-btn {
  width: 100%;
  padding: 6px;
  border: none;
  border-radius: 8px;
  background: #1f7aff;
  color: white;
  cursor: pointer;
}

/* =========================
   FLOATING COMPARE MENU (ВОССТАНОВЛЕНО ПОЛНОСТЬЮ)
========================= */

#compare-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;

  display: flex;
  flex-direction: column; /* важно */
  align-items: stretch;
  gap: 10px;

  min-width: 180px;
  padding: 12px 14px;

  font-size: 14px;
  font-weight: 700;

  border-radius: 10px;

  background: linear-gradient(135deg,#0b1626,#13233a);
  color: #fff;

  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.05);

  backdrop-filter: blur(10px);

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#compare-float:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* =========================
   FLOAT CONTENT
========================= */

.cmp-head {
  font-weight: 700;
  font-size: 14px;
}

.cmp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cmp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =========================
   ACTION BUTTONS (СРАВНИТЬ / ОЧИСТИТЬ)
========================= */

.cmp-action-btn {
  width: 100%;
  padding: 9px 12px;

  border-radius: 8px;

  background: linear-gradient(135deg, #1f7aff, #0046d5);
  color: #fff;

  font-weight: 700;
  font-size: 13px;

  border: none;
  cursor: pointer;

  transition: 0.25s;

  box-shadow: 0 8px 18px rgba(31, 122, 255, 0.25);
}

.cmp-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(31, 122, 255, 0.35);
}

.cmp-action-btn:active {
  transform: translateY(0);
}

/* =========================
   TOAST (ОБЩИЙ)
========================= */

.compare-toast {
  position: fixed;
  bottom: 20px;
  right: 260px;

  background: #0b1626;
  color: #fff;

  padding: 10px 14px;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);

  opacity: 0;
  transform: translateX(-10px);

  transition: 0.25s;
  z-index: 9998;
}

.compare-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   REMOVE BUTTON (ОБЩИЙ)
========================= */

.cmp-remove {
  position: static;

  width: 28px;
  height: 28px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 8px;

  background: linear-gradient(135deg,#0b1626,#13233a);

  cursor: pointer;

  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}

.cmp-remove img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.cmp-remove:hover {
  box-shadow: 0 0 14px rgba(255,80,80,0.6),
              0 12px 26px rgba(0,0,0,0.4);
  transform: rotate(180deg) scale(1.2);
}

.cmp-remove:active {
  transform: scale(0.95);
}

/* =========================
   REMOVE ANIMATION
========================= */

.cmp-removing {
  transform: scale(0.7) rotate(-10deg) translateY(40px);
  opacity: 0;
  filter: blur(4px);
}

/* =========================
   CATALOG BUTTON
========================= */

.equipment-card .compare-add-btn {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: linear-gradient(135deg,#0b1626,#13233a);
  border: 1px solid rgba(255,255,255,0.08);

  box-shadow: 0 6px 18px rgba(0,0,0,0.35);

  cursor: pointer;

  transition: transform 0.25s ease, box-shadow 0.25s ease;

  z-index: 5;
}

.equipment-card .compare-add-btn:hover {
  transform: translateY(-2px);
}

.equipment-card .cmp-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.equipment-card .compare-add-btn.active {
  background: linear-gradient(135deg,#0073c6,#004080);
}

.equipment-card .compare-add-btn.active .cmp-icon {
  content: url("/assets/svg/check.svg");
}

/* =========================
   PRODUCT PAGE BUTTON
========================= */

.product-page .compare-add-btn {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border-radius: 10px;

  background: linear-gradient(135deg,#0b1626,#13233a);
  border: 1px solid rgba(255,255,255,0.08);

  box-shadow: 0 6px 18px rgba(0,0,0,0.35);

  cursor: pointer;

  transition: transform 0.25s ease, box-shadow 0.25s ease;

  position: relative;
  z-index: 2;
}

.product-page .compare-add-btn:hover {
  transform: translateY(-2px);
}

.product-page .compare-add-btn .cmp-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.product-page .compare-add-btn.active {
  background: linear-gradient(135deg,#0073c6,#004080);
}

.product-page .compare-add-btn.active .cmp-icon {
  content: url("/assets/svg/check.svg");
}

.compare-add-btn {
  transform-origin: center;
}

.compare-fly {
  position: fixed;
  width: 28px;
  height: 28px;
  z-index: 99999;
  pointer-events: none;

  transition: transform 600ms cubic-bezier(.22,.9,.3,1),
              opacity 600ms ease;
}

.compare-fly img {
  width: 100%;
  height: 100%;
}

@keyframes cmpPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25) rotate(6deg); }
  100% { transform: scale(1); }
}