/* Ulubione i obserwowane (fav.php / fav.js) */
.kfav-heart svg, .kfav-pbtn svg, .kfav-follow-btn svg, .kfav-hbtn svg, .kfav-toast svg, .kfav-shared svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; flex: none; }
.is-on > svg { fill: currentColor; }
.is-pop > svg { animation: kfav-pop .35s ease; }
@keyframes kfav-pop { 40% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .is-pop > svg { animation: none; } }

/* serduszko na kafelku */
.kfav-host { position: relative; }
.kfav-heart { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--wp--preset--color--ground-900) 55%, transparent); color: #f3efe6; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s, color .2s; touch-action: manipulation; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.kfav-host:hover .kfav-heart, .kfav-heart:focus-visible, .kfav-heart.is-on { opacity: 1; }
.kfav-heart.is-on { color: var(--wp--preset--color--patina); }
.kfav-heart:hover { background: color-mix(in srgb, var(--wp--preset--color--ground-900) 80%, transparent); }
@media (hover: none) { .kfav-heart { opacity: .9; width: 34px; height: 34px; } }
/* siatka zdjęć: serduszko pod ramą, w wierszu kategorii – nie na ramie, żeby nie wyglądało na część zamawianego produktu */
.wc-block-product > .kfav-host .kfav-heart { top: calc(100% + 13px); right: -6px; width: 32px; height: 32px; background: none; color: var(--wp--preset--color--ink-300); -webkit-backdrop-filter: none; backdrop-filter: none; }
.wc-block-product > .kfav-host .kfav-heart:hover { background: none; color: var(--wp--preset--color--ink-100); }
.wc-block-product > .kfav-host .kfav-heart.is-on { color: var(--wp--preset--color--patina); }
.wc-block-product:has(> .kfav-host) > .taxonomy-product_cat { padding-inline: 34px; }

/* przyciski: karta zdjęcia i „Obserwuj” */
.kfav-pbtn, .kfav-follow-btn { display: inline-flex; align-items: center; gap: 7px; margin: 6px 0 4px; padding: 6px 12px 6px 10px; border: 1px solid var(--wp--preset--color--line-300); border-radius: 18px; background: transparent; color: var(--wp--preset--color--ink-300); font: 500 12px/1.3 var(--wp--preset--font-family--sans); letter-spacing: .04em; cursor: pointer; transition: border-color .15s, color .15s; touch-action: manipulation; }
.kfav-pbtn:hover, .kfav-follow-btn:hover { border-color: var(--wp--preset--color--patina); color: var(--wp--preset--color--ink-100); }
.kfav-pbtn.is-on, .kfav-follow-btn.is-on { border-color: var(--wp--preset--color--patina); color: var(--wp--preset--color--patina); }
.kfav-pbtn svg, .kfav-follow-btn svg { width: 15px; height: 15px; }
.kfav-on-txt { display: none; } .is-on .kfav-on-txt { display: inline; } .is-on .kfav-off-txt { display: none; }
.kfav-place { margin: 12px 0 22px; align-self: flex-start; justify-self: start; width: auto; max-width: 100%; }

/* nagłówek */
.kfav-hbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 4px; padding: 0; border: 0; background: none; color: var(--wp--preset--color--ink-100); cursor: pointer; }
.kfav-hbtn svg { width: 20px; height: 20px; }
.kfav-hbtn.has svg { color: var(--wp--preset--color--patina); }
.kfav-count { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--wp--preset--color--patina); color: var(--wp--preset--color--ground-900); font: 600 10px/16px var(--wp--preset--font-family--sans); font-style: normal; text-align: center; }
.kfav-panel { position: absolute; z-index: 100005; width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto; padding: 14px 16px 16px; border: 1px solid var(--wp--preset--color--line-300); background: var(--wp--preset--color--ground-800); color: var(--wp--preset--color--ink-300); font: 14px/1.5 var(--wp--preset--font-family--sans); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.kfav-panel[hidden] { display: none; }
.kfav-panel-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.kfav-panel-head b { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--ink-500); }
.kfav-panel-x { width: 30px; height: 30px; border: 0; background: none; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.kfav-panel-empty, .kfav-panel-load { margin: 0 0 6px; color: var(--wp--preset--color--ink-500); }
.kfav-panel-p { display: grid; gap: 8px; }
.kfav-panel-p a { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 6px; border: 1px solid transparent; color: var(--wp--preset--color--ink-100); text-decoration: none; }
.kfav-panel-p a:hover { border-color: var(--wp--preset--color--line-300); }
.kfav-panel-p span { grid-row: 1 / 3; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: var(--wp--preset--color--ground-700); }
.kfav-panel-p img { max-width: 48px; max-height: 48px; width: auto; height: auto; display: block; }
.kfav-panel-p b { font-weight: 400; font-size: 14px; line-height: 1.3; }
.kfav-panel-p em { font-style: normal; font-size: 12px; color: var(--wp--preset--color--patina); }
.kfav-panel-f { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--wp--preset--color--line-300); }
.kfav-panel-f span { flex: 0 0 100%; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--ink-500); }
.kfav-panel-f a, .kfav-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--wp--preset--color--line-300); border-radius: 14px; color: var(--wp--preset--color--ink-100); font-size: 13px; text-decoration: none; }
.kfav-panel-foot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--wp--preset--color--line-300); font-size: 13px; }
.kfav-panel-foot p { margin: 0; color: var(--wp--preset--color--ink-500); }
.kfav-panel-foot a { color: var(--wp--preset--color--patina); }

