/* ==========================================================================
 * publish-preview.css — compact, dual-state product page
 *
 * Two visual states driven by tbl_Products.ProductStatus:
 *   .pp-edit       — internal PIM editor look
 *   .pp-published  — V14 / customer-facing look
 *
 * V14 palette (per branding_and_design.md):
 *   --v14-blue       #0072BC   primary CTA, headers
 *   --v14-blue-dk    #005a96   hover / depth
 *   --v14-red        #C8102E   accent, "Add to cart"
 *   --v14-yellow     #ffcc00   highlight
 *   --v14-navy       #0a1628   headline / dark band
 *   --v14-bg-soft    #f0f5fa   light page background
 *   --v14-bg-tint    #e8f2fb   subtle hover / band
 *   --v14-border     #cde0f0
 * ========================================================================== */

:root {
    --v14-blue:       #0072BC;
    --v14-blue-dk:    #005a96;
    --v14-blue-dk2:   #004f8a;
    --v14-red:        #C8102E;
    --v14-red-dk:     #a30c25;
    --v14-yellow:     #ffcc00;
    --v14-navy:       #0a1628;
    --v14-bg-soft:    #f0f5fa;
    --v14-bg-tint:    #e8f2fb;
    --v14-border:     #cde0f0;
    --v14-text:       #0a1628;
    --v14-text-mute:  #445566;
    --v14-text-light: #667788;
    --v14-stock-in:   #059669;
    --v14-stock-lead: #d97706;
}

/* ---------------------------------------------------------------------------
 * PIM design tokens — scoped to .pp-page so they don't leak into the rest
 * of the ecom site. These are mirrors of pim/public/assets/css/pim.css's
 * :root block (the file pim.css is what defines them on PIM-side; on ecom
 * we only load publish-preview.css, so we have to redeclare them here).
 *
 * KEEP IN SYNC with pim.css :root. If a new variable is added there and
 * publish-preview.css starts using it, mirror it here too.
 * --------------------------------------------------------------------------- */
.pp-page {
    --navy:        #003366;
    --navy-light:  #0a4a8a;
    --blue:        #0066CC;
    --red:         #CC2027;
    --bg:          #f4f5f7;
    --card:        #ffffff;
    --border:      #e2e5ea;
    --text:        #1a1e2c;
    --text-muted:  #6b7280;
    --text-hint:   #9ca3af;
    --success:     #059669;
    --success-bg:  #ecfdf5;
    --warning:     #d97706;
    --warning-bg:  #fffbeb;
    --danger:      #dc2626;
    --danger-bg:   #fef2f2;
    --info:        #2563eb;
    --info-bg:     #eff6ff;
    --purple:      #7c3aed;
    --purple-bg:   #f5f3ff;
    --radius:      8px;
    --radius-lg:   12px;
    --font:        'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono:        'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
    /* Inherit body font into the card so site.css's font-family reset on
       buttons/inputs doesn't override pp-* button fonts. */
    font-family:   var(--font);
    color:         var(--text);
    font-size:     14px;
    line-height:   1.5;
}
/* Reset the box-sizing and apply font inheritance to ALL pp-* descendants
   so the cascade beats site.css's button/input/form resets. */
.pp-page,
.pp-page *,
.pp-page *::before,
.pp-page *::after { box-sizing: border-box; }
.pp-page button,
.pp-page input,
.pp-page select,
.pp-page textarea {
    font-family: inherit;
    font-size:   inherit;
    color:       inherit;
}

/* ---------------------------------------------------------------------------
 * Breadcrumb — ecom-only (.pp-breadcrumb)
 * Sits ABOVE the .pp-page card. Final crumb is "PN — short title" for
 * keyword-rich text + BreadcrumbList JSON-LD parity (the structured-data
 * leaf name and the visible leaf must match for Google's SERP rich result).
 * --------------------------------------------------------------------------- */
