/* Astral Masala - skroty sklepu.
 * Telefon (<=1024 px): dolny pasek jak w aplikacji.
 * Komputer: "ULUBIONE" obok "KOSZYK" w naglowku, lista ulubionych wysuwana z prawej.
 * Wszedzie: serduszka na zdjeciach produktow i na karcie produktu. */

/* --- serduszko --- */
.woocommerce-loop-image-link { position: relative; display: block; }
.amdp-heart {
	position: absolute; top: 10px; right: 10px; z-index: 5;
	width: 38px; height: 38px; padding: 0; margin: 0; border: 0; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, .92) !important; color: #3d3d3d; box-shadow: 0 1px 6px rgba(0, 0, 0, .12); cursor: pointer;
	transition: transform .15s;
}
.amdp-heart:hover, .amdp-heart:focus { background: #fff !important; color: #c07e33; transform: scale(1.08); }
.amdp-heart svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.amdp-heart.is-on { color: #c07e33; }
.amdp-heart.is-on svg { fill: #c07e33; }
.amdp-heart--single {
	position: static; display: inline-flex; width: auto; height: auto; padding: 8px 16px; gap: 8px; margin: 4px 0 14px;
	border-radius: 20px; border: 1px solid #ede4d8; box-shadow: none !important; background: #fff !important;
	font: 500 13px Montserrat, sans-serif; transform: none !important;
}

/* --- ULUBIONE w naglowku komputera (wyglada jak KOSZYK motywu) --- */
.amdp-top {
	display: inline-flex; align-items: center; gap: 6px; margin-right: 22px; padding: 0; border: 0;
	background: none !important; box-shadow: none !important; cursor: pointer;
	color: #c07e33; font: 600 15px Montserrat, sans-serif; text-transform: uppercase; letter-spacing: .01em;
}
.amdp-top:hover, .amdp-top:focus { color: #c07e33; opacity: .8; }
.amdp-top svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.amdp-top .amdp__badge { position: static; }

.amdp__badge {
	display: inline-block; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
	background: #c07e33; color: #fff; font: 600 10px/17px Montserrat, sans-serif; text-align: center;
}
.amdp-top .amdp__badge { min-width: 26px; height: 26px; border-radius: 13px; font-size: 13px; line-height: 26px; font-weight: 400; }
.amdp__badge[data-n="0"] { display: none; }

/* --- lista Ulubione: telefon = arkusz od dolu, komputer = panel z prawej --- */
.amdp-sheet { position: fixed; inset: 0; z-index: 99995; visibility: hidden; pointer-events: none; }
.amdp-sheet.is-open { visibility: visible; pointer-events: auto; }
.amdp-sheet__bg { position: absolute; inset: 0; background: rgba(31, 41, 51, .45); opacity: 0; transition: opacity .25s; }
.amdp-sheet.is-open .amdp-sheet__bg { opacity: 1; }
.amdp-sheet__panel {
	position: absolute; overflow: auto; background: #fff;
	font-family: Montserrat, sans-serif; color: #1f2933; transition: transform .3s ease;
}
.amdp-sheet.is-open .amdp-sheet__panel { transform: none; }
.amdp-sheet__grip { width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: #e2d6c6; }
.amdp-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.amdp-sheet__head h3 { margin: 0; font: 700 18px Montserrat, sans-serif; color: #1f2933; }
.amdp-sheet__x { border: 0; background: none !important; box-shadow: none !important; padding: 6px; color: #3d3d3d; font-size: 26px; line-height: 1; cursor: pointer; }
.amdp-sheet__empty { padding: 26px 0 10px; text-align: center; color: #7b8794; font-size: 14px; line-height: 1.5; }
.amdp-sheet__empty a { color: #c07e33; font-weight: 600; }
.amdp-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1ebe3; }
.amdp-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.amdp-item a { flex: 1; color: #1f2933; text-decoration: none; font-size: 14px; line-height: 1.35; }
.amdp-item a:hover { color: #c07e33; }
.amdp-item a b { display: block; margin-top: 3px; color: #c07e33; font-weight: 600; }
.amdp-item button { border: 0; background: none !important; box-shadow: none !important; color: #7b8794; padding: 8px; font-size: 18px; cursor: pointer; }

/* --- dolny pasek: tylko telefon i tablet --- */
.amdp { display: none; }

@media (max-width: 1024px) {
	body.amdp-on { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

	.amdp {
		display: flex;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid #ede4d8;
		box-shadow: 0 -4px 18px rgba(31, 41, 51, .06);
		font-family: Montserrat, sans-serif;
	}
	.amdp__btn {
		flex: 1 1 0; position: relative;
		display: flex; flex-direction: column; align-items: center; gap: 3px;
		padding: 4px 0; margin: 0; border: 0; background: none; box-shadow: none;
		color: #3d3d3d; font: 500 11px/1.2 Montserrat, sans-serif; letter-spacing: .01em;
		text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
	}
	.amdp__btn:hover, .amdp__btn:focus { background: none !important; color: #3d3d3d; outline: 0; }
	.amdp__btn:focus-visible { outline: 2px solid #c07e33; outline-offset: -2px; border-radius: 8px; }
	.amdp__btn svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
	.amdp__btn.is-active, .amdp__btn.is-active:focus { color: #c07e33; }
	.amdp__btn.is-active::before {
		content: ""; position: absolute; top: -6px; left: 30%; right: 30%;
		height: 2px; border-radius: 2px; background: #c07e33;
	}
	.amdp__btn .amdp__badge { position: absolute; top: 0; left: calc(50% + 6px); }

	/* Kadence "do gory" i baner zgod nie moga siedziec pod paskiem */
	body.amdp-on #kt-scroll-up, body.amdp-on .scroll-up-wrap { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
	body.amdp-on .cmplz-cookiebanner { margin-bottom: calc(64px + env(safe-area-inset-bottom)) !important; }

	.amdp-heart { top: 8px; right: 8px; width: 36px; height: 36px; }

	.amdp-sheet__panel {
		left: 0; right: 0; bottom: 0; max-height: 78vh;
		padding: 10px 18px calc(84px + env(safe-area-inset-bottom));
		border-radius: 18px 18px 0 0; transform: translateY(100%);
	}
}

@media (min-width: 1025px) {
	.amdp-sheet__panel {
		top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw;
		padding: 28px 28px 40px; box-shadow: -8px 0 30px rgba(31, 41, 51, .12);
		transform: translateX(100%);
	}
	.amdp-sheet__grip { display: none; }
	.amdp-sheet__head { margin-bottom: 16px; }
	.amdp-sheet__head h3 { font-size: 22px; }
	.amdp-item img { width: 76px; height: 76px; }
}
