/*
Theme Name: Surfactant Depot
Description: Child theme of Twenty Twenty-Five for the Surfactant Depot store. Temporary first-build design: text logo, industrial-supply palette, catalog and product-page layouts.
Template: twentytwentyfive
Version: 0.5.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: surfactant-depot
*/

:root {
	--sd-ink: #16202a;
	--sd-blue: #0b4f6c;
	--sd-blue-dark: #0a3a50;
	--sd-amber: #e8862a;
	--sd-muted: #5b6875;
	--sd-surface: #f3f5f7;
	--sd-line: #d5dbe1;
	--sd-radius: 4px;
}

/* ---------- Header ---------- */
.sd-utility {
	background: var(--sd-blue-dark);
	color: #fff;
	font-size: 0.8125rem;
	padding: 0.4rem 1.25rem;
	text-align: center;
}
.sd-utility p { margin: 0; }
.sd-header {
	border-bottom: 3px solid var(--sd-blue);
	background: #fff;
	padding: 0.9rem 1.25rem;
}
.sd-header__row {
	gap: 1rem 1.5rem;
	align-items: center;
}
.sd-logo,
.sd-logo a {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--sd-ink);
	text-decoration: none;
	line-height: 1.1;
	margin: 0;
}
.sd-logo a::before {
	content: "";
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	margin-right: 0.45em;
	background: var(--sd-amber);
	border-radius: 2px;
	transform: rotate(45deg) translateY(-0.05em);
}
.sd-header .wp-block-search {
	flex: 1 1 18rem;
	max-width: 30rem;
}
.sd-header .wp-block-navigation {
	font-weight: 600;
	font-size: 0.95rem;
}
.wp-block-search__input,
.sd-catalog-search input[type="search"] {
	border: 1px solid var(--sd-line);
	border-radius: var(--sd-radius);
	padding: 0.55rem 0.75rem;
	font-size: 0.95rem;
	min-width: 0;
}
.wp-block-search__button,
.sd-catalog-search button {
	background: var(--sd-blue);
	color: #fff;
	border: 0;
	border-radius: var(--sd-radius);
	padding: 0.55rem 1rem;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}
.wp-block-search__button:hover,
.sd-catalog-search button:hover { background: var(--sd-blue-dark); }

/* ---------- Footer ---------- */
.sd-footer {
	margin-top: 4rem;
	background: var(--sd-ink);
	color: #d9dee3;
	padding: 2rem 1.25rem;
	font-size: 0.9rem;
}
.sd-footer a { color: #fff; }
.sd-footer p { margin: 0; }
.sd-footer__row { gap: 0.75rem 2rem; }

/* ---------- Home ---------- */
.sd-main { padding: 0 1.25rem; }
.sd-hero {
	background: linear-gradient(180deg, var(--sd-surface), #fff);
	border-bottom: 1px solid var(--sd-line);
	padding: 3.5rem 1.25rem 3rem;
	margin-top: 0;
}
.sd-eyebrow {
	color: var(--sd-blue);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}
.sd-hero h1 {
	font-size: clamp(1.9rem, 4.2vw, 3rem);
	line-height: 1.12;
	font-weight: 800;
	max-width: 20ch;
	margin: 0 0 1rem;
}
.sd-lead {
	font-size: 1.125rem;
	color: var(--sd-muted);
	max-width: 60ch;
}
.sd-hero .wp-block-search { max-width: 34rem; margin-top: 1.5rem; }
.sd-section { padding: 2.75rem 1.25rem 0; }
.sd-section--tint {
	background: var(--sd-surface);
	padding-bottom: 2.75rem;
	margin-top: 2.75rem;
	border-top: 1px solid var(--sd-line);
	border-bottom: 1px solid var(--sd-line);
}
.sd-section h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 1rem; }
.sd-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1rem;
}
.sd-card-grid > * { margin: 0 !important; }
.sd-card {
	background: #fff;
	border: 1px solid var(--sd-line);
	border-left: 4px solid var(--sd-blue);
	border-radius: var(--sd-radius);
	padding: 1rem 1.1rem;
}
.sd-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.35rem; }
.sd-card h3 a { color: var(--sd-ink); text-decoration: none; }
.sd-card h3 a:hover { color: var(--sd-blue); text-decoration: underline; }
.sd-card p { margin: 0; font-size: 0.925rem; color: var(--sd-muted); }
.sd-notice {
	border: 1px solid var(--sd-line);
	border-left: 4px solid var(--sd-amber);
	background: #fffaf3;
	border-radius: var(--sd-radius);
	padding: 0.85rem 1rem;
	font-size: 0.95rem;
}

