/* Product Review Block — Frontend Styles */
:root {
    --prb-accent: #f59e0b;
    --prb-bg: #ffffff;
    --prb-border: #e5e7eb;
    --prb-text: #111827;
    --prb-muted: #6b7280;
    --prb-pro-bg: #f0fdf4;
    --prb-pro-border: #bbf7d0;
    --prb-pro-text: #166534;
    --prb-con-bg: #f9fafb;
    --prb-con-border: #e5e7eb;
    --prb-con-text: #6b7280;
    --prb-why-bg: #fffbeb;
    --prb-why-border: #fde68a;
    --prb-radius: 16px;
    --prb-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.prb-block {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--prb-bg);
    border: 1px solid var(--prb-border);
    border-radius: var(--prb-radius);
    box-shadow: var(--prb-shadow);
    padding: 28px;
    margin: 32px 0;
    position: relative;
    color: var(--prb-text);
    overflow: hidden;
}

.prb-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--prb-accent);
}

/* Editorial Badge */
.prb-editorial-badge {
    display: inline-block;
    background: var(--prb-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: .3px;
}

/* Header */
.prb-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.prb-rank {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--prb-accent);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.prb-header-info {
    flex: 1;
    min-width: 160px;
}

.prb-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    margin: 0 0 8px !important;
    line-height: 1.3 !important;
    color: var(--prb-text) !important;
}

.prb-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prb-score {
    font-size: 28px;
    font-weight: 900;
    color: var(--prb-accent);
    line-height: 1;
}

.prb-stars {
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 1;
}

.prb-star-full  { color: var(--prb-accent); }
.prb-star-empty { color: #d1d5db; }

.prb-score-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--prb-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* CTA button */
.prb-cta-btn {
    display: inline-block;
    background: var(--prb-accent);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    text-align: center;
    white-space: nowrap;
    transition: opacity .15s, transform .15s;
    cursor: pointer;
    border: none;
}

.prb-cta-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
    color: #fff !important;
}

.prb-cta-btn--small {
    font-size: 13px;
    padding: 8px 16px;
    align-self: flex-start;
    margin-top: 4px;
}

/* Image */
.prb-image-wrap {
    margin: 20px 0;
    text-align: center;
    border-radius: 10px;
    padding: 16px;
}

.prb-image {
    max-height: 260px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* Short description */
.prb-short-desc {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
    margin: 0 0 20px;
}

/* Sections */
.prb-section {
    margin-bottom: 20px;
}

.prb-section-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .6px !important;
    color: var(--prb-muted) !important;
    margin: 0 0 10px !important;
}

.prb-section-title--pros { color: #166534 !important; }
.prb-section-title--cons { color: #6b7280 !important; }

/* Lists */
.prb-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.prb-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 14px;
    line-height: 1.55;
    border-bottom: 1px solid #f3f4f6;
}

.prb-list li:last-child { border-bottom: none; }

.prb-list-icon {
    flex-shrink: 0;
    font-weight: 700;
    margin-top: 1px;
}

.prb-list--features .prb-list-icon { color: var(--prb-accent); }
.prb-list--pros     .prb-list-icon { color: #16a34a; }
.prb-list--cons     .prb-list-icon { color: #9ca3af; }

/* Pros / Cons two-column */
.prb-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .prb-pros-cons { grid-template-columns: 1fr; }
    .prb-header { flex-direction: column; }
    .prb-cta-btn--small { width: 100%; }
}

.prb-pros {
    background: var(--prb-pro-bg);
    border: 1px solid var(--prb-pro-border);
    border-radius: 10px;
    padding: 14px;
}

.prb-cons {
    background: var(--prb-con-bg);
    border: 1px solid var(--prb-con-border);
    border-radius: 10px;
    padding: 14px;
}

.prb-pros .prb-list li,
.prb-cons .prb-list li {
    border-bottom-color: rgba(0,0,0,.06);
}

/* Why / Perfect For */
.prb-section--why {
    background: var(--prb-why-bg);
    border: 1px solid var(--prb-why-border);
    border-radius: 10px;
    padding: 14px 18px;
}

.prb-section--perfect {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 14px 18px;
}

.prb-section--why p,
.prb-section--perfect p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}

/* Product title / image links */
.prb-product-link {
    color: inherit;
    text-decoration: none;
}

.prb-product-link:hover {
    text-decoration: underline;
    color: inherit;
}

/* CTA wrap at bottom — centered */
.prb-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    text-align: center;
}

.prb-cta-wrap .prb-cta-btn {
    font-size: 16px;
    padding: 14px 28px;
}

.prb-cta-sub {
    font-size: 12px;
    color: var(--prb-muted);
}

/* ── Product Review Table ── */
.prb-table-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 32px 0;
}

