/* =========================================
   SINGLE PEPTIDE PROFILE STYLES (Final)
   ========================================= */

/* --- 1. CORE VARIABLES --- */
:root {
    /* Palette */
    --bg-page: #F8FAFC;
    --card-bg: #FFFFFF;
    --ink: #0F172A;
    --muted: #64748B;
    --muted-light: #94A3B8;
    --stroke: #E2E8F0;
    --accent: #4F46E5; /* Indigo */
    
    /* Dimensions */
    --radius-lg: 20px;
    
    /* Gradients & Tints */
    --header-grad: radial-gradient(300px 150px at 100% 0%, rgba(91,92,230,.06), transparent 70%);
    --box-grad: linear-gradient(180deg, rgba(91,92,230,.05), rgba(255,255,255,0)); /* Light Indigo Tint */
    --bar-grad: linear-gradient(90deg, #2DD4BF, #6366F1); /* Teal to Indigo */
    
    /* Component Colors */
    --focus-bg: #EEF2FF; --focus-tx: #4338CA;
    --route-bg: #FFFFFF; --route-bd: #E2E8F0; --route-tx: #334155;
    
    /* Status Colors */
    --warn-bg: #FFF1F2; --warn-bd: #FECDD3; --warn-tx: #9F1239;
}

/* --- 2. PAGE LAYOUT GRID --- */
.pep-page-wrap {
    background-color: var(--bg-page);
    padding: 20px 16px 120px; /* Extra bottom padding for mobile sticky footer */
    min-height: 100vh;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--ink);
}

.pep-container {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* Mobile First: Single Column */
    gap: 24px;
}

/* Desktop Grid: Content Left, Sidebar Right */
@media (min-width: 960px) {
    .pep-container {
        grid-template-columns: 1fr 350px;
        align-items: start;
        padding-top: 20px;
    }
    .pep-sidebar {
        position: sticky;
        top: 40px; /* Sticky Sidebar */
    }
    .pep-page-wrap {
        padding-bottom: 40px;
    }
}

/* --- 3. SHARED CARD STYLES --- */
.pep-card {
    background: var(--card-bg);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    overflow: hidden;
    margin-bottom: 24px;
}

/* --- 4. HERO SECTION --- */
.hero-card .p-head {
    padding: 24px 24px 16px;
    background: var(--header-grad);
    border-bottom: 1px solid rgba(15,23,42,0.03);
}

.p-badges { display: flex; gap: 8px; margin-bottom: 12px; }

.h-badge {
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    padding: 5px 10px; border-radius: 6px;
    background: #F1F5F9; color: var(--muted);
    letter-spacing: 0.05em;
}

.p-title {
    font-size: 32px; font-weight: 900; letter-spacing: -0.03em;
    margin: 0; line-height: 1.1; color: var(--ink);
}

.p-tagline {
    font-size: 16px; color: var(--muted); margin-top: 8px; 
    line-height: 1.4; font-weight: 500;
}

.hero-card .p-body { 
    padding: 24px; 
    display: flex; flex-direction: column; gap: 24px; 
}

/* --- 5. PLAIN ENGLISH BOX (Blue Style + Border) --- */
.pe-box {
    background: #EFF6FF; /* Blue-50 */
    border: 1px solid #DBEAFE; /* Blue-100 */
    border-left: 4px solid #3B82F6; /* FIXED: Added Blue Accent Border */
    border-radius: 12px; 
    padding: 16px 20px;
}

.pe-text {
    font-size: 15px; 
    line-height: 1.6; 
    color: #334155; /* Slate-700 */
    margin: 0;
}

.pe-inline-title {
    color: #1E3A8A; /* Blue-900 */
    font-weight: 800; 
    text-transform: uppercase;
    font-size: 12px; 
    letter-spacing: 0.05em; 
    margin-right: 6px;
}

/* --- 6. EVIDENCE METER --- */
.evidence-box {
    margin-bottom: 4px;
}
.ev-head { 
    display: flex; justify-content: space-between; 
    font-size: 13px; font-weight: 700; margin-bottom: 8px; 
}
.ev-label { color: var(--ink); }
.ev-val { color: var(--muted); }

