/* China Stone Paper site styles. Colors and type come from theme.json presets. */

:root {
	--csp-radius: 14px;
	--csp-radius-sm: 10px;
	--csp-shadow: 0 1px 2px rgb(43 42 40 / 0.04), 0 8px 24px rgb(43 42 40 / 0.06);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-x: hidden; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { height: auto; }

/* Eyebrow label above headings */
.csp-eyebrow,
.csp-eyebrow a {
	color: var(--wp--preset--color--amber-text);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	margin-bottom: 0.25rem;
}

/* ---------- Header ---------- */
.csp-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .csp-header { top: var(--wp-admin--admin-bar--height, 32px); }

.csp-topbar { padding-block: 0.4rem; }
.csp-topbar p { margin: 0; }
.csp-topbar a { color: inherit; text-decoration: none; }
.csp-topbar a:hover { color: var(--wp--preset--color--amber); }
.csp-sep { opacity: 0.5; margin-inline: 0.35rem; }

.csp-navbar { padding-block: 0.85rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.csp-logo { margin: 0; flex-shrink: 0; }
.csp-logo img { display: block; }
.csp-navbar__right { gap: 1.75rem; }
.csp-nav a { text-decoration: none; font-weight: 500; }
.csp-nav a:hover { color: var(--wp--preset--color--amber-text); }
.csp-nav .current-menu-item > a { color: var(--wp--preset--color--amber-text); }
.csp-btn-inquiry .wp-block-button__link { padding: 0.6rem 1.15rem; }

@media (max-width: 781px) {
	.csp-topbar { display: none; }
	.csp-logo img { width: 120px !important; }
	.csp-navbar__right { gap: 1rem; }
	.csp-btn-inquiry .wp-block-button__link { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
}
@media (max-width: 599px) {
	/* Below 600px the menu collapses to a burger: show [Inquiry] [☰] */
	.csp-navbar__right { gap: 0.75rem; flex-direction: row-reverse; }
	/* Full-screen mobile menu */
	.csp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 4.5rem; align-items: stretch; }
	.csp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; width: 100%; align-items: stretch; }
	.csp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.9rem 0.25rem; font-size: 1.25rem; font-weight: 600; width: 100%; justify-content: flex-start; align-items: flex-start; text-align: left; }
	.csp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: stretch !important; }
}

/* ---------- Sections ---------- */
.csp-section h2 { margin-top: 0.25rem; }
.csp-section--white { background: var(--wp--preset--color--surface); border-block: 1px solid var(--wp--preset--color--line); }
.csp-band-wrap { background: var(--wp--preset--color--bg); }

/* ---------- Cards ---------- */
.csp-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--csp-radius);
	padding: clamp(1.1rem, 2.5vw, 1.6rem);
}
.csp-card + .csp-card { margin-top: 1rem; }
.csp-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.csp-card p { margin: 0 0 0.6rem; }
.csp-location a { color: inherit; }

.csp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem !important; }
.csp-chips a {
	background: var(--wp--preset--color--bg);
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}
.csp-chips a:hover { background: var(--wp--preset--color--amber); color: var(--wp--preset--color--ink); }

/* ---------- Product grid ---------- */
.csp-grid.wp-block-post-template { gap: 1.1rem; }
@media (max-width: 781px) {
	.csp-grid.wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem; }
}
.csp-product-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--csp-radius);
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.csp-product-card:hover { box-shadow: var(--csp-shadow); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .csp-product-card, .csp-product-card:hover { transition: none; transform: none; } }
.csp-product-card .wp-block-post-featured-image { margin: 0; background: var(--wp--preset--color--bg); }
.csp-product-card .wp-block-post-featured-image img { display: block; width: 100%; object-fit: cover; }
.csp-product-card__body { padding: 0.8rem 0.95rem 1rem; gap: 0.35rem; flex: 1; justify-content: space-between; }
.csp-product-card .wp-block-post-title { margin: 0; font-size: 0.95rem; line-height: 1.3; letter-spacing: 0; }
.csp-product-card .wp-block-post-title a { text-decoration: none; }
.csp-inquire { color: var(--wp--preset--color--amber-text); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.csp-inquire:hover { text-decoration: underline; }
@media (max-width: 781px) {
	.csp-product-card__body { padding: 0.6rem 0.7rem 0.75rem; }
	.csp-product-card .wp-block-post-title { font-size: 0.85rem; }
}

/* Category filter pills */
.csp-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 1.75rem; }
.csp-filters a {
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
	border-radius: 999px;
	padding: 0.45rem 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}
.csp-filters a.is-active,
.csp-filters a:hover { background: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); color: var(--wp--preset--color--surface); }

/* ---------- Single product ---------- */
.csp-breadcrumb a { text-decoration: none; color: var(--wp--preset--color--muted); }
.csp-product__image img { border-radius: var(--csp-radius); background: var(--wp--preset--color--surface); }
.csp-inquire-btn {
	display: inline-block;
	background: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--ink);
	border-radius: 999px;
	padding: 0.8rem 1.5rem;
	font-weight: 600;
	text-decoration: none;
	margin: 0.5rem 0;
}
.csp-inquire-btn:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--surface); text-decoration: none; }
.csp-product__content { margin-top: var(--wp--preset--spacing--50); }
.csp-product__content h3 { margin-top: 2rem; }
.csp-product__content ul { padding-left: 1.2rem; }
.csp-product__content li { margin-bottom: 0.35rem; }

