/* =========================
   Compare Page
   Matches MobilePrices UI
========================= */

.page--compare .archive-head{
  margin-bottom: 14px;
}

.compare-shell{
  display: grid;
  gap: 16px;
}

/* Top selector grid */
.compare-selector{
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 0;
  overflow: hidden;
}

.compare-selector__cell{
  padding: 14px 14px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--surface);
}

.compare-selector__cell:last-child{
  border-right: none;
}

.compare-selector__labels{
  background: color-mix(in srgb, var(--surface) 92%, var(--color-gray-100) 8%);
}

.compare-selector__top{
  padding-top: 18px;
  padding-bottom: 18px;
}

.compare-slot{
  display: grid;
  justify-items: center;
  gap: 10px;
}

.compare-slot__btn{
  margin-top: 2px;
}

.compare-slot__img{
  width: min(240px, 70%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: color-mix(in srgb, var(--surface) 88%, var(--color-gray-100) 12%);
  border-radius: var(--radius-md);
}

.compare-slot__name{
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.compare-slot__meta{
  display: grid;
  gap: 8px;
  justify-items: center;
}

.compare-slot__price{
  font-weight: 700;
  font-size: 18px;
}

.compare-slot__remove{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.compare-slot__remove:hover{
  filter: brightness(0.98);
}

/* Reuse product page rating badge look */
.page--compare .our-rating__badge{
  position: static;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  background: var(--color-gray-700);
  color: var(--color-white);
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-md);
}

/* Result tables */
.compare-section{
  margin-top: 14px;
}

.compare-section__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.compare-section__title{
  font-size: 18px;
  font-weight: 800;
}

.compare-table{
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.compare-table .table{
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.compare-table th:first-child,
.compare-table td:first-child{
  width: 180px;
  color: color-mix(in srgb, var(--text) 78%, var(--color-gray-500) 22%);
  font-weight: 600;
}

/* Picker overlay additions */
.picker-search{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--surface);
}

.picker-search .input{
  width: 100%;
}

.picker-empty{
  padding: 14px;
  color: color-mix(in srgb, var(--text) 70%, var(--color-gray-500) 30%);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 860px){
  .compare-selector{
    grid-template-columns: 140px 1fr 1fr;
  }
  .compare-table th:first-child,
  .compare-table td:first-child{
    width: 140px;
  }
}

@media (max-width: 680px){
  .compare-selector{
    grid-template-columns: 1fr;
  }

  .compare-selector__labels{
    display:none;
  }

  .compare-selector__cell{
    border-right: none;
  }

  .compare-selector__top{
    border-bottom: none;
  }

  .compare-table th:first-child,
  .compare-table td:first-child{
    width: 40%;
  }
}

.no-scroll{ overflow: hidden; }