.progress-track { 
    width: 100%; height: 8px; background: #E2E8F0; 
    border-radius: 99px; overflow: hidden; 
}
.progress-fill { 
    height: 100%; background: var(--bar-grad); 
    border-radius: 99px; 
}

/* --- 7. QUICK FACTS GRID (Tinted) --- */
.facts-box {
    background: var(--box-grad); 
    border: 1px solid #eef2f7;
    border-radius: 16px; 
    padding: 20px;
    display: flex; flex-direction: column; gap: 16px;
}

.facts-header { 
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px; 
}

.facts-title { 
    display: flex; align-items: center; gap: 10px; 
    font-size: 12px; font-weight: 900; 
    color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; 
}

.bolt-icon { 
    width: 24px; height: 24px; 
    background: var(--focus-bg); border-radius: 6px; 
    display: flex; align-items: center; justify-content: center; 
    color: var(--accent);
}

.fact-row { 
    display: grid; 
    grid-template-columns: 90px 1fr; /* Fixed Label Width */
    gap: 16px; 
    align-items: baseline; 
}

.f-key { 
    font-size: 12px; font-weight: 800; 
    color: var(--muted-light); text-transform: uppercase; 
    padding-top: 4px;
}

.f-val { 
    font-size: 14px; font-weight: 500; 
    color: var(--ink); line-height: 1.5; 
}

/* --- 8. PILLS (Focus, Route, Flags) --- */
.pill-wrap { 
    display: flex; flex-wrap: wrap; gap: 8px; 
}

.pill { 
    font-size: 12px; font-weight: 700; 
    padding: 6px 12px; border-radius: 99px; 
    display: inline-flex; align-items: center; gap: 6px; 
    white-space: nowrap;
}

/* Focus Pills */
.pill.focus { 
    background: var(--focus-bg); color: var(--focus-tx); 
}
.dot-f { 
    width: 6px; height: 6px; border-radius: 50%; 
    opacity: 0.6; background: currentColor; 
}

/* Route Pills */
.pill.route { 
    background: var(--route-bg); 
    border: 1px solid var(--route-bd); 
    color: var(--route-tx); 
}
.dot-r { 
    width: 6px; height: 6px; border-radius: 50%; 
    background: #CBD5E1; 
}