.prb-table-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--prb-text) !important;
    margin: 0 0 16px !important;
}

.prb-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Base table styles — apply at all screen sizes */
.prb-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border: none;
    font-size: 14px;
}

.prb-table-th {
    padding: 12px 16px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #b0b4bc;
    border: none;
    white-space: nowrap;
    background: transparent;
}

.prb-table-th--rank  { width: 52px;  text-align: center; }
.prb-table-th--score { width: 90px;  text-align: center; }
.prb-table-th--cta   { width: 180px; }

.prb-table-td {
    padding: 20px 16px;
    border: none;
    vertical-align: middle;
    color: var(--prb-text);
}

.prb-table-td--rank  { text-align: center; }
.prb-table-td--score { text-align: center; }

.prb-table-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
}

.prb-table-td--product {
    display: flex;
    align-items: center;
    gap: 14px;
}

.prb-table-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    flex-shrink: 0;
    padding: 4px;
}

.prb-table-product-link {
    font-weight: 700;
    font-size: 14px;
    color: var(--prb-text);
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

.prb-table-product-link:hover { color: var(--prb-accent); }

.prb-table-features {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

.prb-table-features li {
    padding: 2px 0;
    color: var(--prb-muted);
    line-height: 1.5;
    font-size: 12px;
}

.prb-table-features li::before {
    content: '✓';
    color: var(--prb-accent);
    font-weight: 700;
    margin-right: 6px;
}

.prb-table-score {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
}

.prb-table-stars { display: none; }

.prb-table-cta {
    display: inline-block;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: opacity .15s, transform .15s;
}

.prb-table-cta:hover {
    opacity: .88;
    transform: translateY(-1px);
    color: #fff !important;
}

.prb-table-read-review {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--prb-muted);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    opacity: .65;
}

.prb-table-read-review:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Desktop enhancements — outer border, alternating rows, stars visible */
@media (min-width: 641px) {
    .prb-table-scroll {
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        overflow: hidden;
    }

    .prb-table-row:nth-child(odd)  { background: #ffffff; }
    .prb-table-row:nth-child(even) { background: #f7f8fa; }
    .prb-table-row:hover           { background: #eef1f7; }

    .prb-table-stars {
        display: block;
        font-size: 13px;
        letter-spacing: 1px;
        line-height: 1;
    }
}

@media (max-width: 640px) {
    /* Turn horizontal table into vertical cards on mobile */
    .prb-table-scroll { overflow-x: visible; }

    .prb-table,
    .prb-table tbody {
        display: block;
        width: 100%;
        border: none;
        background: transparent;
    }

    .prb-table thead { display: none; }

    .prb-table-row {
        display: flex;
        flex-direction: column;
        border: 1px solid var(--prb-border);
        border-radius: 12px;
        margin-bottom: 16px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
    }

    .prb-table-row:nth-child(even),
    .prb-table-row:hover { background: #fff; }

    /* Hide rank and brand on mobile */
    .prb-table-td--rank,
    .prb-table-td--brand { display: none !important; }

    /* All visible tds become block, no default padding */
    .prb-table-td { border-bottom: none; padding: 0; }

    /* Reorder cells: image/name → score/stars → features → CTA */
    .prb-table-td--product  { order: 1; }
    .prb-table-td--score    { order: 2; }
    .prb-table-td--features { order: 3; }
    .prb-table-td--cta      { order: 4; }

    /* Strip all inner borders — only the card outline remains */
    .prb-table-td,
    .prb-table-td--product,
    .prb-table-td--score,
    .prb-table-td--features,
    .prb-table-td--cta { border: none !important; }

    /* Product cell: image centered above product name */
    .prb-table-td--product {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: unset;
        padding: 16px 16px 0;
        text-align: center;
    }

    .prb-table-thumb {
        width: 100px;
        height: 100px;
        margin-bottom: 10px;
    }

    .prb-table-product-link { font-size: 15px; }

    /* Score + stars cell: inline, flush with name above */
    .prb-table-td--score {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 6px 16px 10px;
    }

    .prb-table-td--score .prb-table-score { font-size: 24px; }

    .prb-table-stars {
        display: inline;
        font-size: 15px;
        letter-spacing: 1px;
    }

    /* Features cell */
    .prb-table-td--features {
        display: block;
        padding: 10px 16px;
    }

    /* CTA cell */
    .prb-table-td--cta {
        display: block;
        padding: 12px 16px;
        text-align: center;
    }

    .prb-table-cta {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 14px;
        box-sizing: border-box;
    }
}

/* ── FAQ Block ── */
.prb-faq-block {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 32px 0;
}

.prb-faq-title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--prb-text) !important;
    margin: 0 0 16px !important;
}

.prb-faq-item {
    border: 1px solid var(--prb-border);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    background: #fff;
}

.prb-faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--prb-text);
    text-align: left;
    line-height: 1.4;
}

.prb-faq-q:hover { background: #f9fafb; }

.prb-faq-chevron {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--prb-muted);
    transition: transform .2s;
}

.prb-faq-q[aria-expanded="true"] .prb-faq-chevron { transform: rotate(180deg); }

.prb-faq-a {
    padding: 0 20px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.prb-faq-a p { margin: 0; }

/* ── Expert Verdict Block ── */
.prb-verdict {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border: 1px solid var(--prb-border);
    border-radius: var(--prb-radius);
    box-shadow: var(--prb-shadow);
    padding: 28px;
    margin: 32px 0;
    position: relative;
    overflow: hidden;
}

.prb-verdict::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--prb-accent);
}

