/*
 * PlaceKids – base styles and the shared site shell (header, drawer, footer).
 * Page-specific styles (home, category, product, cart) are added in later steps.
 * Written with logical properties (inline-start/end) so RTL is native.
 */

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--pk-cream);
	color: var(--pk-ink);
	font-family: var(--pk-font);
	font-size: var(--pk-fs-base);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

body.pk-lock { overflow: hidden; }

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
	outline: 2.5px solid var(--pk-navy);
	outline-offset: 2px;
	border-radius: 6px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.pk-skip {
	position: absolute;
	inset-inline-start: 12px;
	top: -60px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: var(--pk-r-pill);
	background: var(--pk-navy);
	color: var(--pk-white);
}
.pk-skip:focus { top: 12px; }

.pk-wrap {
	width: 100%;
	max-width: var(--pk-wrap);
	margin-inline: auto;
	padding-inline: var(--pk-gutter);
}

.pk-main { min-height: 50vh; }
.pk-main:focus { outline: none; }

.pk-h1 {
	margin: 0 0 12px;
	font-family: var(--pk-font-display);
	font-weight: 600;
	font-size: var(--pk-fs-h1);
	line-height: 1.12;
}

.pk-page { padding-block: 20px 48px; }
.pk-prose { max-width: 720px; font-size: var(--pk-fs-md); line-height: 1.65; }

.pk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	padding: 0 24px;
	border: 0;
	border-radius: var(--pk-r-pill);
	background: var(--pk-navy);
	color: var(--pk-white);
	font-size: var(--pk-fs-base);
	font-weight: 500;
}

.pk-only-desktop, .pk-only-desktop-block { display: none !important; }
@media (min-width: 960px) {
	.pk-only-desktop { display: flex !important; }
	.pk-only-desktop-block { display: block !important; }
	.pk-only-mobile, .pk-only-mobile-block { display: none !important; }
}

/* ---------- Header ---------- */
.pk-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: var(--pk-cream);
}

.admin-bar .pk-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .pk-header { top: 32px; } }

.pk-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: var(--pk-header-h);
	padding-inline: 10px;
}

.pk-header__group { display: flex; align-items: center; gap: 4px; }

.pk-logo { display: flex; }
.pk-header .pk-logo {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}
.pk-logo .pk-logo__img { height: 27px; width: auto; }
.pk-logo--small .pk-logo__img { height: 26px; }

.pk-iconbtn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: var(--pk-tap);
	height: var(--pk-tap);
	padding: 0;
	border: 0;
	border-radius: var(--pk-r-pill);
	background: transparent;
	color: var(--pk-navy);
}
.pk-iconbtn--soft { background: var(--pk-cream); }

.pk-textbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: var(--pk-tap);
	padding: 0 12px;
	border-radius: var(--pk-r-pill);
	font-size: var(--pk-fs-sm);
	font-weight: 500;
}
.pk-textbtn:hover, .pk-iconbtn:hover { background: rgba(30, 35, 54, 0.06); }

.pk-badge {
	position: absolute;
	top: 5px;
	inset-inline-end: 3px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--pk-navy);
	color: var(--pk-white);
	font-size: 10.5px;
	font-weight: 500;
	line-height: 17px;
	text-align: center;
	box-shadow: 0 0 0 2px var(--pk-cream);
}
.pk-badge[hidden] { display: none; }
.pk-badge.is-bump {
	background: var(--pk-success);
	color: var(--pk-navy);
	animation: pk-bump .55s ease-out;
}
@keyframes pk-bump {
	0% { transform: scale(1); }
	35% { transform: scale(1.6); }
	100% { transform: scale(1); }
}

/* Search field (desktop header and drawer) */
.pk-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding: 0 16px;
	border: 1.5px solid var(--pk-line-2);
	border-radius: var(--pk-r-pill);
	background: var(--pk-white);
	color: var(--pk-muted);
}
.pk-search--soft { display: flex; border-color: transparent; background: var(--pk-cream); }
.pk-search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	background: transparent;
	color: var(--pk-ink);
	font-size: var(--pk-fs-md); /* 16px: no zoom-in on iOS */
	outline: none;
}
.pk-search input::placeholder { color: var(--pk-muted); }
.pk-search:focus-within { border-color: var(--pk-navy); }

