/* ============================================================
   MEGA LAB PEPTIDES - SINGLE PRODUCT (Lab Ledger, Phase 4b; SEO content blocks, Phase 4)
   Mobile-first. Every section is full-bleed with its content on
   .xlml-rail. Tokens only. The research-use strip is the shared .xlml-notice (base.css).
   Sections alternate white / --c-off by position: a section that renders
   nothing (overview, batch, FAQ, related) does not break the rhythm.
   ============================================================ */

.mlsp { background: #fff; color: var(--c-text); }
.mlsp > section { background: #fff; padding-block: var(--sp-8); }
.mlsp > section:nth-of-type(even) { background: var(--c-off); }

/* -- Breadcrumb -------------------------------------------------- */
.mlsp-bc { background: #fff; border-bottom: 1px solid var(--c-border); }
.mlsp-bc__list { list-style: none; margin-block: 0; padding-block: 12px; display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--f-mono); font-size: var(--t-label); color: var(--n-700); }
.mlsp-bc__list li + li::before { content: "/"; margin: 0 8px; color: var(--n-400); }
.mlsp-bc__list a { color: var(--c-text-2); text-decoration: none; }
.mlsp-bc__list a:hover { color: var(--c-primary); }
.mlsp-bc__list [aria-current] { color: var(--c-dark); }


/* -- Main: image | ledger ---------------------------------------- */
.mlsp > .mlsp-main { padding-block: var(--sp-4) var(--sp-8); }
.mlsp-main__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); align-items: start; }

.mlsp-media__main { margin: 0; border: 1px solid var(--c-border); background: var(--c-photo); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mlsp-media__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mlsp-media__noimg { font-family: var(--f-mono); font-size: var(--t-label); color: var(--c-text-3); }
.mlsp-media__thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mlsp-media__thumb { width: 64px; height: 64px; padding: 0; border: 1px solid var(--c-border); background: var(--c-photo); cursor: pointer; overflow: hidden; }
.mlsp-media__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mlsp-media__thumb.is-active, .mlsp-media__thumb:hover { border-color: var(--c-primary); }

.mlsp-eyebrow { margin-bottom: 10px; }
.mlsp-title { font-family: var(--f-display); font-weight: 700;  color: var(--c-dark); margin: 0 0 6px; }
.mlsp-oneline { font-family: var(--f-mono); font-size: var(--t-small); color: var(--c-text-2); margin: 0 0 var(--sp-3); }

.mlsp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 16px; padding-block: var(--sp-2); border-block: 1px solid var(--c-border); margin-bottom: var(--sp-3); }
.mlsp-price__now { font-family: var(--f-mono); font-weight: 700; font-size: var(--t-h3); color: var(--c-dark); }
.mlsp-price__now .woocommerce-Price-amount, .mlsp-price__was .woocommerce-Price-amount { font-family: inherit; }
.mlsp-price__was { font-family: var(--f-mono); font-size: var(--t-body); color: var(--n-500); }
.mlsp-stock { margin-left: auto; font-family: var(--f-mono); font-size: var(--t-label); color: var(--n-800); padding-left: 14px; position: relative; font-weight: 600;}
.mlsp-stock::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; transform: translateY(-50%); background: var(--n-400); font-weight: 600;}
.mlsp-stock--instock::before { background: var(--s-success); font-weight: 600;}
.mlsp-stock--onbackorder::before { background: var(--c-warn); font-weight: 600;}