.pp-breadcrumb {
    margin: 0 0 10px;
    font-size: 12px;
    color: #445566;
}
.pp-breadcrumb-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.pp-breadcrumb-item { display: inline-flex; align-items: center; gap: 4px; }
.pp-breadcrumb-item a { color: #0072BC; text-decoration: none; }
.pp-breadcrumb-item a:hover { text-decoration: underline; }
.pp-breadcrumb-item--current span {
    color: #0a1628; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 60vw;
}
.pp-breadcrumb-sep { color: #99aabb; }
@media (max-width: 760px) {
    .pp-breadcrumb-item--current span { max-width: 80vw; }
}

/* ---------------------------------------------------------------------------
 * High-specificity overrides for ecom site.css cascade
 *
 * site.css is loaded FIRST (in header.php), publish-preview.css second.
 * But site.css's `* { padding: 0; margin: 0 }` reset, plus its global
 * `a { ... }` and the user-agent button/ol defaults, win against simple
 * `.pp-cta-secondary { padding: 8px }` rules. The fix: re-state critical
 * styles at scope `.pp-page .pp-foo` (one level deeper specificity) so
 * they decisively win.
 *
 * KEEP THESE IN SYNC with the base .pp-cta-* / .pp-add-form rules above.
 * If you change padding/border there, mirror it here too.
 * --------------------------------------------------------------------------- */
.pp-page .pp-add-form .pp-cta-primary,
.pp-page .pp-add-form .pp-cta-secondary {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--navy);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    -webkit-appearance: none;
    appearance: none;
}
.pp-page.pp-published .pp-cta-primary {
    background: #C8102E; color: #fff; border-color: #C8102E;
    text-transform: uppercase; letter-spacing: 0.04em; padding: 9px 18px;
}
.pp-page.pp-published .pp-cta-secondary {
    background: #fff; color: #0072BC; border-color: #0072BC;
}
.pp-page .pp-add-form .pp-cta-pdf {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #cde0f0;
    background: #fff;
    color: #0072BC;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}
.pp-page .pp-add-form .pp-cta-pdf:hover {
    background: #e8f2fb;
    border-color: #0072BC;
}

/* Breadcrumb list — site.css doesn't have an ol reset but the user-agent
   default still shows "1. 2." numbers because list-style-type defaults to
   decimal on <ol>. Use a more specific selector to seal it. */
nav.pp-breadcrumb ol.pp-breadcrumb-list,
.pp-breadcrumb-list { list-style: none !important; }
nav.pp-breadcrumb ol.pp-breadcrumb-list li,
.pp-breadcrumb-list .pp-breadcrumb-item { list-style: none !important; }

/* Dashed separator above the Manufacturer/MPN/Alt PN row (mirrors PIM). */
.pp-page .pp-hero-meta {
    border-top: 1px dashed var(--border);
    padding-top: 8px; margin-top: 6px;
    list-style: none !important;
}

/* ---------------- Flash + publish bar (visible in both states) ---------------- */
.pp-flash {
    background: #ecfdf5; color: #065f46; border-left: 3px solid #10b981;
    padding: 8px 14px; border-radius: 6px; font-size: 13px;
    margin-bottom: 10px;
}
.pp-publish-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 8px 12px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 10px;
}
.pp-publish-bar-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; flex: 1; min-width: 0; }
.pp-publish-bar-info code { font-family: var(--mono); font-size: 13px; background: var(--bg); color: var(--navy); padding: 2px 8px; border-radius: 4px; }

/* Preview button — sits in the middle of the bar, separated from the
   destructive Publish action on the right by a wide gap (margin-left: auto
   on actions creates the gap, and the preview button has its own margin-
   right safety zone). */
.pp-publish-bar-preview { display: flex; gap: 6px; margin-right: 64px; }
.pp-publish-bar-actions { display: flex; gap: 6px; margin-left: auto; }
.pp-btn-preview {
    background: #fff; color: var(--navy);
    border: 1px solid var(--navy);
}
.pp-btn-preview:hover { background: var(--info-bg); }

/* When in preview mode, the bar gets a subtle banner so the user knows
   they're seeing a preview, not the live state. */
.pp-publish-bar:has(.pp-pill-info:contains("preview mode")) {
    background: var(--info-bg);
}