/* ---------- Catalog ---------- */
.sd-catalog { padding: 2rem 1.25rem 0; }
.sd-catalog__layout {
	display: grid;
	grid-template-columns: 16rem minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
}
.sd-catalog__layout > * { margin: 0 !important; }
.sd-catalog-title { font-size: 2rem; font-weight: 800; margin: 0 0 0.25rem; }
.sd-catalog-intro { color: var(--sd-muted); }
.sd-catalog-intro p { margin: 0 0 1rem; }
.sd-catalog-search { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; }
.sd-catalog-search input[type="search"] { flex: 1 1 auto; width: 100%; }
.sd-catalog-nav__heading {
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--sd-muted);
	margin: 0 0 0.5rem;
}
.sd-catalog-nav ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sd-line); }
.sd-catalog-nav li { border-bottom: 1px solid var(--sd-line); }
.sd-catalog-nav li a {
	display: block;
	padding: 0.6rem 0.5rem;
	color: var(--sd-ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
}
.sd-catalog-nav li a:hover { background: var(--sd-surface); color: var(--sd-blue); }
.sd-catalog-nav li a[aria-current="page"] {
	border-left: 4px solid var(--sd-amber);
	background: var(--sd-surface);
	padding-left: calc(0.5rem - 4px + 4px);
}
.sd-product-list { list-style: none; margin: 1.25rem 0 0; padding: 0; border-top: 1px solid var(--sd-line); }
.sd-product-list > li {
	border-bottom: 1px solid var(--sd-line);
	padding: 1rem 0.25rem;
	margin: 0;
}
.sd-product-list h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.sd-product-list h2 a { color: var(--sd-ink); text-decoration: none; }
.sd-product-list h2 a:hover { color: var(--sd-blue); text-decoration: underline; }
.sd-product-list .wp-block-post-terms { font-size: 0.85rem; color: var(--sd-muted); margin: 0.2rem 0 0; }
.sd-product-list .wp-block-post-terms a { color: var(--sd-muted); }
.sd-product-list .wp-block-post-excerpt { margin: 0.4rem 0 0; font-size: 0.95rem; color: var(--sd-muted); }
.sd-product-list .wp-block-post-excerpt p { margin: 0; }
.sd-chips { margin: 0.35rem 0 0 !important; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sd-chip {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.15rem 0.45rem;
	border-radius: 3px;
	border: 1px solid var(--sd-line);
	color: var(--sd-muted);
	background: #fff;
}
.sd-chip--provisional { border-color: #e6b27a; color: #8a4b08; background: #fff6ea; }
.sd-preview-banner {
	background: #fff6ea;
	border-bottom: 1px solid #e6b27a;
	color: #6b3a05;
	font-size: 0.85rem;
	padding: 0.45rem 1.25rem;
	text-align: center;
}

/* ---------- Product page ---------- */
.sd-product { padding: 1.75rem 1.25rem 0; }
.sd-product .woocommerce-breadcrumb,
.sd-product .wc-block-breadcrumbs { font-size: 0.85rem; color: var(--sd-muted); margin-bottom: 1rem; }
.sd-product__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 22rem;
	gap: 2.5rem;
	align-items: start;
}
.sd-product__layout > * { margin: 0 !important; }
.sd-product__main > * + * { margin-top: 1.25rem; }
.sd-product h1 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; line-height: 1.15; margin: 0; }
.sd-product .wp-block-post-terms { font-size: 0.9rem; color: var(--sd-muted); margin: 0 0 0.35rem; }
.sd-product .wp-block-post-excerpt { font-size: 1.1rem; color: var(--sd-ink); }
.sd-product .wp-block-post-excerpt p { margin: 0; }
.sd-identity { font-size: 0.95rem; margin: 0.5rem 0 0; }
.sd-identity__label { font-weight: 700; color: var(--sd-muted); margin-right: 0.35rem; }
.sd-product__aside { display: grid; gap: 1rem; }
.sd-product__aside > * { margin: 0 !important; }
.sd-panel {
	border: 1px solid var(--sd-line);
	border-radius: var(--sd-radius);
	background: #fff;
	padding: 1rem 1.1rem 1.1rem;
}
.sd-product__aside .sd-panel { border-top: 4px solid var(--sd-blue); }
.sd-panel h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 0.6rem; }
.sd-pending { color: var(--sd-muted); font-size: 0.925rem; margin: 0; }
.sd-footnote { color: var(--sd-muted); font-size: 0.825rem; margin: 0.6rem 0 0; }
.sd-spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.sd-spec-table th,
.sd-spec-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--sd-line); vertical-align: top; }
.sd-spec-table thead th {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--sd-muted);
	background: var(--sd-surface);
}
.sd-spec-table tbody th { font-weight: 600; width: 45%; }
.sd-doc-list { list-style: none; margin: 0; padding: 0; }
.sd-doc-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--sd-line); }
.sd-doc-list li:last-child { border-bottom: 0; }
.sd-doc-link { font-weight: 700; color: var(--sd-blue); }
.sd-doc-note { display: block; font-size: 0.825rem; color: var(--sd-muted); }
.sd-product__description h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 0.5rem; }

