/* Lemmikute leht v2 (spec ai/specs/2026-10-05-favourites-v2-design.md). Light + dark ([data-bs-theme="dark"]).
 * Primary buttons are the existing .btn-success (chilli.ee OSTA style, custom.css); here only size changes. */
.fav2 {
  --fav-panel: #fff;
  --fav-line: rgba(16, 24, 40, .07);
  --fav-shadow: 0 10px 30px rgba(16, 24, 40, .07), 0 1px 3px rgba(16, 24, 40, .05);
  --fav-muted: #6b7280;
  --fav-soft: #f3f4f6;
  --fav-ring-off: #d5d9df;
  --fav-gap: var(--bs-body-bg, #fff);
  --fav-chilli: linear-gradient(135deg, #DC251E 0%, #FF7A00 100%);
  padding-bottom: 48px;
}
[data-bs-theme="dark"] .fav2 {
  --fav-panel: #1b1e23;
  --fav-line: rgba(255, 255, 255, .08);
  --fav-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --fav-muted: #9ca3af;
  --fav-soft: #262a31;
  --fav-ring-off: #3b414a;
}

/* 1. header */
.fav2-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 22px; }
.fav2-title { margin: 0; font-weight: 800; letter-spacing: -.02em; }
.fav2-stats { display: flex; gap: 10px; }
.fav2-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--fav-soft); color: var(--fav-muted); font-size: 14px; font-weight: 600; }
.fav2-stat b { color: var(--bs-emphasis-color); font-size: 17px; font-weight: 800; }
.fav2-h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; }

