/*
Theme Name: SA Plumbing Supplies
Theme URI: https://saplumbingsupplies.com.au
Author: Pixel Lantern
Author URI: https://plweb.au
Description: Custom one-page landing theme for South Australian Plumbing Supplies (Port Lincoln, SA). Built by Pixel Lantern.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: saps
*/

/* -------------------------------------------------------------------------
   0. Variables & Reset
------------------------------------------------------------------------- */
:root {
	--saps-navy: #0b2e4f;
	--saps-navy-dark: #1a1d24;
	--saps-blue: #14508a;
	--saps-amber: #f2952f;
	--saps-amber-dark: #d97e1a;
	--saps-light: #f5f7f9;
	--saps-gray: #6b7580;
	--saps-border: #e2e6ea;
	--saps-white: #ffffff;
	--saps-max-width: 1200px;
	--saps-radius: 6px;
	--saps-shadow: 0 4px 16px rgba(11, 46, 79, 0.08);
	--saps-slant: 44px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #22303f;
	line-height: 1.6;
	background: var(--saps-white);
}

img { max-width: 100%; display: block; }

a { color: var(--saps-blue); text-decoration: none; }
a:hover { color: var(--saps-amber-dark); }

h1, h2, h3, h4 { font-family: inherit; font-weight: 700; color: var(--saps-navy); margin: 0 0 0.5em; line-height: 1.25; }

.saps-container {
	max-width: var(--saps-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.saps-section { padding: 80px 0; scroll-margin-top: 84px; position: relative; }
.saps-section--alt { background: var(--saps-light); }

/* Diagonal section dividers — an entering section's top edge cuts across
   the seam and overlaps upward into the section above it, so the diagonal
   is drawn entirely by the (opaque) entering section and there's never a
   gap regardless of what colour sits behind it. Direction alternates
   (tilt-l / tilt-r) down the page for a zigzag rather than one repeated
   angle. Desktop/tablet only — see the 782px breakpoint, which reverts to
   plain rectangular sections. */
.saps-tilt-l,
.saps-tilt-r {
	margin-top: calc(var(--saps-slant) * -1);
	padding-top: calc(80px + var(--saps-slant));
	z-index: 1;
}
.saps-tilt-l { clip-path: polygon(0 var(--saps-slant), 100% 0, 100% 100%, 0 100%); }
.saps-tilt-r { clip-path: polygon(0 0, 100% var(--saps-slant), 100% 100%, 0 100%); }

/* Scroll-reveal — classes are added by JS (assets/js/main.js), never in
   markup, so content stays fully visible with JS disabled or under
   prefers-reduced-motion (progressive enhancement, not a hidden-by-default
   trap). */
.saps-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.saps-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.saps-eyebrow {
	display: block;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--saps-amber-dark);
	margin-bottom: 0.5em;
}

.saps-section-heading { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.saps-section-heading h2 { font-size: 2rem; }
.saps-section-heading p { color: var(--saps-gray); margin: 0; }

/* Shown instead of the Projects/Testimonials grid when there's no real
   content yet, in place of the old fake placeholder tiles/quotes. */
.saps-section-empty { text-align: center; color: var(--saps-gray); font-size: 0.95rem; max-width: 480px; margin: 0 auto; }

/* Buttons */
.saps-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.95rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.saps-btn:hover { transform: translateY(-2px); }

.saps-btn--primary {
	background: var(--saps-amber);
	color: var(--saps-navy-dark);
	border-color: var(--saps-amber);
	box-shadow: 0 8px 20px rgba(242, 149, 47, 0.35);
	animation: saps-glow-pulse 3s ease-in-out infinite;
}
.saps-btn--primary:hover { background: var(--saps-amber-dark); border-color: var(--saps-amber-dark); color: var(--saps-white); animation-play-state: paused; }

@keyframes saps-glow-pulse {
	0%, 100% { box-shadow: 0 8px 20px rgba(242, 149, 47, 0.35); }
	50% { box-shadow: 0 8px 28px rgba(242, 149, 47, 0.7), 0 0 16px rgba(242, 149, 47, 0.4); }
}

.saps-btn--secondary { background: transparent; color: var(--saps-white); border-color: var(--saps-white); }
.saps-btn--secondary:hover { background: var(--saps-white); color: var(--saps-navy); }

.saps-btn--ghost { background: transparent; color: var(--saps-white); border-color: transparent; padding-left: 8px; padding-right: 8px; text-decoration: underline; text-underline-offset: 4px; }
.saps-btn--ghost:hover { color: var(--saps-amber); transform: none; }

.saps-btn--outline { background: transparent; color: var(--saps-navy); border-color: var(--saps-navy); }
.saps-btn--outline:hover { background: var(--saps-navy); color: var(--saps-white); }

.saps-btn--small { padding: 10px 20px; font-size: 0.85rem; }

/* -------------------------------------------------------------------------
   1. Header / Navigation (sticky)
------------------------------------------------------------------------- */
.saps-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--saps-white);
	box-shadow: 0 2px 10px rgba(11, 46, 79, 0.1);
}

