/* BetterPick Vergleichstabellen – Frontend CSS v4.4.0 */

.bpv-fullshell,
.bpv-fullshell * { box-sizing: border-box; }

.bpv-fullshell {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    clear: both;
}

.bpv-wrap {
    --bpv-bg:        #ffffff;
    --bpv-text:      #374151;
    --bpv-muted:     #6b7280;
    --bpv-line:      #d9d9d9;
    --bpv-head:      #f6f6f6;
    --bpv-side:      #efefef;
    --bpv-green:     #228b22;
    --bpv-gold:      #d5b04a;
    --bpv-blue:      #1696d2;
    --bpv-orange:    #e3a51a;
    --bpv-red:       #b91c1c;
    --bpv-highlight: #f7f1dc;
    --bpv-winner:    #e4f4fb;
    --bpv-price:     #fbf1d9;
    --bpv-strong:    #f3f3f3;
    --bpv-shadow:    0 8px 24px rgba(0,0,0,.06);

    color: var(--bpv-text);
    font-family: inherit;
    width: min(1500px, calc(100vw - 24px));
    max-width: 1500px;
    margin: 32px auto;
    padding: 0;
    clear: both;
    display: block;
}

/* ── head content ──────────────────────────────────── */

.bpv-headcontent { margin-bottom: 18px; }

.bpv-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    color: var(--bpv-muted);
    font-size: .92rem;
}

.bpv-title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
    text-align: center;
}

.bpv-subtitle {
    margin: 8px auto 20px;
    color: var(--bpv-muted);
    line-height: 1.6;
    max-width: 1320px;
    text-align: center;
}

/* ── filter bar ────────────────────────────────────── */

.bpv-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 18px;
    padding: 14px 16px;
    border: 1px solid var(--bpv-line);
    background: #fafafa;
    border-radius: 14px;
}

.bpv-filter-label {
    display: flex;
    align-items: center;
    font-size: .9rem;
    font-weight: 800;
    color: #374151;
    margin-right: 4px;
}

.bpv-filter-btn {
    appearance: none;
    border: 1px solid #d4d4d4;
    background: #fff;
    color: #374151;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: .18s ease;
}

.bpv-filter-btn:hover { border-color: #9ccde6; color: #1482c5; }
.bpv-filter-btn.active { background: #1482c5; border-color: #1482c5; color: #fff; }

/* ── desktop / mobile toggle ───────────────────────── */

.bpv-desktop { display: block; }
.bpv-mobile  { display: none; }

/* ── desktop table box ─────────────────────────────── */

.bpv-box {
    border: 1px solid var(--bpv-line);
    border-radius: 18px;
    background: #fff;
    overflow: visible;
    box-shadow: var(--bpv-shadow);
}

.bpv-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.bpv-scroll::-webkit-scrollbar,
.bpv-mobile-head-scroll::-webkit-scrollbar,
.bpv-mobile-values-scroll::-webkit-scrollbar { height: 10px; width: 10px; }

.bpv-scroll::-webkit-scrollbar-thumb,
.bpv-mobile-head-scroll::-webkit-scrollbar-thumb,
.bpv-mobile-values-scroll::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 999px; }

/* ── table ─────────────────────────────────────────── */

.bpv-table {
    width: 100%;
    min-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fff;
}

.bpv-table th,
.bpv-table td {
    border-right: 1px solid var(--bpv-line);
    border-bottom: 1px solid var(--bpv-line);
    vertical-align: top;
    background: #fff;
}

.bpv-table th:last-child,
.bpv-table td:last-child { border-right: none; }

.bpv-table thead th { padding: 0; background: var(--bpv-head); }

.bpv-desktop-head-row th.bpv-product-col {
    background: #ffffff !important;
}

.bpv-desktop-head-row th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bpv-head);
    vertical-align: top;
}

/* Account for WordPress admin bar (32px) and possible theme headers */
.admin-bar .bpv-desktop-head-row th {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .bpv-desktop-head-row th {
        top: 46px;
    }
}

.bpv-rowhead {
    width: 16%;
    min-width: 210px;
    max-width: 250px;
    padding: 14px !important;
    background: var(--bpv-side) !important;
    font-weight: 700;
    color: #444;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 21;
}

.bpv-rowhead-top {
    top: 0;
    z-index: 25;
    vertical-align: middle !important;
}

