/* Lemi — supplemental front-end + editor styles.
 * Global design lives in theme.json; keep this file minimal and only for things
 * the JSON cannot express (transitions, focus ring, small interaction polish). */

:where(a, .wp-block-button__link, .wp-block-navigation-item__content) {
	transition: color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}

/* Accessible keyboard focus ring. */
:where(a, button, .wp-block-button__link, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--sky, #47799e);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Navigation hover: soft underline instead of harsh color jump. */
.wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--sky, #47799e);
}

/* -------------------------------------------------------------------------
 * Header — wordmark + utility icons
 * ---------------------------------------------------------------------- */

.lemi-wordmark a,
.lemi-wordmark {
	text-decoration: none;
}

/* Full-width header: centred wordmark, utility icons right, nav on the row below. */
.lemi-header-row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding-inline: clamp(1rem, 4vw, 2.75rem);
}
.lemi-header-left { min-width: 0; }
.lemi-nav-row,
.lemi-announcement { padding-inline: clamp(1rem, 4vw, 2.75rem); }

/* Utility icons sit tight together, aligned to the right edge. */
.lemi-utility {
	justify-self: end;
	align-items: center;
	gap: 4px;
}
.lemi-utility > * { margin: 0; }

.lemi-utility .wp-block-search__button.has-icon {
	background: transparent;
	color: var(--wp--preset--color--ink, #26272b);
	padding: 4px;
	min-width: 0;
	box-shadow: none;
}
.lemi-utility .wp-block-search__button.has-icon:hover {
	color: var(--wp--preset--color--sky, #47799e);
	background: transparent;
}
.lemi-utility .wp-block-search__button svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

/* WooCommerce header blocks: normalize icon color/size to match. */
.lemi-utility .wc-block-mini-cart__button,
.lemi-utility .wc-block-customer-account {
	color: var(--wp--preset--color--ink, #26272b);
}
.lemi-utility .wc-block-mini-cart__button:hover,
.lemi-utility .wc-block-customer-account:hover {
	color: var(--wp--preset--color--sky, #47799e);
}
.lemi-utility .wc-block-mini-cart__amount {
	font-family: var(--wp--preset--font-family--body);
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */

.lemi-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}
.lemi-footer-links a {
	color: var(--wp--preset--color--muted, #6b7280);
	text-decoration: none;
}
.lemi-footer-links a:hover {
	color: var(--wp--preset--color--ink, #26272b);
}

/* Newsletter signup form (visual — connect to your ESP). */
.lemi-newsletter-form {
	display: flex;
	gap: 8px;
	max-width: 340px;
	margin-top: 0.75rem;
}
.lemi-newsletter-form input[type="email"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.7rem 1rem;
	border: 1px solid var(--wp--preset--color--line, #e6eaef);
	border-radius: 2px;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--ink, #26272b);
	font: inherit;
	font-size: 0.9rem;
}
.lemi-newsletter-form input[type="email"]::placeholder {
	color: var(--wp--preset--color--muted, #6b7280);
}
.lemi-newsletter-form button {
	flex: 0 0 auto;
	padding: 0.7rem 1.3rem;
	border: 0;
	border-radius: 2px;
	background: var(--wp--preset--color--sky, #47799e);
	color: #fff;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.18s ease;
}
.lemi-newsletter-form button:hover {
	background: var(--wp--preset--color--ink, #26272b);
}

/* -------------------------------------------------------------------------
 * Buttons — outline variant on brand
 * ---------------------------------------------------------------------- */

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid var(--wp--preset--color--sky, #47799e);
	color: var(--wp--preset--color--sky, #47799e);
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus {
	background: var(--wp--preset--color--sky, #47799e);
	color: #fff;
}

/* Light button (on dark/image overlays) */
.lemi-btn-light .wp-block-button__link:hover {
	background: var(--wp--preset--color--powder, #91c1e5) !important;
	color: var(--wp--preset--color--ink, #26272b) !important;
}

/* -------------------------------------------------------------------------
 * Homepage — full-width hero banner
 * ---------------------------------------------------------------------- */

.lemi-hero .lemi-hero-copy { text-align: left; }
.lemi-hero .wp-block-cover__inner-container { width: 100%; }

/* Light outline button on the dark banner */
.lemi-hero .lemi-btn-outline-light .wp-block-button__link {
	border: 1.5px solid rgba(255, 255, 255, 0.9);
	color: #fff;
	background: transparent;
}
.lemi-hero .lemi-btn-outline-light .wp-block-button__link:hover {
	background: #fff;
	color: var(--wp--preset--color--ink, #26272b);
}

@media (max-width: 781px) {
	.lemi-hero { min-height: 70vh !important; }
	.lemi-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(30,42,54,0.30) 0%, rgba(30,42,54,0.62) 100%) !important; }
}

/* Editorial split feature (full-bleed image + airy text) */
.lemi-editorial { gap: 0 !important; }
.lemi-editorial__img,
.lemi-editorial__img .wp-block-cover__image-background { border-radius: 0; }
@media (max-width: 781px) {
	.lemi-editorial__img { min-height: 420px !important; }
}

/* Editorial section header: title left, "View all" link right (benlai-style) */
.lemi-sec-head { align-items: flex-end; }
.lemi-viewall {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.lemi-viewall a {
	color: var(--wp--preset--color--sky, #47799e);
	text-decoration: none;
}
.lemi-viewall a:hover { color: var(--wp--preset--color--ink, #26272b); }

/* -------------------------------------------------------------------------
 * Homepage — category grid, lookbook
 * ---------------------------------------------------------------------- */

/* Category tiles: uniform square crop + gentle zoom on hover. */
.lemi-cat-img {
	overflow: hidden;
	border-radius: 0;
}
.lemi-cat-img img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.lemi-cat-card:hover .lemi-cat-img img {
	transform: scale(1.05);
}
.lemi-cat-card a {
	color: var(--wp--preset--color--ink, #26272b);
	text-decoration: none;
}
.lemi-cat-card:hover a {
	color: var(--wp--preset--color--sky, #47799e);
}

/* Lookbook — asymmetric editorial mosaic (tiles into a clean 4×3 rectangle). */
.lemi-mosaic {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 15.5vw;
	max-height: none;
	gap: 8px;
	grid-auto-flow: dense;
}
.lemi-mosaic__item {
	margin: 0;
	overflow: hidden;
	background: var(--wp--preset--color--cloud, #f6f8fa);
}
.lemi-mosaic__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}
.lemi-mosaic__item:hover img { transform: scale(1.05); }
.lemi-mosaic__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.lemi-mosaic__item:nth-child(6) { grid-column: span 2; }

@media (max-width: 781px) {
	.lemi-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
	.lemi-mosaic__item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
	.lemi-mosaic__item:nth-child(6) { grid-column: span 2; }
}

/* Newsletter CTA form centered variant */
.lemi-newsletter-form--center {
	margin-left: auto;
	margin-right: auto;
	max-width: 420px;
}

/* -------------------------------------------------------------------------
 * Utilities
 * ---------------------------------------------------------------------- */

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

/* -------------------------------------------------------------------------
 * Form controls — consistent, on-brand inputs/selects/textareas everywhere
 * (shop sort dropdown, review & comment forms, search, etc.)
 * ---------------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="search"], input[type="tel"],
input[type="number"], input[type="url"], input[type="password"], textarea, select {
	font: inherit;
	font-size: 0.9rem;
	color: var(--wp--preset--color--ink, #26272b);
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--line, #e6eaef);
	border-radius: 2px;
	padding: 0.6rem 0.85rem;
	line-height: 1.4;
	max-width: 100%;
}
input:focus, textarea:focus, select:focus {
	border-color: var(--wp--preset--color--sky, #47799e);
	outline: none;
}
input::placeholder, textarea::placeholder { color: var(--wp--preset--color--muted, #6b7280); }

/* Native selects: hide the default arrow, add a subtle chevron. */
select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 2.1rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2326272B' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 12px 8px;
	cursor: pointer;
}

/* -------------------------------------------------------------------------
 * Mobile: tighten the (deliberately airy) section spacing.
 * Overriding the spacing presets rescales every section that references them.
 * ---------------------------------------------------------------------- */
@media (max-width: 781px) {
	:root {
		--wp--preset--spacing--50: 1rem !important;   /* = scale 30 */
		--wp--preset--spacing--60: 2rem !important;
		--wp--preset--spacing--70: 2.5rem !important;
		--wp--preset--spacing--80: 3rem !important;
	}
}

/* -------------------------------------------------------------------------
 * Header logo — uses the image uploaded in WordPress (Site Logo);
 * falls back to the "lemi" site-title text when no logo image is set.
 * ---------------------------------------------------------------------- */
.lemi-header-center { gap: 0; }
.lemi-header-center .wp-block-site-logo { line-height: 0; }
.lemi-header-center .wp-block-site-logo img {
	max-height: 42px;
	width: auto;
	display: block;
}
/* When a logo image is present, hide the text wordmark. */
.lemi-header-center:has(.wp-block-site-logo img) .wp-block-site-title { display: none; }
/* When no logo image, hide the empty site-logo wrapper so it doesn't add a gap. */
.lemi-header-center .wp-block-site-logo:not(:has(img)) { display: none; }