@media (max-width: 860px) {
	.sd-catalog__layout,
	.sd-product__layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
	.sd-header .wp-block-search { order: 3; flex-basis: 100%; max-width: none; }
	.sd-logo, .sd-logo a { font-size: 1.25rem; }
}

/* Keep narrower hero items left-aligned with the content column instead of centred. */
.sd-hero > * {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1160px)) / 2)) !important;
	margin-right: auto !important;
}

/* Consistent left edge and text size across sections. */
body { font-size: 1rem; line-height: 1.55; }
.sd-section:not(.alignfull) { padding-left: 0; padding-right: 0; }
@media (max-width: 1220px) {
	.sd-section:not(.alignfull) { padding-left: 1.25rem; padding-right: 1.25rem; }
}
.sd-product > .alignwide,
.sd-product > .wp-block-woocommerce-breadcrumbs { max-width: var(--wp--style--global--content-size, 1160px) !important; }
.sd-product__description { font-size: 1rem; }
.sd-product__description h3 { font-size: 1.1rem; font-weight: 800; margin: 1.25rem 0 0.4rem; }
.sd-product__description ul { margin: 0; padding-left: 1.25rem; }

/* ---------- Purchasing section (stage 3) ---------- */
.sd-purchase__facts { margin: 0 0 0.75rem; }
.sd-purchase__facts > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--sd-line);
	font-size: 0.95rem;
}
.sd-purchase__facts dt { color: var(--sd-muted); font-weight: 600; }
.sd-purchase__facts dd { margin: 0; text-align: right; font-weight: 600; }
.sd-purchase__facts dd .sd-pending { font-weight: 400; }
.sd-purchase__price { font-size: 1.6rem; font-weight: 800; margin: 0.25rem 0 0.75rem; line-height: 1.2; }
.sd-purchase__unit { font-size: 0.9rem; font-weight: 600; color: var(--sd-muted); }
.sd-purchase__noprice { font-size: 1.05rem; font-weight: 700; margin: 0.25rem 0 0.35rem; }
.sd-purchase__unavailable { color: var(--sd-muted); font-size: 0.925rem; margin: 0; }
.sd-purchase__form label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.3rem; }
.sd-purchase__row { display: flex; gap: 0.5rem; align-items: stretch; }
.sd-purchase__qty {
	width: 5.5rem;
	flex: 0 0 5.5rem;
	border: 1px solid var(--sd-line);
	border-radius: var(--sd-radius);
	padding: 0.6rem 0.6rem;
	font-size: 1.05rem;
	font-weight: 600;
	min-height: 2.9rem;
	box-sizing: border-box;
}
.sd-purchase__button {
	flex: 1 1 auto;
	background: var(--sd-amber);
	color: #1b1204;
	border: 0;
	border-radius: var(--sd-radius);
	font-weight: 800;
	font-size: 1rem;
	padding: 0.6rem 1rem;
	min-height: 2.9rem;
	cursor: pointer;
}
.sd-purchase__button:hover { background: #d47518; color: #1b1204; }
.sd-purchase__button[disabled],
.sd-purchase__qty[disabled] { opacity: 0.55; cursor: not-allowed; }
.sd-purchase__placeholder { color: var(--sd-muted); font-style: italic; }
.sd-purchase__preview-flag,
.sd-purchase__editor-note {
	font-size: 0.8rem;
	border: 1px dashed #e6b27a;
	background: #fff6ea;
	color: #6b3a05;
	border-radius: var(--sd-radius);
	padding: 0.4rem 0.55rem;
	margin: 0.75rem 0 0;
}
.sd-purchase__preview-flag { margin: 0 0 0.75rem; }

/* Native WooCommerce drum-weight selector, within the custom product panel. */
.sd-purchase .variations { width: 100%; margin-bottom: 1rem; border: 0; }
.sd-purchase .variations tr,
.sd-purchase .variations th,
.sd-purchase .variations td { display: block; padding: 0; border: 0; text-align: left; }
.sd-purchase .variations label { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; }
.sd-purchase .variations select {
	width: 100%; max-width: 100%; min-height: 2.9rem; box-sizing: border-box;
	padding: 0.55rem; border: 1px solid var(--sd-line); border-radius: var(--sd-radius); background: white; font-size: 1rem;
}
.sd-purchase .reset_variations { display: inline-block; margin-top: 0.4rem; font-size: 0.85rem; }
.sd-purchase .woocommerce-variation-price { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.75rem; }
.sd-purchase .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sd-purchase .variations_form .qty {
	width: 5.5rem; min-height: 2.9rem; padding: 0.6rem; box-sizing: border-box;
	border: 1px solid var(--sd-line); border-radius: var(--sd-radius); font-size: 1rem;
}
.sd-purchase .variations_form .single_add_to_cart_button {
	flex: 1; min-height: 2.9rem; padding: 0.6rem 1rem; border: 0; border-radius: var(--sd-radius);
	background: var(--sd-amber); color: #1b1204; font-size: 1rem; font-weight: 800; cursor: pointer;
}
.sd-purchase .variations_form .single_add_to_cart_button.disabled { opacity: 0.55; cursor: not-allowed; }

/* Header cart control */
.sd-header .wc-block-mini-cart { flex: 0 0 auto; }
.sd-header .wc-block-mini-cart__button { color: var(--sd-ink); padding: 0.35rem 0.5rem; }
.sd-product .wc-block-store-notices,
.sd-product .woocommerce-notices-wrapper { margin-bottom: 1rem; }

/* On narrow screens the Order panel follows the title and summary, ahead of the long description. */
@media (max-width: 860px) {
	.sd-product__main,
	.sd-product__aside { display: contents; }
	.sd-product__layout > .sd-product__main > *,
	.sd-product__layout > .sd-product__aside > * { margin: 0 !important; min-width: 0; }
	.sd-product__head { order: 1; }
	.sd-product__layout .wp-block-post-excerpt { order: 2; }
	.sd-purchase { order: 3; }
	.sd-product__description { order: 4; }
	.sd-specs { order: 5; }
	.sd-documents { order: 6; }
	.sd-product__aside .sd-panel { border-top: 4px solid var(--sd-blue); }
	/* One header row: logo, cart, menu button. Search wraps beneath. */
	.sd-header__row { flex-wrap: wrap; gap: 0.75rem 0.4rem; }
	.sd-header .wc-block-mini-cart__button { padding: 0.35rem 0.3rem; }
	.sd-header__row > .sd-logo,
	.sd-header__row > .wp-block-site-title { flex: 1 1 auto; order: 0; }
	.sd-header .wc-block-mini-cart { order: 1; flex: 0 0 auto; }
	.sd-header .wp-block-navigation { order: 2; flex: 0 0 auto; }
	.sd-header .wp-block-search { order: 3; }
}

/* Very narrow phones (320 px): keep logo, cart and menu on one row and stop the search row overflowing. */
@media (max-width: 860px) {
	.sd-header .wp-block-search,
	.sd-header .wp-block-search__inside-wrapper { min-width: 0; max-width: 100%; box-sizing: border-box; }
	.sd-header .wp-block-search { flex: 1 1 100%; width: 100%; }
	.sd-header .wp-block-search__input { min-width: 0; width: 100%; flex: 1 1 auto; }
	.sd-header .wp-block-search__button { flex: 0 0 auto; margin-left: 0.4rem; }
}
@media (max-width: 380px) {
	.sd-logo, .sd-logo a { font-size: 1.02rem; }
}

/* Tablet widths show the full menu, so the cart sits after it, as on desktop. */
@media (min-width: 600px) and (max-width: 860px) {
	.sd-header .wp-block-navigation { order: 1; }
	.sd-header .wc-block-mini-cart { order: 2; }
}

/* ================= Storefront refinement (stage 4) ================= */

/* Type scale and rhythm shared by every page. */
h1, h2, h3 { color: var(--sd-ink); letter-spacing: -0.005em; }
main a { text-underline-offset: 0.15em; }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 3px solid var(--sd-amber); outline-offset: 2px; }
.wp-block-button__link { border-radius: var(--sd-radius); font-weight: 700; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--sd-blue); color: #fff; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: var(--sd-blue-dark); }
.wp-block-button.is-style-outline .wp-block-button__link { color: var(--sd-blue); border: 2px solid var(--sd-blue); background: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--sd-surface); }
.sd-hero .wp-block-buttons { gap: 0.6rem; }

