/* SM Plant Sales: parts product page. Scoped to .smp-part so nothing else on the site changes. */
.smp-part {
	--smp-navy: #003768;
	--smp-navy-dark: #00264a;
	--smp-amber: #f9b101;
	--smp-amber-dark: #d99a00;
	--smp-ink: #1a1a1a;
	--smp-muted: #545d68;
	--smp-line: #dfe3e8;
	--smp-soft: #f4f6f9;
	--smp-radius: 6px;
	color: var(--smp-ink);
	font-size: 16px;
	line-height: 1.6;
	margin: 0 auto 48px;
}
.smp-part *,
.smp-part *::before,
.smp-part *::after { box-sizing: border-box; }

/* Breadcrumb */
.smp-crumbs { margin: 8px 0 20px; font-size: 14px; color: var(--smp-muted); }
.smp-crumbs .woocommerce-breadcrumb { margin: 0; padding: 0; font-size: inherit; color: inherit; }
.smp-crumbs a { color: var(--smp-navy); text-decoration: none; }
.smp-crumbs a:hover, .smp-crumbs a:focus { text-decoration: underline; }
.smp-crumb-sep { margin: 0 8px; color: #9aa3ad; }

/* Top: gallery and buy box */
.smp-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 900px) {
	.smp-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
}
.smp-part div.images,
.smp-part .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; }
.smp-part div.summary { width: 100% !important; float: none !important; margin: 0 !important; }
.smp-gallery { position: relative; }
.smp-gallery .woocommerce-product-gallery__wrapper { border: 1px solid var(--smp-line); border-radius: var(--smp-radius); overflow: hidden; background: #fff; }
.smp-gallery .flex-control-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 !important; padding: 0; }
.smp-gallery .flex-control-thumbs li { width: 72px !important; margin: 0 !important; list-style: none; }
.smp-gallery .flex-control-thumbs img { border: 1px solid var(--smp-line); border-radius: 4px; }

.smp-range { margin: 0 0 2px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.smp-range a { display: inline-block; padding: 4px 0; color: var(--smp-muted); text-decoration: none; }
.smp-range a:hover, .smp-range a:focus { color: var(--smp-navy); text-decoration: underline; }

/* Names and headings exactly as stored. The theme capitalises every word, which would show "1620mm long" as "1620mm Long". */
body.smp-part-page .smp-part h1,
body.smp-part-page .smp-part h2,
body.smp-part-page .smp-part h3,
body.smp-part-page .smp-part h4 { text-transform: none !important; }

.smp-part h1.smp-title {
	margin: 0 0 14px;
	font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
	line-height: 1.2;
	color: var(--smp-navy);
	overflow-wrap: anywhere;
}

.smp-partno {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin: 0 0 16px; padding: 12px 16px;
	background: var(--smp-navy); color: #fff; border-radius: var(--smp-radius);
}
.smp-partno-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--smp-amber); }
.smp-partno-value { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.smp-copy {
	margin-left: auto; padding: 4px 12px; min-height: 32px;
	background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.55); border-radius: 4px;
	font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.2;
}
.smp-copy:hover, .smp-copy:focus-visible { background: rgba(255,255,255,0.14); }

.smp-short { margin: 0 0 18px; color: var(--smp-ink); }
.smp-short p { margin: 0 0 8px; }

