/* P4L Shop Connect */
:root {
	--p4l-ink: #17171c;
	--p4l-text: #3b3b45;
	--p4l-muted: #6b6b76;
	--p4l-line: #e6e6ec;
	--p4l-soft: #f6f6f9;
	--p4l-card: #ffffff;
	--p4l-pink: #faa4b8;
	--p4l-orange: #fdab33;
	--p4l-lime: #bed32c;
	--p4l-teal: #72ced4;
	--p4l-red: #f65653;
	--p4l-accent: #c2185b; /* readable pink for small text on white */
	--p4l-radius: 18px;
	--p4l-head: "KG Blank Space Solid", "Fredoka", ui-rounded, system-ui, sans-serif;
	--p4l-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--p4l-stripe: linear-gradient(90deg, var(--p4l-pink) 0 20%, var(--p4l-orange) 20% 40%, var(--p4l-lime) 40% 60%, var(--p4l-teal) 60% 80%, var(--p4l-red) 80% 100%);
}

.p4l-product, .p4l-product *, .p4l-drawer, .p4l-drawer *, .p4l-modal, .p4l-modal *, .p4l-pill { box-sizing: border-box; }

/* ---------- product box ---------- */

.p4l-product {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
	margin: 2.2em 0;
	padding: 26px;
	background: var(--p4l-card);
	border: 1px solid var(--p4l-line);
	border-radius: var(--p4l-radius);
	box-shadow: 0 1px 2px rgba(23, 23, 28, .04), 0 12px 32px rgba(23, 23, 28, .08);
	overflow: hidden;
	font-family: var(--p4l-body);
	color: var(--p4l-text);
}
.p4l-product::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 6px;
	background: var(--p4l-stripe);
}
.p4l-product__media {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	background: var(--p4l-soft);
	line-height: 0;
	transition: transform .2s ease;
}
.p4l-product__media:hover { transform: translateY(-2px); }
.p4l-product__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin: 0 !important;
}
.p4l-product__gallery { min-width: 0; }
.p4l-product__gallery { position: relative; }
.p4l-gal__btn { position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px; margin-top: -18px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 10px rgba(23, 23, 28, .18); color: #1f1f29; font-size: 26px; line-height: 34px; text-align: center; cursor: pointer; opacity: 0; transition: opacity .15s, transform .15s; }
.p4l-gal__btn--prev { left: 8px; }
.p4l-gal__btn--next { right: 8px; }
.p4l-product__gallery:hover .p4l-gal__btn, .p4l-gal__btn:focus-visible { opacity: 1; }
.p4l-gal__btn:hover { transform: scale(1.06); }
.p4l-gal__btn:focus-visible { outline: 2px solid #1f1f29; outline-offset: 2px; }
@media (hover: none) { .p4l-gal__btn { opacity: 1; } }
.p4l-gal__dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.p4l-gal__dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .75); box-shadow: 0 0 0 1px rgba(23, 23, 28, .25); transition: background .15s, transform .15s; }
.p4l-gal__dot.is-active { background: #1f1f29; transform: scale(1.15); box-shadow: 0 0 0 1px #fff; }
.p4l-product__body > * { margin: 0; }
.p4l-product__eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--p4l-accent);
	margin-bottom: 8px !important;
}
.p4l-product .p4l-product__title {
	font-family: var(--p4l-head);
	font-weight: 600;
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.15;
	letter-spacing: -.01em;
	color: var(--p4l-ink);
	margin: 0 0 10px !important;
}
.p4l-product__text {
	font-size: 16px;
	line-height: 1.5;
	color: var(--p4l-text);
	margin-bottom: 14px !important;
}
.p4l-product__price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 4px 0 16px !important;
}
.p4l-product__amount {
	font-size: 28px;
	font-weight: 800;
	color: var(--p4l-ink);
	letter-spacing: -.02em;
}
.p4l-product__compare { color: var(--p4l-muted); font-size: 16px; }
.p4l-product__trust {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	padding: 0 !important;
	margin: 14px 0 0 !important;
	font-size: 13px;
	color: var(--p4l-muted);
}
.p4l-product__trust li { margin: 0 !important; padding-left: 20px; position: relative; }
.p4l-product__trust li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	border-radius: 50%;
	background: #e8f6f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231f8a91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.p4l-product__bundle {
	margin-top: 16px !important;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fff4f7;
	font-size: 14px;
	line-height: 1.45;
	color: var(--p4l-text);
}
.p4l-product__bundle a { color: var(--p4l-accent); font-weight: 700; }