.bpv-rowhead small {
    display: block;
    margin-top: 5px;
    color: var(--bpv-muted);
    line-height: 1.4;
    font-weight: 500;
}

.bpv-col {
    width: 21%;
    min-width: 0;
    padding: 0 !important;
    text-align: center;
    background: #fffdf7;
}

.bpv-highlight-col { background: var(--bpv-highlight) !important; }
.bpv-winner-col    { background: var(--bpv-winner) !important; }
.bpv-price-col     { background: var(--bpv-price) !important; }

.bpv-table tbody td {
    padding: 12px 10px;
    text-align: center;
    font-size: .88rem;
    line-height: 1.5;
    background: #fbfaf5;
    overflow-wrap: break-word;
    word-break: break-word;
}

.bpv-table tbody td.bpv-rowhead {
    background: var(--bpv-side) !important;
    text-align: left;
    font-size: .82rem;
}

.bpv-section-row td {
    background: #f3f3f3 !important;
    color: #444;
    font-weight: 800;
    text-align: left;
    padding: 12px 16px;
    font-size: 1rem;
}

/* ── CTA button row ────────────────────────────────── */

.bpv-cta-row td {
    padding: 16px 10px !important;
    text-align: center;
    vertical-align: middle;
    background: #f9f9f9 !important;
    border-top: 1px solid var(--bpv-line) !important;
    border-bottom: 1px solid var(--bpv-line) !important;
}

.bpv-cta-row td.bpv-rowhead {
    background: var(--bpv-side) !important;
    font-size: .82rem;
    border-top: 1px solid var(--bpv-line) !important;
    border-bottom: 1px solid var(--bpv-line) !important;
}

.bpv-cta-row .bpv-cta {
    width: 100%;
    max-width: 170px;
}

/* Make all thead product cells same height via flexbox */

/* ── badge tag ─────────────────────────────────────── */

.bpv-tag {
    display: flex;
    width: 100%;
    color: #fff;
    font-weight: 800;
    font-size: .83rem;
    padding: 9px 8px;
    min-height: 38px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
    word-break: break-word;
}