/* Header navigation */
.sd-header .wp-block-navigation .wp-block-navigation-item__content { padding: 0.35rem 0; }
.sd-header .wp-block-navigation .wp-block-navigation__container { gap: 0.25rem 1.35rem; }
.sd-header .wp-block-navigation__submenu-container { border: 1px solid var(--sd-line); border-radius: var(--sd-radius); box-shadow: 0 6px 18px rgba(22, 32, 42, 0.12); min-width: 16rem; }
.sd-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.55rem 0.9rem; font-weight: 500; }

/* Footer */
.sd-footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.sd-footer__links a { text-decoration: none; }
.sd-footer__links a:hover { text-decoration: underline; }

/* Featured products */
.sd-section--featured:not(:has(.sd-featured)) { display: none; }
.sd-featured h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 1rem; }
.sd-featured__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
	gap: 1rem;
}
.sd-featured__card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--sd-line);
	border-top: 4px solid var(--sd-amber);
	border-radius: var(--sd-radius);
	padding: 1rem 1.1rem 1.1rem;
	margin: 0;
}
.sd-featured__card > * { margin: 0; }
.sd-featured__cat { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sd-muted); }
.sd-featured__card h3 { font-size: 1.08rem; font-weight: 800; line-height: 1.25; margin: 0.3rem 0 0; }
.sd-featured__card h3 a { color: var(--sd-ink); text-decoration: none; }
.sd-featured__card h3 a:hover { color: var(--sd-blue); text-decoration: underline; }
.sd-featured__summary { font-size: 0.9rem; color: var(--sd-muted); margin-top: 0.5rem; }
.sd-featured__more { margin-top: auto; padding-top: 0.85rem; font-weight: 700; font-size: 0.925rem; }
.sd-featured__more a { color: var(--sd-blue); }
.sd-steps .sd-card { border-left-color: var(--sd-amber); }