/* Slim utility bar (phone + social) above the main logo/nav row — kept as
   part of the same sticky .saps-header rather than scrolling away, so the
   phone number stays reachable while browsing, not just on first load. */
.saps-header-top {
	background: var(--saps-light);
	border-top: 1px solid var(--saps-border);
}
.saps-header-top-inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 16px;
	padding-top: 8px;
	padding-bottom: 8px;
	font-size: 0.85rem;
}

.saps-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 18px;
	padding-bottom: 18px;
}

.saps-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--saps-navy);
	letter-spacing: -0.01em;
	white-space: nowrap;
}
.saps-logo img { max-height: 48px; width: auto; }
.saps-logo span { color: var(--saps-navy); }
.saps-logo-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--saps-amber);
	color: var(--saps-navy-dark);
	flex-shrink: 0;
}

.primary-menu {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}
.primary-menu a {
	color: var(--saps-navy);
	font-weight: 600;
	font-size: 0.95rem;
}
.primary-menu a:hover { color: var(--saps-amber-dark); }

.saps-header-actions {
	display: flex;
	align-items: center;
	gap: 22px;
}
.saps-header-phone {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--saps-navy);
	white-space: nowrap;
}
.saps-header-phone svg { flex-shrink: 0; }

.saps-header-social { display: flex; align-items: center; gap: 8px; }
.saps-header-social a {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid var(--saps-border);
	color: var(--saps-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.saps-header-social a:hover { background: var(--saps-navy); border-color: var(--saps-navy); color: var(--saps-white); }

.saps-nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}
.saps-nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--saps-navy);
	margin: 5px 0;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

/* -------------------------------------------------------------------------
   2. Hero Banner
------------------------------------------------------------------------- */
.saps-hero {
	position: relative;
	min-height: 90vh;
	display: flex;
	align-items: stretch;
	color: var(--saps-white);
	background: var(--saps-navy-dark);
	overflow: hidden;
}

.saps-hero-image {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 58%;
	overflow: hidden;
	background: var(--saps-white);
	clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.saps-hero-image-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	display: block;
}

/* Slideshow variant (2+ images selected in Site Settings → Hero): every
   image is stacked in the same spot via the absolute positioning above,
   and only the .is-active one is opaque. Crossfading is just two images
   transitioning opacity in the same tick — no JS beyond toggling the
   class is needed for the fade itself, see assets/js/main.js. Single-image
   hero doesn't get this modifier class, so it stays fully opaque with no
   transition overhead. */
.saps-hero-image--slideshow .saps-hero-image-img {
	opacity: 0;
	transition: opacity 1.8s ease-in-out;
}
.saps-hero-image--slideshow .saps-hero-image-img.is-active {
	opacity: 1;
	z-index: 1;
}

/* Solid-colour overlay (not a gradient) — colour and darkness are both
   admin-adjustable (Site Settings → Branding → Hero → Hero Overlay
   Colour / Darkness (Desktop) / (Mobile)) via the --saps-hero-overlay-color
   / --saps-hero-overlay-opacity / --saps-hero-overlay-opacity-mobile
   custom properties set inline on .saps-hero-image in front-page.php.
   Opacity is a plain 0–1 fraction (0% = fully transparent, 100% = fully
   opaque) applied via the element's own `opacity`, not calc() inside an
   rgba() alpha channel — that combination is unreliable in some browsers
   and can silently fail to compute, dropping the background entirely.
   z-index: 2 is required, not decorative: .saps-hero-image--slideshow
   .saps-hero-image-img.is-active below is a real element painted AFTER
   this ::before in the DOM, so at matching z-index the photo would paint
   on top of the overlay and hide it completely on any hero with more than
   one photo configured. Needs to beat the slideshow image (z-index: 1)
   and sit below the text content (.saps-hero-inner, z-index: 3 below). */