/* ---------- Inquiry form ---------- */
#inquiry { scroll-margin-top: 120px; } /* Clear the sticky header when jumping to the form */
.csp-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.csp-form__field { margin: 0 0 0.9rem; }
.csp-form__field--wide { grid-column: 1 / -1; }
.csp-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.csp-form input,
.csp-form textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem; /* 16px stops iOS zooming into fields */
	color: inherit;
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--csp-radius-sm);
	padding: 0.7rem 0.85rem;
}
.csp-form input:focus,
.csp-form textarea:focus { outline: 2px solid var(--wp--preset--color--amber); outline-offset: 1px; background: var(--wp--preset--color--surface); }
.csp-form__submit { margin: 0.5rem 0 0; }
.csp-form__submit button { cursor: pointer; border: 0; width: 100%; padding: 0.9rem 1.4rem; font-size: 1rem; }
.csp-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.csp-form__notice { border-radius: var(--csp-radius-sm); padding: 0.8rem 1rem; font-weight: 600; }
.csp-form__notice--ok { background: #e6f3e8; color: #1f5a2c; }
.csp-form__notice--error { background: #fbe9e7; color: #8a2a1b; }
.cf-turnstile { margin-bottom: 0.75rem; }
@media (max-width: 600px) { .csp-form__grid { grid-template-columns: 1fr; } }

/* ---------- Home: hero ---------- */
.csp-hero { position: relative; }
.csp-hero__track { display: grid; }
.csp-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0.6s; }
.csp-slide.is-active { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .csp-slide { transition: none; } }
.csp-slide .wp-block-columns { align-items: center !important; }
.csp-slide figure { margin: 0; }
.csp-slide img { border-radius: 18px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.csp-hero__dots { display: flex; gap: 0.4rem; margin-top: 1.5rem; }
.csp-hero__dots button { width: 28px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: #cfc7ba; cursor: pointer; }
.csp-hero__dots button[aria-current="true"] { background: var(--wp--preset--color--ink); }
.csp-hero .wp-block-buttons { margin-top: 1.25rem; }
.csp-btn-ghost .wp-block-button__link { background: transparent; color: var(--wp--preset--color--ink); padding-inline: 0.5rem; }
.csp-btn-ghost .wp-block-button__link:hover { background: transparent; color: var(--wp--preset--color--amber-text); }
@media (max-width: 781px) {
	/* Photo above the headline on phones */
	.csp-slide .wp-block-columns { flex-direction: column-reverse; }
	.csp-slide img { aspect-ratio: 16 / 10; max-height: 380px; }
	.csp-hero__dots { justify-content: center; }
}

/* ---------- Home: what is stone paper ---------- */
.csp-video { border-radius: var(--csp-radius); overflow: hidden; margin: 0; }
.csp-video img,
.csp-photo img { width: 100%; display: block; border-radius: var(--csp-radius); }
.csp-photo { margin: 0; }
.csp-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }
.csp-facts { gap: 0.75rem !important; }
.csp-facts > * { background: var(--wp--preset--color--bg); border-radius: var(--csp-radius-sm); padding: 0.9rem; flex: 1; }
.csp-facts p { margin: 0; font-size: 0.85rem; color: var(--wp--preset--color--muted); }
.csp-facts strong { display: block; font-size: 1.6rem; color: var(--wp--preset--color--ink); line-height: 1.1; }

/* ---------- Home: properties strip ---------- */
.csp-props { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.6rem; }
@media (max-width: 1024px) { .csp-props { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.csp-props figure { margin: 0; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: var(--csp-radius-sm); padding: 0.5rem; }
.csp-props img { width: 100%; display: block; aspect-ratio: 1; object-fit: contain; }
@media (max-width: 600px) { .csp-props { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Home: why choose us ---------- */
.csp-why { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.9rem; }
.csp-why > .csp-card { margin: 0; }
.csp-why h3 { font-size: 1rem; }
.csp-why p { font-size: 0.9rem; color: var(--wp--preset--color--muted); }
@media (max-width: 1024px) { .csp-why { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .csp-why { grid-template-columns: 1fr; } }

/* ---------- Home: application areas ---------- */
.csp-apps { display: grid !important; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.75rem; }
.csp-apps figure { margin: 0; }
.csp-apps img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--csp-radius-sm); display: block; }
.csp-apps figcaption { font-size: 0.85rem; font-weight: 600; text-align: center; margin-top: 0.4rem; color: var(--wp--preset--color--ink); }
@media (max-width: 1024px) { .csp-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .csp-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- About gallery ---------- */
.csp-gallery.wp-block-gallery img { border-radius: var(--csp-radius-sm); }

/* ---------- Footer ---------- */
.csp-footer a { color: inherit; text-decoration: none; }
.csp-footer a:hover { color: var(--wp--preset--color--amber); }
.csp-footer__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0; }
.csp-footer__legal { opacity: 0.7; margin-top: 1.5rem; }
.csp-footer figure { margin: 0; }
.csp-footer__logo img { filter: brightness(0) invert(1); } /* The logo file has dark text; show it all white on the dark footer */

/* ---------- Mobile contact bar ---------- */
.csp-mobilebar { display: none; }
@media (max-width: 781px) {
	body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.csp-mobilebar {
		display: flex;
		gap: 0.5rem;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		background: var(--wp--preset--color--surface);
		border-top: 1px solid var(--wp--preset--color--line);
		padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
		box-shadow: 0 -4px 16px rgb(43 42 40 / 0.06);
	}
	.csp-mobilebar a {
		flex: 1;
		text-align: center;
		text-decoration: none;
		font-weight: 700;
		font-size: 0.9rem;
		border-radius: 999px;
		padding: 0.7rem 0;
		background: var(--wp--preset--color--bg);
		color: var(--wp--preset--color--ink);
	}
	.csp-mobilebar a.is-primary { background: var(--wp--preset--color--amber); }
}
