/* ==========================================================================
   WS48 Products Page Patterns
   Every rule is scoped to .ws48p (each pattern's outer Group) so nothing
   leaks into the rest of the theme.
   ========================================================================== */

.ws48p {
	--ws-blue: #26526E;
	--ws-cream: #EDE8DE;
	--ws-terra: #C1694A;
	--ws-greige: #A8A296;
	--ws-black: #1A1A1A;
	--ws-brick: #9C3A2B;
	--ws-grey: #F2F2F2;
	--ws-slot: #DCDCDC;
	--ws-muted: #5E5A52;
	--ws-max: 1320px;
	--ws-pad: clamp(20px, 3vw, 40px);

	font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--ws-black);
	background: #FFFFFF;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

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

/* Reset theme / flow-layout spacing on everything inside the patterns. */
body .ws48p.alignfull { margin-top: 0; margin-bottom: 0; }
body .ws48p :is(p, h1, h2, h3, figure, .wp-block-group, .wp-block-image) { margin: 0; }
body .ws48p :is(figure, .wp-block-group, .wp-block-image) { max-width: none; }
body .ws48p :is(h1, h2, h3) {
	font-family: inherit;
	color: inherit;
	text-transform: none;
}
body .ws48p mark { padding: 0; background: transparent; }

/* Light-weight word inside headings: use the Italic button in the editor. */
body .ws48p :is(h1, h2, h3, .ws48p-marquee, .ws48p-tile-label) em {
	font-style: normal;
	font-weight: 400;
}

.ws48p-inner {
	width: 100%;
	max-width: var(--ws-max);
	margin-inline: auto !important;
}

body .ws48p a { color: inherit; text-decoration: none; }
.ws48p a:focus-visible { outline: 3px solid var(--ws-terra); outline-offset: 4px; border-radius: 4px; }

/* ---------- Shared type ---------- */
body .ws48p .ws48p-title {
	font-size: clamp(40px, 6vw, 88px);
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 0.9;
}
.ws48p-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
}
.ws48p-intro {
	max-width: 340px;
	font-size: 16px;
	line-height: 1.5;
	color: #4A4740;
}
.ws48p-eyebrow {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* ---------- Text CTAs ("Find a rep →") ---------- */
.ws48p-ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 36px;
}
body .ws48p .ws48p-ctas a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 18px;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	text-underline-offset: 6px;
	text-decoration-thickness: 1.5px;
}
.ws48p-ctas a::after {
	content: "→";
	display: inline-block;
	margin-left: 8px;
	transition: transform 0.25s;
}
.ws48p-ctas a:first-child::after { color: var(--ws-terra); }
body .ws48p .ws48p-ctas a:hover { text-decoration: underline; }
.ws48p-ctas a:hover::after { transform: translateX(5px); }
.ws48p-ctas-light { color: #FFFFFF; }
body .ws48p .ws48p-ctas-small a { font-size: 15px; min-height: 0; }
body .ws48p .ws48p-ctas-large a { font-size: 20px; }

/* ---------- Badges / chips ---------- */
.ws48p-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--ws-brick);
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
}
.ws48p-badge-terra { background: var(--ws-terra); align-self: flex-start; }

/* ==========================================================================
   Photo tiles (hero bento + category tiles)
   ========================================================================== */
.ws48p-tile {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-width: 0;
	min-height: 220px;
	border-radius: 28px;
	background: var(--ws-slot);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 12px;
	transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s;
}
.ws48p-tile > .wp-block-image {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
.ws48p-tile > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.ws48p-tile:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(26,26,26,.35); }
.ws48p-tile:hover > .wp-block-image img { transform: scale(1.05); }

/* Dark label bar; its link covers the whole tile. */
body .ws48p .ws48p-tile-label {
	align-self: flex-start;
	max-width: 100%;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 4px;
	padding: 9px 14px;
	border-radius: 12px;
	background: rgba(26, 26, 26, 0.78);
	color: #FFFFFF;
	font-size: clamp(15px, 1.2vw, 18px);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.15;
}
.ws48p-tile-label a { margin-right: auto; }
.ws48p-tile-label a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ws48p-tile-label::after {
	content: "→";
	margin-left: 4px;
	color: var(--ws-terra);
	font-size: 16px;
	transition: transform 0.25s;
}
.ws48p-tile:hover .ws48p-tile-label::after { transform: translateX(5px); }

