/* ===== GeneratePress full-width override for filter/compare pages ===== */
body.bb-filter-active #primary,
body.bb-filter-active .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
}
body.bb-filter-active #secondary,
body.bb-filter-active .sidebar-primary,
body.bb-filter-active .widget-area {
    display: none !important;
}
body.bb-filter-active .site-main,
body.bb-filter-active .entry-content,
body.bb-filter-active article.post {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}
body.bb-filter-active #bb-filter-page,
body.bb-filter-active #bb-compare-page {
    display: block;
    width: 100%;
}
/* Override GeneratePress separate-containers grid */
body.bb-filter-active .inside-article,
body.bb-filter-active .grid-container {
    padding: 0 !important;
}

/* ============================================
   BeforeBuying — Core Styles
   Filter pages, compare pages, single laptop, archive
   ============================================ */

:root {
    --bb-primary:     #2563eb;
    --bb-primary-dark:#1d4ed8;
    --bb-accent:      #f97316;
    --bb-accent-dark: #ea6500;
    --bb-text:        #111827;
    --bb-muted:       #6b7280;
    --bb-light:       #f9fafb;
    --bb-border:      #e5e7eb;
    --bb-white:       #ffffff;
    --bb-green:       #059669;
    --bb-radius:      12px;
    --bb-radius-sm:   8px;
    --bb-shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --bb-shadow:      0 4px 12px rgba(0,0,0,0.08);
    --bb-shadow-hover:0 8px 24px rgba(0,0,0,0.12);
    --bb-transition:  all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bb-text);
    background: var(--bb-light);
}

/* ---------- Container ---------- */
.bb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ---------- Breadcrumb ---------- */
.bb-breadcrumb {
    font-size: 0.8rem;
    padding: 8px 0 12px;
    color: var(--bb-muted);
}
.bb-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.bb-breadcrumb li + li::before { content: "›"; margin-right: 4px; color: var(--bb-muted); }
.bb-breadcrumb a { color: rgba(255,255,255,0.8); text-decoration: none; }
.bb-breadcrumb a:hover { color: #fff; }
.bb-breadcrumb li:last-child { color: rgba(255,255,255,0.6); }

/* ---------- Filter Page Hero ---------- */
.bb-filter-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #fff;
    padding: 36px 0 32px;
    margin-bottom: 0;
}
.bb-filter-hero h1 {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 8px 0 6px;
    color: #fff;
    letter-spacing: -0.02em;
}
.bb-filter-hero-sub {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

/* Give the container below the hero some top padding */
#bb-filter-page > .bb-container {
    padding-top: 32px;
}

/* ---------- Product Grid ---------- */
.bb-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