/* zachęta i pytanie o powiadomienia */
.kfav-toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 100006; display: flex; align-items: center; gap: 12px; width: min(560px, calc(100vw - 24px)); padding: 12px 12px 12px 16px; border: 1px solid var(--wp--preset--color--patina); background: var(--wp--preset--color--ground-800); color: var(--wp--preset--color--ink-100); font: 14px/1.45 var(--wp--preset--font-family--sans); box-shadow: 0 12px 30px rgba(0,0,0,.35); transform: translate(-50%, 20px); opacity: 0; transition: opacity .25s, transform .25s; }
.kfav-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.kfav-toast > span:first-child { flex: 1; }
.kfav-toast svg { width: 15px; height: 15px; margin: 0 8px -2px 0; fill: currentColor; color: var(--wp--preset--color--patina); }
.kfav-toast a { color: var(--wp--preset--color--patina); }
.kfav-toast > button { width: 30px; height: 30px; border: 0; background: none; color: inherit; font-size: 22px; cursor: pointer; flex: none; }
.kfav-toast-btns { display: flex; gap: 6px; flex: none; }
.kfav-toast-btns button { min-height: 34px; padding: 0 12px; border: 1px solid var(--wp--preset--color--patina); background: transparent; color: var(--wp--preset--color--patina); font: 500 12px var(--wp--preset--font-family--sans); cursor: pointer; }
.kfav-toast-btns .kfav-yes { background: var(--wp--preset--color--patina); color: var(--wp--preset--color--ground-900); }
@media (max-width: 600px) { .kfav-toast--ask { flex-wrap: wrap; } }

/* konto → Ulubione */
.kfav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.kfav-card { position: relative; }
.kfav-card a { display: flex; flex-direction: column; gap: 2px; color: var(--wp--preset--color--ink-100); text-decoration: none; }
.kfav-card-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; margin-bottom: 6px; background: var(--wp--preset--color--ground-700); }
.kfav-card-img img { max-width: 86%; max-height: 86%; width: auto; height: auto; display: block; }
.kfav-card b { font-weight: 400; font-size: 14px; line-height: 1.3; }
.kfav-card small { font-size: 12px; color: var(--wp--preset--color--ink-500); }
.kfav-card em { font-style: normal; font-size: 12.5px; color: var(--wp--preset--color--patina); }
.kfav-acc .kfav-x { border: 0; background: none; color: var(--wp--preset--color--ink-500); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.kfav-card .kfav-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--wp--preset--color--ground-900) 60%, transparent); color: #f3efe6; }
.kfav-follow { margin: 0 0 14px; }
.kfav-follow-lab { display: block; margin: 0 0 6px; font-size: 13px; color: var(--wp--preset--color--ink-500); }
.kfav-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kfav-chip a { color: inherit; text-decoration: none; }
.kfav-notify { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--wp--preset--color--line-300); font-size: 14px; cursor: pointer; }
.kfav-notify input { margin-top: 3px; accent-color: var(--wp--preset--color--patina); }
.kfav-share-url { display: block; width: 100%; margin-top: 12px; padding: 9px 12px; border: 1px solid var(--wp--preset--color--line-300); background: var(--wp--preset--color--ground-700); color: var(--wp--preset--color--ink-100); font: 13px var(--wp--preset--font-family--sans); }
.kfav-share-url[hidden] { display: none; }

/* lista udostępniona */
.kfav-shared { display: flex; align-items: center; gap: 10px; max-width: 1280px; margin: 18px auto 0 !important; padding: 12px 16px; border: 1px solid var(--wp--preset--color--patina); color: var(--wp--preset--color--ink-100); font: 15px var(--wp--preset--font-family--sans); }
.kfav-shared svg { fill: currentColor; color: var(--wp--preset--color--patina); }
.woocommerce-account .kfav-acc .kfav-card a, .woocommerce-account .kfav-acc .kfav-chip a { color: var(--wp--preset--color--ink-100) !important; }

/* karta zdjęcia: samo serduszko w prawym górnym rogu panelu zakupu */
.kfav-panel-host { position: relative; }
.kfav-panel-host > .kfav-pbtn { position: absolute; top: 14px; right: 14px; z-index: 2; justify-content: center; width: 42px; height: 42px; margin: 0; padding: 0; border-radius: 50%; }
.kfav-panel-host > .kfav-pbtn svg { width: 20px; height: 20px; }
.kfav-panel-host > .wp-block-post-terms:first-of-type { padding-right: 52px; }
@media (max-width: 782px) { .kfav-panel-host > .kfav-pbtn { top: 6px; right: 0; width: 40px; height: 40px; } }
