/*
Theme Name: Maiee Lace
Description: Premium one-page site for Maiee Lace (laces, trims, fabrics, appliqué, collars). Products are managed in WP Admin → Products: title = name, featured image = photo.
Version: 2.5.1
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: maiee-lace
*/

:root {
	--navy: #32376F;
	--navy-deep: #1F2248;
	--orange: #EC5D1B;
	--ivory: #F7F4EE;
	--sand: #ECE6DB;
	--ink: #2B2B2B;
	--muted: #6B6A72;
	--line: rgba(50, 55, 111, .14);
	--serif: 'Cormorant Garamond', Georgia, serif;
	--sans: 'Montserrat', system-ui, sans-serif;
	--pad: clamp(16px, 5vw, 80px);
	--ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font: 400 15px/1.75 var(--sans); color: var(--ink); background: var(--ivory); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.75rem); color: var(--navy); }
h1 em, h2 em { font-style: italic; color: var(--orange); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow {
	display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
	font: 600 .72rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--orange);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:not(.eyebrow) { color: var(--muted); margin: 16px 0 0; }

.btn {
	display: inline-block; padding: 15px 30px; border: 1px solid transparent; border-radius: 0;
	font: 600 .78rem var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer;
	transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-solid { background: var(--orange); color: #fff; }
.btn-solid:hover { background: var(--navy); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Header */
.site-header {
	position: fixed; inset: 0 0 auto; z-index: 30;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 18px var(--pad); color: #fff;
	transition: background .4s var(--ease), padding .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { #wpadminbar { position: fixed; } } /* WP unpins its bar here, which would cover the header */
.site-header.scrolled, .site-header.menu-open { background: var(--ivory); color: var(--navy); padding-block: 12px; box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 52px; height: auto; }
/* The logo is only ever used in its original colours; on dark backgrounds it sits on an ivory badge so the navy wings stay visible. */
.site-header:not(.scrolled):not(.menu-open) .brand img, .footer-brand img {
	box-sizing: content-box; padding: 6px 9px; border-radius: 6px; background: var(--ivory);
}
.brand span { font: 600 1.05rem var(--sans); letter-spacing: .18em; white-space: nowrap; }
.brand b { font-weight: 600; color: var(--orange); }
#site-nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 36px); }
#site-nav a { font: 500 .75rem var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; position: relative; }
#site-nav a:not(.nav-cta)::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--orange); transform: scaleX(0); transition: transform .3s var(--ease); }
#site-nav a:hover::after, #site-nav a[aria-current]::after { transform: scaleX(1); }
.nav-cta { padding: 10px 18px; border: 1px solid currentColor; }
.nav-cta:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.menu-toggle { display: none; }

@media (max-width: 860px) {
	.menu-toggle { display: grid; gap: 6px; width: 44px; height: 44px; place-content: center; background: none; border: 0; color: inherit; cursor: pointer; }
	.menu-toggle i { display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
	.menu-open .menu-toggle i:first-of-type { transform: translateY(3.75px) rotate(45deg); }
	.menu-open .menu-toggle i:last-of-type { transform: translateY(-3.75px) rotate(-45deg); }
	#site-nav {
		position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0;
		padding: 8px var(--pad) 24px; background: var(--ivory); box-shadow: 0 12px 24px rgba(31,34,72,.08);
		visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s, visibility .3s;
	}
	.menu-open #site-nav { visibility: visible; opacity: 1; transform: none; }
	#site-nav a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: .85rem; }
	#site-nav a::after { display: none; }
	.nav-cta { border: 0; margin-top: 8px; padding: 14px 0; color: var(--orange); }
}

/* Hero */
.hero {
	position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden;
	padding: 120px var(--pad) 140px; color: #fff; background: var(--navy-deep);
}
.hero::before {
	content: ''; position: absolute; inset: 0; background: var(--hero) center / cover;
	animation: drift 24s var(--ease) both;
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(31,34,72,.92) 0%, rgba(31,34,72,.72) 45%, rgba(31,34,72,.25) 100%); }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: clamp(3rem, 8.5vw, 7.25rem); }
.hero-lead { max-width: 520px; margin: 28px 0 40px; font-size: clamp(1rem, 1.6vw, 1.1rem); color: rgba(255,255,255,.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-inner > * { animation: rise 1.1s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: .15s; }
.hero-inner > :nth-child(3) { animation-delay: .3s; }
.hero-inner > :nth-child(4) { animation-delay: .45s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero-foot {
	position: absolute; z-index: 1; left: var(--pad); right: var(--pad); bottom: 36px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	font: 500 .72rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.75);
}
.hero-foot p { margin: 0; }
@media (max-width: 700px) { .hero-foot { right: 92px; justify-content: flex-start; gap: 20px; } }
.hero-foot strong { font: 500 1.6rem var(--serif); letter-spacing: 0; color: #fff; margin-right: 6px; }
.scroll-cue { width: 1px; height: 56px; background: linear-gradient(rgba(255,255,255,.8), transparent); animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* Library page header: a shorter version of the hero, dark so the transparent header stays readable */
.page-hero {
	position: relative; overflow: hidden; padding: clamp(140px, 18vw, 200px) var(--pad) clamp(56px, 7vw, 88px);
	color: #fff; background: var(--navy-deep);
}
.page-hero::before { content: ''; position: absolute; inset: 0; background: var(--hero) center 60% / cover; opacity: .35; }
.page-hero > * { position: relative; }
.page-hero h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); margin-bottom: 16px; }
.page-hero p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.8); max-width: 560px; }
.see-all { margin: clamp(32px, 4vw, 48px) 0 0; text-align: center; color: var(--navy); }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--ivory); padding: 20px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 120s linear infinite; }
.marquee span { white-space: nowrap; font: italic 400 1.5rem var(--serif); color: var(--navy); padding-right: .5em; }
.marquee i { font-style: normal; color: var(--orange); font-size: .8em; margin: 0 .6em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Collections */
.collections, .library, .enquire { padding: clamp(72px, 10vw, 140px) var(--pad); }
.cat-grid { display: grid; gap: clamp(12px, 1.6vw, 24px); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-tile { position: relative; aspect-ratio: 3 / 4; overflow: hidden; color: #fff; text-decoration: none; background: var(--navy); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.cat-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(31,34,72,.85)); }
.cat-tile:hover img { transform: scale(1.05); }
.cat-num { position: absolute; z-index: 1; top: 18px; left: 20px; font: italic 500 1.1rem var(--serif); }
.cat-body { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 20px; display: grid; gap: 4px; }
.cat-name { font: 500 clamp(1.5rem, 2.6vw, 2.1rem)/1.1 var(--serif); }
.cat-count { font: 500 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.cat-tile:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.cat-card { display: flex; flex-direction: column; min-width: 0; }
.cat-subs { list-style: none; margin: 14px 0 0; padding: 0; }
.cat-subs a {
	display: block; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none;
	font: 500 .82rem/1.35 var(--sans); color: var(--navy); transition: color .25s, padding-left .25s var(--ease);
}
.cat-subs a:hover { color: var(--orange); padding-left: 6px; }
.cat-subs a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.cat-subs-more a { border-bottom: 0; color: var(--orange); font-weight: 600; letter-spacing: .04em; }

/* Library */
.library { background: #fff; }
.lib-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 40px; max-width: 720px; }
.lib-search input[type="search"] {
	flex: 1 1 260px; min-width: 0; padding: 14px 0; border: 0; border-bottom: 1px solid rgba(50,55,111,.35); border-radius: 0;
	background: transparent; font: 400 1rem var(--sans); color: var(--ink);
}
.lib-search input[type="search"]:focus { outline: none; border-bottom-color: var(--orange); }
.lib-search .btn { padding: 13px 24px; border: 0; }
.lib-clear { font-size: .85rem; color: var(--navy); }
.filters { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.filters a {
	padding: 0 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none;
	font: 500 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.filters a span { margin-left: 4px; letter-spacing: 0; font-size: .7rem; opacity: .7; }
.filters a:hover { color: var(--navy); }
.filters a.active { color: var(--navy); border-bottom-color: var(--orange); }
.subfilters, .widthfilter { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.subfilters a {
	flex-shrink: 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--ivory); text-decoration: none;
	font: 500 .78rem var(--sans); color: var(--navy); white-space: nowrap; transition: background .25s, color .25s, border-color .25s;
}
.subfilters a span, .widthfilter a span { margin-left: 4px; color: var(--muted); font-size: .7rem; }
.subfilters a:hover { border-color: var(--navy); }
.subfilters a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.subfilters a.active span { color: rgba(255,255,255,.7); }
.widthfilter > span { flex-shrink: 0; margin-right: 6px; font: 600 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }
.widthfilter a {
	flex-shrink: 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; text-decoration: none;
	font: 500 .78rem var(--sans); color: var(--navy); white-space: nowrap;
}
.widthfilter a:hover { border-color: var(--navy); }
.widthfilter a.active { border-color: var(--orange); color: var(--orange); }
.filters a:focus-visible, .subfilters a:focus-visible, .widthfilter a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.lib-count { margin: 12px 0 28px; font: 500 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.no-results { margin: 0 0 40px; color: var(--muted); }
.no-results a { color: var(--orange); }
.pager { display: flex; justify-content: center; gap: 14px; margin-top: 56px; }
.load-more[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile-img { display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; overflow: hidden; background: var(--sand); cursor: zoom-in; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile-img:not(:disabled):hover img { transform: scale(1.04); }
/* Products without a photo yet: a quiet lace-like dot pattern instead of a flat grey box. */
.tile-img.is-empty {
	cursor: default;
	background: radial-gradient(circle at 50% 50%, rgba(50,55,111,.10) 1.5px, transparent 2px) 0 0 / 18px 18px, var(--sand);
}
.tile-img:focus-visible, .btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.tile-name { margin: 14px 0 0; font: 500 1.2rem/1.25 var(--serif); color: var(--navy); text-align: center; }

/* Story */
.story { display: grid; gap: clamp(40px, 7vw, 110px); align-items: center; padding: clamp(72px, 10vw, 140px) var(--pad); }
@media (min-width: 900px) { .story { grid-template-columns: 1fr 1.1fr; } }
.story-media { position: relative; margin: 0 0 0 clamp(16px, 3vw, 40px); }
.story-media::before { content: ''; position: absolute; inset: clamp(16px, 3vw, 40px) clamp(16px, 3vw, 40px) calc(-1 * clamp(16px, 3vw, 40px)) calc(-1 * clamp(16px, 3vw, 40px)); background: var(--navy); }
.story-media img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.story-text h2 { margin-bottom: 28px; }
.story-text p:not(.eyebrow) { color: var(--muted); max-width: 540px; }
.stats { display: flex; flex-wrap: wrap; gap: 20px clamp(28px, 4vw, 56px); margin: 40px 0 0; padding-top: 32px; border-top: 1px solid var(--line); }
.stats dt { font: 500 clamp(2.4rem, 4vw, 3.2rem)/1 var(--serif); color: var(--navy); }
.stats dd { margin: 6px 0 0; font: 600 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }

/* Visit */
.visit { display: grid; gap: clamp(32px, 5vw, 72px); align-items: stretch; padding: clamp(72px, 10vw, 140px) var(--pad); background: var(--navy-deep); color: #fff; }
@media (min-width: 900px) { .visit { grid-template-columns: 1fr 1.3fr; } }
.visit h2 { color: #fff; margin-bottom: 28px; }
.visit-addr { font: 500 1.5rem/1.4 var(--serif); }
.visit a:not(.btn) { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); }
.visit a:not(.btn):hover { color: var(--orange); border-color: var(--orange); }
.visit .btn { margin-top: 12px; }
.visit-map { min-height: 360px; }
.visit-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; filter: grayscale(1) contrast(1.05); }

/* Enquire */
.enquire { background: var(--sand); }
.enquiry-form { display: grid; gap: 20px 28px; max-width: 920px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.enquiry-form label { display: grid; gap: 8px; font: 600 .7rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--navy); }
.enquiry-form label span { font-weight: 400; letter-spacing: .05em; text-transform: none; color: var(--muted); }
.enquiry-form .full { grid-column: 1 / -1; }
.enquiry-form input, .enquiry-form select, .enquiry-form textarea {
	width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid rgba(50,55,111,.35); background: transparent;
	font: 400 1rem var(--sans); color: var(--ink); letter-spacing: 0; text-transform: none; border-radius: 0;
}
.enquiry-form textarea { resize: vertical; }
.enquiry-form :is(input, select, textarea):focus { outline: none; border-bottom-color: var(--orange); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 8px; }
.form-actions a { color: var(--navy); font-size: .9rem; }

/* Footer */
.site-footer {
	display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start;
	padding: 72px var(--pad) 32px; background: var(--navy-deep); color: rgba(255,255,255,.8); border-top: 1px solid rgba(255,255,255,.08);
}
.footer-brand span { display: block; margin-top: 12px; font: 600 1.05rem var(--sans); letter-spacing: .18em; color: #fff; }
.footer-brand b { color: var(--orange); font-weight: 600; }
.footer-brand p { margin: 8px 0 0; font-size: .8rem; }
.site-footer nav, .footer-contact { display: grid; gap: 10px; }
.site-footer a { text-decoration: none; font-size: .85rem; }
.site-footer a:hover { color: var(--orange); }
.copy { grid-column: 1 / -1; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .75rem; letter-spacing: .1em; }

/* WhatsApp */
.whatsapp {
	position: fixed; right: 20px; bottom: 20px; z-index: 20;
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
	background: #25D366; box-shadow: 0 6px 18px rgba(0,0,0,.22);
}

/* Lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(31,34,72,.96); }
.lightbox[open] { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; grid-column: 2; text-align: center; }
.lightbox img { max-height: 80vh; margin: 0 auto; object-fit: contain; }
.lightbox figcaption { margin-top: 18px; color: #fff; font: italic 500 1.5rem var(--serif); }
.lightbox button { background: none; border: 0; color: #fff; font-size: 2.5rem; cursor: pointer; }
.lb-close { position: absolute; top: 12px; right: 20px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }

/* Reveal on scroll (only when JS runs, so content is never hidden without it) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
	.marquee-track { transform: none; }
}