.saps-hero-image::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: var(--saps-hero-overlay-color, #1a1d24);
	opacity: var(--saps-hero-overlay-opacity, 0.65);
}

.saps-hero-inner {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	min-height: 90vh;
	width: 100%;
}

.saps-hero-content { max-width: 540px; text-align: left; padding: 60px 0; }

.saps-hero-tag {
	display: inline-block;
	padding: 6px 16px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 22px;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.saps-hero h1 {
	color: var(--saps-white);
	font-size: 3.1rem;
	line-height: 1.15;
	margin-bottom: 0.4em;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.saps-hero-sub {
	font-size: 1.15rem;
	font-weight: 500;
	color: #cdd8e3;
	max-width: 460px;
	margin-bottom: 32px;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.saps-hero-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   3. Specialties Grid
------------------------------------------------------------------------- */
.saps-specialties-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
}

.saps-specialty-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	background: var(--saps-white);
	border: 1px solid var(--saps-border);
	border-radius: var(--saps-radius);
	padding: 28px 20px;
	text-align: center;
	box-shadow: var(--saps-shadow);
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.saps-specialty-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(11, 46, 79, 0.14); border-color: var(--saps-amber); }
.saps-specialty-card:focus-visible { outline: 2px solid var(--saps-amber); outline-offset: 2px; }

.saps-specialty-cta {
	display: block;
	margin-top: 14px;
	color: var(--saps-blue);
	font-weight: 700;
	font-size: 0.82rem;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}
.saps-specialty-card:hover .saps-specialty-cta,
.saps-specialty-card:focus-visible .saps-specialty-cta { opacity: 1; transform: translateY(0); }

.saps-specialty-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 80, 138, 0.1);
	border-radius: 50%;
	color: var(--saps-blue);
}

.saps-specialty-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.saps-specialty-card p { color: var(--saps-gray); font-size: 0.9rem; margin: 0; }

/* -------------------------------------------------------------------------
   3b. Trusted Suppliers modal
------------------------------------------------------------------------- */
.saps-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.saps-modal.is-open { display: flex; }

.saps-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(11, 46, 79, 0.66);
	backdrop-filter: blur(2px);
	animation: saps-modal-fade-in 0.2s ease;
}

.saps-modal-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(100%, 980px);
	max-height: 88vh;
	background: var(--saps-white);
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(11, 46, 79, 0.35);
	overflow: hidden;
	animation: saps-modal-pop-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes saps-modal-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes saps-modal-pop-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.saps-modal-header {
	flex-shrink: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 28px 32px 20px;
	border-bottom: 1px solid var(--saps-border);
}
.saps-modal-header h2 { margin-bottom: 4px; font-size: 1.4rem; }
.saps-modal-header p { margin: 0; color: var(--saps-gray); font-size: 0.9rem; }

.saps-modal-close {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--saps-border);
	background: var(--saps-white);
	color: var(--saps-navy);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.saps-modal-close:hover { background: var(--saps-navy); border-color: var(--saps-navy); color: var(--saps-white); }

.saps-modal-tabs {
	flex-shrink: 0;
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	padding: 16px 32px;
	overflow-x: auto;
	border-bottom: 1px solid var(--saps-border);
	scrollbar-width: thin;
}

.saps-modal-tab {
	flex-shrink: 0;
	white-space: nowrap;
	padding: 8px 18px;
	line-height: 1.4;
	border-radius: 999px;
	border: 1px solid var(--saps-border);
	background: var(--saps-white);
	color: var(--saps-gray);
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.saps-modal-tab:hover { border-color: var(--saps-amber); color: var(--saps-amber-dark); }
.saps-modal-tab.is-active { background: var(--saps-navy); border-color: var(--saps-navy); color: var(--saps-white); }

.saps-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 24px 32px 32px;
}

.saps-modal-group + .saps-modal-group { margin-top: 32px; }
.saps-modal-group.is-hidden { display: none; }

.saps-modal-group-title {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--saps-gray);
	margin-bottom: 16px;
}