/* ---------- Cards ---------- */
.bb-card {
    background: var(--bb-white);
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius);
    overflow: hidden;
    transition: var(--bb-transition);
    box-shadow: var(--bb-shadow-sm);
    display: flex;
    flex-direction: column;
}
.bb-card:hover {
    box-shadow: var(--bb-shadow-hover);
    border-color: #d1d5db;
    transform: translateY(-3px);
}
.bb-card-img-link {
    display: block;
    background: var(--bb-light);
    border-bottom: 1px solid var(--bb-border);
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}
.bb-card-img-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.3s ease;
    display: block;
}
.bb-card:hover .bb-card-img-link img { transform: scale(1.04); }
.bb-no-img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
}
.bb-card-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bb-card-brand {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bb-primary);
}
.bb-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    color: var(--bb-text);
}
.bb-card-title a { color: inherit; text-decoration: none; }
.bb-card-title a:hover { color: var(--bb-primary); }
.bb-rating {
    font-size: 0.78rem;
    color: var(--bb-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.bb-rating-star { color: #f59e0b; }
.bb-card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--bb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.bb-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--bb-text);
}
.bb-btn-amazon {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--bb-accent);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--bb-transition);
}
.bb-btn-amazon:hover { background: var(--bb-accent-dark); color: #fff; }

/* ---------- Spec Chips ---------- */
.bb-spec-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 4px; }
.bb-chip {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}
.bb-chip-top   { background: #fef2f2; color: #dc2626; }
.bb-chip-hi    { background: #f0fdf4; color: #16a34a; }
.bb-chip-mid   { background: #eff6ff; color: #2563eb; }
.bb-chip-low   { background: #f1f5f9; color: #64748b; }
.bb-chip-apple { background: #faf5ff; color: #7c3aed; }
.bb-chip-ram   { background: #fffbeb; color: #d97706; }
.bb-chip-ssd   { background: #f1f5f9; color: #475569; }
.bb-chip-gpu   { background: #fef2f2; color: #dc2626; }

/* ---------- Pagination ---------- */
.bb-pagination {
    text-align: center;
    margin: 8px 0 40px;
}
.bb-pagination a,
.bb-pagination span {
    display: inline-block;
    padding: 7px 14px;
    margin: 2px;
    border: 1.5px solid var(--bb-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--bb-primary);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bb-white);
    transition: var(--bb-transition);
}
.bb-pagination .current {
    background: var(--bb-primary);
    color: #fff;
    border-color: var(--bb-primary);
}
.bb-pagination a:hover { background: var(--bb-primary); color: #fff; border-color: var(--bb-primary); }

/* ---------- No results ---------- */
.bb-no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--bb-muted);
    font-size: 1rem;
    background: var(--bb-white);
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius);
    margin-bottom: 32px;
}
.bb-no-results a { color: var(--bb-primary); font-weight: 600; }

/* ---------- SEO Content ---------- */
.bb-seo-content {
    margin-top: 40px;
    padding: 24px 28px;
    background: var(--bb-white);
    border-radius: var(--bb-radius);
    border: 1.5px solid var(--bb-border);
}
.bb-seo-content h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; }
.bb-seo-content p { font-size: 0.875rem; color: var(--bb-muted); line-height: 1.7; margin: 0 0 8px; }

/* ---------- Compare Page ---------- */
.bb-compare-header {
    display: grid;
    grid-template-columns: 200px 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    text-align: center;
    background: var(--bb-white);
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius);
    padding: 24px;
}
.bb-compare-col img { max-height: 180px; object-fit: contain; }
.bb-compare-col h2 { font-size: 1rem; margin: 8px 0; }

.bb-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 32px;
    background: var(--bb-white);
    border-radius: var(--bb-radius);
    overflow: hidden;
    border: 1.5px solid var(--bb-border);
}
.bb-compare-table th,
.bb-compare-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--bb-border);
    border-right: 1px solid var(--bb-border);
}
.bb-compare-table th:last-child,
.bb-compare-table td:last-child { border-right: none; }
.bb-compare-table thead {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    color: #fff;
}
.bb-compare-table thead th { border-color: rgba(255,255,255,0.1); }
.bb-compare-table tbody tr:last-child td { border-bottom: none; }
.bb-compare-table tbody tr:nth-child(even) { background: var(--bb-light); }
.bb-compare-table tbody tr:hover { background: #eff6ff; }
.bb-spec-label { font-weight: 600; color: var(--bb-muted); white-space: nowrap; }
.bb-winner { background: #f0fdf4 !important; font-weight: 700; color: var(--bb-green); }
.bb-badge {
    background: var(--bb-green);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
    font-weight: 700;
}

/* Verdict */
.bb-verdict {
    background: var(--bb-white);
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius);
    padding: 28px;
    margin-bottom: 32px;
}
.bb-verdict h2 { margin: 0 0 10px; font-size: 1.2rem; }
.bb-verdict-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Related */
.bb-related { margin-bottom: 40px; }
.bb-related h3 { font-size: 1rem; margin-bottom: 10px; }
.bb-related a { color: var(--bb-primary); text-decoration: none; font-size: 0.875rem; margin-right: 12px; }
.bb-related a:hover { text-decoration: underline; }

/* ---------- Page Header (compare/archive) ---------- */
.bb-page-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #fff;
    padding: 36px 20px 32px;
    margin-bottom: 32px;
}
.bb-page-header h1 { font-size: 1.9rem; font-weight: 800; margin: 0 0 6px; color: #fff; }
.bb-subtitle { color: rgba(255,255,255,0.65); margin: 0; font-size: 0.9rem; }

/* ---------- Single Laptop Page ---------- */
.bb-single-product { max-width: 960px; margin: 0 auto; }
.bb-product-top {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
    margin-bottom: 40px;
    background: var(--bb-white);
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius);
    padding: 28px;
}
.bb-product-image img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius-sm);
    background: var(--bb-light);
    padding: 12px;
}
.bb-product-info h1 { font-size: 1.5rem; margin: 0 0 8px; }
.bb-rating-large { font-size: 1rem; margin-bottom: 12px; color: var(--bb-muted); }
.bb-price-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bb-text);
    margin: 12px 0;
}
.bb-price-note { font-size: 0.75rem; color: var(--bb-muted); font-weight: 400; vertical-align: middle; }
.bb-btn-large {
    display: inline-block;
    padding: 13px 28px;
    background: var(--bb-accent);
    color: #fff;
    border-radius: var(--bb-radius-sm);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    transition: var(--bb-transition);
}
.bb-btn-large:hover { background: var(--bb-accent-dark); color: #fff; }
.bb-quick-specs { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; }
.bb-quick-specs li { padding: 6px 0; border-bottom: 1px solid var(--bb-border); }

.bb-full-specs,
.bb-review-content,
.bb-similar { margin-bottom: 40px; }
.bb-full-specs h2,
.bb-review-content h2,
.bb-similar h2 {
    font-size: 1.2rem;
    border-left: 4px solid var(--bb-primary);
    padding-left: 12px;
    margin-bottom: 16px;
}
.bb-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--bb-white);
    border-radius: var(--bb-radius);
    overflow: hidden;
    border: 1.5px solid var(--bb-border);
}
.bb-spec-table th,
.bb-spec-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--bb-border);
}
.bb-spec-table th {
    background: var(--bb-light);
    font-weight: 600;
    width: 35%;
    text-align: left;
}
.bb-spec-table tr:last-child th,
.bb-spec-table tr:last-child td { border-bottom: none; }
.bb-spec-table tr:hover td { background: #eff6ff; }

.bb-similar-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.bb-similar-card {
    background: var(--bb-white);
    border: 1.5px solid var(--bb-border);
    border-radius: var(--bb-radius-sm);
    padding: 12px;
    font-size: 0.875rem;
    transition: var(--bb-transition);
}
.bb-similar-card:hover { border-color: var(--bb-primary); }
.bb-similar-card a {
    color: var(--bb-primary);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.bb-similar-card span { color: var(--bb-text); font-weight: 800; }

/* ---------- GeneratePress overrides ---------- */
body.page-template-bb-homepage .site-content,
body.page-template-bb-homepage .entry-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
body.page-template-bb-homepage article.post,
body.page-template-bb-homepage .entry-header { display: none; }

/* For filter/compare virtual pages - full width */
body.page-template-default .bb-container,
#bb-filter-page .bb-container,
#bb-compare-page .bb-container { max-width: 1200px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .bb-product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .bb-product-grid { grid-template-columns: repeat(2, 1fr); }
    .bb-compare-header { grid-template-columns: 1fr 1fr; }
    .bb-compare-header .bb-compare-label-col { display: none; }
}
@media (max-width: 768px) {
    .bb-product-top { grid-template-columns: 1fr; }
    .bb-compare-table { font-size: 0.78rem; }
    .bb-filter-hero h1 { font-size: 1.5rem; }
}
@media (max-width: 600px) {
    .bb-product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bb-compare-table { display: block; overflow-x: auto; font-size: 0.75rem; }
    .bb-spec-table { display: block; overflow-x: auto; }
    .bb-price-large { font-size: 1.5rem; }
    .bb-filter-hero h1 { font-size: 1.3rem; }
    .bb-filter-hero { padding: 24px 0 20px; }
    .bb-compare-cta { padding: 24px 16px; }
    .bb-verdict { padding: 20px; }
    .bb-product-top { padding: 16px; gap: 16px; }
}
@media (max-width: 480px) {
    .bb-product-grid { grid-template-columns: 1fr 1fr; }
    .bb-btn-amazon { padding: 6px 10px; font-size: 0.7rem; }
}