.bpv-tag.highlight  { background: var(--bpv-gold); }
.bpv-tag.winner     { background: var(--bpv-blue); }
.bpv-tag.toppick    { background: #e8690a; }
.bpv-tag.price      { background: var(--bpv-orange); }
.bpv-tag.strong     { background: #909090; }
.bpv-tag.eco        { background: #2d8a4e; }
.bpv-tag.new        { background: #7c3aed; }
.bpv-tag.premium    { background: #b45309; }
.bpv-tag.bestseller { background: #dc2626; }

/* ── product head pad ──────────────────────────────── */

.bpv-headpad {
    padding: 12px 16px 16px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #ffffff !important;
}

.bpv-adnote {
    align-self: flex-start;
    font-size: .76rem;
    color: #777;
    margin-bottom: 6px;
    margin-left: 2px;
}

.bpv-product-image {
    width: 130px;
    height: 130px;
    margin: 0 auto 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 4px;
}

.bpv-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bpv-product-title {
    margin: 0 0 12px;
    font-size: 1.04rem;
    line-height: 1.3;
    font-weight: 800;
    min-height: 0;
    max-width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bpv-product-title a { color: #1e88b7; text-decoration: none; }
.bpv-product-title a:hover { text-decoration: underline; }

.bpv-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 82px;
    width: 100%;
}

.bpv-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 170px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 3px;
    background: #228b22;
    color: #fff !important;
    text-decoration: none !important;
    font-size: .94rem;
    font-weight: 800;
    box-shadow: 0 2px 0 rgba(0,0,0,.12);
    transition: .15s ease;
}

.bpv-cta:hover { transform: translateY(-1px); filter: brightness(1.03); }

/* ── scorecard ─────────────────────────────────────── */

.bpv-scorecard {
    background: var(--bpv-bg, #fff);
    border-left: 6px solid var(--bpv-grade-color, #909090);
    border-top: 0.5px solid #d9d9d9;
    border-right: 0.5px solid #d9d9d9;
    border-bottom: 0.5px solid #d9d9d9;
    border-radius: 0 10px 10px 0;
    padding: 12px 14px;
    max-width: 180px;
    margin: 0 auto;
    text-align: left;
}

.bpv-scorecard .label {
    display: block;
    font-size: .72rem;
    color: #6b7280;
    line-height: 1.2;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.bpv-scorecard .grade {
    display: inline-block;
    font-size: .78rem;
    font-weight: 800;
    color: #fff;
    background: var(--bpv-grade-color, #909090);
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: .04em;
    text-transform: uppercase;
    word-break: break-word;
    line-height: 1.4;
}

.bpv-scorecard .date {
    display: block;
    margin-top: 8px;
    font-size: .72rem;
    color: #6b7280;
}

/* ── ratings ───────────────────────────────────────── */

.bpv-rating { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* Visual star bar – rendered by JS into .bpv-stars */
.bpv-stars {
    display: inline-flex;
    gap: 2px;
    line-height: 1;
}

.bpv-stars svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Fallback: if JS hasn't run yet, show raw text normally */
.bpv-stars:not([data-rendered]) {
    color: #f1b400;
    font-size: 1.08rem;
    letter-spacing: 1px;
}

.bpv-rating-count { color: #1e88b7; font-weight: 600; text-decoration: none; font-size: .93rem; }
.bpv-rating-count:hover { text-decoration: underline; }

/* ── tech cells ────────────────────────────────────── */

.bpv-check { color: #2f9a29; font-weight: 900; font-size: 1.45rem; line-height: 1; }
.bpv-cross { color: #b91c1c; font-weight: 900; font-size: 1.45rem; line-height: 1; }
.bpv-mini  { font-size: .88rem; color: #4b5563; }

/* ── direct link ───────────────────────────────────── */

.bpv-directlink {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bpv-directlink a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.bpv-amazon-logo   { width: 84px; height: auto; display: block; }
.bpv-direct-price  { font-size: 1rem; font-weight: 800; color: #111827; line-height: 1.2; }
.bpv-direct-note   { font-size: .75rem; color: var(--bpv-muted); line-height: 1.3; }

/* ── desktop sticky product columns in tbody ───────── */
/* The thead is already sticky via .bpv-desktop-head-row th.          */
/* For tbody, we create a compact sticky mini-header per product col  */
/* that appears when the thead scrolls out of the overflow container. */

.bpv-product-col { position: relative; }

/* Mini sticky bar inside each product column – shown via JS */
.bpv-col-sticky-bar {
    display: none; /* hidden until JS activates */
    position: sticky;
    top: 0;
    z-index: 15;
    background: inherit;
    border-bottom: 1px solid var(--bpv-line);
    padding: 8px 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
}

.bpv-col-sticky-bar.is-active { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.bpv-col-sticky-bar img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}

.bpv-col-sticky-bar .bpv-sticky-title {
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1e3a5f;
    max-width: 140px;
}

.bpv-col-sticky-bar .bpv-cta {
    min-height: 32px;
    font-size: .78rem;
    padding: 0 10px;
    max-width: 130px;
}



/* ── filter hidden ─────────────────────────────────── */

.bpv-hidden-col { display: none !important; }

/* ── mobile sticky header ──────────────────────────── */

.bpv-mobile-sticky {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid var(--bpv-line);
    border-radius: 16px;
    box-shadow: var(--bpv-shadow);
    overflow: hidden;
    margin-bottom: 14px;
}

.bpv-mobile-head-wrap { position: relative; background: #fff; }

.bpv-mobile-head-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

.bpv-mobile-head-scroll::-webkit-scrollbar { display: none; }

.bpv-mobile-head-grid {
    display: grid;
    grid-auto-flow: column;
    min-width: max-content;
}

.bpv-mobile-head-card {
    border-right: 1px solid var(--bpv-line);
    background: #ffffff;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
}

.bpv-mobile-head-card:last-child { border-right: none; }

.bpv-mobile-head-inner  { padding: 0 0 12px; text-align: center; }
.bpv-mobile-head-pad    { padding: 8px 10px 0; }
.bpv-mobile-rank        { font-size: .78rem; color: #fff7d6; font-weight: 700; margin-left: 4px; }

.bpv-mobile-head-title {
    padding: 0 10px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.2;
}

.bpv-mobile-head-title a { color: #1e88b7; text-decoration: none; }
.bpv-mobile-head-cta     { padding: 0 10px; }
.bpv-mobile-head-cta .bpv-cta { max-width: none; width: 100%; min-height: 40px; font-size: .88rem; border-radius: 3px; }

/* ── nav buttons ───────────────────────────────────── */

.bpv-mobile-nav {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    pointer-events: none;
    padding: 0 6px;
}

.bpv-mobile-nav.is-visible {
    display: flex;
}

.bpv-mobile-navbtn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: #555;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 6px rgba(0,0,0,.15);
    cursor: pointer;
    pointer-events: auto;
    transition: .15s ease;
    backdrop-filter: blur(4px);
}

.bpv-mobile-navbtn:hover           { color: #111; background: rgba(255,255,255,.98); }
.bpv-mobile-navbtn.is-disabled     { opacity: .2; cursor: default; pointer-events: none; }

/* ── mobile toolbar ────────────────────────────────── */

.bpv-mobile-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-size: .8rem;
    color: var(--bpv-muted);
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid var(--bpv-line);
}

.bpv-mobile-pageindicator { font-weight: 800; color: #374151; }

/* ── mobile sections ───────────────────────────────── */

.bpv-mobile-section {
    margin-bottom: 14px;
    border: 1px solid var(--bpv-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--bpv-shadow);
    background: #fff;
}

.bpv-mobile-section-toggle {
    width: 100%;
    appearance: none;
    border: none;
    background: #f3f3f3;
    color: #374151;
    font-size: 1rem;
    font-weight: 800;
    padding: 15px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.bpv-mobile-section-toggle span:last-child { font-size: 1.15rem; line-height: 1; transition: transform .18s ease; }
.bpv-mobile-section-content { display: block; background: #f8f8f8; }
.bpv-mobile-section.is-collapsed .bpv-mobile-section-content { display: none; }
.bpv-mobile-section.is-collapsed .bpv-mobile-section-toggle span:last-child { transform: rotate(-90deg); }

.bpv-mobile-row { border-top: 1px solid #e5e7eb; padding-bottom: 8px; }

.bpv-mobile-row-label {
    padding: 14px 14px 10px;
    text-align: left;
    font-size: .92rem;
    font-weight: 800;
    color: #444;
    line-height: 1.3;
    background: #efefef;
}

.bpv-mobile-row-label small {
    display: block;
    margin-top: 4px;
    font-size: .74rem;
    line-height: 1.35;
    color: var(--bpv-muted);
    font-weight: 500;
}

.bpv-mobile-values-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

.bpv-mobile-values-scroll::-webkit-scrollbar { display: none; }

.bpv-mobile-values {
    display: grid;
    grid-auto-flow: column;
    min-width: max-content;
    padding: 0;
}

.bpv-mobile-cell {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 10px;
    font-size: .94rem;
    line-height: 1.35;
    background: #fbfaf5;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
    border-right: 1px solid var(--bpv-line);
}

.bpv-mobile-cell:last-child { border-right: none; }
.bpv-mobile-cell.highlight  { background: var(--bpv-highlight); }
.bpv-mobile-cell.winner     { background: var(--bpv-winner); }
.bpv-mobile-cell.price      { background: var(--bpv-price); }
.bpv-mobile-cell.strong     { background: var(--bpv-strong); }

.bpv-mobile-aff {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.bpv-mobile-aff img { 
    width: 88px; 
    height: auto; 
    display: block;
    background: #fff;
    border-radius: 6px;
    padding: 3px;
}

/* ── affiliate note ────────────────────────────────── */

.bpv-note {
    margin-top: 14px;
    color: var(--bpv-muted);
    font-size: .84rem;
    line-height: 1.55;
}

/* ── responsive ────────────────────────────────────── */

@media (max-width: 1280px) {
    .bpv-table { min-width: 1240px; }
}

@media (max-width: 767px) {
    .bpv-wrap          { width: 100%; max-width: 100%; margin: 24px auto; }
    .bpv-topbar        { justify-content: flex-start; font-size: .86rem; }
    .bpv-title         { font-size: 1.55rem; text-align: left; }
    .bpv-subtitle      { font-size: .97rem; text-align: left; max-width: 100%; }
    .bpv-filterbar     { padding: 12px; gap: 8px; }
    .bpv-filter-label  { width: 100%; margin-bottom: 2px; }
    .bpv-filter-btn    { padding: 9px 12px; font-size: .84rem; }
    .bpv-desktop       { display: none; }
    .bpv-mobile        { display: block; }
    .bpv-table         { min-width: 100%; }
}