/* White pill label variant (hero "Kinetic workstations"). */
body .ws48p .ws48p-label-pill {
	align-self: flex-start;
	margin: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ws-black);
	font-size: 14px;
	letter-spacing: 0;
}
.ws48p-label-pill::after { content: none; }

.ws48p-tile > .ws48p-badge { position: absolute; top: 16px; left: 16px; }

.ws48p-count {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ws-black);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

body .ws48p .ws48p-sticker {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 112px;
	height: 112px;
	border-radius: 50%;
	background: var(--ws-terra);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transform: rotate(-12deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.ws48p-hero { padding: 40px var(--ws-pad) 24px; }
.ws48p-hero .ws48p-inner { display: flex; flex-direction: column; gap: 28px; }
.ws48p-hero-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.ws48p-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--ws-grey);
	font-size: 13px;
	font-weight: 600;
}
.ws48p-chip::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ws-terra);
}
.ws48p-meta { font-size: 14px; color: var(--ws-muted); }
body .ws48p .ws48p-display {
	font-size: clamp(44px, 6.5vw, 104px);
	line-height: 0.92;
	font-weight: 600;
	letter-spacing: -0.04em;
}
.ws48p-display em { color: var(--ws-terra); }
.ws48p-hero-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
}
.ws48p-lede { max-width: 620px; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.45; color: #3F3C36; }

.ws48p-bento {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 240px;
	gap: 12px;
	padding-top: 8px;
}
.ws48p-bento .ws48p-span-big { grid-column: span 2; grid-row: span 2; }

/* ==========================================================================
   Ticker bands
   ========================================================================== */
.ws48p-band {
	background: var(--ws-black);
	color: var(--ws-cream);
	padding: 22px var(--ws-pad);
	margin-top: 40px !important;
	overflow: hidden;
}
body .ws48p .ws48p-marquee-cats {
	font-size: 34px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
}
.ws48p-clients { padding: 72px 0 40px; overflow: hidden; }
.ws48p-clients-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 0 var(--ws-pad);
	margin-bottom: 24px !important;
}
.ws48p-clients-label { font-size: 15px; font-weight: 600; }
body .ws48p .ws48p-marquee-clients {
	padding: 0 var(--ws-pad);
	font-size: 44px;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.2;
	color: var(--ws-greige);
}

/* Set by JS on the front end: the text loops horizontally. */
.ws48p-marquee.is-running {
	white-space: nowrap;
	overflow: hidden;
	padding-inline: 0 !important;
}
.ws48p-track {
	display: inline-flex;
	width: max-content;
	animation: ws48p-marquee 38s linear infinite;
}
.ws48p-marquee-clients .ws48p-track { animation-duration: 60s; }
.ws48p-track > span { padding-right: 0.6em; }
.ws48p-marquee.is-running:hover .ws48p-track { animation-play-state: paused; }
@keyframes ws48p-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* ==========================================================================
   Pick your space
   ========================================================================== */
.ws48p-categories { padding: 96px var(--ws-pad) 48px; }
.ws48p-categories .ws48p-inner { display: flex; flex-direction: column; gap: 36px; }
.ws48p-categories .ws48p-title em { color: var(--ws-blue); }

.ws48p-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 220px;
	grid-auto-flow: dense;
	gap: 12px;
	counter-reset: ws48p-tile;
}
.ws48p-tiles .ws48p-span-big { grid-column: span 2; grid-row: span 2; }
.ws48p-tiles .ws48p-span-tall { grid-row: span 2; }
.ws48p-tiles .ws48p-span-wide { grid-column: span 2; }
.ws48p-cat-tile { counter-increment: ws48p-tile; }
.ws48p-cat-tile .ws48p-tile-label::before {
	content: counter(ws48p-tile, decimal-leading-zero);
	font-size: 11px;
	font-weight: 600;
	opacity: 0.6;
	letter-spacing: 0;
}

/* ==========================================================================
   Spotlight
   ========================================================================== */