.prb-verdict-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--prb-muted);
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 16px;
}

/* Image + info side-by-side */
.prb-verdict-top {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.prb-verdict-img-wrap {
    flex-shrink: 0;
    width: 120px;
    text-align: center;
}

.prb-verdict-img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.prb-verdict-info {
    flex: 1;
    min-width: 0;
}

.prb-verdict-product-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--prb-text);
    margin: 0 0 10px !important;
    line-height: 1.3;
}

.prb-verdict-score {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.prb-verdict-score-num {
    font-size: 36px;
    font-weight: 900;
}

.prb-verdict-score-den {
    font-size: 16px;
    font-weight: 600;
    color: var(--prb-muted);
}

.prb-verdict-score-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--prb-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-left: 6px;
    align-self: center;
}

.prb-verdict-stars {
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 1;
}

.prb-verdict-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--prb-text);
    margin: 0 0 20px !important;
}

.prb-verdict-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.prb-verdict-pill {
    flex: 1;
    min-width: 200px;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.prb-verdict-pill--yes {
    background: var(--prb-pro-bg);
    border: 1px solid var(--prb-pro-border);
    color: var(--prb-pro-text);
}

.prb-verdict-pill--no {
    background: var(--prb-con-bg);
    border: 1px solid var(--prb-con-border);
    color: var(--prb-con-text);
}

@media (max-width: 480px) {
    .prb-verdict-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .prb-verdict-score { justify-content: center; }
    .prb-verdict-stars { text-align: center; }
}

/* ── Best For Cards ── */
.prb-bestfor {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 32px 0;
}

.prb-bestfor-title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--prb-text) !important;
    margin: 0 0 16px !important;
}

.prb-bestfor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.prb-bestfor-card {
    background: #fff;
    border: 1px solid var(--prb-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    position: relative;
    overflow: hidden;
}

.prb-bestfor-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--prb-accent);
}

.prb-bestfor-badge {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
    align-self: flex-start;
}

.prb-bestfor-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--prb-text);
    margin: 0 !important;
    line-height: 1.4;
}

.prb-bestfor-name a {
    color: inherit;
    text-decoration: none;
}

.prb-bestfor-name a:hover { text-decoration: underline; }

.prb-bestfor-reason {
    font-size: 13px;
    color: var(--prb-muted);
    margin: 0 !important;
    line-height: 1.5;
    flex: 1;
}

.prb-bestfor-cta {
    display: inline-block;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none !important;
    text-align: center;
    transition: opacity .15s;
    align-self: flex-start;
}

.prb-bestfor-cta:hover { opacity: .85; color: #fff !important; }

@media (max-width: 480px) {
    .prb-bestfor-grid { grid-template-columns: 1fr 1fr; }
}

/* ── HowTo / Buying Guide ── */
.prb-howto {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border: 1px solid var(--prb-border);
    border-radius: var(--prb-radius);
    padding: 28px;
    margin: 32px 0;
}

.prb-howto-title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--prb-text) !important;
    margin: 0 0 8px !important;
}

.prb-howto-intro {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
    margin: 0 0 24px !important;
}

.prb-howto-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prb-howto-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.prb-howto-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--prb-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    margin-top: 2px;
}

.prb-howto-step-body { flex: 1; }

.prb-howto-step-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--prb-text) !important;
    margin: 0 0 6px !important;
}

.prb-howto-step-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.65;
    margin: 0 !important;
}

/* ── Methodology block ───────────────────────────────────────────── */
.prb-methodology {
    background: #f9fafb;
    border-left: 4px solid var(--prb-accent, #f59e0b);
    border-radius: 8px;
    padding: 24px 28px;
    margin: 24px 0;
}

.prb-methodology-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--prb-text, #111827);
    margin: 0 0 12px;
}

.prb-methodology-intro {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
    margin: 0 0 16px;
}

.prb-methodology-criteria {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prb-methodology-criteria li {
    font-size: 14px;
    color: #374151;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.prb-methodology-criteria li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--prb-accent, #f59e0b);
    font-weight: 700;
}