@media (min-width: 960px) {
	.pk-header__bar { padding-inline: var(--pk-gutter); gap: 24px; }
	.pk-header .pk-logo { position: static; transform: none; }
	.pk-logo .pk-logo__img { height: 34px; }
	.pk-search { flex: 1; max-width: 560px; }
	.pk-cartbtn { padding: 0 14px; background: var(--pk-navy); color: var(--pk-white); }
	.pk-cartbtn:hover { background: #2B3150; }
	.pk-cartbtn .pk-badge {
		position: static;
		background: var(--pk-white);
		color: var(--pk-navy);
		box-shadow: none;
	}
}

/* Desktop category bar + dropdown */
.pk-catbar { border-block: 1px solid var(--pk-line); background: var(--pk-cream); }
.pk-catmenu--bar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	min-height: 52px;
	align-items: center;
}
.pk-catmenu--bar > li { position: relative; }
.pk-catmenu--bar > li > a {
	display: flex;
	align-items: center;
	height: 40px;
	padding: 0 14px;
	border-radius: var(--pk-r-pill);
	font-size: var(--pk-fs-base);
	font-weight: 500;
}
.pk-catmenu--bar > li > a:hover,
.pk-catmenu--bar > li:focus-within > a { background: var(--pk-white); }
.pk-catmenu--bar .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	z-index: 20;
	display: none;
	min-width: 260px;
	padding: 10px;
	border-radius: var(--pk-r-md);
	background: var(--pk-white);
	box-shadow: 0 18px 40px -18px rgba(30, 35, 54, 0.35);
}
.pk-catmenu--bar > li:hover > .sub-menu,
.pk-catmenu--bar > li:focus-within > .sub-menu { display: block; }
.pk-catmenu--bar .sub-menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: var(--pk-fs-sm);
}
.pk-catmenu--bar .sub-menu a:hover { background: var(--pk-cream); }
.pk-catmenu--bar .sub-menu .sub-menu { display: none; }

/* ---------- Drawer (mobile menu) ---------- */
.pk-drawer {
	position: fixed;
	inset: 0;
	z-index: 50;
}
.pk-drawer[hidden] { display: none; }
.pk-drawer__scrim {
	position: absolute;
	inset: 0;
	background: rgba(30, 35, 54, 0.55);
	opacity: 0;
	transition: opacity .25s var(--pk-ease);
}
.pk-drawer__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	inset-inline-start: 0;
	display: flex;
	flex-direction: column;
	width: min(340px, 88vw);
	background: var(--pk-white);
	transform: translateX(100%);
	transition: transform .28s var(--pk-ease);
}
[dir="ltr"] .pk-drawer__panel { transform: translateX(-100%); }
.pk-drawer.is-open .pk-drawer__scrim { opacity: 1; }
.pk-drawer.is-open .pk-drawer__panel { transform: none; }

.pk-drawer__head {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	padding: 0 18px 0 12px;
	border-bottom: 1px solid var(--pk-line);
}
.pk-drawer__body {
	position: relative;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 20px 28px;
}
.pk-drawer__label {
	margin: 18px 0 8px;
	color: var(--pk-muted);
	font-size: var(--pk-fs-xs);
	font-weight: 600;
}

