/* Strona „Moja lista” (/lista). Kolory propozycji: ciemniejsza zieleń — ten sam produkt (product.id z centrum),
   zielony — ta sama marka i ilość, jasnozielony — ta sama marka, żółty — zamiennik. */

.list-loading, .list-empty { padding: 28px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.list-empty a { color: var(--green-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.list-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.list-summary .btn { height: 44px; padding: 0 18px; }

.list-items { display: grid; gap: 14px; }
.list-item { padding: 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.list-item.is-ended .list-own { opacity: .55; filter: grayscale(1); }

/* Pozycja z listy: zdjęcie, nazwa, cena, akcje */
.list-own { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; }
.list-thumb { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.list-thumb img { width: 100%; height: 100%; object-fit: contain; }
.list-thumb { display: grid; place-items: center; color: var(--green-ink); }
.list-thumb .ico { width: 55%; height: 55%; }
.list-own .list-type { display: flex; align-items: center; gap: 5px; color: var(--green-ink); font-weight: 600; }
.list-type .ico { width: 16px; height: 16px; }
.list-own-body, .list-match-body { display: grid; gap: 2px; min-width: 0; }
.list-store { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
/* Dyskretne logo sieci przy nazwie: małe, bez ramki; bez logo — litera w miętowym kwadracie */
.list-store img { width: 34px; height: 18px; object-fit: contain; object-position: left center; }
.list-store b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--mint); color: var(--green-ink); font-size: 11px; letter-spacing: 0; }
.list-name { font-weight: 650; font-size: 15.5px; line-height: 1.3; }
a.list-name:hover { color: var(--green-ink); text-decoration: underline; text-underline-offset: 3px; }
.list-own small, .list-match small { font-size: 13px; color: var(--muted); }
.list-own-price, .list-match-price { display: grid; justify-items: end; gap: 2px; text-align: right; }
.list-own-price strong, .list-match-price strong { font-size: 18px; font-weight: 800; white-space: nowrap; }
.list-date { font-size: 12.5px; font-weight: 650; }
.list-item.is-ended .list-date { color: var(--red); }
.list-own-actions { display: flex; align-items: center; gap: 8px; }
.list-own-actions a, .list-match-meta a { color: var(--green-ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.list-own-actions a:hover, .list-match-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.list-remove { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); cursor: pointer; }
.list-remove:hover { background: var(--page); color: var(--ink); }

/* Propozycje pod pozycją: kolorowy pasek z lewej mówi, jak dobrze pasują */
.list-matches { display: grid; gap: 8px; margin-top: 14px; }
.list-match { display: grid; grid-template-columns: 130px 48px minmax(0, 1fr) auto 150px; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; border-left: 5px solid; }
.list-match.is-product { border-color: var(--green-ink); background: #d3ecdc; }
.list-match.is-same { border-color: #1f9d55; background: #e3f4e9; }
.list-match.is-brand { border-color: #7cc79a; background: #f0f8f2; }
.list-match.is-substitute { border-color: #e0b100; background: #fff8dc; }
.list-match .list-thumb { width: 48px; height: 48px; border-radius: 8px; }
.list-kind { font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.list-terms { color: var(--green-ink) !important; font-weight: 600; }
.list-match-meta { display: grid; justify-items: end; gap: 2px; text-align: right; }
.list-diff { font-size: 13.5px; font-weight: 800; }
.list-diff.is-cheaper { color: var(--green-ink); }
.list-diff.is-dearer { color: var(--red); }
.list-none { margin-top: 12px; padding: 10px 14px; border-radius: 12px; border-left: 5px solid #c9d4cc; background: var(--page); font-size: 14px; color: var(--muted); }

@media (max-width: 760px) {
  .list-own { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; }
  .list-thumb { width: 56px; height: 56px; }
  .list-own-actions { grid-column: 1 / -1; justify-content: space-between; }
  .list-match { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px 12px; }
  .list-kind { grid-column: 1 / -1; }
  .list-match-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; }
  .list-summary { flex-direction: column; align-items: flex-start; }
}

/* Długie warunki promocji (np. karta, limit) skracamy do dwóch linii — pełny tekst jest w gazetce. */
.list-terms { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Wąski telefon: cena propozycji pod opisem, żeby nazwa sieci i produktu miały całą szerokość */
@media (max-width: 480px) {
  .list-own, .list-match { grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
  .list-own .list-thumb { width: 48px; height: 48px; }
  .list-own-price, .list-match-price { grid-column: 2; justify-items: start; text-align: left; }
  .list-match-meta { flex-wrap: wrap; justify-content: flex-start; gap: 4px 12px; }
}