/* Flag Pills (Dynamic Colors) */
.pill.flag.info { background: #F1F5F9; border: 1px solid #E2E8F0; color: #475569; }
.dot-flag-info { width: 6px; height: 6px; background: #64748B; border-radius: 50%; }

.pill.flag.caution { background: #FFF7ED; border: 1px solid #FFEDD5; color: #C2410C; }
.dot-flag-caution { width: 6px; height: 6px; background: #F97316; border-radius: 50%; }

.pill.flag.warning { background: #FEF2F2; border: 1px solid #FEE2E2; color: #991B1B; }
.dot-flag-warning { width: 6px; height: 6px; background: #EF4444; border-radius: 50%; }


/* --- 9. CONTENT CARD (WordPress Content) --- */
.content-card { 
    padding: 30px; 
    font-size: 16px; line-height: 1.7; color: #334155; 
}
.wp-content h2, .wp-content h3 { 
    color: var(--ink); font-weight: 800; 
    margin-top: 1.5em; margin-bottom: 0.6em; 
}
.wp-content p { margin-bottom: 1.5em; }
.wp-content ul { margin-bottom: 1.5em; padding-left: 1.2em; }

/* Safety Flags Box */
.warn-box { 
    margin-top: 40px; padding: 20px; 
    background: var(--warn-bg); 
    border-radius: 12px; border: 1px solid var(--warn-bd); 
}
.warn-box h3 { 
    margin: 0 0 12px 0; 
    color: var(--warn-tx); font-size: 16px; 
}

/* --- 10. SIDEBAR: IMAGE & TECH SPECS --- */
.side-card { 
    padding: 20px; 
}

/* Image Row (Ghost Double Strategy) */
.image-row {
    width: 100%; height: 220px;
    background-image: radial-gradient(var(--stroke) 1px, transparent 1px);
    background-size: 16px 16px;
    background-color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    position: relative; border-radius: 12px; border: 1px solid var(--stroke);
    overflow: hidden; 
    margin-bottom: 20px;
}
.card-img { 
    width: 100%; height: 100%; object-fit: contain; 
    padding: 16px; mix-blend-mode: multiply; filter: contrast(1.05);
}
.img-tag {
    position: absolute; bottom: 10px; right: 12px;
    font-size: 10px; font-weight: 700; background: #fff;
    padding: 4px 8px; border: 1px solid var(--stroke);
    border-radius: 4px; color: var(--muted-light);
}

/* Tech Specs Stack */
.tech-stack { display: flex; flex-direction: column; gap: 10px; }
.tech-heading { 
    font-size: 12px; font-weight: 800; color: var(--ink); 
    text-transform: uppercase; margin: 0 0 4px 0; letter-spacing: 0.05em; 
}
.tech-row { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 8px 0; border-bottom: 1px solid #F1F5F9; 
}
.tech-row:last-child { border-bottom: none; }
.tech-row.stack { 
    flex-direction: column; align-items: flex-start; gap: 6px; 
}

.t-label { 
    font-size: 12px; color: var(--muted-light); font-weight: 700; text-transform: uppercase; 
}
.t-val { 
    font-size: 13px; color: var(--ink); font-weight: 600; text-align: right; 
}
.mono { font-family: monospace; letter-spacing: -0.02em; }
.break { word-break: break-all; text-align: left; line-height: 1.4; color: var(--muted); }

/* Visibility Classes (Ghost Double) */
.mobile-only-img { display: flex; margin-bottom: 20px; }
.desktop-only-img { display: none; }
@media (min-width: 960px) {
    .mobile-only-img { display: none; }
    .desktop-only-img { display: flex; }
}

/* --- 11. SIDEBAR: BUY / PARTNERS --- */
.buy-card { 
    padding: 24px; 
    position: sticky; top: 20px; 
}
.price-header { 
    display: flex; align-items: center; gap: 8px; 
    font-size: 12px; font-weight: 700; color: #16A34A; margin-bottom: 8px; 
}
.stock-dot { 
    width: 8px; height: 8px; background: #16A34A; border-radius: 50%; 
}
.avg-price-display { 
    font-size: 32px; font-weight: 900; color: var(--ink); 
    margin-bottom: 24px; letter-spacing: -0.02em; 
}
.avg-price-display .unit { 
    font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; 
}

/* Partner Tool */
.partner-tool { display: flex; flex-direction: column; gap: 12px; }
.geo-head { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--muted); 
}
#regionSelect { 
    padding: 4px 8px; border-radius: 6px; 
    border: 1px solid var(--stroke); font-size: 12px; 
    background: #F8FAFC; color: var(--ink); font-weight: 600; 
}

.partner-list { display: flex; flex-direction: column; gap: 10px; }
.p-card { 
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 10px;
    text-decoration: none; transition: 0.2s; background: #fff;
}
.p-card:hover { 
    border-color: var(--accent); background: #F8FAFC; transform: translateY(-2px); 
}
.pc-info { display: flex; flex-direction: column; gap: 4px; }
.pc-badge { 
    font-size: 9px; font-weight: 800; text-transform: uppercase; 
    background: #DBEAFE; color: #1E40AF; align-self: flex-start; 
    padding: 2px 6px; border-radius: 4px; 
}
.pc-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.pc-arrow { font-weight: 800; color: var(--accent); }
.p-empty { 
    text-align: center; font-size: 12px; color: var(--muted); 
    font-style: italic; margin-top: 10px; 
}

/* --- 12. MOBILE STICKY FOOTER --- */
.mob-sticky {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--stroke);
    padding: 16px 20px; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.mob-price { font-size: 20px; font-weight: 900; color: var(--ink); }
.mob-price .unit { font-size: 12px; color: var(--muted); }
.mob-btn {
    background: var(--ink); color: #fff; border: none;
    padding: 12px 24px; border-radius: 99px;
    font-weight: 700; font-size: 14px; cursor: pointer;
}
@media (min-width: 960px) { .mob-sticky { display: none; } }