/*
 * Pufloo UX – global styles (all front-end pages; small on purpose).
 * Sources: inline-pufloo-menu-onedrop.css, inline-pufloo-express-checkout.css,
 * inline-pufloo-onedrop-lead-size.css, mobile hero CSS (spec §7), helpers.
 */
:root {
	--pufloo-ux-espresso: #181512;
	--pufloo-ux-brown: #392b24;
	--pufloo-ux-text: #302b27;
	--pufloo-ux-cream: #f7efdf;
	--pufloo-ux-light: #fbf8f2;
	--pufloo-ux-border: #e4dfd7;
	--pufloo-ux-green: #2f7d5a;
	--pufloo-ux-green-hover: #24654a;
	--pufloo-ux-radius: 10px;
	--pufloo-ux-radius-s: 4px;
	--pufloo-ux-focus: #bd654b;
	--pufloo-ux-display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
	--pufloo-ux-body: Jost, Arial, sans-serif;
	--pufloo-ux-header-offset: 150px;
}

html { scroll-padding-top: 170px; }
@media (max-width: 767px) { html { scroll-padding-top: 150px; } }

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

/* "Nowość" badge ------------------------------------------------------- */
.pufloo-ux-new-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	display: inline-block;
	padding: 4px 9px;
	border-radius: var(--pufloo-ux-radius-s);
	background: var(--pufloo-ux-espresso);
	color: #fff;
	font: 500 11px/1.3 var(--pufloo-ux-body);
	letter-spacing: .08em;
	text-transform: uppercase;
	pointer-events: none;
}
li.product, .wc-block-grid__product, .pufloo-ux-badge-host { position: relative; }
.pufloo-ux-new-badge-wrap { position: relative; height: 0; z-index: 5; }
.pufloo-ux-new-badge-wrap .pufloo-ux-new-badge { top: 12px; left: 12px; }

/* Fallback when the theme card skips woocommerce_before_shop_loop_item_title (Blocksy cards) */
.pufloo-ux-is-new:not(:has(.pufloo-ux-new-badge)) .ct-media-container { position: relative; }
.pufloo-ux-is-new:not(:has(.pufloo-ux-new-badge)) .ct-media-container::after {
	content: var(--pufloo-ux-new-label, "Nowość");
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	padding: 4px 9px;
	border-radius: var(--pufloo-ux-radius-s);
	background: var(--pufloo-ux-espresso);
	color: #fff;
	font: 500 11px/1.3 var(--pufloo-ux-body);
	letter-spacing: .08em;
	text-transform: uppercase;
	pointer-events: none;
}

/* Menu: ONE DROP | OKAZJE (CSS class "pufloo-menu-onedrop" on the menu item) */
.menu-item.pufloo-menu-onedrop > a,
.pufloo-menu-onedrop > .ct-menu-link,
a.pufloo-menu-onedrop {
	color: var(--pufloo-ux-green) !important;
	font-weight: 600 !important;
}
.menu-item.pufloo-menu-onedrop > a:hover,
.menu-item.pufloo-menu-onedrop > a:focus-visible,
a.pufloo-menu-onedrop:hover {
	color: var(--pufloo-ux-green-hover) !important;
}

/* Menu font per language (optional, body.pufloo-ux-menu-fit) */
@media (min-width: 1280px) {
	body.pufloo-ux-menu-fit { --pf-menu-fs: clamp(11.5px, 1.17vw, 15px); }
	body.pufloo-ux-menu-fit.pufloo-ux-lang-en { --pf-menu-fs: clamp(11.5px, 1.16vw, 15px); }
	body.pufloo-ux-menu-fit.pufloo-ux-lang-nb { --pf-menu-fs: clamp(11.5px, 1.07vw, 15px); }
	body.pufloo-ux-menu-fit.pufloo-ux-lang-sv { --pf-menu-fs: clamp(11.5px, 1.03vw, 15px); }
	body.pufloo-ux-menu-fit.pufloo-ux-lang-fr,
	body.pufloo-ux-menu-fit.pufloo-ux-lang-es { --pf-menu-fs: clamp(11.5px, 1vw, 15px); }
	body.pufloo-ux-menu-fit.pufloo-ux-lang-de { --pf-menu-fs: clamp(11.5px, .975vw, 15px); }
	body.pufloo-ux-menu-fit [data-id="menu"] > ul > li > a,
	body.pufloo-ux-menu-fit .header-menu-1 > ul > li > a {
		font-size: var(--pf-menu-fs) !important;
		padding-left: clamp(5px, calc(.8vw - 4.8px), 15px) !important;
		padding-right: clamp(5px, calc(.8vw - 4.8px), 15px) !important;
	}
}
@media (min-width: 1280px) and (max-width: 1439px) {
	body.pufloo-ux-menu-fit [data-id="menu"] > ul > li > a { letter-spacing: .022em; }
}
#offcanvas .menu-item > a,
.ct-panel .mobile-menu .menu-item > a {
	white-space: normal;
	overflow-wrap: break-word;
	line-height: 1.3;
}