.pk-now { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-chip {
	display: inline-flex;
	align-items: center;
	height: 40px;
	padding: 0 16px;
	border-radius: var(--pk-r-pill);
	font-size: 14.5px;
	font-weight: 600;
}
.pk-chip--season-1 { background: var(--pk-blue); }
.pk-chip--season-2 { background: var(--pk-pink); }
.pk-chip--season-3 { background: var(--pk-yellow); }
.pk-chip--season-4 { background: var(--pk-lavender-soft); }

.pk-catmenu--drawer > li > a,
.pk-catmenu--drawer > li > .pk-sub-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 50px;
	padding: 0;
	border: 0;
	border-bottom: 1px solid #F0EEE8;
	background: transparent;
	font-size: 15.5px;
	text-align: start;
}
.pk-catmenu--drawer > li > a::before,
.pk-catmenu--drawer > li > .pk-sub-toggle::before {
	content: "";
	flex: 0 0 12px;
	height: 12px;
	border-radius: 6px;
	background: var(--pk-dot, var(--pk-blue));
}
.pk-catmenu--drawer .pk-sub-toggle .pk-icon { margin-inline-start: auto; color: var(--pk-muted); }
.pk-dot-1 { --pk-dot: var(--pk-yellow); }
.pk-dot-2 { --pk-dot: var(--pk-pink); }
.pk-dot-3 { --pk-dot: #B8AEEB; }
.pk-dot-4 { --pk-dot: var(--pk-blue); }
.pk-dot-5 { --pk-dot: #E2C38F; }
.pk-dot-6 { --pk-dot: #B9C98A; }

/* Sub-category panel slides over the drawer body */
.pk-catmenu--drawer .sub-menu { display: none; }
.pk-subpanel {
	position: absolute;
	inset: 0;
	z-index: 2;
	overflow-y: auto;
	padding: 12px 20px 28px;
	background: var(--pk-white);
}
.pk-subpanel[hidden] { display: none; }
.pk-subpanel__back {
	display: flex;
	align-items: center;
	gap: 6px;
	height: var(--pk-tap);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--pk-muted);
	font-size: var(--pk-fs-sm);
	font-weight: 500;
}
.pk-subpanel__title {
	margin: 4px 0 8px;
	font-family: var(--pk-font-display);
	font-size: var(--pk-fs-xl);
	font-weight: 600;
}
.pk-subpanel a {
	display: flex;
	align-items: center;
	min-height: 50px;
	border-bottom: 1px solid #F0EEE8;
	font-size: 15.5px;
}
.pk-subpanel .pk-subpanel__all { font-weight: 600; }

.pk-drawer__links { margin-top: 8px; }
.pk-drawer__links a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 50px;
	font-size: 15.5px;
}

.pk-wa-card {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: 20px;
	background: var(--pk-whatsapp-soft);
}
.pk-wa-card__icon {
	display: flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	height: 40px;
	border-radius: 20px;
	background: var(--pk-whatsapp);
	color: var(--pk-white);
}
.pk-wa-card__text { display: flex; flex-direction: column; }
.pk-wa-card__text strong { color: var(--pk-success-ink); font-size: var(--pk-fs-base); font-weight: 600; }
.pk-wa-card__text > span { color: #2F6B4B; font-size: 13px; }

/* ---------- Footer ---------- */
.pk-footer {
	margin-top: 32px;
	padding: 30px 0 110px;
	border-radius: var(--pk-r-xl) var(--pk-r-xl) 0 0;
	background: var(--pk-navy);
	color: var(--pk-white);
}
.pk-footer__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pk-logo--footer .pk-logo__img { width: 160px; height: auto; }
.pk-social { display: flex; gap: 8px; }
.pk-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 23px;
	background: rgba(255, 255, 255, 0.1);
}
.pk-social a:hover { background: rgba(255, 255, 255, 0.18); }
.pk-footer__rule { height: 1px; margin: 22px 0; border: 0; background: rgba(255, 255, 255, 0.12); }
.pk-footer__links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 16px;
}
.pk-footer__links a {
	display: flex;
	align-items: center;
	min-height: 38px;
	color: var(--pk-on-dark);
	font-size: 14.5px;
}
.pk-footer__links a:hover { color: var(--pk-white); text-decoration: underline; text-underline-offset: 3px; }
.pk-footer__legal { margin: 18px 0 0; color: var(--pk-on-dark-muted); font-size: var(--pk-fs-xs); }
.pk-footer :focus-visible { outline-color: var(--pk-white); }

@media (min-width: 960px) {
	.pk-footer { padding-bottom: 40px; }
	.pk-footer__links { grid-template-columns: repeat(6, auto); justify-content: start; column-gap: 28px; }
}