/* Catalog list */
.sd-chip--featured { border-color: var(--sd-amber); color: #8a4b08; background: #fff6ea; }
.sd-chip--draft { border-color: var(--sd-line); }
.sd-product-list > li { padding: 1.1rem 0.25rem; }
.sd-product-list .wp-block-post-excerpt { max-width: 70ch; }

/* Product page: grouped property tables */
.sd-specs h2 { font-size: 1.25rem; }
.sd-spec-group + .sd-spec-group { margin-top: 1.5rem; }
.sd-spec-group h3 { font-size: 1rem; font-weight: 800; margin: 0 0 0.4rem; padding-left: 0.6rem; border-left: 4px solid var(--sd-line); }
.sd-spec-group--specification h3 { border-left-color: var(--sd-blue); }
.sd-spec-group--typical h3 { border-left-color: var(--sd-amber); }
.sd-spec-table tbody tr:last-child th,
.sd-spec-table tbody tr:last-child td { border-bottom: 0; }
.sd-spec-table { border: 1px solid var(--sd-line); }
.sd-spec-note {
	margin: 1.25rem 0 0;
	padding: 0.7rem 0.9rem;
	border-left: 4px solid var(--sd-amber);
	background: #fffaf3;
	font-size: 0.9rem;
}
.sd-product__description h3:first-child { margin-top: 0; }
.sd-product__description p { margin: 0 0 0.75rem; max-width: 70ch; }
.sd-product__description ul + h3 { margin-top: 1.25rem; }

/* Product page: documents */
.sd-doc-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.15rem 0.75rem; }
.sd-doc-name { font-weight: 600; }
.sd-doc-status { font-size: 0.8rem; color: var(--sd-muted); white-space: nowrap; }
.sd-doc-status--ready { color: var(--sd-blue); font-weight: 700; }
.sd-doc-note { flex: 1 1 100%; }