/* ---------- buttons ---------- */

.p4l-btn,
.p4l-btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	padding: 12px 22px;
	border-radius: 12px;
	border: 1.5px solid transparent;
	font: 700 16px/1.2 var(--p4l-body);
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.p4l-btn--primary,
.p4l-btn--primary:visited { background: var(--p4l-ink); color: #fff !important; width: 100%; }
.p4l-btn--primary:hover,
.p4l-btn--primary:focus-visible { background: #000; color: #fff !important; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(23, 23, 28, .18); }
.p4l-btn--ghost,
.p4l-btn--ghost:visited { background: transparent; color: var(--p4l-ink) !important; border-color: var(--p4l-line); }
.p4l-btn--ghost:hover { border-color: var(--p4l-ink); }
.p4l-btn--block { width: 100%; }
.p4l-btn:focus-visible,
.p4l-x:focus-visible,
.p4l-pill:focus-visible { outline: 3px solid var(--p4l-teal); outline-offset: 2px; }
.p4l-busy .p4l-product__add { opacity: .6; pointer-events: none; }

/* ---------- overlay, drawer, modal ---------- */

.p4l-lock { overflow: hidden; }
.p4l-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: rgba(23, 23, 28, .45);
	backdrop-filter: blur(2px);
}
.p4l-overlay[hidden], .p4l-drawer[hidden], .p4l-pill[hidden] { display: none !important; }

.p4l-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483001;
	display: flex;
	flex-direction: column;
	width: min(420px, 100vw);
	background: #fff;
	box-shadow: -12px 0 40px rgba(23, 23, 28, .18);
	font-family: var(--p4l-body);
	color: var(--p4l-text);
	transform: translateX(100%);
	transition: transform .25s ease;
}
.p4l-drawer.is-open { transform: none; }
.p4l-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px 14px;
	border-bottom: 1px solid var(--p4l-line);
	position: relative;
}
.p4l-drawer__head::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 5px;
	background: var(--p4l-stripe);
}
.p4l-drawer .p4l-drawer__title { font: 600 22px/1.2 var(--p4l-head); color: var(--p4l-ink); margin: 0; }
.p4l-drawer__note { margin: 14px 22px 0; padding: 10px 14px; border-radius: 10px; background: #eef9f3; color: #1d6b43; font-size: 14px; font-weight: 600; }
.p4l-drawer__empty { padding: 30px 22px; color: var(--p4l-muted); }

.p4l-x {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--p4l-line);
	background: #fff;
	color: var(--p4l-ink);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.p4l-x:hover { border-color: var(--p4l-ink); }

.p4l-mm { margin: 14px 22px 0; padding: 12px 14px; border: 1px solid var(--p4l-line); border-radius: 12px; }
.p4l-mm__text { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--p4l-ink); }
.p4l-mm__bar { height: 8px; border-radius: 99px; background: var(--p4l-soft); overflow: hidden; }
.p4l-mm__bar span { display: block; height: 100%; border-radius: 99px; background: var(--p4l-stripe); background-size: 420px 100%; transition: width .3s ease; }
.p4l-mm.is-done { border-color: #bfe6cf; background: #f2fbf6; }

.p4l-lines { list-style: none; margin: 8px 0 0; padding: 0 22px; overflow-y: auto; flex: 1; }
.p4l-line { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--p4l-line); margin: 0; }
.p4l-line__img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--p4l-soft); flex: none; margin: 0 !important; }
.p4l-line__info { flex: 1; min-width: 0; }
.p4l-line__info p { margin: 0; }
.p4l-line__title { font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--p4l-ink); }
.p4l-line__tag { display: inline-block; margin-top: 4px !important; padding: 1px 8px; border-radius: 99px; background: #fff4f7; color: var(--p4l-accent); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.p4l-line__price { font-size: 14px; color: var(--p4l-muted); margin-top: 2px !important; }
.p4l-line__remove { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--p4l-muted); font-size: 20px; cursor: pointer; }
.p4l-line__remove:hover { background: var(--p4l-soft); color: var(--p4l-ink); }

