/* ============================================================
   BBM SHOP — POLICY PAGES (Privacy Policy, T&C, Refund, AUP, etc.)
   Sticky table-of-contents sidebar + numbered sections.
   Uses the same design tokens as customer.css (--cu-*) for consistency.
   ============================================================ */

.pol-wrap {
    background: var(--cu-bg);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--cu-text);
}

/* ---------- Hero ---------- */
.pol-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px 40px;
}
.pol-eyebrow {
    display: inline-block;
    background: var(--cu-accent-soft);
    color: var(--cu-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.pol-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    color: var(--cu-text);
    margin: 0 0 12px;
}
.pol-hero p {
    font-size: 15px;
    color: var(--cu-text-secondary);
    max-width: 640px;
    line-height: 1.65;
    margin: 0 0 14px;
}
.pol-updated {
    font-size: 12.5px;
    color: var(--cu-text-muted);
}

/* ---------- Body layout ---------- */
.pol-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: start;
}

/* ---------- TOC sidebar ---------- */
.pol-toc {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    background: var(--cu-surface);
    border: 1px solid var(--cu-border);
    border-radius: var(--cu-radius-lg);
    padding: 20px 18px;
}
.pol-toc summary {
    list-style: none;
    cursor: default;
}
.pol-toc summary::-webkit-details-marker { display: none; }
.pol-toc summary::marker { content: ''; }
.pol-toc-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cu-text-muted);
    margin-bottom: 12px;
}
.pol-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pol-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--cu-text-secondary);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.pol-toc a:hover { background: var(--cu-bg); color: var(--cu-text); }
.pol-toc a.active { background: var(--cu-accent-soft); color: var(--cu-accent); font-weight: 600; }
.pol-toc-num {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--cu-bg);
    color: var(--cu-text-muted);
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pol-toc a.active .pol-toc-num { background: var(--cu-accent); color: #fff; }

/* ---------- Content ---------- */
.pol-content { min-width: 0; }
.pol-intro {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--cu-text-secondary);
    background: var(--cu-accent-soft);
    border: 1px solid #E0DCFB;
    border-radius: var(--cu-radius-lg);
    padding: 22px 26px;
    margin-bottom: 28px;
}

.pol-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--cu-border);
    scroll-margin-top: 96px;
}
.pol-section:last-of-type { border-bottom: none; }
.pol-section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.pol-section-num {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--cu-accent-soft);
    color: var(--cu-accent);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pol-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--cu-text);
    margin: 0;
}
.pol-section-body { font-size: 14.5px; line-height: 1.75; color: var(--cu-text-secondary); }
.pol-section-body p { margin: 0 0 14px; }
.pol-section-body p:last-child { margin-bottom: 0; }
.pol-section-body h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--cu-text);
    margin: 22px 0 10px;
    padding-left: 12px;
    border-left: 3px solid var(--cu-accent);
    line-height: 1.4;
}
.pol-section-body h4:first-child { margin-top: 0; }
.pol-section-body ul { margin: 0 0 14px; padding: 0; list-style: none; }
.pol-section-body li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}
.pol-section-body li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cu-accent);
}
.pol-section-body li:last-child { margin-bottom: 0; }
.pol-section-body ol {
    margin: 0 0 14px;
    padding-left: 0;
    list-style: none;
    counter-reset: pol-ol;
}
.pol-section-body ol li {
    counter-increment: pol-ol;
    padding-left: 30px;
}
.pol-section-body ol li::before {
    content: counter(pol-ol);
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cu-accent-soft);
    color: var(--cu-accent);
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pol-section-body strong { color: var(--cu-text); }
.pol-note {
    background: var(--cu-warning-soft);
    border: 1px solid #F5D9A8;
    color: var(--cu-warning);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    margin: 14px 0;
}

/* ---------- Contact callout ---------- */
.pol-contact-box {
    background: var(--cu-surface);
    border: 1px solid var(--cu-border);
    border-radius: var(--cu-radius-lg);
    padding: 26px 28px;
    margin-top: 12px;
}
.pol-contact-box h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    margin: 0 0 12px;
    color: var(--cu-text);
}
.pol-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--cu-text-secondary);
    margin-bottom: 8px;
}
.pol-contact-row:last-child { margin-bottom: 0; }
.pol-contact-row svg { width: 16px; height: 16px; color: var(--cu-accent); flex-shrink: 0; }
.pol-contact-row a { color: var(--cu-text); text-decoration: none; font-weight: 500; }
.pol-contact-row a:hover { color: var(--cu-accent); }

/* ---------- Related policies ---------- */
.pol-related {
    margin-top: 24px;
    font-size: 13.5px;
    color: var(--cu-text-muted);
}
.pol-related a { color: var(--cu-accent); text-decoration: none; font-weight: 600; }
.pol-related a:hover { text-decoration: underline; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .pol-body { grid-template-columns: 1fr; gap: 20px; }
    .pol-toc {
        position: sticky;
        top: 64px; /* sits just below the sticky site header (~64px tall on mobile) */
        z-index: 30;
        padding: 4px 0;
        border: none;
        background: var(--cu-bg); /* solid so content scrolling underneath doesn't show through once stuck */
    }
    .pol-toc-label { display: none; }
    .pol-toc summary {
        cursor: pointer;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--cu-surface);
        border: 1px solid var(--cu-border);
        border-radius: var(--cu-radius);
        padding: 13px 16px;
        font-size: 13.5px;
        font-weight: 600;
        color: var(--cu-text);
    }
    .pol-toc summary::-webkit-details-marker { display: none; }
    .pol-toc summary::after {
        content: '▾';
        color: var(--cu-text-muted);
        transition: transform 0.15s ease;
    }
    .pol-toc[open] summary::after { transform: rotate(180deg); }
    .pol-toc ol { margin-top: 8px; padding: 10px; background: var(--cu-surface); border: 1px solid var(--cu-border); border-radius: var(--cu-radius); max-height: 300px; overflow-y: auto; }
    .pol-hero { padding: 40px 18px 28px; }
    .pol-section { padding: 26px 0; }
    .pol-intro, .pol-contact-box { padding: 18px 20px; }
}
@media (min-width: 861px) {
    .pol-toc summary { pointer-events: none; }
    .pol-toc summary::-webkit-details-marker { display: none; }
}