/* Floating WhatsApp button */
.pk-wa-fab {
	position: fixed;
	inset-inline-end: 20px;
	bottom: calc(24px + env(safe-area-inset-bottom));
	z-index: 25;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 28px;
	background: var(--pk-whatsapp);
	color: var(--pk-white);
	box-shadow: var(--pk-shadow-float);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Desktop top strip: store rules */
.pk-topstrip {
	align-items: center;
	justify-content: center;
	gap: 28px;
	height: 36px;
	background: var(--pk-navy);
	color: var(--pk-white);
	font-size: 13px;
	font-weight: 500;
}
.pk-topstrip [aria-hidden] { opacity: .5; }

/* ---------- Information pages ---------- */
.pk-info { padding-top: 18px; }
.pk-info__eyebrow { margin: 0; color: var(--pk-muted); font-size: 13px; }
.pk-info__title { margin: 4px 0 0; font-family: var(--pk-font-display); font-size: 32px; font-weight: 600; line-height: 1.15; }
.pk-info__lead { margin: 10px 0 0; color: #3A3E4E; font-size: var(--pk-fs-md); line-height: 1.6; }
.pk-info__intro { margin-top: 12px; }
.pk-info__card { max-width: none; margin-top: 16px; padding: 20px; border-radius: 24px; background: var(--pk-white); color: #2F3344; font-size: var(--pk-fs-base); line-height: 1.65; }
.pk-info__card h2 { margin: 0 0 10px; color: var(--pk-ink); font-family: var(--pk-font-display); font-size: 20px; font-weight: 600; }
.pk-info__card h3 { margin: 14px 0 4px; color: var(--pk-ink); font-size: var(--pk-fs-base); font-weight: 600; }
.pk-info__card p { margin: 0 0 10px; }
.pk-info__card ul, .pk-info__card ol { margin: 0 0 10px; padding-inline-start: 20px; }
.pk-info__card a, .pk-info__intro a { text-decoration: underline; text-underline-offset: 3px; }
.pk-info__contact .pk-contact { margin-top: 32px; }
.pk-404 { gap: 14px; }
.pk-404__search { display: flex; width: 100%; }
@media (min-width: 960px) {
	.pk-info { max-width: 820px; padding-top: 32px; }
	.pk-info__title { font-size: 40px; }
	.pk-info__card { padding: 28px 32px; }
	.pk-info__contact { max-width: 820px; }
}

/* ---------- Desktop footer ---------- */
.pk-footdesk__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.pk-footdesk h2 { margin: 0 0 14px; font-size: var(--pk-fs-base); font-weight: 600; }
.pk-footdesk ul { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pk-footdesk nav a, .pk-footdesk__contact span, .pk-footdesk__about p { color: #D5D7E0; font-size: 14px; }
.pk-footdesk nav a:hover { color: var(--pk-white); text-decoration: underline; text-underline-offset: 3px; }
.pk-footdesk__about { display: flex; flex-direction: column; gap: 18px; }
.pk-footdesk__about p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.pk-footdesk .pk-social { flex-direction: row; gap: 10px; }
.pk-footdesk__contact { display: flex; flex-direction: column; gap: 12px; }
.pk-footdesk__contact h2 { margin-bottom: 2px; }
.pk-footdesk__wa { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; height: 46px; margin-top: 6px; padding: 0 20px; border-radius: 23px; background: var(--pk-white); color: var(--pk-navy); font-size: 14.5px; font-weight: 500; }
.pk-footdesk__legal { margin: 0 auto; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .12); color: #B6B9C6; font-size: 13px; }
@media (min-width: 960px) {
	.pk-footer { margin-top: 72px; padding: 0; border-radius: 0; }
}
.pk-cancel__form .pk-field__label { margin-top: 16px; }
.pk-cancel__form .pk-field__label:first-of-type { margin-top: 0; }
.pk-cancel__group { margin: 18px 0 0; padding: 0; border: 0; }
.pk-cancel__group legend { margin-bottom: 6px; padding: 0; }
.pk-cancel__radio { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--pk-fs-base); cursor: pointer; }
.pk-cancel__radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--pk-navy); }
.pk-cancel__send { margin-top: 22px; min-height: 56px; border-radius: 18px; }
.pk-footer__cancel { display: inline-flex; align-items: center; min-height: 44px; color: var(--pk-white); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
