/*
 * Shared components: headings, buttons, horizontal rails, product cards,
 * the "added to cart" toast. Used on home, category, favourites and more.
 */

/* ---------- Headings & links ---------- */
.pk-h2 {
	margin: 0;
	font-family: var(--pk-font-display);
	font-size: var(--pk-fs-xl);
	font-weight: 600;
	line-height: 1.2;
}
.pk-h3 {
	margin: 0;
	font-family: var(--pk-font-display);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
}
@media (min-width: 960px) {
	.pk-h2 { font-size: 28px; }
}

.pk-more,
.pk-link {
	font-size: 14px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Button variants ---------- */
.pk-btn--sm { min-height: 44px; padding: 0 18px; font-size: 14.5px; }
.pk-btn--soft { background: var(--pk-cream); color: var(--pk-ink); }
.pk-btn--outline { border: 1.5px solid var(--pk-line-2); background: var(--pk-white); color: var(--pk-ink); }
.pk-btn--wide { flex: 1.3; }
.pk-btn:hover { filter: brightness(1.08); }

.pk-card-box {
	border-radius: var(--pk-r-lg);
	background: var(--pk-white);
	padding: 20px;
}

/* ---------- Sections ---------- */
.pk-section { margin-top: 28px; }
.pk-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.pk-section__note { color: var(--pk-muted); font-size: 13px; }

/* Horizontal rail: swipe on phones, grid on desktop (set per rail). */
.pk-rail {
	display: flex;
	gap: 12px;
	padding-inline: var(--pk-gutter);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--pk-gutter);
	scrollbar-width: none;
}
.pk-rail::-webkit-scrollbar { display: none; }
.pk-rail > * { flex: 0 0 auto; scroll-snap-align: start; }

.pk-dots { display: flex; justify-content: center; gap: 6px; padding-top: 12px; }
.pk-dots span {
	width: 6px;
	height: 6px;
	border-radius: 3px;
	background: #D3D1C9;
	transition: width .2s var(--pk-ease), background .2s;
}
.pk-dots span.is-on { width: 18px; background: var(--pk-navy); }

/* ---------- Product card ---------- */
.pk-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pk-card--row { width: 156px; }

.pk-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	border-radius: var(--pk-r-md);
	background: var(--pk-white);
}
.pk-card__img { display: flex; width: 72%; }
.pk-card__img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.pk-card.is-out .pk-card__img img { opacity: .45; }

.pk-card__name {
	display: -webkit-box;
	overflow: hidden;
	min-height: 2.7em;
	font-size: var(--pk-fs-sm);
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.pk-card__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.pk-card__price { font-size: var(--pk-fs-md); font-weight: 600; }
.pk-card__price del { color: var(--pk-muted); font-weight: 400; font-size: .85em; }
.pk-card__price ins { text-decoration: none; }

.pk-tag {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	display: flex;
	align-items: center;
	height: 24px;
	padding: 0 10px;
	border-radius: 12px;
	font-size: 11.5px;
	font-weight: 600;
}
.pk-tag--deal { background: var(--pk-deal); color: var(--pk-navy); }
.pk-tag--season { background: var(--pk-tag-season-bg); color: var(--pk-tag-season-ink); }
.pk-tag--out { background: var(--pk-tag-out-bg); color: var(--pk-tag-out-ink); }
.pk-tag--new { border: 1px solid var(--pk-line-2); background: var(--pk-white); color: var(--pk-ink); }
.pk-tag--stock { background: var(--pk-tag-stock-bg); color: var(--pk-tag-stock-ink); }

.pk-fav {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 18px;
	background: var(--pk-cream);
	color: var(--pk-navy);
}
.pk-fav[aria-pressed="true"] { color: var(--pk-cherry); }
.pk-fav[aria-pressed="true"] .pk-icon path { fill: currentColor; }

/* + button → stepper */
.pk-qty__add,
.pk-qty__stepper,
.pk-choose {
	position: absolute;
	bottom: 10px;
	inset-inline-start: 10px;
}
.pk-qty__add {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: var(--pk-navy);
	color: var(--pk-white);
}
.pk-qty__stepper {
	inset-inline-end: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 40px;
	padding: 0 2px;
	border-radius: 20px;
	background: var(--pk-navy);
	color: var(--pk-white);
}
.pk-qty__stepper button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--pk-white);
}
.pk-qty__n { font-size: 14px; font-weight: 600; }
.pk-qty.is-busy { opacity: .7; pointer-events: none; }
.pk-choose {
	display: flex;
	align-items: center;
	height: 36px;
	padding: 0 14px;
	border-radius: 18px;
	background: var(--pk-navy);
	color: var(--pk-white);
	font-size: 13px;
	font-weight: 500;
}