.saps-modal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
}

.saps-modal-supplier {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 12px;
	min-height: 88px;
	border: 1px solid var(--saps-border);
	border-radius: var(--saps-radius);
	background: var(--saps-light);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.saps-modal-supplier:hover {
	border-color: var(--saps-amber);
	box-shadow: var(--saps-shadow);
	transform: translateY(-2px);
}
.saps-modal-supplier img {
	max-height: 48px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
}
.saps-modal-supplier-name {
	color: var(--saps-gray);
	font-weight: 600;
	font-size: 0.72rem;
	letter-spacing: 0.02em;
	text-align: center;
	line-height: 1.3;
}
.saps-modal-supplier-name--only {
	color: var(--saps-navy);
	font-weight: 700;
	font-size: 0.85rem;
}

body.saps-modal-is-open { overflow: hidden; }

@media (max-width: 782px) {
	.saps-modal { padding: 0; }
	.saps-modal-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
	.saps-modal-header { padding: 20px 20px 16px; }
	.saps-modal-tabs { padding: 12px 20px; }
	.saps-modal-body { padding: 20px; }
}

/* -------------------------------------------------------------------------
   4. Featured Products
------------------------------------------------------------------------- */
.saps-products-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.saps-product-card {
	background: var(--saps-white);
	border: 1px solid var(--saps-border);
	border-radius: var(--saps-radius);
	overflow: hidden;
	box-shadow: var(--saps-shadow);
	display: flex;
	flex-direction: column;
}

/* Fixed 4:3 box, every card the same size regardless of each photo's
   own proportions — object-fit: cover fills it completely (no
   letterbox gap, so the rounded corners sit against real photo edges,
   not whitespace) by cropping instead of squashing. Which edge gets
   cropped is controlled per-product via the "Image Position" ACF field
   (--saps-img-position, set inline in front-page.php) rather than
   baked into the file, so it's non-destructive and trivially
   adjustable later — including if the card's aspect ratio itself ever
   changes, since "top"/"center"/"bottom" still means the same thing. */
.saps-product-image {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--saps-white);
	overflow: hidden;
	border-radius: var(--saps-radius) var(--saps-radius) 0 0;
	--saps-img-position: center;
}
.saps-product-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center var(--saps-img-position);
	display: block;
}

/* Slideshow variant (Featured Image + 1 or more Additional Images set in
   ACF): every image stacks in the same spot via absolute positioning
   (already the case above) and crossfades, same technique as the hero
   slideshow above. A product with no additional images doesn't get
   this modifier class, so its single photo just displays with no
   transition overhead. */
.saps-product-image--slideshow .saps-product-image-img {
	opacity: 0;
	z-index: 0;
	transition: opacity 1.8s ease-in-out;
}
.saps-product-image--slideshow .saps-product-image-img.is-active {
	opacity: 1;
	z-index: 1;
}

.saps-product-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.saps-product-body h3 { font-size: 1rem; margin-bottom: 0; }
.saps-product-body p { color: var(--saps-gray); font-size: 0.88rem; margin: 0; flex: 1; }
.saps-product-price { font-weight: 700; color: var(--saps-navy); font-size: 0.95rem; align-self: center; }
.saps-product-body .saps-btn { align-self: center; margin-top: 8px; }

/* -------------------------------------------------------------------------
   5. Why Choose Us
------------------------------------------------------------------------- */
.saps-why-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
}

.saps-why-item { text-align: center; }
.saps-why-number {
	width: 48px;
	height: 48px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--saps-navy);
	color: var(--saps-white);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
}
.saps-why-item h3 { font-size: 1.05rem; }
.saps-why-item p { color: var(--saps-gray); font-size: 0.9rem; margin: 0; }

/* -------------------------------------------------------------------------
   6. Projects / Gallery Teaser
------------------------------------------------------------------------- */
.saps-gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.saps-gallery-tile {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--saps-radius);
	overflow: hidden;
	background: var(--saps-navy);
	display: flex;
	align-items: flex-end;
	color: var(--saps-white);
}
/* Tiles with a real photo render as a <button> (clickable, opens the
   lightbox); placeholder-only tiles stay a plain <div>. Resets the
   default button chrome so it's visually identical to the div version. */