/* 2. story row */
.fav2-stories { margin-bottom: 28px; }
.fav2-stories__row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.fav2-stories__row::-webkit-scrollbar { display: none; }
.fav2-story { flex: none; width: 88px; display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; color: inherit; scroll-snap-align: start; }
.fav2-story__ring { width: 80px; height: 80px; border-radius: 50%; padding: 2px; background: var(--fav-ring-off); display: block; transition: transform .2s ease; }
.fav2-story.is-new .fav2-story__ring { padding: 3px; background: var(--fav-chilli); }
.fav2-story__img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--fav-gap); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 800; font-size: 26px; color: #DC251E; }
.fav2-story__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.fav2-story__name { max-width: 100%; font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav2-story:hover .fav2-story__ring { transform: scale(1.05); }
.fav2-story:focus-visible { outline: none; }
.fav2-story:focus-visible .fav2-story__ring { box-shadow: 0 0 0 3px rgba(220, 37, 30, .35); }
.fav2-story.is-off { opacity: .45; }
.fav2-story--add .fav2-story__ring { background: none; border: 2px dashed var(--fav-ring-off); padding: 0; }
.fav2-story--add .fav2-story__img { border: 0; background: var(--fav-soft); color: var(--fav-muted); font-size: 26px; }
.fav2-story--add .fav2-story__name { color: var(--fav-muted); }

/* login invitation */
.fav2-login { display: flex; align-items: center; gap: 18px; padding: 20px 22px; margin-bottom: 28px; border-radius: 20px; background: var(--fav-panel); border: 1px solid var(--fav-line); box-shadow: var(--fav-shadow); }
.fav2-login__icon { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--fav-chilli); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.fav2-login__text { flex: 1; min-width: 0; }
.fav2-login__text .fav2-h2 { margin-bottom: 4px; font-size: 1.1rem; }
.fav2-login__text p { margin: 0; color: var(--fav-muted); font-size: 14px; }
.fav2-login__btn { flex: none; min-height: 48px !important; padding: 0 26px; font-weight: 700; }

/* 3. reels */
.fav2-reels { margin-bottom: 28px; }
.fav2-reels .reels-title { font-size: 1.25rem; }

/* 4. brand blocks */
.fav2-brand, .fav2-discover, .fav2-sec, #fav2-others { scroll-margin-top: 110px; }
.fav2-brand { background: var(--fav-panel); border: 1px solid var(--fav-line); border-radius: 20px; box-shadow: var(--fav-shadow); padding: 20px; margin-bottom: 20px; transition: opacity .25s ease; }
.fav2-brand.is-off { opacity: .6; }
.fav2-brand__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.fav2-brand__logo { flex: none; width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 1px solid var(--fav-line); display: flex; align-items: center; justify-content: center; overflow: hidden; text-decoration: none; font-weight: 800; font-size: 22px; color: #DC251E; }
.fav2-brand__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.fav2-brand__meta { flex: 1; min-width: 0; }
.fav2-brand__name { font-size: 1.15rem; font-weight: 800; margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav2-brand__name a { color: inherit; text-decoration: none; }
.fav2-brand__name a:hover { text-decoration: underline; }
.fav2-brand__sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--fav-muted); }
.fav2-brand__rating i { color: #f5a524; }
.fav2-brand__rating b { color: var(--bs-emphasis-color); }
.fav2-brand__link { color: var(--fav-muted); text-decoration: none; font-weight: 600; }
.fav2-brand__link:hover { color: var(--bs-emphasis-color); }
.fav2-brand__link i { font-size: 11px; }
.fav2-brand__quiet { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--fav-soft); color: var(--fav-muted); font-size: 14px; }

/* «Jälgi» (.btn-success) / «Jälgid» (soft grey) */
.fav2 .fav2-follow { flex: none; min-height: 40px !important; padding: 0 16px; gap: 6px; font-size: 14px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.fav2 .fav2-follow.is-on { background: var(--fav-soft); color: var(--bs-emphasis-color); border: 0; border-radius: 15px; }
.fav2 .fav2-follow.is-on:hover { background: var(--fav-ring-off); }
.fav2 .fav2-follow.is-on i { color: #18AE00; }
.fav2 .fav2-follow:disabled { cursor: progress; opacity: .8; }
.fav2 .fav2-follow--sm { min-height: 36px !important; font-size: 13px; padding: 0 12px; }
.favourites-grid-item > .fav2-follow--sm { width: 100%; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; }

/* brand row */
.fav2-rail { position: relative; }
.fav2-rail__row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 2px; margin: -2px; scrollbar-width: none; }
.fav2-rail__row::-webkit-scrollbar { display: none; }
.fav2-rail__arrow { position: absolute; top: 34%; z-index: 7; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fav-panel); color: var(--bs-emphasis-color); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease; }
.fav2-rail__arrow[hidden] { display: none; }
.fav2-rail__arrow--prev { left: -12px; }
.fav2-rail__arrow--next { right: -12px; }
.fav2-rail:hover .fav2-rail__arrow, .fav2-rail__arrow:focus-visible { opacity: 1; }
@media (pointer: coarse) { .fav2-rail__arrow { display: none !important; } }

/* compact card */
.fav2-card { flex: none; width: 210px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--fav-panel); border: 1px solid var(--fav-line); transition: transform .2s ease, box-shadow .2s ease; }
.fav2-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, .1); }
.fav2-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--fav-soft); }
.fav2-card__media > a, .fav2-card__media img { display: block; width: 100%; height: 100%; }
.fav2-card__media img { object-fit: cover; }
.fav2-card__media .favourite-heart { top: 8px; right: 8px; }
.fav2-card__badge { position: absolute; top: 9px; left: 9px; display: none; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #e11d48; font-size: 11.5px; font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.fav2-card.is-fav .fav2-card__badge { display: inline-flex; }
.fav2-card__pct { position: absolute; left: 9px; bottom: 9px; padding: 2px 8px; border-radius: 999px; background: #DC251E; color: #fff; font-size: 12px; font-weight: 800; }
.fav2-card__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 11px 12px 12px; }
.fav2-card__title { color: inherit; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fav2-card__title:hover { text-decoration: underline; }
.fav2-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fav2-card__price { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.fav2-card__price b { font-size: 16px; font-weight: 800; white-space: nowrap; }
.fav2-card__price s { font-size: 12px; color: var(--fav-muted); white-space: nowrap; }
.fav2 .fav2-card__buy { flex: none; min-height: 36px !important; padding: 0 16px; font-size: 14px; font-weight: 700; }

/* 5. other favourites */
.fav2-sec { margin: 32px 0 8px; }
.favourites-grid-item { transition: opacity 250ms ease; }

/* 6. expired */
.fav2-expired { margin-top: 32px; border-radius: 20px; background: var(--fav-soft); padding: 4px 18px; }
.fav2-expired > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 800; font-size: 1.05rem; }
.fav2-expired > summary::-webkit-details-marker { display: none; }
.fav2-expired > summary i { transition: transform .2s ease; }
.fav2-expired[open] > summary i { transform: rotate(180deg); }
.fav2-expired[open] { padding-bottom: 18px; }
.favourites-grid-item--expired .listing-card { filter: grayscale(1); opacity: .7; pointer-events: none; }
.favourites-grid-item--expired .listing-card .favourite-heart { pointer-events: auto; }

/* 7. empty state + suggestions */
.fav2-empty { text-align: center; padding: 40px 20px 32px; margin: 8px 0 28px; border-radius: 20px; background: var(--fav-panel); border: 1px solid var(--fav-line); box-shadow: var(--fav-shadow); }
.fav2-empty[hidden] { display: none; }
.fav2-empty__icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--fav-chilli); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 10px 24px rgba(220, 37, 30, .25); }
.fav2-empty p { max-width: 460px; margin: 0 auto; color: var(--fav-muted); }
.fav2-discover { margin-top: 36px; }
.fav2-discover__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.fav2-sug { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 14px 16px; border-radius: 20px; background: var(--fav-panel); border: 1px solid var(--fav-line); box-shadow: var(--fav-shadow); }
.fav2-sug__logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 1px solid var(--fav-line); display: flex; align-items: center; justify-content: center; overflow: hidden; text-decoration: none; font-weight: 800; font-size: 24px; color: #DC251E; margin-bottom: 4px; }
.fav2-sug__logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.fav2-sug__name { color: inherit; text-decoration: none; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav2-sug__n { font-size: 13px; color: var(--fav-muted); }
.fav2-sug .fav2-follow { margin-top: 8px; width: 100%; }

.fav2-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; padding: 10px 16px; border-radius: 12px; background: #111; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }

/* phone: rows scroll sideways, blocks full width */
@media (max-width: 767.98px) {
  .fav2-head { margin: 20px 0 18px; }
  .fav2-title { font-size: 1.6rem; }
  .fav2-stat { padding: 6px 12px; font-size: 13px; }
  .fav2-stories__row, .fav2-rail__row, .fav2-discover__row { margin: 0 -16px; padding: 4px 16px 6px; scroll-padding: 0 16px; }
  .fav2-story { width: 76px; }
  .fav2-story__ring { width: 70px; height: 70px; }
  .fav2-brand { margin-bottom: 14px; border-radius: 18px; padding: 16px; }
  .fav2-brand .fav2-rail__row { margin: 0 -16px; padding: 2px 16px; }
  .fav2-brand__head { gap: 12px; }
  .fav2-brand__logo { width: 48px; height: 48px; }
  .fav2-brand__name { font-size: 1.05rem; }
  .fav2 .fav2-brand__head .fav2-follow { padding: 0 12px; }
  .fav2-card { width: 168px; }
  .fav2-card__foot { flex-direction: column; align-items: stretch; }
  .fav2 .fav2-card__buy { width: 100%; }
  .fav2-login { flex-wrap: wrap; padding: 18px; }
  .fav2-login__btn { width: 100%; }
  .fav2-discover__row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .fav2-discover__row::-webkit-scrollbar { display: none; }
  .fav2-sug { flex: none; width: 168px; scroll-snap-align: start; }
}
