.favourites-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 52px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #8ebcc1;
  border-radius: 8px;
  background: #fff;
  color: var(--sea);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.favourites-toggle:hover { background: var(--mist); }
.favourites-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.favourites-toggle.has-favourites svg { fill: currentColor; }

.card-shell { position: relative; min-width: 0; }
.card-shell .card { height: 100%; }
.card-favourite {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #c4dada;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: var(--sea);
  box-shadow: 0 2px 7px #073d4b1c;
  cursor: pointer;
}
.card-favourite:hover { transform: translateY(-1px); background: #fff; border-color: #65a8ac; }
.card-favourite svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.card-favourite.saved { background: var(--sea); color: #fff; border-color: var(--sea); }
.card-favourite.saved svg { fill: currentColor; }

.favourites-dialog {
  width: min(520px, 100vw);
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: -20px 0 60px #002a3c38;
}
.favourites-dialog::backdrop { background: #062d3b80; }
.favourites-panel { height: 100%; min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; }
.favourites-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px; border-bottom: 1px solid var(--line); }
.favourites-heading { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.favourites-title-heart { display: none; }
.favourites-header h2 { margin: 0; font-size: 1.65rem; }
.favourites-header p { margin: .2rem 0 0; color: var(--muted); }
.favourites-header .eyebrow { color: var(--rust); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.favourites-close { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.favourites-content { min-height: 0; overflow: auto; padding: 14px 20px 24px; }
.favourites-state { margin: 36px auto; max-width: 340px; text-align: center; color: var(--muted); }
.favourites-state h3 { color: var(--ink); margin-bottom: .35rem; }
.favourite-row { display: grid; grid-template-columns: 112px minmax(0,1fr) auto; gap: 13px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.favourite-photo { position: relative; width: 112px; height: 88px; overflow: hidden; border-radius: 10px; background: var(--mist); }
.favourite-photo img { width: 100%; height: 100%; object-fit: cover; }
.favourite-body { min-width: 0; }
.favourite-body h3 { margin: 0 0 4px; font-size: .95rem; line-height: 1.25; }
.favourite-body p { margin: 2px 0; color: var(--muted); font-size: .78rem; }
.favourite-body .price { color: var(--ink); font-size: .9rem; font-weight: 800; }
.favourite-body a { display: inline-block; margin-top: 4px; color: var(--sea); font-size: .78rem; font-weight: 800; }
.favourite-status { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 999px; background: #fff0da; color: #8a471f; font-size: .68rem; font-weight: 850; }
.favourite-remove { padding: 5px 7px; border: 0; background: transparent; color: var(--muted); font-size: .74rem; font-weight: 750; cursor: pointer; }
.favourite-remove:hover { color: #a52820; text-decoration: underline; }
.favourites-undo { margin: 0 20px 12px; padding: 10px 12px; border-radius: 9px; background: #073d4b; color: #fff; font-size: .82rem; }
.favourites-undo button { margin-left: 8px; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 850; text-decoration: underline; cursor: pointer; }
.favourites-footer { position: sticky; z-index: 3; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -8px 18px rgba(7,61,75,.06); }
.favourites-exports { display: flex; flex-wrap: wrap; gap: 7px; }
.favourites-exports button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 58px; height: 58px; padding: 5px 8px; border: 1px solid #9abfc2; border-radius: 9px; background: #fff; color: var(--sea); font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.favourites-exports button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.favourites-exports button:hover { transform: translateY(-1px); background: var(--mist); border-color: #65a8ac; }
.favourites-exports button:disabled { opacity: .45; cursor: default; }
.favourites-clear { border: 0; background: transparent; color: #a52820; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.favourites-clear:disabled { opacity: .45; cursor: default; }

@media (max-width: 620px) {
  .favourites-dialog { box-sizing: border-box; inset: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; }
  .favourites-panel { height: 100dvh; }
  .favourites-header { padding: 18px; }
  .favourites-title-heart { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; background: var(--sea); color: #fff; font-size: 1.35rem; line-height: 1; }
  .favourites-content { padding: 8px 16px 22px; }
  .favourite-row { grid-template-columns: 88px minmax(0,1fr) auto; gap: 10px; }
  .favourite-photo { width: 88px; height: 76px; }
  .card-favourite { top: 9px; right: 9px; }
  .favourites-footer { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); }
  .favourites-exports { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; gap: 5px; }
  .favourites-exports button { width: 100%; min-width: 0; height: 54px; padding: 4px 2px; }
  .favourites-clear { min-height: 44px; padding: 0 4px; white-space: nowrap; }
}