button.saps-gallery-tile {
	width: 100%;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	text-align: inherit;
	cursor: pointer;
}
.saps-gallery-tile-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}
/* Cards with more than one photo (Featured Image + Additional Images)
   crossfade between them — same technique as the product card slideshow.
   A single-photo card has no --slideshow wrapper class at all, so its img
   just stays a normal fully-opaque photo, never entering this rule. */
.saps-gallery-tile--slideshow .saps-gallery-tile-img {
	opacity: 0;
	transition: opacity 1.8s ease-in-out;
}
.saps-gallery-tile--slideshow .saps-gallery-tile-img.is-active {
	opacity: 1;
}
.saps-gallery-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(11,46,79,0) 40%, rgba(7,30,53,0.85) 100%);
}
.saps-gallery-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: var(--saps-navy);
	color: var(--saps-white);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: var(--saps-radius);
}
.saps-gallery-caption {
	position: relative;
	z-index: 2;
	padding: 16px;
	font-weight: 700;
	font-size: 0.9rem;
}

.saps-gallery-cta { text-align: center; margin-top: 40px; }

/* -------------------------------------------------------------------------
   6b. Visit Our Showroom
------------------------------------------------------------------------- */
/* Deliberately mixed tile sizes (not just each photo's natural aspect
   ratio, which can end up looking like a uniform grid if the source
   photos happen to be similar shapes) — every 5th photo (see the
   .saps-showroom-tile--large class, set in front-page.php) is a "hero"
   tile spanning 2 columns × 2 rows; the other 4 in each group of 5 are
   plain 1×1 tiles. A 2×2 tile + four 1×1 tiles is exactly 8 cells, which
   is a complete 4-column × 2-row rectangle with nothing left over — so
   each group of 5 photos tiles perfectly on its own regardless of what
   comes before or after it, and the pattern repeats cleanly for any
   number of photos. Only the very last, possibly-incomplete group can
   leave a shorter final row (normal end-of-content, not a gap). Also
   holds at the 2-column tablet breakpoint below (8 cells / 2 cols = 4
   rows, still exact); the 1-column mobile breakpoint overrides the large
   tile to span 1 column, where a single column is gapless by definition
   regardless of tile heights. */
.saps-showroom-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 190px;
	grid-auto-flow: dense;
	gap: 16px;
}
.saps-showroom-tile--large {
	grid-column: span 2;
	grid-row: span 2;
}

.saps-showroom-tile {
	position: relative;
	width: 100%;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	border-radius: var(--saps-radius);
	overflow: hidden;
	background: var(--saps-light);
	cursor: pointer;
}
.saps-showroom-tile img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.saps-showroom-tile:hover img,
.saps-showroom-tile:focus-visible img { transform: scale(1.06); }
.saps-showroom-tile:focus-visible { outline: 2px solid var(--saps-amber); outline-offset: 2px; }

/* -------------------------------------------------------------------------
   6c. Photo lightbox (Showroom + Projects gallery)
------------------------------------------------------------------------- */
.saps-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1100;
	align-items: center;
	justify-content: center;
	padding: 32px;
}
.saps-lightbox.is-open { display: flex; }

.saps-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(7, 30, 53, 0.92);
	animation: saps-modal-fade-in 0.2s ease;
}

.saps-lightbox-img {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
	animation: saps-modal-pop-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.saps-lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: rgba(11, 46, 79, 0.6);
	color: var(--saps-white);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.saps-lightbox-close:hover { background: var(--saps-amber); border-color: var(--saps-amber); color: var(--saps-navy-dark); }

body.saps-lightbox-is-open { overflow: hidden; }

@media (max-width: 782px) {
	.saps-lightbox { padding: 16px; }
	.saps-lightbox-close { top: 12px; right: 12px; }
}

/* -------------------------------------------------------------------------
   6d. Project popup (photo + slideshow) — reuses .saps-modal's card/overlay
   visual language, adapted for a photo-first layout.
------------------------------------------------------------------------- */
.saps-project-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1050;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.saps-project-modal.is-open { display: flex; }

.saps-project-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(11, 46, 79, 0.72);
	animation: saps-modal-fade-in 0.2s ease;
}