/* Sticky desktop header (optional; Blocksy free has no sticky row) */
@media (min-width: 1000px) {
	body.pufloo-ux-sticky-header #header {
		position: sticky;
		top: 0;
		z-index: 50;
		background: #fff;
	}
	body.admin-bar.pufloo-ux-sticky-header #header { top: 32px; }
}

/* Top bar */
.pufloo-ux-topbar__sep { opacity: .8; }

/* Cookie settings link (Complianz) */
.pufloo-ux-cookie-settings { cursor: pointer; }

/* Express checkout buttons: 12px under "Add to cart", 48px high, 12px gaps */
body.pufloo-ux-express-css #wc-stripe-express-checkout-element,
body.pufloo-ux-express-css .wc-stripe-express-checkout-element,
body.pufloo-ux-express-css #wc-stripe-payment-request-wrapper,
body.pufloo-ux-express-css #wcpay-express-checkout-element {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 12px !important;
}
body.pufloo-ux-express-css #wc-stripe-express-checkout-element > *,
body.pufloo-ux-express-css #wcpay-express-checkout-element > * { min-height: 48px; }
body.pufloo-ux-express-css #wc-stripe-express-checkout-button-separator,
body.pufloo-ux-express-css #wcpay-express-checkout-button-separator { margin: 12px 0 !important; }

/* Made to measure selected: hide express buttons for that variant */
body.pufloo-ux-mtm-active #wc-stripe-express-checkout-element,
body.pufloo-ux-mtm-active .wc-stripe-express-checkout-element,
body.pufloo-ux-mtm-active #wc-stripe-express-checkout-button-separator,
body.pufloo-ux-mtm-active #wc-stripe-payment-request-wrapper,
body.pufloo-ux-mtm-active #wc-stripe-payment-request-button-separator,
body.pufloo-ux-mtm-active #wcpay-express-checkout-element,
body.pufloo-ux-mtm-active #wcpay-express-checkout-button-separator,
body.pufloo-ux-mtm-active inpost-izi-button,
body.pufloo-ux-mtm-active .inpost-izi-button,
body.pufloo-ux-mtm-active .inpostpay-widget,
body.pufloo-ux-mtm-active .ppc-button-wrapper {
	display: none !important;
}

/* ONE DROP category: bigger description and product count */
body.pufloo-ux-onedrop .term-description,
body.pufloo-ux-onedrop .page-description,
body.pufloo-ux-onedrop .pufloo-onedrop-lead {
	font-size: 26px;
	line-height: 1.3;
	max-width: 900px;
	margin: 6px auto 12px;
	text-wrap: balance;
}
body.pufloo-ux-onedrop .woocommerce-result-count { font-size: 26px; line-height: 1.2; }
@media (max-width: 767px) {
	body.pufloo-ux-onedrop .term-description,
	body.pufloo-ux-onedrop .page-description,
	body.pufloo-ux-onedrop .pufloo-onedrop-lead { font-size: 20px; margin: 4px auto 10px; }
	body.pufloo-ux-onedrop .woocommerce-result-count { font-size: 20px; }
}