/* Content pages (About, Contact, Shipping) */
.sd-page { padding: 2.25rem 1.25rem 0; }
.sd-page > .wp-block-post-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; line-height: 1.15; margin: 0 0 1rem; }
.sd-page > .wp-block-post-title,
.sd-page .wp-block-post-content > * { max-width: 46rem !important; margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1160px)) / 2)) !important; margin-right: auto !important; }
.sd-page .wp-block-post-content h2 { font-size: 1.25rem; font-weight: 800; margin-top: 2rem; margin-bottom: 0.4rem; }
.sd-page .wp-block-post-content p { margin-top: 0; margin-bottom: 0.85rem; }
.sd-page .wp-block-post-content ul { padding-left: 1.25rem; margin-top: 0; margin-bottom: 0.85rem; }
.sd-page .wp-block-post-content li + li { margin-top: 0.3rem; }
.sd-page .sd-lead { color: var(--sd-ink); }
.sd-rate-table { margin-top: 1rem; margin-bottom: 1rem; }
.sd-rate-table table { width: 100%; border-collapse: collapse; border: 1px solid var(--sd-line); font-size: 0.95rem; }
.sd-rate-table th,
.sd-rate-table td { text-align: left; padding: 0.55rem 0.75rem; border: 0; border-bottom: 1px solid var(--sd-line); }
.sd-rate-table thead { border: 0; }
.sd-rate-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sd-muted); background: var(--sd-surface); }
.sd-rate-table tbody td:first-child { font-weight: 700; width: 40%; }
.sd-rate-table tbody tr:last-child td { border-bottom: 0; }
.sd-rate-table figcaption { font-size: 0.85rem; color: var(--sd-muted); text-align: left; margin-top: 0.4rem; }

/* Cart and checkout pages share the page heading style. */
.woocommerce-cart .sd-page .wp-block-post-content > *,
.woocommerce-checkout .sd-page .wp-block-post-content > * { max-width: var(--wp--style--global--content-size, 1160px) !important; }

