.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shopping {
  color: var(--text);
  min-height: 100dvh;
}

.page-shopping .back-link {
  display: inline-flex;
  margin-bottom: 0.9rem;
}

.board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-content: start;
}

.board-wide {
  grid-column: 1 / -1;
}

.board-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

/* Hero / URL */
.shopping-hero__label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}

.shopping-url-input {
  min-height: 2.75rem;
}

.shopping-hero__hint {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Filters: chips + dots */
.shopping-filters .ds-section-card__label {
  margin-bottom: 0.5rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  padding: 0.05rem 0;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(47, 107, 255, 0.25);
}

.filter-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.filter-pill.active .filter-dot {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Product cards (was .card) */
.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  box-shadow: var(--shadow-xs);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:active {
  transform: scale(0.99);
}
.product-card[hidden] {
  display: none;
}

.product-card.dragging {
  opacity: 0.35;
  transform: scale(0.96);
  filter: grayscale(0.4);
}
.product-card.drag-over {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.imgWrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--skeleton-base);
  position: relative;
  overflow: hidden;
}
.imgWrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meta {
  padding: 0.6rem 0.7rem 0.75rem;
}

.title {
  margin: 0 0 0.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  min-height: 1.5em;
}

.host {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cardLink {
  text-decoration: none;
  color: inherit;
  display: block;
}

.tag-dots {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 1rem);
}

/* Touch target 44px; colored disc stays ~20px via padding + content-box clip */
.tag-dot {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0.75rem;
  box-sizing: content-box;
  background-clip: content-box;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.4;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.1s ease, transform 0.1s ease;
}
.tag-dot.active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 2px 6px rgba(0, 0, 0, 0.12);
}

.removeBtn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 2.75rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  z-index: 4;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.1s ease, background 0.1s ease;
}
.removeBtn svg {
  width: 15px;
  height: 15px;
}
.removeBtn:active {
  background: var(--danger);
  opacity: 1;
}

.skeleton .imgWrap {
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite ease-in-out;
}
.skeleton .imgWrap img {
  opacity: 0;
}
.skeleton .title,
.skeleton .host {
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  color: transparent;
  border-radius: 4px;
}
.skeleton .title { width: 80%; min-height: 1.15em; }
.skeleton .host  { width: 50%; }

.retryBtn {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  z-index: 5;
  min-height: 2.25rem;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  -webkit-tap-highlight-color: transparent;
}
.retryBtn:active { background: var(--accent); }
.product-card.preview-failed .imgWrap { background: var(--surface-2); }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ds-empty-state[hidden] { display: none; }

.toast-container {
  position: fixed;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 0.65rem 1rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  animation: toastIn 250ms ease, toastOut 250ms ease 2750ms forwards;
  max-width: min(90vw, 20rem);
  text-align: center;
}
.toast.toast-error { background: var(--danger); color: #fff; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(10px); }
}

@media (min-width: 480px) {
  .board {
    grid-template-columns: repeat(2, 1fr);
  }
  .imgWrap { aspect-ratio: 4 / 5; }
}

@media (min-width: 800px) {
  .app-container--padded-bottom {
    max-width: 72rem;
  }
  .board {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}
