/* MJT 2026 — Product Compare */

.mjt-compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  transform: translateY(110%);
  transition: transform var(--mjt-transition);
  pointer-events: none;
}
.mjt-compare-bar.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.mjt-compare-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--mjt-color-surface-elevated);
  border-top: 1px solid var(--mjt-color-border);
  box-shadow: var(--mjt-shadow-lg);
}
.mjt-compare-bar__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--mjt-color-text);
}
.mjt-compare-bar__text strong {
  color: var(--mjt-color-accent);
  margin-left: 0.35rem;
}

.mjt-compare-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mjt-compare-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.mjt-compare-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--mjt-color-overlay);
}
.mjt-compare-modal__panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: 85vh;
  margin: 0 auto;
  background: var(--mjt-color-surface);
  border-radius: var(--mjt-radius-lg) var(--mjt-radius-lg) 0 0;
  box-shadow: var(--mjt-shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(24px);
  transition: transform 0.35s var(--mjt-ease-out);
}
.mjt-compare-modal.is-open .mjt-compare-modal__panel {
  transform: translateY(0);
}
.mjt-compare-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--mjt-color-border);
}
.mjt-compare-modal__title {
  margin: 0;
  font-size: 1.15rem;
}
.mjt-compare-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--mjt-color-bg-alt);
  color: var(--mjt-color-text);
  cursor: pointer;
}
.mjt-compare-modal__body {
  padding: 1rem 1.25rem 1.5rem;
  overflow: auto;
}
.mjt-compare-empty {
  margin: 0;
  color: var(--mjt-color-text-muted);
  text-align: center;
  padding: 2rem 1rem;
}
.mjt-compare-table-wrap { overflow-x: auto; }
.mjt-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.mjt-compare-table th,
.mjt-compare-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--mjt-color-border);
  vertical-align: top;
  text-align: left;
}
.mjt-compare-table th {
  width: 120px;
  color: var(--mjt-color-text-muted);
  font-weight: 600;
}
.mjt-compare-table__thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--mjt-radius-sm);
  background: var(--mjt-color-bg-alt);
}
.mjt-compare-table__name {
  color: var(--mjt-color-text);
  text-decoration: none;
  font-weight: 600;
}
.mjt-compare-table__name:hover { color: var(--mjt-color-accent); }
.mjt-compare-instock { color: var(--mjt-color-success-text); font-weight: 600; }
.mjt-compare-outstock { color: var(--mjt-color-error-text); font-weight: 600; }
.mjt-compare-toggle.is-active {
  background: var(--mjt-color-accent);
  color: var(--mjt-color-text-inverse);
}

@media (min-width: 768px) {
  .mjt-compare-modal { align-items: center; padding: 1.5rem; }
  .mjt-compare-modal__panel { border-radius: var(--mjt-radius-lg); max-height: 80vh; }
}

@media (max-width: 767px) {
  .mjt-compare-bar__inner { flex-direction: column; align-items: stretch; }
}