.smp-price { margin: 0 0 8px; }
.smp-price p { margin: 0; }
.smp-price-ex { font-size: 2rem; font-weight: 700; color: var(--smp-navy); line-height: 1.15; }
.smp-price-ex span, .smp-price-was span { font-size: 0.95rem; font-weight: 600; color: var(--smp-muted); }
.smp-price-inc { font-size: 1rem; color: var(--smp-muted); }
.smp-price-was { color: var(--smp-muted); }
.smp-part .stock { margin: 6px 0 14px; font-weight: 600; }
.smp-part .stock.in-stock { color: #1d6b35; }
.smp-part .stock.out-of-stock { color: #a3261d; }

.smp-cart form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 0 0 18px !important; }
.smp-cart form.cart .quantity { margin: 0 !important; }
.smp-cart form.cart .quantity .qty { height: 52px; width: 80px; border: 1px solid #b9c1ca; border-radius: var(--smp-radius); font-size: 1rem; text-align: center; }
.smp-part .single_add_to_cart_button,
.smp-btn-primary {
	background: var(--smp-amber) !important; color: var(--smp-ink) !important;
	border: 0 !important; border-radius: var(--smp-radius) !important;
	font-weight: 700 !important; font-size: 1rem !important; letter-spacing: 0.01em;
	min-height: 52px; padding: 0 28px !important; flex: 1 1 200px; margin: 0 !important;
	display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.smp-part .single_add_to_cart_button:hover,
.smp-part .single_add_to_cart_button:focus-visible,
.smp-btn-primary:hover, .smp-btn-primary:focus-visible { background: var(--smp-amber-dark) !important; color: var(--smp-ink) !important; }

/* Price on application */
.smp-poa { margin: 0 0 18px; padding: 18px; background: var(--smp-soft); border: 1px solid var(--smp-line); border-left: 4px solid var(--smp-amber); border-radius: var(--smp-radius); }
.smp-poa-label { margin: 0 0 4px; font-size: 1.35rem; font-weight: 700; color: var(--smp-navy); }
.smp-unavailable { border-left-color: #a3261d; }
.smp-unavailable .smp-poa-label { color: #a3261d; }
.smp-poa-text { margin: 0 0 14px; color: var(--smp-ink); }
.smp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.smp-actions .smp-btn { flex: 1 1 auto; }
.smp-actions .smp-btn-primary { flex: 1 1 100%; }
.smp-btn {
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
	min-height: 48px; padding: 8px 14px; border-radius: var(--smp-radius);
	border: 1px solid var(--smp-navy); color: var(--smp-navy); background: #fff;
	font-weight: 600; text-decoration: none; line-height: 1.2;
}
.smp-btn:hover, .smp-btn:focus-visible { background: var(--smp-navy); color: #fff; }

.smp-help { margin: 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--smp-line); font-size: 15px; color: var(--smp-muted); }
.smp-help li { position: relative; margin: 0 0 6px; padding-left: 18px; }
.smp-help li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--smp-amber); }
.smp-help a { color: var(--smp-navy); font-weight: 600; }

/* Body: part information and enquiry */
.smp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 48px; }
@media (min-width: 900px) {
	.smp-body { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
	.smp-enquiry { position: sticky; top: 24px; }
}
.smp-info h2, .smp-enquiry h2 { margin: 0 0 12px; font-size: 1.5rem; line-height: 1.25; color: var(--smp-navy); }
.smp-desc h3 { margin: 28px 0 10px; font-size: 1.15rem; line-height: 1.3; color: var(--smp-navy); }
.smp-desc h3:first-child { margin-top: 4px; }
.smp-desc p { margin: 0 0 12px; }
.smp-desc ul { margin: 0 0 14px; padding-left: 20px; }
.smp-desc li { margin: 0 0 4px; }
@media (min-width: 700px) {
	.smp-desc ul { columns: 2; column-gap: 32px; }
	.smp-desc li { break-inside: avoid; }
}
.smp-desc table { width: 100%; margin: 0 0 16px; border-collapse: collapse; border: 1px solid var(--smp-line); font-size: 15px; }
.smp-desc th, .smp-desc td { padding: 10px 12px; border-bottom: 1px solid var(--smp-line); text-align: left; vertical-align: top; }
.smp-desc th { width: 38%; background: var(--smp-soft); color: var(--smp-navy); font-weight: 600; }
.smp-desc tr:last-child th, .smp-desc tr:last-child td { border-bottom: 0; }
.smp-listed { margin: 20px 0 0; font-size: 14px; color: var(--smp-muted); }
.smp-listed span { font-weight: 600; }
.smp-listed a { color: var(--smp-navy); }

.smp-enquiry { padding: 20px; border: 1px solid var(--smp-line); border-radius: var(--smp-radius); background: #fff; }
.smp-enquiry > p { margin: 0 0 10px; }
.smp-contact-lines { display: flex; flex-direction: column; gap: 2px; }
.smp-contact-lines a { color: var(--smp-navy); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.smp-contact-lines a:hover, .smp-contact-lines a:focus { text-decoration: underline; }
.smp-enquiry .wpforms-container { margin: 12px 0 0 !important; }
.smp-enquiry .wpforms-submit { background: var(--smp-navy) !important; color: #fff !important; border-radius: var(--smp-radius) !important; min-height: 48px; padding: 0 22px !important; font-weight: 700 !important; }

/* Related parts: simple card grid, overriding the theme's single-product classes on loop items */
.smp-more { margin-top: 56px; }
.smp-more .related > h2, .smp-more .upsells > h2 { font-size: 1.5rem; color: var(--smp-navy); margin: 0 0 16px; }
.smp-more ul.products { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px; margin: 0 !important; padding: 0 !important; }
@media (min-width: 900px) { .smp-more ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 20px; } }
.smp-more ul.products::before, .smp-more ul.products::after { display: none !important; content: none !important; }
.smp-more ul.products li.product {
	width: auto !important; float: none !important; margin: 0 !important; padding: 12px !important;
	display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 8px;
	border: 1px solid var(--smp-line); border-radius: var(--smp-radius); background: #fff; text-align: left !important;
}
.smp-more ul.products li.product .astra-shop-thumbnail-wrap,
.smp-more ul.products li.product .astra-shop-summary-wrap { flex-basis: auto !important; max-width: 100% !important; width: 100% !important; float: none !important; margin: 0 !important; padding: 0 !important; }
.smp-more ul.products li.product .astra-shop-summary-wrap { display: flex !important; flex-direction: column !important; gap: 6px; flex: 1 1 auto; max-width: none !important; }
.smp-more ul.products li.product img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; margin: 0 !important; }
.smp-more .woocommerce-loop-product__title { font-size: 0.95rem !important; line-height: 1.35 !important; color: var(--smp-navy) !important; margin: 0 !important; padding: 0 !important; overflow-wrap: anywhere; }
.smp-more .ast-woo-product-category { display: none !important; }
.smp-more .smp-exvat { font-size: 12px; font-weight: 600; color: var(--smp-muted); }
.smp-more .ast-woo-shop-product-description { display: none !important; }
.smp-more ul.products li.product .price { margin: 0 !important; color: var(--smp-ink) !important; font-weight: 700; }
.smp-more ul.products li.product .button {
	margin: auto 0 0 !important; width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
	white-space: normal; text-align: center; border-radius: var(--smp-radius) !important; font-size: 14px !important; padding: 8px 12px !important;
}

/* Focus visibility */
.smp-part a:focus-visible, .smp-part button:focus-visible { outline: 3px solid var(--smp-amber); outline-offset: 2px; }

@media (max-width: 599px) {
	.smp-price-ex { font-size: 1.75rem; }
	.smp-partno-value { font-size: 1.1rem; }
}
