/* ==========================================================================
   Favourites — heart a fireplace, see your shortlist, enquire about it.
   Saved on the visitor's device (localStorage). Built by js/favourites.js.
   ========================================================================== */

.fav-ico { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.fav-ico path { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; transition: fill .2s ease, stroke .2s ease; }
.is-saved > .fav-ico path, .is-saved .fav-ico path { fill: var(--color-accent, #ff4500); stroke: var(--color-accent, #ff4500); }

@keyframes fav-pop { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 70% { transform: scale(.92); } 100% { transform: scale(1); } }
.fav-pop .fav-ico { animation: fav-pop .42s cubic-bezier(.3, 1.4, .5, 1); }

/* ---- Header button + count ---------------------------------------------- */
.fav-header-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-border, #ececec);
  background: #fff; color: var(--color-navy, #00264c); cursor: pointer; flex-shrink: 0;
  transition: border-color .2s ease, background .2s ease;
}
.fav-header-btn:hover { border-color: var(--color-navy, #00264c); }
.fav-header-btn .fav-ico { width: 21px; height: 21px; }
.fav-count {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--color-accent, #ff4500); color: #fff;
  font: 600 11px/19px var(--font-heading, Poppins, Arial, sans-serif); text-align: center;
  box-shadow: 0 0 0 2px #fff; transform: scale(0); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1);
}
.fav-count.is-on { transform: scale(1); }
.fav-count.is-bump { animation: fav-pop .42s cubic-bezier(.3, 1.4, .5, 1); }

/* ---- Heart on shop cards ------------------------------------------------- */
.fav-cell { position: relative; }
.fav-card-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .94); color: var(--color-navy, #00264c);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16); transition: transform .15s ease, box-shadow .15s ease;
}
.fav-cell:hover .fav-card-btn { transform: translateY(-4px); }
.fav-card-btn:hover, .fav-cell:hover .fav-card-btn:hover { transform: translateY(-4px) scale(1.08); box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.fav-card-btn:focus-visible, .fav-header-btn:focus-visible, .fav-save:focus-visible { outline: 2px solid var(--color-accent, #ff4500); outline-offset: 2px; }

/* ---- "Save" on product pages (sits on the dark hero / dark spec panel) --- */
.fav-save {
  display: inline-flex; align-items: center; gap: 8px; margin: -10px 0 22px;
  padding: 9px 16px 9px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 16, 26, .28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font: 500 14px/1 var(--font-heading, Poppins, Arial, sans-serif);
  transition: background .2s ease, border-color .2s ease;
}
.fav-save:hover { background: rgba(10, 16, 26, .5); border-color: rgba(255, 255, 255, .8); }
.fav-save.is-saved { border-color: rgba(255, 69, 0, .7); }

/* ---- Drawer ---------------------------------------------------------------- */
.fav-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(8, 14, 24, .38);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.fav-overlay.is-open { opacity: 1; visibility: visible; }
.fav-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001; width: 400px; max-width: 100%;
  background: #fff; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0, 0, 0, .14);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
}
.fav-panel.is-open { transform: none; visibility: visible; }
.fav-panel-head { display: flex; align-items: center; gap: 10px; padding: 22px 22px 16px; border-bottom: 1px solid var(--color-border, #ececec); }
.fav-panel-head h2 { font: 600 20px/1.2 var(--font-heading, Poppins, Arial, sans-serif); color: var(--color-black, #0c0c0c); margin: 0; }
.fav-panel-head .fav-n { color: var(--color-grey, #828282); font: 400 15px/1 var(--font-body, Roboto, Arial, sans-serif); }
.fav-close {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--color-bg-alt, #f5f6f8);
  color: var(--color-black, #0c0c0c); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.fav-close:hover { background: #e9ecf0; }
.fav-list { flex: 1; overflow-y: auto; padding: 8px 22px; margin: 0; list-style: none; overscroll-behavior: contain; }
.fav-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--color-border, #ececec); transition: opacity .2s ease; }
.fav-item:last-child { border-bottom: 0; }
.fav-item a { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.fav-thumb { width: 76px; height: 64px; border-radius: 8px; flex-shrink: 0; object-fit: cover; background: #16202e; }
.fav-meta { min-width: 0; }
.fav-name { font: 500 15px/1.3 var(--font-heading, Poppins, Arial, sans-serif); color: var(--color-black, #0c0c0c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-item a:hover .fav-name { color: var(--color-accent, #ff4500); }
.fav-price { font-size: 14px; color: var(--color-grey, #828282); margin-top: 3px; }
.fav-remove {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; cursor: pointer; flex-shrink: 0;
  color: var(--color-grey, #828282); display: inline-flex; align-items: center; justify-content: center;
}
.fav-remove:hover { background: var(--color-bg-alt, #f5f6f8); color: var(--color-black, #0c0c0c); }
.fav-foot { padding: 16px 22px 22px; border-top: 1px solid var(--color-border, #ececec); }
.fav-foot .btn { width: 100%; justify-content: center; text-align: center; }
.fav-foot-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--color-grey, #828282); }
.fav-link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--color-grey, #828282); text-decoration: underline; text-underline-offset: 2px; }
.fav-link-btn:hover { color: var(--color-black, #0c0c0c); }

.fav-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 34px 60px; }
.fav-empty-ico { width: 64px; height: 64px; border-radius: 50%; background: #fff3ee; color: var(--color-accent, #ff4500); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.fav-empty-ico .fav-ico { width: 28px; height: 28px; }
.fav-empty h3 { font: 600 18px/1.3 var(--font-heading, Poppins, Arial, sans-serif); margin: 0 0 8px; color: var(--color-black, #0c0c0c); }
.fav-empty p { color: var(--color-grey, #828282); font-size: 15px; line-height: 1.5; margin: 0 0 22px; }
.fav-empty .fav-inline-heart { display: inline-block; vertical-align: -3px; width: 16px; height: 16px; color: var(--color-accent, #ff4500); }
.fav-empty .fav-inline-heart .fav-ico { width: 16px; height: 16px; margin: 0 1px; }

/* ---- Toast ----------------------------------------------------------------- */
.fav-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1002; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 999px;
  background: var(--color-navy, #00264c); color: #fff; font: 400 14px/1.2 var(--font-body, Roboto, Arial, sans-serif);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22); opacity: 0; visibility: hidden; white-space: nowrap;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1), visibility .2s ease;
}
.fav-toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.fav-toast button { background: rgba(255, 255, 255, .12); border: 0; border-radius: 999px; padding: 7px 13px; color: #fff; font: 600 13px/1 var(--font-heading, Poppins, Arial, sans-serif); cursor: pointer; }
.fav-toast button:hover { background: rgba(255, 255, 255, .22); }

body.fav-lock { overflow: hidden; }

@media (max-width: 560px) {
  .fav-panel { width: 100%; }
  .fav-header-btn { width: 40px; height: 40px; }
  .fav-toast { bottom: 16px; max-width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .fav-panel, .fav-overlay, .fav-toast, .fav-count { transition: none; }
  .fav-pop .fav-ico, .fav-count.is-bump { animation: none; }
}