/* Narrow screens */
@media (max-width: 860px) {
	/* Categories become a compact row of chips instead of a long stacked list above the products. */
	.sd-catalog-nav ul { display: flex; flex-wrap: wrap; gap: 0.4rem; border-top: 0; }
	.sd-catalog-nav li { border: 0; }
	.sd-catalog-nav li a {
		border: 1px solid var(--sd-line);
		border-radius: 999px;
		padding: 0.4rem 0.8rem;
		font-size: 0.875rem;
		background: #fff;
		min-height: 2.25rem;
		box-sizing: border-box;
		display: inline-flex;
		align-items: center;
	}
	.sd-catalog-nav li a[aria-current="page"] { border: 1px solid var(--sd-blue); background: var(--sd-blue); color: #fff; padding-left: 0.8rem; }
	.sd-catalog-search { margin-bottom: 1rem; }
	.sd-catalog-title { font-size: 1.6rem; }
	.sd-catalog { padding-top: 1.25rem; }
	.sd-hero { padding: 2.25rem 1.25rem 2rem; }
	.sd-section { padding-top: 2rem; }
	.sd-section--tint { margin-top: 2rem; padding-bottom: 2rem; }
	.sd-page { padding-top: 1.5rem; }
	.sd-spec-table tbody th { width: 50%; }
	.sd-footer { margin-top: 2.5rem; }
	.sd-footer__links { gap: 0.25rem 1.25rem; }
	.sd-footer__links a { display: inline-block; padding: 0.4rem 0; }
}
@media (max-width: 480px) {
	.sd-spec-table th,
	.sd-spec-table td { padding: 0.5rem 0.5rem; font-size: 0.9rem; }
	.sd-hero .wp-block-button,
	.sd-hero .wp-block-button__link { width: 100%; box-sizing: border-box; text-align: center; }
}

/* Three-across card rows fill the row instead of leaving an empty fourth column. */
.sd-card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
	.sd-card-grid--three { grid-template-columns: minmax(0, 1fr); }
}
.sd-specs > h2 { margin-bottom: 0.9rem; }
/* Phones: sections already sit inside the page gutter, so they take no second inset. */
@media (max-width: 860px) {
	.sd-section:not(.alignfull) { padding-left: 0; padding-right: 0; }
}
@media (max-width: 860px) {
	.sd-hero { padding-left: var(--wp--style--root--padding-left, 1.25rem); padding-right: var(--wp--style--root--padding-right, 1.25rem); }
}
/* Inside the phone menu the category links are a plain indented list, not a floating panel. */
.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0;
	box-shadow: none;
	min-width: 0;
	padding-top: 0.25rem;
	padding-bottom: 0.5rem;
}
.sd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.35rem 0; font-size: 0.95rem; }


/* ================= Approved branding and product pictures (2026-10-11) ================= */

/* Logo: approved drum-and-drop mark with the Surfactant Depot wordmark, no tagline. */
.sd-brand { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; flex: 0 0 auto; }
.sd-brand img { display: block; height: 4.25rem; width: auto; max-width: 100%; }
.sd-header .sd-brand { margin: -0.6rem 0 -0.6rem -0.6rem; }
.sd-header__row > .wp-block-shortcode { flex: 0 0 auto; margin: 0; }
.sd-footer__brand { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; }
.sd-footer__brand > * { margin: 0 !important; }
.sd-footer .sd-brand img { height: 4.5rem; }
.sd-footer .sd-brand { margin-left: -0.6rem; }

/* Product pictures: always shown whole, on white, never cropped or stretched. */
.sd-product-img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
.sd-product-image { margin: 0; border: 1px solid var(--sd-line); border-radius: var(--sd-radius); background: #fff; padding: 0.75rem 0.75rem 0.6rem; }
.sd-product-image figcaption { margin-top: 0.4rem; font-size: 0.8rem; color: var(--sd-muted); text-align: center; }

.sd-featured__image { display: block; margin: -0.25rem auto 0.6rem !important; width: 100%; max-width: 11rem; }

.sd-product-list > li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); column-gap: 1.1rem; align-items: start; }
.sd-product-list > li > * { grid-column: 2; min-width: 0; }
.sd-product-list > li > .sd-product-list__thumb { grid-column: 1; grid-row: 1 / span 6; margin: 0; width: 6rem; }
.sd-product-list__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border: 1px solid var(--sd-line); border-radius: var(--sd-radius); }
.sd-product-list > li:not(:has(.sd-product-list__thumb)) { grid-template-columns: minmax(0, 1fr); }
.sd-product-list > li:not(:has(.sd-product-list__thumb)) > * { grid-column: 1; }

@media (max-width: 860px) {
	.sd-brand img { height: 3.5rem; }
	.sd-header__row > .wp-block-shortcode { flex: 1 1 auto; order: 0; }
	.sd-product-image { order: 3; max-width: 22rem; width: 100%; justify-self: center; box-sizing: border-box; }
	.sd-purchase { order: 4; }
	.sd-product__description { order: 5; }
	.sd-specs { order: 6; }
	.sd-documents { order: 7; }
	.sd-featured__image { max-width: 9rem; }
}
@media (max-width: 480px) {
	.sd-product-list > li { grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: 0.85rem; }
	.sd-product-list > li > .sd-product-list__thumb { width: 4.5rem; }
}
@media (max-width: 380px) {
	.sd-brand img { height: 3rem; }
}
