/**
 * Lenzzberry — global utility CSS.
 *
 * theme.json owns design tokens (colors, fonts, spacing).
 * This file adds the bits theme.json can't express:
 *   - resets / micro-fixes
 *   - hover & focus states
 *   - small layout helpers
 *   - cross-block component tweaks
 */

/* ---------------------------------------------------------------------- */
/* Reset & accessibility                                                  */
/* ---------------------------------------------------------------------- */

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

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

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------------------------------------------------------------------- */
/* Buttons — hover/focus polish that theme.json can't fully describe      */
/* ---------------------------------------------------------------------- */

/* Button hover/focus — covers both block-theme buttons and classic
   markup (WC's .button class, anchor.button, plain <button>). */
.wp-block-button__link,
.wp-element-button,
button,
.button,
input[type="submit"],
input[type="button"] {
	transition:
		background-color 150ms ease,
		color 150ms ease,
		transform 150ms ease,
		box-shadow 150ms ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
.button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wp-block-button__link:active,
.wp-element-button:active,
.button:active {
	transform: translateY(0);
}

/* ---------------------------------------------------------------------- */
/* Image hover — used in product grids and content                        */
/* ---------------------------------------------------------------------- */

.wp-block-image img,
.lenzz-card img {
	transition: transform 300ms ease;
}

/* ---------------------------------------------------------------------- */
/* Text helpers                                                           */
/* ---------------------------------------------------------------------- */

.lenzz-eyebrow {
	display: inline-block;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* NOTE: the previous `.lenzz-card` rule here (white bg + border + padding)
   conflicted with the borderless product-card design in product-cards.css.
   Removed — product-cards.css is now the single source of truth for cards. */

/* ---------------------------------------------------------------------- */
/* Header / nav micro-tweaks                                              */
/* ---------------------------------------------------------------------- */

.wp-block-navigation a,
.lenzz-main-nav a {
	transition: color 150ms ease;
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                  */
/* ---------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	padding: 0.625rem 0.875rem;
	font-size: var(--wp--preset--font-size--base);
	background: var(--wp--preset--color--white);
	transition: border-color 150ms ease, box-shadow 150ms ease;
	width: 100%;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--wp--preset--color--brand);
	box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
	outline: none;
}

/* ---------------------------------------------------------------------- */
/* Accessibility — screen-reader-only & skip link                          */
/* ---------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--white);
	clip: auto !important;
	-webkit-clip-path: none;
	clip-path: none;
	color: var(--wp--preset--color--ink);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}


/* ---------------------------------------------------------------------- */
/* Generic page wrapper — used by page.php / page-default.php and every    */
/* WC dashboard / cart / checkout / account page.                          */
/* ---------------------------------------------------------------------- */

.lenzz-main {
	background-color: var(--wp--preset--color--cream);
	padding-bottom: var(--wp--preset--spacing--70);
	min-height: 60vh;
}

.lenzz-main--default {
	padding-top: var(--wp--preset--spacing--60);
}

.lenzz-post {
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(14, 123, 145, 0.10);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.lenzz-post-header {
	margin: 0 0 var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--wp--preset--color--border);
	position: relative;
}

.lenzz-post-header::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 48px;
	height: 2px;
	background: var(--wp--preset--color--brand);
	border-radius: 2px;
}

.lenzz-post-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.75rem, 3.6vw, 2.5rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--ink);
}

.lenzz-post-content {
	color: var(--wp--preset--color--body);
	line-height: 1.65;
}

.lenzz-post-content > *:first-child {
	margin-top: 0;
}

.lenzz-post-content > *:last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.lenzz-post {
		padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	}
}


/* ---------------------------------------------------------------------- */
/* Centered content container — used sitewide (homepage, shop archive,    */
/* search, single product, contact, cart, checkout, my account, etc.).    */
/*                                                                        */
/* Defined here in style.css instead of home.css so the padding actually  */
/* loads on every page — home.css only enqueues on the front page, which  */
/* meant non-home pages were rendering edge-to-edge with zero gutter.     */
/*                                                                        */
/* Padding ramp matches modern e-commerce baselines (Shopify/Amazon):     */
/*   - Desktop  (>960px):  32px each side                                  */
/*   - Tablet   (601-960): 24px each side                                  */
/*   - Mobile   (<=600px): 16px each side                                  */
/* ---------------------------------------------------------------------- */

.lenzz-container {
	width: 100%;
	max-width: 1240px;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--wp--preset--spacing--60);
	padding-right: var(--wp--preset--spacing--60);
	box-sizing: border-box;
}

.lenzz-container--narrow { max-width: 760px; }
.lenzz-container--about  { max-width: 760px; text-align: center; }

@media (max-width: 960px) {
	.lenzz-container {
		padding-left: var(--wp--preset--spacing--50);
		padding-right: var(--wp--preset--spacing--50);
	}
}

@media (max-width: 600px) {
	.lenzz-container {
		padding-left: var(--wp--preset--spacing--40);
		padding-right: var(--wp--preset--spacing--40);
	}
}

/* ---------------------------------------------------------------------- */
/* INFINITE SCROLL — auto-load more products on scroll                    */
/*                                                                        */
/* Lives in style.css (not shop.css) so it loads on the search page too.  */
/* shop.css only enqueues on WC pages (is_woocommerce / cart / checkout / */
/* account); the search page is `is_search()`, so without these rules     */
/* here the JS would set `body.lenzz-has-infinite` and insert the loader  */
/* but the pagination would stay visible and the loader would render      */
/* unstyled.                                                              */
/* ---------------------------------------------------------------------- */

/* Hide both pagination flavours when infinite scroll is active:
   - `.woocommerce-pagination` (WC archive — woocommerce_pagination())
   - `.navigation.pagination`  (the_posts_pagination — search results)
   `!important` because WC core CSS sets `display: block` on its
   pagination wrapper with a more specific selector. */
body.lenzz-has-infinite .navigation.pagination,
body.lenzz-has-infinite .woocommerce-pagination,
body.lenzz-has-infinite .lenzz-shop .navigation.pagination,
body.lenzz-has-infinite .lenzz-shop .woocommerce-pagination,
body.lenzz-has-infinite .lenzz-search .navigation.pagination,
body.lenzz-has-infinite .lenzz-search .woocommerce-pagination {
	display: none !important;
}

/* Loader — full-width centered block under the product grid. */
.lenzz-infinite-loader {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: var(--wp--preset--spacing--50) 0;
	margin: var(--wp--preset--spacing--40) 0 0;
	min-height: 80px;
	width: 100%;
	text-align: center;
}

.lenzz-infinite-loader.is-done {
	opacity: 0.7;
}

.lenzz-infinite-status {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	text-align: center;
}

/* Brand-color circular spinner — visible only while fetching */
.lenzz-infinite-spinner {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 3px solid rgba(14, 123, 145, 0.15);
	border-top-color: var(--wp--preset--color--brand);
	animation: lenzz-infinite-spin 700ms linear infinite;
	opacity: 0;
	transition: opacity 200ms ease;
	margin: 0 auto;
}

.lenzz-infinite-loader.is-loading .lenzz-infinite-spinner {
	opacity: 1;
}

.lenzz-infinite-loader.is-done .lenzz-infinite-spinner {
	display: none;
}

@keyframes lenzz-infinite-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.lenzz-infinite-spinner {
		animation-duration: 1.6s;
	}
}
