@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bsm-bg-light: #FAFAFA;
    --bsm-surface: #FFFFFF;
    --bsm-text-primary: #111827;
    --bsm-text-secondary: #4B5563;
    --bsm-border: #E5E7EB;
    --bsm-accent: #059669;
    --bsm-shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --bsm-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --bsm-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --bsm-radius: 16px;
    --transition: all 0.2s ease-in-out;
}

/* =====================
   RESET & BASE
   ===================== */
.bsm-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--bsm-text-primary);
    background: transparent;
    line-height: 1.6;
    width: 100%;
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

.bsm-container *,
.bsm-container *::before,
.bsm-container *::after {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

/* =====================
   TYPOGRAPHY (Mobile-First)
   ===================== */
.bsm-title {
    font-size: 1.875rem;       /* mobile: 30px */
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--bsm-text-primary);
    margin: 0 0 1rem;
}

.bsm-subtitle {
    font-size: 1rem;
    color: var(--bsm-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

@media (min-width: 640px) {
    .bsm-title { font-size: 2.5rem; }
    .bsm-subtitle { font-size: 1.0625rem; }
}

@media (min-width: 1024px) {
    .bsm-container { padding: 2rem 1.5rem; }
    .bsm-title { font-size: 3.25rem; }
}

/* =====================
   SECTIONS
   ===================== */
.bsm-section {
    margin-bottom: 4rem;
    width: 100%;
}

/* =====================
   CARDS
   ===================== */
.bsm-card {
    background: var(--bsm-surface);
    border: 1px solid var(--bsm-border);
    border-radius: var(--bsm-radius);
    padding: 1.5rem;
    box-shadow: var(--bsm-shadow-sm);
    transition: var(--transition);
}

.bsm-card.hoverable:hover {
    box-shadow: var(--bsm-shadow-md);
    transform: translateY(-2px);
    border-color: #D1D5DB;
}

/* =====================
   GRIDS — MOBILE FIRST
   ===================== */

/* Default: 1 column on mobile */
.bsm-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.bsm-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* 2 col at tablet + */
@media (min-width: 640px) {
    .bsm-grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .bsm-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Full grid at desktop */
@media (min-width: 1024px) {
    .bsm-grid-2 { gap: 3rem; }
    .bsm-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

/* =====================
   BSM-SPECIFIC GRIDS (inline overrides)
   ===================== */

/* Discount percentage grid: 2 cols on mobile, 4 on desktop */
.bsm-discount-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .bsm-discount-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

/* Hero metrics: always 3-col but compact */
.bsm-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 1.25rem 1rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.bsm-hero-metrics .val {
    font-size: 1.375rem;
    font-weight: 800;
    color: #059669;
}

.bsm-hero-metrics .lbl {
    font-size: 0.65rem;
    color: #6B7280;
    font-weight: 500;
    line-height: 1.3;
}

/* App mockup inner grid */
.bsm-app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* calculator metric boxes – 1 col on mobile */
.bsm-calc-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (min-width: 480px) {
    .bsm-calc-metrics { grid-template-columns: repeat(3, 1fr); }
}

/* Pioneers grid */
.bsm-pioneer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

@media (min-width: 480px) {
    .bsm-pioneer-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Compliance grid */
.bsm-compliance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .bsm-compliance-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =====================
   BUTTONS
   ===================== */
.btn-bsm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.375rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-bsm-primary {
    background: #059669;
    color: #FFFFFF;
    border: 1px solid transparent;
}
.btn-bsm-primary:hover { background: #047857; color: #FFFFFF; }

.btn-bsm-outline {
    background: #FFFFFF;
    color: var(--bsm-text-primary);
    border: 1px solid var(--bsm-border);
    box-shadow: var(--bsm-shadow-sm);
}
.btn-bsm-outline:hover { background: #F9FAFB; }

.bsm-btn-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 1.5rem;
}

@media (min-width: 480px) {
    .bsm-btn-row {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
}

/* =====================
   CALCULATOR SLIDER
   ===================== */
.calculator-slider {
    width: 100%;
    margin: 1.25rem 0;
    appearance: none;
    height: 6px;
    background: #E5E7EB;
    border-radius: 999px;
    outline: none;
}
.calculator-slider::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #059669;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* =====================
   METRIC BOXES
   ===================== */
.metric-box {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid var(--bsm-border);
}
.metric-value {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--bsm-text-primary);
    letter-spacing: -0.02em;
}
.metric-label {
    font-size: 0.7rem;
    color: var(--bsm-text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =====================
   LISTS
   ===================== */
.bsm-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bsm-list li {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--bsm-border);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.bsm-list li:last-child { border-bottom: none; }

/* =====================
   FAQ <details>
   ===================== */
details.bsm-faq {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.125rem 1.25rem;
    cursor: pointer;
}
details.bsm-faq summary {
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
details.bsm-faq summary::-webkit-details-marker { display: none; }
details.bsm-faq p {
    margin-top: 0.875rem;
    color: #4B5563;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* =====================
   PHARMACY TAGS
   ===================== */
.bsm-pharma-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.625rem;
}

/* =====================
   ANIMATIONS
   ===================== */
.bsm-fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.bsm-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
