/**
 * Shared shopper browse polish — compare + price drops.
 */
.shopper-browse {
  max-width: 72rem;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
}

.shopper-browse-header {
  margin-bottom: 1.25rem;
}

.shopper-browse-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  color: #0f172a;
}

.shopper-browse-lead {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  max-width: 40rem;
}

.shopper-browse-empty {
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.shopper-empty-panel {
  margin: 1.5rem 0;
  padding: 2rem 1.5rem;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  text-align: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.shopper-empty-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(23, 162, 184, 0.12);
  color: #17a2b8;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

.shopper-empty-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 700;
}

.shopper-empty-panel p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.shopper-empty-panel-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.15rem;
}

.shopper-empty-panel-actions .btn {
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
}

.shopper-browse-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.shopper-browse-filters label {
  font-size: 0.85rem;
  color: #374151;
}

.shopper-browse-filters select {
  display: block;
  margin-top: 0.25rem;
  min-width: 8rem;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
}

.shopper-browse-filters select:focus {
  outline: none;
  border-color: #17a2b8;
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15);
}

.compare-share-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  align-items: center;
}

.wishlist-share-page .wishlist-share-eyebrow {
  margin: 0 0 0.35rem;
  color: #64748b;
  font-size: 0.875rem;
}

.wishlist-share-page .shopper-browse-header h1 {
  margin-top: 0;
}

.compare-share-bar input {
  flex: 1;
  min-width: 12rem;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

@media (max-width: 767px) {
  .compare-share-bar {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .compare-share-bar input#compareShareUrl {
    display: none;
  }

  .compare-share-bar .btn {
    min-height: 44px;
    flex: 1 1 auto;
  }

  .compare-share-bar #compareShareBtn {
    flex: 1 1 50%;
  }

  .compare-matrix {
    font-size: 0.8125rem;
  }

  .compare-matrix th,
  .compare-matrix td {
    padding: 0.45rem 0.55rem;
  }
}

.compare-matrix-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.compare-matrix-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.compare-matrix-wrap.is-scrollable::after {
  opacity: 1;
}

.compare-matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.compare-matrix th,
.compare-matrix td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.compare-matrix thead th {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}

.compare-matrix .compare-matrix-label {
  color: #64748b;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.06);
  font-weight: 600;
  font-size: 0.8rem;
}

.compare-matrix thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f8fafc;
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.06);
}

.shopper-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.shopper-book-card {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.shopper-book-card:hover {
  border-color: var(--color-primary, #17a2b8);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.shopper-book-card-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  border: none;
  background: #fff;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #0f172a;
}

.shopper-book-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 3;
  max-height: 200px;
  margin: 0 auto 0.75rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  overflow: hidden;
}

.shopper-book-card-visual img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.shopper-book-card h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  line-height: 1.35;
}

.shopper-book-card h3 a {
  color: inherit;
  text-decoration: none;
}

.shopper-book-card h3 a:hover {
  color: var(--color-primary, #17a2b8);
}

.shopper-book-meta {
  margin: 0.15rem 0;
  color: #64748b;
  font-size: 0.85rem;
}

.shopper-book-price {
  margin: 0.5rem 0 0;
  font-weight: 700;
  color: #0f172a;
}

.shopper-book-price s {
  font-weight: 500;
  color: #94a3b8;
  margin-right: 0.4rem;
}

.shopper-drop-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.shopper-book-card .price-drop-alert-btn {
  margin-top: 0.6rem;
  width: 100%;
}

.shopper-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.shopper-card-actions {
  margin-top: 0.65rem;
}

.price-drop-card .price-drop-alert-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #0369a1;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.price-drop-card .price-drop-alert-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.price-drop-card .shopper-card-wishlist,
.price-drop-card .shopper-card-compare {
  position: absolute;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.price-drop-card .shopper-card-wishlist {
  top: 0.5rem;
  right: 0.5rem;
}

.price-drop-card .shopper-card-compare {
  top: 0.5rem;
  left: 0.5rem;
}

.price-drop-card .shopper-card-wishlist.active {
  color: #ef4444;
  border-color: #fecaca;
}

.price-drop-card .shopper-card-compare.active {
  color: var(--color-primary, #17a2b8);
  border-color: #bae6fd;
}

.price-drop-card .shopper-drop-badge {
  top: auto;
  bottom: 0.5rem;
  right: 0.5rem;
}

.price-drop-card:focus-within {
  border-color: var(--color-primary, #17a2b8);
}

@media (max-width: 767px) {
  .shopper-book-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }

  .shopper-book-card {
    padding: 0.75rem;
  }

  .shopper-book-card:hover {
    transform: none;
  }

  .shopper-book-card:active {
    transform: scale(0.99);
    border-color: #cbd5e1;
  }

  .shopper-book-card .price-drop-alert-btn {
    min-height: 44px;
  }
}

.compare-offer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.compare-offer-table th {
  text-align: left;
  font-weight: 500;
  padding: 0 0 0.25rem;
  color: #94a3b8;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.compare-offer-table th:not(:first-child),
.compare-offer-table td:not(:first-child) {
  text-align: right;
}

.compare-offer-table tr {
  border-top: 1px solid #f1f5f9;
}

.compare-offer-table tr.is-best {
  background: #f0fdf4;
}

.compare-offer-table td {
  padding: 0.35rem 0;
  color: #374151;
}

.compare-offer-table .is-free {
  color: #16a34a;
}

.compare-offer-table a {
  color: var(--color-primary, #17a2b8);
  font-weight: 600;
  text-decoration: none;
}

.compare-offer-table a:hover {
  text-decoration: underline;
}

.compare-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.82rem;
  color: #374151;
}

.compare-spec-table tr {
  border-top: 1px solid #f1f5f9;
}

.compare-spec-table td {
  padding: 0.2rem 0;
}

.compare-spec-table td:first-child {
  color: #94a3b8;
}

.compare-spec-table td:last-child {
  text-align: right;
  font-weight: 500;
}

.shopper-pagination {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.shopper-pagination a {
  padding: 0.35rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.shopper-pagination a.is-current {
  font-weight: 700;
  border-color: var(--color-primary, #17a2b8);
  color: var(--color-primary-dark, #138496);
  background: var(--color-primary-light, #e6f7fa);
}

@media (max-width: 640px) {
  .shopper-browse-header h1 {
    font-size: 1.45rem;
  }

  .shopper-browse-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .shopper-browse-filters label {
    width: 100%;
  }

  .shopper-browse-filters select {
    width: 100%;
    min-width: 0;
  }
}