/* ---------- Toast "נוסף לסל" ---------- */
.pk-toast {
	position: fixed;
	inset-inline: 16px;
	bottom: calc(24px + env(safe-area-inset-bottom));
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 420px;
	min-height: 60px;
	margin-inline: auto;
	padding: 10px 10px 10px 14px;
	border-radius: 20px;
	background: var(--pk-navy);
	color: var(--pk-white);
	box-shadow: 0 12px 30px -12px rgba(30, 35, 54, 0.55);
	animation: pk-toast 2.6s ease forwards;
}
.pk-toast__check {
	display: flex;
	flex: 0 0 32px;
	align-items: center;
	justify-content: center;
	height: 32px;
	border-radius: 16px;
	background: var(--pk-success);
	color: var(--pk-navy);
}
.pk-toast__text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pk-toast__title { font-size: 14.5px; font-weight: 600; }
.pk-toast__name { overflow: hidden; color: #C9CCD8; font-size: var(--pk-fs-xs); white-space: nowrap; text-overflow: ellipsis; }
.pk-toast__cta {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	height: 40px;
	padding: 0 16px;
	border-radius: 20px;
	background: var(--pk-white);
	color: var(--pk-navy);
	font-size: 14px;
	font-weight: 500;
}
@keyframes pk-toast {
	0% { opacity: 0; transform: translateY(14px); }
	10% { opacity: 1; transform: none; }
	85% { opacity: 1; }
	100% { opacity: 0; visibility: hidden; }
}

/* ---------- Pills (toolbar buttons) ---------- */
.pk-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 14px;
	border: 1.5px solid var(--pk-line-2);
	border-radius: 20px;
	background: var(--pk-white);
	color: var(--pk-ink);
	font-size: 14px;
	font-weight: 500;
}
.pk-pill.is-active, .pk-pill[aria-expanded="true"] { border-color: var(--pk-navy); }
.pk-pill__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--pk-navy);
	color: var(--pk-white);
	font-size: 11.5px;
	font-weight: 600;
}
.pk-clear {
	display: inline-flex;
	align-items: center;
	height: 40px;
	padding: 0 4px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.pk-iconbtn--chip { background: var(--pk-chip); }
.pk-btn--block { width: 100%; min-height: 56px; border-radius: 18px; font-size: var(--pk-fs-md); }

/* ---------- Bottom sheet ---------- */
.pk-sheet { position: fixed; inset: 0; z-index: 60; }
.pk-sheet__scrim {
	position: absolute;
	inset: 0;
	background: rgba(30, 35, 54, 0.55);
	opacity: 0;
	transition: opacity .25s var(--pk-ease);
}
.pk-sheet__panel {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	max-height: 86%;
	border-radius: var(--pk-r-lg) var(--pk-r-lg) 0 0;
	background: var(--pk-white);
	transform: translateY(100%);
	transition: transform .28s var(--pk-ease);
}
.pk-sheet__panel--tall { top: 76px; max-height: none; }
.pk-sheet.is-open .pk-sheet__scrim { opacity: 1; }
.pk-sheet.is-open .pk-sheet__panel { transform: none; }
.pk-sheet__grip {
	display: block;
	width: 40px;
	height: 5px;
	margin: 10px auto 0;
	border-radius: 3px;
	background: #D9D7D0;
}
.pk-sheet__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 20px 16px; }
.pk-sheet__foot {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
	border-top: 1px solid #EEECE6;
	background: var(--pk-white);
	box-shadow: var(--pk-shadow-sheet);
}
@media (min-width: 960px) {
	.pk-sheet__panel {
		inset-inline: auto;
		left: 50%;
		bottom: auto;
		top: 50%;
		width: 520px;
		max-height: 80vh;
		border-radius: var(--pk-r-lg);
		transform: translate(-50%, -46%);
		opacity: 0;
		transition: transform .2s var(--pk-ease), opacity .2s;
	}
	.pk-sheet.is-open .pk-sheet__panel { transform: translate(-50%, -50%); opacity: 1; }
	.pk-sheet__grip { display: none; }
}