/* Mobile hero (Cover block with class "pufloo-ux-mobile-hero"; spec §7) */
@media (max-width: 767px) {
	.pufloo-ux-mobile-hero.wp-block-cover,
	.pufloo-ux-mobile-hero {
		height: clamp(390px, 110vw, 460px);
		min-height: 0 !important;
		max-height: 460px;
		overflow: hidden;
	}
	.pufloo-ux-mobile-hero .wp-block-cover__image-background,
	.pufloo-ux-mobile-hero > img {
		object-fit: cover;
		object-position: 50% 25%;
	}
	.pufloo-ux-mobile-hero .wp-block-cover__inner-container {
		position: absolute;
		left: 22px;
		right: 22px;
		bottom: 22px;
		width: auto;
	}
	.pufloo-ux-mobile-hero h1,
	.pufloo-ux-mobile-hero h2 {
		font-size: clamp(27px, 7.5vw, 36px) !important;
		line-height: 1.04 !important;
		margin: 0 0 14px;
	}
	.pufloo-ux-mobile-hero .wp-block-button__link {
		box-sizing: border-box;
		width: calc(100vw - 112px);
		max-width: 270px;
		min-height: 46px;
		padding: 8px 32px 8px 12px;
		font-size: 10px;
		letter-spacing: .08em;
		line-height: 1.25;
		text-align: center;
		text-transform: uppercase;
		white-space: normal;
	}
	.pufloo-ux-mobile-hero.pufloo-ux-hero-gradient::after {
		content: "";
		position: absolute;
		inset: 45% 0 0;
		z-index: 1;
		pointer-events: none;
		background: linear-gradient(180deg, rgba(20, 17, 14, 0), rgba(20, 17, 14, .18) 25%, rgba(20, 17, 14, .82) 100%);
	}
	.pufloo-ux-mobile-hero.pufloo-ux-hero-gradient .wp-block-cover__inner-container { z-index: 2; }
}
@media (max-width: 575px) {
	body:not(.pufloo-ux-lang-pl) .pufloo-ux-mobile-hero h1,
	body:not(.pufloo-ux-lang-pl) .pufloo-ux-mobile-hero h2 {
		font-size: clamp(26px, 8vw, 40px) !important;
	}
}

/* Layout helpers for block-built pages */
@media (max-width: 767px) {
	.pufloo-ux-mobile-stack { display: flex !important; flex-direction: column; }
	.pufloo-ux-m-order-1 { order: 1; }
	.pufloo-ux-m-order-2 { order: 2; }
	.pufloo-ux-m-order-3 { order: 3; }
	.pufloo-ux-m-order-4 { order: 4; }
	.pufloo-ux-m-order-5 { order: 5; }
	.pufloo-ux-m-order-6 { order: 6; }
	.pufloo-ux-m-order-7 { order: 7; }
	.pufloo-ux-m-order-8 { order: 8; }
	.pufloo-ux-m-order-9 { order: 9; }
	.pufloo-ux-hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
	.pufloo-ux-hide-desktop { display: none !important; }
}

/* Mobile bottom bar (optional) */
.pufloo-ux-mbar { display: none; }
@media (max-width: 767px) {
	.pufloo-ux-mbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		display: flex;
		padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-top: 1px solid var(--pufloo-ux-border);
	}
	.pufloo-ux-mbar__item {
		position: relative;
		flex: 1;
		min-width: 0;
		min-height: 44px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		padding: 4px 0;
		margin: 0;
		border: 0;
		background: none;
		color: var(--pufloo-ux-espresso);
		font: 500 11px/1.2 var(--pufloo-ux-body);
		text-decoration: none;
		cursor: pointer;
	}
	.pufloo-ux-mbar__icon { width: 22px; height: 22px; }
	.pufloo-ux-mbar__count {
		position: absolute;
		top: 2px;
		left: calc(50% + 6px);
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		border-radius: 9px;
		background: var(--pufloo-ux-espresso);
		color: #fff;
		font-size: 10px;
		line-height: 17px;
		text-align: center;
	}
	.pufloo-ux-mbar__count[hidden] { display: none; }
	body:has(.pufloo-ux-mbar) { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
	.pufloo-ux-mbar__item:focus-visible { outline: 2px solid var(--pufloo-ux-espresso); outline-offset: -3px; }
}

.pufloo-ux-admin-hint {
	padding: 10px 14px;
	border: 1px dashed #b32d2e;
	background: #fff6f6;
	color: #8a1f1f;
	font-size: 13px;
}