.ws48p-spotlight { padding: 48px var(--ws-pad); }
.ws48p-spot-card {
	border-radius: 36px;
	background: var(--ws-black);
	color: var(--ws-cream);
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
}
.ws48p-spot-text {
	flex: 1 1 460px;
	min-width: 0;
	padding: 64px 48px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
body .ws48p .ws48p-spot-title {
	font-size: clamp(40px, 5vw, 76px);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 0.95;
	overflow-wrap: break-word;
}
.ws48p-spot-copy { font-size: 18px; line-height: 1.55; max-width: 420px; color: #CFCAC0; }
.ws48p-spot-media {
	flex: 1 1 460px;
	min-width: 0;
	min-height: 440px;
	padding: 16px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(200px, 1fr));
	gap: 12px;
}
.ws48p-spot-media > .wp-block-image {
	border-radius: 24px;
	background: #3A3A3A;
	overflow: hidden;
	min-height: 200px;
}
.ws48p-spot-media > .wp-block-image.ws48p-spot-main { grid-row: span 2; }
.ws48p-spot-media > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Product grid
   ========================================================================== */
.ws48p-grid { padding: 88px var(--ws-pad) 96px; scroll-margin-top: 40px; }
.ws48p-grid .ws48p-inner { display: flex; flex-direction: column; gap: 28px; }
.ws48p-result-count { font-size: 24px; color: var(--ws-muted); }

.ws48p-filters {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 0;
	background: #FFFFFF;
}
body .ws48p .ws48p-filters a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 999px;
	background: var(--ws-grey);
	color: var(--ws-black);
	font-size: 15px;
	font-weight: 500;
	transition: background 0.2s, color 0.2s;
}
body .ws48p .ws48p-filters a:hover { background: #E4E4E4; }
body .ws48p .ws48p-filters a.is-active { background: var(--ws-black); color: #FFFFFF; font-weight: 600; }

.ws48p-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}
.ws48p-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 12px 18px;
	border-radius: 26px;
	background: var(--ws-grey);
	transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s;
}
.ws48p-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(26,26,26,.35); }
.ws48p-card.is-hidden { display: none; }
.ws48p-card.is-entering { animation: ws48p-in 0.4s ease both; }
@keyframes ws48p-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ws48p-card:not(:has(.wp-block-image)) > .ws48p-badge { top: 14px; right: 14px; }
.ws48p-card-img {
	aspect-ratio: 4 / 5;
	border-radius: 18px;
	background: #FFFFFF;
	overflow: hidden;
	margin-bottom: 8px !important;
}
.ws48p-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.ws48p-card > .ws48p-badge { position: absolute; top: 22px; right: 22px; z-index: 1; font-size: 11px; padding: 5px 10px; }