/* Buy row */
.mlsp-buy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; }
.mlsp-qty { display: grid; grid-template-columns: auto 44px minmax(0, 1fr) 44px; align-items: stretch; border: 1px solid var(--c-border); height: 48px; }
.mlsp-qty__label { display: flex; align-items: center; padding-inline: 12px; font-family: var(--f-mono); font-size: var(--t-label); color: var(--n-800); border-right: 1px solid var(--c-border); font-weight: 600;}
.mlsp-qty__btn { border: 0; background: #fff; font-size: 20px; line-height: 1; color: var(--c-dark); cursor: pointer; }
.mlsp-qty__btn:hover { background: var(--c-off); }
.mlsp-qty input { border: 0; border-inline: 1px solid var(--c-border); text-align: center; font-family: var(--f-mono); font-size: var(--t-body); font-weight: 700; color: var(--c-dark); min-width: 0; -moz-appearance: textfield; appearance: textfield; }
.mlsp-qty input::-webkit-outer-spin-button, .mlsp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mlsp-atc-btn { justify-content: center; height: 48px; font-size: var(--t-body); }
.mlsp-dispatch { font-family: var(--f-mono); font-size: var(--t-small); color: var(--n-700); margin: 10px 0 0; }
.mlsp-unavailable { font-family: var(--f-mono); font-size: var(--t-small); color: var(--c-text-2); border: 1px solid var(--c-border); padding: 12px 14px; margin: 0; }

/* Spec table: ruled two-column ledger. Stacked label-over-value at phone width,
   200px label column from 640px. Identity rows (.mlsp-spec__row--mono) use the mono face. */
.mlsp-spec { width: 100%; border-collapse: collapse; margin-top: var(--sp-4); border-top: 1px solid var(--c-dark); }
.mlsp-spec tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.mlsp-spec th, .mlsp-spec td { display: block; text-align: left; vertical-align: top; padding: 0 12px; border: 0; font-size: var(--t-label); line-height: 1.55; font-weight: 600;}
.mlsp-spec th { font-family: var(--f-mono); font-weight: 600; font-size: var(--t-label); color: var(--n-800); padding-bottom: 4px; }
.mlsp-spec td { font-family: var(--f-display); color: var(--c-dark); overflow-wrap: anywhere; }
.mlsp-spec__row--mono td { font-family: var(--f-mono); font-size: var(--t-small); overflow-wrap: anywhere; }
.mlsp-spec td sub { font-size: 0.72em; line-height: 0; vertical-align: -0.25em; }
@media (min-width: 640px) {
	.mlsp-spec tr { display: table-row; padding: 0; border-bottom: 0; }
	.mlsp-spec th, .mlsp-spec td { display: table-cell; padding: 14px 16px; border-bottom: 1px solid var(--c-border); font-weight: 600;}
	.mlsp-spec th { width: 200px; font-weight: 600;}
}

/* -- Section titles (shared) -------------------------------------- */
.mlsp-section-title { font-size: var(--t-h3); line-height: var(--lh-h3); font-weight: 600; color: var(--c-dark); margin: 0 0 var(--sp-3); }

/* -- Research overview (narrow reading column) ------------------- */
.mlsp-desc__body { font-size: var(--t-lead); line-height: var(--lh-lead); color: var(--c-text-2); }
.mlsp-desc__body p { margin: 0 0 1em; }
.mlsp-desc__body p:last-child { margin-bottom: 0; }
.mlsp-desc__body strong { color: var(--c-dark); }
.mlsp-desc__body h3 { font-size: var(--t-body); font-weight: 600; color: var(--c-dark); margin: 1.4em 0 0.5em; }
.mlsp-desc__body ul, .mlsp-desc__body ol { margin: 0 0 1em; padding-left: 1.2em; }

/* -- Batch record: renders only with full data --------------------- */
.mlsp-batch__box { border-top: 2px solid var(--c-accent); }
.mlsp-batch__title { font-family: var(--f-mono); font-weight: 600; font-size: var(--t-label); color: var(--c-dark); margin: 12px 0 4px; }
.mlsp-batch__rows { margin: 0; }
.mlsp-batch__rows > div { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.mlsp-batch__rows dt { font-family: var(--f-mono); font-size: var(--t-label); color: var(--n-800); font-weight: 600;}
.mlsp-batch__rows dd { margin: 0; font-family: var(--f-mono); font-size: var(--t-small); color: var(--c-dark); }
.mlsp-batch__rows a { color: var(--c-link); text-decoration: none; font-weight: 700; }
.mlsp-batch__rows a:hover { text-decoration: underline; }

/* -- Reconstitution & storage ------------------------------------ */
.mlsp-rows { margin: 0; border-top: 1px solid var(--c-dark); }
.mlsp-rows > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.mlsp-rows dt { font-family: var(--f-mono); font-size: var(--t-label); color: var(--n-800); font-weight: 600;}
.mlsp-rows dd { margin: 0; font-size: var(--t-body); line-height: 1.55; color: var(--c-dark); }

/* -- FAQ accordion (native details; no script) --------------------- */
.mlsp-faq__list { border-top: 1px solid var(--c-dark); }
.mlsp-faq__item { border-bottom: 1px solid var(--c-border); }
.mlsp-faq__q { list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; font-family: var(--f-display); font-size: var(--t-body); font-weight: 600; line-height: 1.4; color: var(--c-dark); }
.mlsp-faq__q::-webkit-details-marker { display: none; }
.mlsp-faq__q::after { content: "+"; flex-shrink: 0; font-family: var(--f-mono); font-size: var(--t-h3); line-height: 1; color: var(--c-primary); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.mlsp-faq__item[open] .mlsp-faq__q::after { transform: rotate(45deg); }
.mlsp-faq__q:hover { color: var(--c-primary); }
.mlsp-faq__q:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.mlsp-faq__a { padding: 0 0 16px; font-size: var(--t-body); line-height: 1.6; color: var(--c-text-2); }
.mlsp-faq__a p { margin: 0 0 0.8em; }
.mlsp-faq__a p:last-child { margin-bottom: 0; }
.mlsp-faq__a a { color: var(--c-link); font-weight: 600; text-decoration: none; }
.mlsp-faq__a a:hover { text-decoration: underline; }

/* -- Guide link cards --------------------------------------------- */
.mlsp-links__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.mlsp-linkcard { display: flex; flex-direction: column; gap: 8px; padding: var(--sp-4); border: 1px solid var(--c-border); border-top: 2px solid var(--c-primary); background: #fff; color: var(--c-dark); text-decoration: none; transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.mlsp-linkcard:hover, .mlsp-linkcard:focus-visible { border-color: var(--c-primary); transform: translateY(-2px); }
.mlsp-linkcard__eyebrow { margin: 0; }
.mlsp-linkcard__title { font-family: var(--f-display); font-size: var(--t-h3); line-height: var(--lh-h3); font-weight: 600; color: var(--c-dark); }
.mlsp-linkcard__text { font-size: var(--t-small); line-height: var(--lh-small); color: var(--c-text-2); }
.mlsp-linkcard__cta { margin-top: auto; padding-top: 8px; font-family: var(--f-mono); font-size: var(--t-small); font-weight: 600; color: var(--c-link); }

/* -- Related ------------------------------------------------------ */
.mlsp-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: var(--sp-3); }
.mlsp-related__title { font-family: var(--f-display); font-weight: 600; font-size: var(--t-h3); line-height: var(--lh-h3); color: var(--c-dark); margin: 0; }
.mlsp-related__all { font-family: var(--f-mono); font-size: var(--t-small); color: var(--c-link); text-decoration: none; white-space: nowrap; }
.mlsp-related__all:hover { text-decoration: underline; }

/* -- Sticky quick-buy -------------------------------------------- */
.mlsp-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--c-dark); border-top: 1px solid var(--c-border-dk); transform: translateY(100%); }
.mlsp-sticky.is-visible { transform: none; }
.mlsp-sticky__rail { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.mlsp-sticky__product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mlsp-sticky__thumb { width: 40px; height: 40px; object-fit: contain; background: var(--c-photo); border: 1px solid var(--c-border-dk); flex-shrink: 0; }
.mlsp-sticky__name { font-family: var(--f-display); font-weight: 700; font-size: var(--t-small); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlsp-sticky__price { font-family: var(--f-mono); font-weight: 700; font-size: var(--t-small); color: var(--c-primary); }
.mlsp-sticky__price .woocommerce-Price-amount { font-family: inherit; }
.mlsp-sticky__atc { flex-shrink: 0; font-size: var(--t-body); padding: 0.75rem 1.1rem; }

/* -- Breakpoints --------------------------------------------------- */
@media (min-width: 640px) {
	.mlsp-buy { grid-template-columns: 200px minmax(0, 1fr); }
	.mlsp-rows > div { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
	.mlsp-links__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
}
@media (min-width: 900px) {
	.mlsp > .mlsp-main { padding-block: var(--sp-6) var(--sp-10); }
	.mlsp-main__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-8); }
	.mlsp-media { position: sticky; top: 140px; }
}

@media (max-width: 480px) {
	.mlsp > section, .mlsp > .mlsp-main { padding-block: var(--sp-6); }
}