.saps-project-modal-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(100%, 760px);
	max-height: 88vh;
	background: var(--saps-white);
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(11, 46, 79, 0.35);
	overflow-y: auto;
	animation: saps-modal-pop-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.saps-project-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(11, 46, 79, 0.55);
	color: var(--saps-white);
	cursor: pointer;
	transition: background 0.15s ease;
}
.saps-project-modal-close:hover { background: var(--saps-navy); }

.saps-project-modal-media {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: var(--saps-light);
	flex-shrink: 0;
}
.saps-project-modal-slides { position: absolute; inset: 0; }
.saps-project-modal-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.4s ease;
}
.saps-project-modal-slide.is-active { opacity: 1; z-index: 1; }
.saps-project-modal-zoom {
	display: block;
	width: 100%;
	height: 100%;
	border: none;
	padding: 0;
	margin: 0;
	background: none;
	cursor: zoom-in;
}
.saps-project-modal-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.saps-project-modal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(11, 46, 79, 0.55);
	color: var(--saps-white);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.saps-project-modal-nav:hover { background: var(--saps-navy); }
.saps-project-modal-nav--prev { left: 14px; }
.saps-project-modal-nav--next { right: 14px; }
.saps-project-modal-counter {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 3;
	background: rgba(11, 46, 79, 0.55);
	color: var(--saps-white);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: var(--saps-radius);
}

.saps-project-modal-thumbs-wrap { position: relative; padding: 12px 32px 0; }
.saps-project-modal-thumbs {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	touch-action: pan-x;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.saps-project-modal-thumbs::-webkit-scrollbar { display: none; }
.saps-project-modal-thumb {
	flex: 0 0 64px;
	width: 64px;
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	overflow: hidden;
	border: 2px solid transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	background: var(--saps-light);
	opacity: 0.6;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}
.saps-project-modal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.saps-project-modal-thumb:hover { opacity: 0.85; }
.saps-project-modal-thumb.is-active { opacity: 1; border-color: var(--saps-amber); }
.saps-project-modal-thumbs-nav {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 50%;
	background: rgba(11, 46, 79, 0.55);
	color: var(--saps-white);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.saps-project-modal-thumbs-nav.is-visible { display: flex; }
.saps-project-modal-thumbs-nav:hover { background: var(--saps-navy); }
.saps-project-modal-thumbs-nav--prev { left: 3px; }
.saps-project-modal-thumbs-nav--next { right: 3px; }

.saps-project-modal-body { padding: 20px 32px 32px; }
.saps-project-modal-heading-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}
.saps-project-modal-title { margin: 0; font-size: 1.25rem; }
.saps-project-modal-tag {
	display: inline-block;
	background: var(--saps-amber);
	color: var(--saps-navy-dark);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: var(--saps-radius);
	flex-shrink: 0;
}
.saps-project-modal-description { margin: 0; line-height: 1.6; color: var(--saps-gray); }
.saps-project-modal-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 20px;
}
.saps-project-modal-close-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 28px;
	border: 1.5px solid var(--saps-navy);
	border-radius: var(--saps-radius);
	background: none;
	color: var(--saps-navy);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.saps-project-modal-close-btn:hover { background: var(--saps-navy); color: var(--saps-white); }
.saps-project-modal-project-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(11, 46, 79, 0.08);
	color: var(--saps-navy);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.saps-project-modal-project-nav:hover { background: rgba(11, 46, 79, 0.16); }

body.saps-project-modal-is-open { overflow: hidden; }