body .ws48p .ws48p-card-title {
	padding: 0 52px 0 6px;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.15;
}
.ws48p-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.ws48p-card-cats { padding: 0 52px 0 6px; font-size: 13px; color: #6F6A60; }
.ws48p-card::after {
	content: "↗";
	position: absolute;
	right: 18px;
	bottom: 18px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	transition: background 0.25s, color 0.25s;
}
.ws48p-card:hover::after { background: var(--ws-terra); color: #FFFFFF; }

/* ==========================================================================
   For designers & dealers
   ========================================================================== */
.ws48p-tools { background: var(--ws-blue); color: var(--ws-cream); padding: 96px var(--ws-pad); }
.ws48p-split { display: flex; flex-wrap: wrap; gap: 48px; }
.ws48p-tools-head { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; }
.ws48p-tools .ws48p-eyebrow { color: #E9B9A5; }
.ws48p-tools .ws48p-title em { color: #E9B9A5; }
body .ws48p .ws48p-tools .ws48p-title { font-size: clamp(40px, 5vw, 72px); line-height: 0.92; }
.ws48p-rows {
	flex: 999 1 560px;
	min-width: 0;
	border-top: 1px solid rgba(237, 232, 222, 0.25);
	counter-reset: ws48p-row;
}
.ws48p-row {
	position: relative;
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) 48px;
	grid-template-areas: "num title arrow" "num desc arrow";
	align-items: center;
	column-gap: 20px;
	row-gap: 4px;
	padding: 26px 0;
	border-bottom: 1px solid rgba(237, 232, 222, 0.25);
	counter-increment: ws48p-row;
}
.ws48p-row::before {
	content: counter(ws48p-row, decimal-leading-zero);
	grid-area: num;
	font-size: 14px;
	opacity: 0.6;
}
.ws48p-row::after {
	content: "→";
	grid-area: arrow;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(237, 232, 222, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	transition: all 0.3s;
}
.ws48p-row:hover::after { background: var(--ws-terra); border-color: var(--ws-terra); color: #FFFFFF; transform: rotate(-45deg); }
body .ws48p .ws48p-row-title {
	grid-area: title;
	font-size: clamp(24px, 2.6vw, 36px);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.1;
}
.ws48p-row-title a::after { content: ""; position: absolute; inset: 0; }
.ws48p-row-desc { grid-area: desc; font-size: 15px; color: #B9CBD6; }

/* ==========================================================================
   Closing CTA
   ========================================================================== */
.ws48p-cta { padding: 40px var(--ws-pad) 96px; }
.ws48p-cta-card {
	border-radius: 36px;
	background: var(--ws-terra);
	color: #FFFFFF;
	padding: 72px 48px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}
body .ws48p .ws48p-cta-title {
	font-size: clamp(48px, 8vw, 128px);
	font-weight: 600;
	line-height: 0.86;
	letter-spacing: -0.045em;
}
.ws48p-cta-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
}
.ws48p-cta-copy { max-width: 440px; font-size: 18px; line-height: 1.5; color: #FFF1EA; }
.ws48p-cta .ws48p-ctas a:first-child::after { color: inherit; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
	.ws48p-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	.ws48p-bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 260px; }
	.ws48p-bento .ws48p-span-big { grid-column: auto; grid-row: span 1; }
	.ws48p-tiles { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 240px; }
	.ws48p-tiles :is(.ws48p-span-big, .ws48p-span-tall, .ws48p-span-wide) { grid-column: auto; grid-row: auto; }
	.ws48p-spot-text, .ws48p-cta-card { padding: 48px 24px; }
	.ws48p-spot-media { min-height: 0; }
	body .ws48p .ws48p-marquee-cats { font-size: 26px; }
	body .ws48p .ws48p-marquee-clients { font-size: 32px; }
	.ws48p-row { grid-template-columns: 28px minmax(0, 1fr) 44px; column-gap: 14px; }
	.ws48p-row::after { width: 44px; height: 44px; }
	.ws48p-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ws48p-card { border-radius: 20px; padding: 8px 8px 14px; }
	body .ws48p .ws48p-card-title { font-size: 16px; padding-right: 6px; }
	.ws48p-card-cats { padding-right: 6px; font-size: 12px; }
	.ws48p-card::after { display: none; }
	.ws48p-sticker { width: 88px !important; height: 88px !important; font-size: 11px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.ws48p-track { animation: none; }
	.ws48p-tile, .ws48p-card, .ws48p-tile > .wp-block-image img, .ws48p-ctas a::after { transition: none; }
	.ws48p-card.is-entering { animation: none; }
}

/* ==========================================================================
   Block editor: keep everything clickable/editable
   ========================================================================== */
.editor-styles-wrapper .ws48p :is(.ws48p-tile-label, .ws48p-card-title, .ws48p-row-title) a::after { content: none; }
.editor-styles-wrapper .ws48p-tile:hover,
.editor-styles-wrapper .ws48p-card:hover { transform: none; box-shadow: none; }
.editor-styles-wrapper .ws48p-filters { position: static; }
.editor-styles-wrapper .ws48p-tile > .wp-block-image { z-index: 0; }
.editor-styles-wrapper .ws48p-tile > :not(.wp-block-image) { position: relative; z-index: 1; }
.editor-styles-wrapper .ws48p-tile > .ws48p-count,
.editor-styles-wrapper .ws48p-tile > .ws48p-badge,
.editor-styles-wrapper .ws48p-tile > .ws48p-sticker { position: absolute; }
.editor-styles-wrapper .ws48p-tile .components-placeholder,
.editor-styles-wrapper .ws48p-card-img .components-placeholder,
.editor-styles-wrapper .ws48p-spot-media .components-placeholder { min-height: 100%; height: 100%; border-radius: inherit; }