/* Quantity stepper (sheet / product page) */
.pk-stepper {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	height: 56px;
	padding: 0 4px;
	border-radius: 28px;
	background: var(--pk-cream);
}
.pk-stepper button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
}
.pk-stepper__n { min-width: 26px; font-size: 18px; font-weight: 600; text-align: center; }

/* Big "הוספה לסל" button → pastel green "נוסף לסל ✓" */
.pk-addbtn {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	height: 56px;
	padding: 0 20px;
	border: 0;
	border-radius: 28px;
	background: var(--pk-navy);
	color: var(--pk-white);
	font-size: var(--pk-fs-md);
	font-weight: 500;
}
.pk-addbtn:disabled { background: #ECEAE4; color: var(--pk-ink-2); cursor: not-allowed; }
.pk-addbtn__total { font-weight: 600; }
.pk-addbtn--done {
	justify-content: center;
	background: var(--pk-success);
	color: var(--pk-navy);
	font-weight: 600;
}
.pk-pop { animation: pk-pop .35s ease-out; }
@keyframes pk-pop {
	0% { transform: scale(.96); }
	50% { transform: scale(1.03); }
	100% { transform: scale(1); }
}

/* Quick add */
.pk-quick__head { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.pk-quick__img {
	display: flex;
	flex: 0 0 96px;
	align-items: center;
	justify-content: center;
	height: 96px;
	border: 1px solid var(--pk-line);
	border-radius: 20px;
}
.pk-quick__img img { width: 72px; height: 72px; object-fit: contain; }
.pk-quick__info { flex: 1; min-width: 0; }
.pk-quick__head .pk-iconbtn { align-self: flex-start; }
.pk-quick__title { margin: 0; font-size: var(--pk-fs-md); font-weight: 600; line-height: 1.35; }
.pk-quick__price { margin-top: 6px; font-size: 18px; font-weight: 600; }
.pk-quick__label { margin: 22px 0 10px; font-size: 14px; font-weight: 600; }
.pk-quick__label span { font-weight: 400; }
.pk-quick__hint { margin: 12px 0 0; color: var(--pk-muted); font-size: var(--pk-fs-sm); }
.pk-quick__full { display: block; margin-top: 20px; text-align: center; }
.pk-optlist { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-opt {
	display: flex;
	align-items: center;
	height: 44px;
	padding: 0 16px;
	border: 1.5px solid var(--pk-line-2);
	border-radius: 22px;
	background: var(--pk-white);
	color: var(--pk-ink);
	font-size: 14px;
}
.pk-opt[aria-pressed="true"] { border: 2px solid var(--pk-navy); font-weight: 600; }
.pk-opt:disabled { color: #9A9DA8; text-decoration: line-through; }

/* ---------- Form fields ---------- */
.pk-field__label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 500; }
.pk-input {
	width: 100%;
	height: 54px;
	padding: 0 16px;
	border: 1.5px solid var(--pk-line-2);
	border-radius: var(--pk-r-sm);
	background: var(--pk-white);
	color: var(--pk-ink);
	font: inherit;
	font-size: var(--pk-fs-md);
}
.pk-input:focus-visible { border-color: var(--pk-navy); outline: 2.5px solid var(--pk-navy); outline-offset: 1px; }
.pk-input--ltr { direction: ltr; text-align: right; }
.pk-input--ltr::placeholder { text-align: right; }
/* Honeypot: hidden from people, filled in by bots */
.pk-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pk-btn--line { border: 1.5px solid var(--pk-navy); background: transparent; color: var(--pk-ink); }
.pk-btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.pk-field__req { color: var(--pk-danger); }
.pk-field__opt { color: var(--pk-muted); font-weight: 400; }
.pk-field__hint { margin: 6px 0 0; color: var(--pk-muted); font-size: 13px; }
.pk-field__err { margin: 6px 0 0; color: var(--pk-danger); font-size: 13px; font-weight: 500; }
.pk-input[aria-invalid="true"] { border-color: var(--pk-danger); }
.pk-input--area { height: auto; padding-block: 14px; line-height: 1.5; resize: vertical; }
.pk-input--big { height: 64px; font-size: 22px; letter-spacing: .04em; border-color: var(--pk-navy); }
.pk-codeinput {
	height: 68px;
	border-color: var(--pk-navy);
	font-size: 30px;
	letter-spacing: .5em;
	text-align: center;
	direction: ltr;
}

/* "Log in to keep it" box (cart, favourites) */
.pk-cart__save { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 16px; border-radius: var(--pk-r-md); background: var(--pk-sky-soft); }
.pk-cart__save div { flex: 1; }
.pk-cart__save p { margin: 3px 0 0; color: #34405F; font-size: var(--pk-fs-sm); line-height: 1.45; }
.pk-cart__save .pk-cart__save-title { margin: 0; color: var(--pk-ink); font-size: var(--pk-fs-base); font-weight: 600; }
.pk-cart__save .pk-btn { flex: 0 0 auto; }


/* "צרו קשר" card (home page, information pages) */
.pk-contact { margin-top: 32px; padding: 24px 20px 20px; border-radius: var(--pk-r-xl); }
.pk-contact .pk-h2 { font-size: 26px; }
.pk-contact__lead { margin: 6px 0 0; color: #3A3E4E; font-size: var(--pk-fs-base); line-height: 1.55; }
.pk-contact__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 18px;
}
.pk-contact__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 14px;
	border-radius: 20px;
	background: var(--pk-cream);
}
.pk-contact__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 2px;
	border-radius: 18px;
}
.pk-contact__label { color: var(--pk-muted); font-size: var(--pk-fs-xs); }
.pk-contact__value { font-size: 15.5px; font-weight: 600; line-height: 1.35; text-align: start; }
.pk-contact__value[dir="ltr"] { text-align: end; unicode-bidi: isolate; }
.pk-contact__actions { display: flex; gap: 10px; margin-top: 14px; }
.pk-contact__actions .pk-btn { flex: 1; min-height: 52px; }
.pk-contact__actions .pk-btn--wide { flex: 1.3; }
@media (min-width: 960px) {
	.pk-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-rows: auto auto 1fr; gap: 8px 40px; margin-top: 48px; padding: 36px 40px; }
	.pk-contact .pk-h2, .pk-contact__lead, .pk-contact__actions { grid-column: 1; }
	.pk-contact__grid { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
	.pk-contact__actions { align-self: end; }
}

/* ---------- Search window ---------- */
.pk-searchui__panel { inset: 0; max-height: none; border-radius: 0; background: var(--pk-cream); }
.pk-searchui__bar { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 14px 20px 0; }
.pk-searchui__back { order: -1; display: flex; flex: 0 0 44px; align-items: center; justify-content: center; height: 44px; padding: 0; border: 0; border-radius: 14px; background: var(--pk-white); color: var(--pk-ink); }
.pk-searchui__field { display: flex; flex: 1; align-items: center; gap: 8px; height: 52px; padding: 0 14px; border: 1.5px solid var(--pk-navy); border-radius: 16px; background: var(--pk-cream); }
.pk-searchui__field input { flex: 1; min-width: 0; height: 44px; border: 0; outline: none; background: transparent; color: var(--pk-ink); font: inherit; font-size: var(--pk-fs-md); }
.pk-searchui__field input::-webkit-search-cancel-button { display: none; }
.pk-searchui__field:focus-within { box-shadow: 0 0 0 1.5px var(--pk-navy); }
.pk-searchui__clear { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 16px; background: var(--pk-white); color: var(--pk-ink); }
.pk-searchui__clear[hidden] { display: none; }
.pk-searchui__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 20px 32px; }
.pk-searchui__h { margin: 24px 0 12px; color: #5B5B66; font-size: 13px; font-weight: 600; }
.pk-searchui__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-searchui__chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 20px; background: var(--pk-white); color: var(--pk-ink); font: inherit; font-size: 14px; cursor: pointer; }
.pk-searchui__chip--line { border: 1.5px solid var(--pk-line-2); }
.pk-searchui__sug { margin-top: 8px; padding: 6px; border-radius: 20px; background: var(--pk-white); box-shadow: 0 10px 28px rgba(30, 35, 54, .1); }
.pk-searchui__sugitem { display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 12px; border: 0; border-radius: 14px; background: transparent; color: var(--pk-ink); font: inherit; font-size: var(--pk-fs-base); text-align: start; cursor: pointer; }
.pk-searchui__sugitem:hover, .pk-searchui__sugitem:focus-visible { background: var(--pk-cream); }
.pk-searchui__sugicon { display: flex; color: #8A8D9A; }
.pk-searchui__sugtext { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pk-searchui__sugtext b { font-weight: 700; }
.pk-searchui__sugkind { color: #6E7180; font-size: 12.5px; }
.pk-searchui__cats, .pk-searchui__products { margin: 0; padding: 0; list-style: none; }
.pk-searchui__cat { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-bottom: 1px solid #EEECE6; }
.pk-searchui__cat > span { display: flex; flex-direction: column; }
.pk-searchui__catname { font-size: var(--pk-fs-base); font-weight: 500; }
.pk-searchui__catpath { color: #5B5B66; font-size: 12.5px; }
.pk-searchui__products { display: flex; flex-direction: column; gap: 10px; }
.pk-searchui__product { display: flex; align-items: center; gap: 12px; }
.pk-searchui__pimg { display: flex; flex: 0 0 72px; align-items: center; justify-content: center; height: 72px; border-radius: 18px; background: var(--pk-white); }
.pk-searchui__pimg img { width: 54px; height: 54px; object-fit: contain; }
.pk-searchui__pinfo { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.pk-searchui__pname { font-size: 14px; line-height: 1.35; }
.pk-searchui__pprice { font-size: var(--pk-fs-md); font-weight: 600; }
.pk-searchui__padd { display: flex; flex: 0 0 44px; align-items: center; justify-content: center; height: 44px; padding: 0; border: 0; border-radius: 22px; background: var(--pk-navy); color: var(--pk-white); cursor: pointer; }
.pk-searchui__padd.is-done { background: var(--pk-success); color: var(--pk-navy); }
.pk-searchui__all { margin-top: 18px; border-radius: 16px; }
.pk-searchui__none { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 28px; padding: 24px 20px; border-radius: 24px; background: var(--pk-white); }
.pk-searchui__none[hidden] { display: none; }
.pk-searchui__none h2 { margin: 0; font-family: var(--pk-font-display); font-size: 20px; font-weight: 600; }
.pk-searchui__none p { margin: 0; color: #45454F; font-size: 14.5px; line-height: 1.5; }
@media (min-width: 960px) {
	.pk-searchui__panel {
		inset: auto;
		left: 50%;
		top: 24px;
		width: 680px;
		max-height: calc(100vh - 48px);
		border-radius: var(--pk-r-lg);
		transform: translate(-50%, -8px);
	}
	.pk-sheet.is-open .pk-searchui__panel { transform: translate(-50%, 0); }
	.pk-searchui__bar { padding: 18px 24px 0; }
	.pk-searchui__body { padding: 0 24px 28px; }
}