@media (max-width: 640px) {
	.saps-project-modal { padding: 0; }
	.saps-project-modal-dialog { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
	.saps-project-modal-body { padding: 20px 20px 26px; }
}

/* -------------------------------------------------------------------------
   7. Testimonials
------------------------------------------------------------------------- */
.saps-testimonials-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.saps-testimonial-card {
	background: var(--saps-white);
	border: 1px solid var(--saps-border);
	border-radius: var(--saps-radius);
	padding: 28px;
	box-shadow: var(--saps-shadow);
}
.saps-testimonial-quote {
	font-size: 0.98rem;
	color: #33465b;
	margin-bottom: 20px;
}
.saps-testimonial-quote::before { content: "\201C"; color: var(--saps-amber); font-size: 1.4em; }
.saps-testimonial-author { font-weight: 700; color: var(--saps-navy); }
.saps-testimonial-role { color: var(--saps-gray); font-size: 0.85rem; }

/* -------------------------------------------------------------------------
   8. Contact Us
------------------------------------------------------------------------- */
.saps-contact {
	background: var(--saps-navy);
	color: var(--saps-white);
	text-align: center;
}
.saps-contact h2 { color: var(--saps-white); }
.saps-contact p { color: #cdd8e3; max-width: 560px; margin: 0 auto 32px; }

.saps-contact-phone {
	font-size: 2.2rem;
	font-weight: 800;
	color: var(--saps-white);
	display: block;
	margin-bottom: 24px;
}
.saps-contact-phone:hover { color: var(--saps-amber); }

.saps-contact-actions {
	display: flex;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}

.saps-contact-details {
	display: flex;
	justify-content: center;
	gap: 64px;
	flex-wrap: wrap;
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	text-align: left;
}
.saps-contact-details h3 {
	color: var(--saps-white);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 16px;
}
.saps-contact-address p { color: #cdd8e3; margin: 0; }

.saps-contact-hours dl { margin: 0; min-width: 220px; }
.saps-hours-row {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	padding: 4px 0;
	color: #cdd8e3;
	font-size: 0.95rem;
}
.saps-hours-row dt { font-weight: 600; color: var(--saps-white); }
.saps-hours-row dd { margin: 0; }
.saps-hours-row.is-closed dd { color: #8ea0b3; }

/* -------------------------------------------------------------------------
   8b. Decorative section backgrounds
   Subtle, optional per-section flourish for the plain-background sections
   (Specialties, Why Us, Testimonials, Contact) — soft blurred gradient
   blobs plus a faint oversized line-art icon reusing the same stroke
   style as the Specialties icons, so it reads as an intentional brand
   motif rather than random decoration. Purely decorative (aria-hidden,
   pointer-events: none) and never affects layout.

   Each host section gets z-index: 0 to become its own stacking context
   (it already has position: relative from .saps-section), and only that
   section's own .saps-container is bumped to z-index: 1 — scoped by ID
   so this never touches .saps-container globally. Decor itself stays at
   the stacking context's base layer, safely behind the real content.
------------------------------------------------------------------------- */
.saps-section-decor {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.saps-decor-blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(50px);
	animation: saps-decor-drift 24s ease-in-out infinite;
}
.saps-decor-blob--1 {
	width: 380px;
	height: 380px;
	top: -140px;
	right: -100px;
	background: radial-gradient(circle at 30% 30%, var(--saps-blue), transparent 70%);
	opacity: 0.22;
}
.saps-decor-blob--2 {
	width: 300px;
	height: 300px;
	bottom: -110px;
	left: -90px;
	background: radial-gradient(circle at 60% 40%, var(--saps-amber), transparent 70%);
	opacity: 0.16;
	animation-delay: -9s;
	animation-duration: 28s;
}
@keyframes saps-decor-drift {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(22px, -16px) scale(1.08); }
}

.saps-decor-icon {
	position: absolute;
	color: var(--saps-navy);
	opacity: 0.05;
	animation: saps-decor-float 15s ease-in-out infinite;
}
@keyframes saps-decor-float {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50% { transform: translateY(-14px) rotate(4deg); }
}

#specialties, #about, #testimonials, #contact { z-index: 0; }
#specialties > .saps-container,
#about > .saps-container,
#testimonials > .saps-container,
#contact > .saps-container {
	position: relative;
	z-index: 1;
}

/* Contact's background is solid navy, so its decor needs to be light
   instead of the navy used everywhere else. */
#contact .saps-decor-icon { color: var(--saps-white); opacity: 0.06; }
#contact .saps-decor-blob--1 { opacity: 0.15; }
#contact .saps-decor-blob--2 {
	background: radial-gradient(circle at 60% 40%, var(--saps-blue), transparent 70%);
	opacity: 0.3;
}

@media (max-width: 782px) {
	.saps-decor-blob--1 { width: 260px; height: 260px; }
	.saps-decor-blob--2 { width: 200px; height: 200px; }
	.saps-decor-icon { width: 140px; height: 140px; }
}

/* -------------------------------------------------------------------------
   9. Footer
------------------------------------------------------------------------- */
.saps-footer {
	background: var(--saps-navy-dark);
	color: #a9b8c7;
	padding: 48px 0 24px;
	font-size: 0.9rem;
}
.saps-footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 32px;
	margin-bottom: 32px;
}
.saps-footer h3 { color: var(--saps-white); font-size: 1rem; margin-bottom: 12px; }
.saps-footer a { color: #a9b8c7; }
.saps-footer a:hover { color: var(--saps-amber); }
.saps-footer-social { display: flex; gap: 12px; margin-top: 12px; }
.saps-footer-social a {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #33465b;
	display: flex;
	align-items: center;
	justify-content: center;
}
.saps-footer-bottom {
	border-top: 1px solid #1c3652;
	padding-top: 20px;
	text-align: center;
	font-size: 0.8rem;
	color: #7c8ea0;
}
.saps-footer-bottom a { color: #7c8ea0; text-decoration: underline; }

/* -------------------------------------------------------------------------
   10. Responsive
------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.saps-specialties-grid { grid-template-columns: repeat(3, 1fr); }
	.saps-products-row { grid-template-columns: repeat(2, 1fr); }
	.saps-why-grid { grid-template-columns: repeat(2, 1fr); }
	.saps-gallery-grid { grid-template-columns: repeat(2, 1fr); }
	.saps-showroom-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
	.saps-testimonials-grid { grid-template-columns: 1fr; }
	.saps-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 782px) {
	.saps-tilt-l,
	.saps-tilt-r {
		clip-path: none;
		margin-top: 0;
		padding-top: 56px;
	}

	.saps-hero-image {
		width: 100%;
		clip-path: none;
	}
	/* Separate admin-adjustable darkness for mobile (Site Settings → Hero →
	   Hero Overlay Darkness (Mobile)) — same solid colour as desktop, just
	   its own opacity, since the photo fills the full width behind the
	   text here instead of only the right ~58%. */
	.saps-hero-image::before {
		opacity: var(--saps-hero-overlay-opacity-mobile, 0.65);
	}
	.saps-hero-inner { justify-content: center; }
	.saps-hero-content { max-width: 100%; text-align: center; padding: 48px 0; }
	.saps-hero-tag { margin-left: auto; margin-right: auto; }
	.saps-hero-actions { justify-content: center; }
	.saps-hero h1 { font-size: 2.1rem; }
	.saps-hero-sub { font-size: 1.05rem; margin-left: auto; margin-right: auto; }

	.saps-nav-toggle { display: block; }

	.primary-menu {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--saps-white);
		flex-direction: column;
		gap: 0;
		padding: 8px 24px;
		box-shadow: 0 8px 16px rgba(11, 46, 79, 0.1);
		display: none;
	}
	.primary-menu.is-open { display: flex; }
	.primary-menu li { border-bottom: 1px solid var(--saps-border); }
	.primary-menu a { display: block; padding: 14px 0; color: var(--saps-navy); }
	.primary-menu a:hover { color: var(--saps-amber-dark); }

	.saps-header-top-inner { justify-content: center; }

	.saps-specialties-grid { grid-template-columns: repeat(2, 1fr); }
	.saps-products-row { grid-template-columns: 1fr 1fr; }
	.saps-why-grid { grid-template-columns: 1fr; }
	.saps-gallery-grid { grid-template-columns: 1fr 1fr; }
	.saps-showroom-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
	.saps-footer-grid { grid-template-columns: 1fr; }
	.saps-section { padding: 56px 0; }
}

@media (max-width: 480px) {
	.saps-specialties-grid { grid-template-columns: 1fr; }
	.saps-products-row { grid-template-columns: 1fr; }
	.saps-gallery-grid { grid-template-columns: 1fr; }
	.saps-showroom-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
	.saps-showroom-tile--large { grid-column: span 1; }
	.saps-contact-phone { font-size: 1.6rem; }
}

/* -------------------------------------------------------------------------
   11. Reduced motion
------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.saps-btn--primary { animation: none; }
	.saps-reveal { transition: none; }
	.saps-modal-overlay, .saps-modal-dialog { animation: none; }
	.saps-hero-image--slideshow .saps-hero-image-img { transition: none; }
	.saps-product-image--slideshow .saps-product-image-img { transition: none; }
	.saps-lightbox-overlay, .saps-lightbox-img { animation: none; }
	.saps-showroom-tile img { transition: none; }
	.saps-decor-blob, .saps-decor-icon { animation: none; }
}