.pp-btn {
    padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--border); background: #fff; color: var(--text);
    cursor: pointer; text-decoration: none; font-family: var(--font);
}
.pp-btn:hover { background: var(--bg); }
.pp-btn-publish    { background: var(--v14-blue); color: #fff; border-color: var(--v14-blue); }
.pp-btn-publish:hover { background: var(--v14-blue-dk); }
.pp-btn-unpublish  { background: var(--warning); color: #fff; border-color: var(--warning); }
.pp-btn-unpublish:hover { background: #b45309; }

/* Pills */
.pp-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.pp-pill-ok       { background: var(--success-bg); color: var(--success); }
.pp-pill-warn     { background: var(--warning-bg); color: var(--warning); }
.pp-pill-info     { background: var(--info-bg);    color: var(--info); }
.pp-pill-required { background: var(--danger-bg);  color: var(--danger); }

.pp-source { display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pp-source--db   { background: #dcfce7; color: #166534; }
.pp-source--seed { background: #fff7ed; color: #c2410c; }
.pp-source--miss { background: #fee2e2; color: #b91c1c; }
.pp-source--pl   { background: #e0e7ff; color: #3730a3; }   /* inherited from ProductLine default */

.pp-status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.pp-status--draft       { background: var(--warning-bg); color: var(--warning); }
.pp-status--complete    { background: var(--info-bg);    color: var(--info); }
.pp-status--published   { background: var(--success-bg); color: var(--success); }
.pp-status--conditional { background: var(--purple-bg);  color: var(--purple); }
.pp-status--not-in-pim  { background: #fee2e2; color: #b91c1c; }

/* ---------------- Page container ---------------- */
.pp-page {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}

/* ============================================================
 * SHARED: hero, sections, spec table — compact base
 * (state-specific overrides come below)
 * ============================================================ */

.pp-hero {
    display: grid; grid-template-columns: 240px 1fr;
    gap: 20px; padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.pp-hero-photo {
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.pp-hero-photo img {
    /* Cropped, contained — works the same in both states */
    width: 100%; height: 100%; object-fit: contain; padding: 6px;
}
.pp-hero-photo-empty {
    text-align: center; color: var(--text-hint); padding: 12px; font-size: 11px;
}
.pp-photo-icon { font-size: 32px; display: block; margin-bottom: 6px; }
.pp-hero-photo-empty small { display: block; margin: 3px 0; }
.pp-hero-photo-empty code  { font-family: var(--mono); font-size: 10px; background: var(--bg); padding: 1px 5px; border-radius: 3px; }

.pp-hero-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pp-hero-eyebrow {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); font-weight: 700;
}
.pp-hero-pn {
    font-family: var(--mono); font-size: 13px; font-weight: 600;
    color: var(--navy); background: var(--bg);
    padding: 3px 8px; border-radius: 4px; align-self: flex-start;
}
.pp-hero-title {
    font-size: 22px; font-weight: 700; color: var(--text);
    line-height: 1.2; letter-spacing: -0.01em;
}
.pp-hero-short {
    font-size: 14px; color: var(--text-muted); line-height: 1.5;
    margin: 2px 0 4px;
}
.pp-hero-short--missing { color: var(--warning); font-style: italic; }

/* Stock + price row (compact, side-by-side on desktop) */
.pp-buy-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 8px 0; margin-top: 4px; border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.pp-stock { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 200px; }
.pp-stock strong { font-size: 13px; }
.pp-stock span   { font-size: 12px; color: var(--text-muted); }
.pp-stock--in       strong { color: var(--v14-stock-in); }
.pp-stock--in::before { content: '●'; color: var(--v14-stock-in); margin-right: 4px; }
.pp-stock--lead     strong { color: var(--v14-stock-lead); }
.pp-stock--lead::before { content: '●'; color: var(--v14-stock-lead); margin-right: 4px; }
.pp-stock--unknown::before { content: '●'; color: var(--text-hint); margin-right: 4px; }

.pp-price { display: flex; align-items: baseline; gap: 8px; }
.pp-price-value { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.pp-price-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Qty stepper + CTAs */
.pp-add-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pp-qty-wrap {
    display: inline-flex; align-items: center; gap: 4px;
    border: 1px solid var(--border); border-radius: 6px; background: #fff;
    padding: 0 4px;
}
.pp-qty-wrap > span {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em; padding: 0 8px;
}
.pp-qty-step {
    width: 28px; height: 28px; border: none; background: transparent;
    font-size: 16px; font-weight: 600; cursor: pointer; color: var(--text);
    border-radius: 4px;
}
.pp-qty-step:hover { background: var(--bg); }
.pp-qty-input {
    width: 56px; height: 32px; border: none; outline: none; text-align: center;
    font-size: 14px; font-family: var(--font); font-weight: 600;
    -moz-appearance: textfield;
}
.pp-qty-input::-webkit-outer-spin-button,
.pp-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pp-cta-primary, .pp-cta-secondary {
    padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
    cursor: not-allowed; font-family: var(--font); border: 1px solid var(--navy);
}
.pp-cta-primary   { background: var(--navy); color: #fff; }
.pp-cta-secondary { background: #fff; color: var(--navy); }

/* PDF spec-sheet link — REAL action (opens spec-sheet.php in new tab),
   styled to feel actionable but visually distinct from cart/quote. */
.pp-cta-pdf {
    padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
    background: #fff; color: var(--text); border: 1px solid var(--border);
    text-decoration: none; cursor: pointer; font-family: var(--font);
    display: inline-flex; align-items: center; gap: 6px;
}
.pp-cta-pdf:hover { background: var(--bg); border-color: var(--text-muted); }
.pp-published .pp-cta-pdf {
    border-color: var(--v14-blue); color: var(--v14-blue);
}
.pp-published .pp-cta-pdf:hover { background: var(--v14-bg-tint); }

.pp-cta-note      { color: var(--text-hint); font-size: 11px; }

/* Hero meta strip */
.pp-hero-meta {
    display: flex; flex-wrap: wrap; gap: 14px; list-style: none;
    margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border);
    font-size: 12px; color: var(--text-muted);
}
.pp-hero-meta li strong { color: var(--text); font-weight: 600; }

/* ---------------- Sections ---------------- */
.pp-section { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.pp-section:last-child { border-bottom: none; }
.pp-section--required { background: linear-gradient(180deg, #fff 0%, #fffbf2 100%); }

.pp-section-header {
    display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
}
.pp-section-roman {
    font-family: var(--mono); font-size: 13px; color: var(--text-muted); min-width: 24px;
}
.pp-section-title {
    font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em;
}

.pp-spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pp-spec-table tr { border-bottom: 1px solid var(--border); }
.pp-spec-table tr:last-child { border-bottom: none; }
.pp-spec-name {
    text-align: left; padding: 6px 10px; font-weight: 500;
    color: var(--text); width: 38%; vertical-align: top;
}
.pp-spec-unit  { color: var(--text-muted); font-weight: 400; margin-left: 4px; font-size: 11px; }
.pp-spec-value { padding: 6px 10px; font-family: var(--mono); font-size: 12px; color: var(--text); }
.pp-spec-source { padding: 6px 10px; width: 60px; text-align: right; }

.pp-storage-text {
    font-size: 13px; color: var(--text); line-height: 1.5;
    background: var(--bg); padding: 10px 12px; border-radius: 4px;
    margin: 0;
}

.pp-prose { font-size: 14px; line-height: 1.6; color: var(--text); }
.pp-sales {
    font-size: 14px; line-height: 1.6; color: var(--text);
    border-left: 3px solid var(--navy);
    background: var(--bg); padding: 10px 14px;
    margin: 0; border-radius: 0 4px 4px 0;
}
.pp-section-missing { background: #fefce8; }
.pp-missing-msg     { color: var(--warning); font-style: italic; font-size: 13px; }

/* In-hero tier pricing (staff view) — collapsible */
.pp-hero-tiers {
    margin-top: 6px; padding: 8px 10px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
}
.pp-hero-tiers > summary {
    cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text);
    padding: 2px 0; user-select: none;
    list-style: none;
}
.pp-hero-tiers > summary::-webkit-details-marker { display: none; }
.pp-hero-tiers > summary::before { content: '▸ '; color: var(--text-muted); }
.pp-hero-tiers[open] > summary::before { content: '▾ '; }
.pp-hero-tiers > summary small { font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.pp-hero-tiers > .pp-tier-table { margin-top: 6px; max-width: 100%; }
.pp-hero-tiers > .pp-pricing-note { margin-top: 4px; }

/* Public tier hint (published / guest view) */
.pp-tier-hint {
    margin-top: 6px; padding: 8px 12px;
    background: var(--info-bg); border-radius: 6px;
    font-size: 12px; color: var(--info);
}
.pp-tier-hint a { color: inherit; font-weight: 600; }

/* Tier pricing table */
.pp-tier-table {
    width: 100%; max-width: 480px; border-collapse: collapse; font-size: 13px;
    background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.pp-tier-table th, .pp-tier-table td { padding: 6px 10px; text-align: left; }
.pp-tier-table thead { background: var(--bg); }
.pp-tier-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.pp-tier-table tbody tr { border-top: 1px solid var(--border); }
.pp-tier-table .num { text-align: right; font-family: var(--mono); }
.pp-tier-default { background: var(--info-bg); font-weight: 600; }
.pp-pricing-note { font-size: 11px; color: var(--text-hint); margin-top: 6px; font-style: italic; }

.pp-section-refs { background: var(--bg); }

/* Internal admin sections (SEO + Merchant) — visible only in edit mode.
   Below the customer-facing rendering, clearly separated by a tinted band
   that signals "internal use only". */
.pp-admin-section {
    background: #fafbfd;
    border-top: 2px solid var(--info);
    padding: 16px 18px;
}
.pp-admin-section + .pp-admin-section { border-top-width: 1px; border-top-color: var(--border); }
.pp-admin-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pp-admin-header h3 {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--info);
}
.pp-admin-sub { font-size: 12px; color: var(--text-muted); }
.pp-admin-sub code { font-family: var(--mono); font-size: 11px; background: #fff; padding: 1px 5px; border-radius: 3px; }

.pp-admin-form {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px;
}
.pp-admin-field { display: flex; flex-direction: column; gap: 4px; }
.pp-admin-field--full { grid-column: 1 / -1; }
.pp-admin-field--checkbox { flex-direction: row; align-items: flex-start; gap: 8px; }
.pp-admin-field--checkbox input { margin-top: 3px; }
.pp-admin-field > span {
    font-size: 12px; font-weight: 500; color: var(--text);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pp-admin-field > span small { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.pp-suggest-btn {
    margin-left: auto; padding: 3px 9px; border-radius: 4px;
    background: var(--bg); color: var(--info); border: 1px solid var(--border);
    font-size: 10px; font-weight: 600; cursor: pointer; font-family: var(--font);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.pp-suggest-btn:hover { background: var(--info-bg); border-color: var(--info); }
.pp-admin-field input,
.pp-admin-field textarea,
.pp-admin-field select {
    padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; font-family: var(--font); outline: none;
    background: #fff; color: var(--text);
}
.pp-admin-field input:focus,
.pp-admin-field textarea:focus,
.pp-admin-field select:focus {
    border-color: var(--navy); box-shadow: 0 0 0 2px rgba(0,51,102,0.08);
}
.pp-admin-field textarea { resize: vertical; min-height: 50px; }
.pp-admin-field input::placeholder,
.pp-admin-field textarea::placeholder {
    color: var(--text-hint); font-style: italic;
}
.pp-admin-actions {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 14px;
    margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--border);
    flex-wrap: wrap;
}
.pp-admin-note { font-size: 11px; color: var(--text-muted); font-style: italic; line-height: 1.5; }

@media (max-width: 720px) {
    .pp-admin-form { grid-template-columns: 1fr; }
}

/* Staff back-office card (PIM-edit only) — surfaces the data we deliberately
   strip from the customer-facing copy. */
.pp-staff-card {
    margin: 0; padding: 14px 18px;
    background: #f3f4f6; border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.pp-staff-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pp-staff-card-header h3 {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted);
}
.pp-staff-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px 16px;
}
.pp-staff-cell { padding: 6px 0; }
.pp-staff-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-hint); font-weight: 600; margin-bottom: 2px;
}
.pp-staff-value {
    font-size: 13px; color: var(--text); font-weight: 500;
}
.pp-staff-value small { color: var(--text-muted); font-weight: 400; margin-left: 4px; }

@media (max-width: 720px) {
    .pp-staff-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
    .pp-staff-grid { grid-template-columns: 1fr; }
}

/* Inline editor — Phase 1: descriptions + alt PN + dims. */
.pp-editor {
    padding: 16px 18px;
    background: #fff; border-top: 1px solid var(--border);
}
.pp-editor-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.pp-editor-header h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.pp-editor-sub { font-size: 12px; color: var(--text-muted); }
.pp-editor-sub code {
    font-family: var(--mono); font-size: 11px; background: var(--bg);
    padding: 1px 5px; border-radius: 3px;
}
.pp-editor-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}
.pp-editor-field { display: flex; flex-direction: column; gap: 4px; }
.pp-editor-field--full { grid-column: 1 / -1; }
.pp-editor-field > span {
    font-size: 12px; font-weight: 500; color: var(--text);
}
.pp-editor-field > span small { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.pp-editor-field input,
.pp-editor-field textarea {
    padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; font-family: var(--font); outline: none;
    background: #fff; color: var(--text);
    transition: border-color 0.1s;
}
.pp-editor-field input:focus,
.pp-editor-field textarea:focus {
    border-color: var(--navy); box-shadow: 0 0 0 2px rgba(0,51,102,0.08);
}
.pp-editor-field textarea { resize: vertical; min-height: 60px; }
.pp-editor-field input::placeholder,
.pp-editor-field textarea::placeholder { color: var(--text-hint); font-style: italic; }
.pp-editor-actions {
    display: flex; align-items: center; gap: 14px;
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.pp-editor-note {
    font-size: 11px; color: var(--text-muted); font-style: italic; line-height: 1.5;
}
@media (max-width: 720px) {
    .pp-editor-grid { grid-template-columns: 1fr; }
}

.pp-diag {
    padding: 14px 18px; background: #fffbeb; border-top: 2px solid var(--warning);
}
.pp-diag h3 { font-size: 13px; font-weight: 600; color: var(--warning); margin-bottom: 6px; }
.pp-diag ul { padding-left: 18px; font-size: 12px; line-height: 1.6; }
.pp-diag code { font-family: var(--mono); font-size: 11px; background: #fff; padding: 1px 4px; border-radius: 3px; }

/* ============================================================
 * PUBLISHED state — V14 chrome overrides
 * ============================================================ */
.pp-published {
    border: 1px solid var(--v14-border);
    box-shadow: 0 4px 24px rgba(10,22,40,0.06);
    color: var(--v14-text);
}

.pp-published .pp-hero {
    background: linear-gradient(135deg, var(--v14-bg-soft) 0%, #fff 60%);
    border-bottom: 3px solid var(--v14-blue);
    grid-template-columns: 280px 1fr;
    padding: 20px 22px;
}
.pp-published .pp-hero-photo {
    border-color: var(--v14-border);
    box-shadow: 0 2px 12px rgba(0,114,188,0.08);
}
.pp-published .pp-hero-eyebrow { color: var(--v14-red); }
.pp-published .pp-hero-pn      { background: var(--v14-bg-tint); color: var(--v14-blue); }
.pp-published .pp-hero-title   { color: var(--v14-navy); font-size: 24px; }
.pp-published .pp-hero-short   { color: var(--v14-text-mute); }

.pp-published .pp-buy-row { border-color: var(--v14-border); }
.pp-published .pp-price-value { color: var(--v14-navy); }

.pp-published .pp-cta-primary {
    background: var(--v14-red); color: #fff; border-color: var(--v14-red);
    text-transform: uppercase; letter-spacing: 0.04em; padding: 9px 18px;
}
.pp-published .pp-cta-secondary {
    background: #fff; color: var(--v14-blue); border-color: var(--v14-blue);
}

.pp-published .pp-hero-meta { border-top-color: var(--v14-border); }
.pp-published .pp-hero-meta li strong { color: var(--v14-text); }

.pp-published .pp-section { border-bottom-color: var(--v14-border); }
.pp-published .pp-section--required { background: linear-gradient(180deg, #fff 0%, #fffaf0 100%); }
.pp-published .pp-section-header {
    padding-bottom: 6px; border-bottom: 2px solid var(--v14-blue);
}
.pp-published .pp-section-roman { color: var(--v14-red); font-weight: 700; font-size: 14px; }
.pp-published .pp-section-title { color: var(--v14-navy); font-size: 16px; }

.pp-published .pp-spec-table tr            { border-color: var(--v14-border); }
.pp-published .pp-spec-table tr:nth-child(even) { background: var(--v14-bg-soft); }
.pp-published .pp-spec-name                 { color: var(--v14-navy); font-weight: 600; }
.pp-published .pp-spec-value                { color: var(--v14-text); }

/* === Strip ALL back-office signals from the published / customer view === */
.pp-published .pp-source,
.pp-published .pp-spec-source,
.pp-published .pp-pill-required,
.pp-published .pp-pricing-note,
.pp-published .pp-staff-card,
.pp-published .pp-diag,
.pp-published .pp-meta-staff-only {
    display: none !important;
}
/* Make the spec value column take the freed source-cell space */
.pp-published .pp-spec-value { width: auto; }
/* "Section X — Required to build assembly" → just the section title */
.pp-published .pp-section--required { background: transparent; }

.pp-published .pp-storage-text {
    background: var(--v14-bg-soft);
    border-left: 3px solid var(--v14-yellow);
    border-radius: 0 4px 4px 0;
}
.pp-published .pp-prose { font-size: 14px; }
.pp-published .pp-sales {
    background: var(--v14-bg-tint); color: var(--v14-navy);
    border-left: 4px solid var(--v14-red);
}
.pp-published .pp-pill-required { background: var(--v14-red); color: #fff; }
.pp-published .pp-tier-table thead { background: var(--v14-bg-soft); }
.pp-published .pp-tier-default     { background: var(--v14-bg-tint); }
.pp-published .pp-section-refs     { background: var(--v14-bg-soft); }

/* ---------------- Mobile ---------------- */
@media (max-width: 720px) {
    .pp-publish-bar { flex-direction: column; align-items: stretch; }
    .pp-publish-bar-info,
    .pp-publish-bar-actions { justify-content: flex-start; flex-wrap: wrap; }

    .pp-hero,
    .pp-published .pp-hero {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 14px;
    }
    .pp-hero-photo { aspect-ratio: 4/3; max-width: 280px; margin: 0 auto; }
    .pp-hero-title { font-size: 20px; }
    .pp-published .pp-hero-title { font-size: 22px; }

    .pp-buy-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .pp-stock, .pp-price { width: 100%; }

    .pp-add-form { flex-wrap: wrap; }
    .pp-cta-primary, .pp-cta-secondary { flex: 1 1 calc(50% - 4px); min-width: 110px; }

    .pp-section { padding: 12px 14px; }
    .pp-spec-table { font-size: 12px; }
    .pp-spec-name { width: auto; padding: 6px 8px; }
    .pp-spec-value { padding: 6px 8px; }
    .pp-spec-source { padding: 6px 8px; width: 50px; }

    .pp-tier-table { font-size: 12px; }
    .pp-tier-table th, .pp-tier-table td { padding: 5px 8px; }
}

@media (max-width: 420px) {
    .pp-hero-title { font-size: 18px; }
    .pp-hero-short { font-size: 13px; }
    .pp-section-title { font-size: 14px; }
    .pp-spec-source, .pp-source { font-size: 9px; }
}

/* Inline-editable spec value cells (edit mode only). Subtle dotted underline
   on hover so staff knows the cell is editable; full focus outline when active. */
.pp-edit .pp-spec-value[contenteditable="true"] {
    cursor: text;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.1s, background-color 0.15s;
}
.pp-edit .pp-spec-value[contenteditable="true"]:hover {
    background-color: var(--info-bg);
    border-bottom-color: var(--info);
}
.pp-edit .pp-spec-value[contenteditable="true"]:focus {
    outline: 2px solid var(--info);
    outline-offset: -2px;
    background-color: #fff;
}
.pp-spec-review-link {
    margin-left: auto;
    font-size: 11px;
    color: var(--info);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
}
.pp-spec-review-link:hover { background: var(--info-bg); }