.p4l-drawer__foot { padding: 16px 22px 22px; border-top: 1px solid var(--p4l-line); display: grid; gap: 10px; }
.p4l-drawer__foot p { margin: 0; }
.p4l-subtotal { display: flex; justify-content: space-between; font-size: 16px; color: var(--p4l-ink); }
.p4l-subtotal strong { font-size: 18px; }
.p4l-drawer__fine { font-size: 13px; color: var(--p4l-muted); }

.p4l-modal {
	position: fixed;
	z-index: 2147483002;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(440px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px 26px 22px;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 24px 60px rgba(23, 23, 28, .28);
	text-align: center;
	font-family: var(--p4l-body);
	color: var(--p4l-text);
	animation: p4l-pop .2s ease;
}
.p4l-modal::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: 20px 20px 0 0; background: var(--p4l-stripe); }
.p4l-modal .p4l-x { position: absolute; top: 14px; right: 14px; }
.p4l-modal__img { display: block; width: 140px; height: 140px; margin: 0 auto 14px !important; border-radius: 14px; object-fit: cover; background: var(--p4l-soft); }
.p4l-modal p { margin: 0; }
.p4l-modal__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--p4l-accent); }
.p4l-modal .p4l-modal__title { font: 600 24px/1.2 var(--p4l-head); color: var(--p4l-ink); margin: 8px 0 10px; }
.p4l-modal__text { font-size: 15px; line-height: 1.5; }
.p4l-modal__price { margin: 14px 0 18px !important; display: flex; justify-content: center; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.p4l-modal__amount { font-size: 28px; font-weight: 800; color: var(--p4l-ink); }
.p4l-modal__price s { color: var(--p4l-muted); }
.p4l-modal__per { color: var(--p4l-muted); font-size: 14px; }
.p4l-modal__actions { display: grid; gap: 10px; }
.p4l-modal__link { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--p4l-muted); }
@keyframes p4l-pop { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* Floating cart, bottom left so it never covers the share and search buttons on the right. */
.p4l-pill {
	position: fixed;
	left: 16px;
	bottom: 90px;
	z-index: 2147482000;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px 10px 12px;
	border: 0;
	border-radius: 99px;
	background: var(--p4l-ink);
	color: #fff;
	font: 700 14px/1 var(--p4l-body);
	box-shadow: 0 10px 24px rgba(23, 23, 28, .25);
	cursor: pointer;
}
.p4l-pill__count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--p4l-pink); color: var(--p4l-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }

/* ---------- editor ---------- */

.p4l-empty { padding: 16px; border: 1px dashed #c3c4c7; border-radius: 8px; color: #50575e; }
.p4l-search__list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 280px; overflow: auto; }
.p4l-search__item { display: flex !important; gap: 10px; align-items: center; width: 100%; height: auto !important; text-align: left; padding: 6px !important; }
.p4l-search__item img { border-radius: 6px; object-fit: cover; }
.p4l-search__err { color: #b32d2e; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
	.p4l-product { grid-template-columns: 1fr; gap: 18px; padding: 22px 18px 20px; }
	.p4l-product__media { max-width: 320px; width: 100%; margin: 0 auto; }
	.p4l-product__gallery { max-width: 320px; width: 100%; margin: 0 auto; }
	.p4l-product__gallery .p4l-product__media { max-width: none; }
	.p4l-drawer { width: 100vw; }
	.p4l-pill { bottom: 100px; }
}

@media (prefers-reduced-motion: reduce) {
	.p4l-drawer, .p4l-btn, .p4l-product__media, .p4l-mm__bar span { transition: none; }
	.p4l-modal { animation: none; }
}
