/* ==========================================================================
   Hearthside Picks — hearthside/comparison-table block styles
   Scoped to .hsp-ctable — never leaks to header / footer / other templates
   ========================================================================== */

.hsp-ctable {
    max-width: 1200px;
    margin: 56px auto;
    padding: 0 24px;
}

.hsp-ctable__title {
    font-family: "DM Serif Display", serif;
    font-size: clamp(22px, 3vw, 30px);
    color: #1A1A2E;
    text-align: center;
    margin: 0 0 24px;
}

/* ── scroll wrapper ─────────────────────────────────────────────────────── */

.hsp-ctable__scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}

/* Hint on mobile that the table is scrollable */
@media (max-width: 700px) {
    .hsp-ctable__scroll-wrap::after {
        content: '';
        display: block;
        position: sticky;
        right: 0;
        top: 0;
        width: 28px;
        height: 100%;
        background: linear-gradient(to right, transparent, rgba(255,255,255,.8));
        pointer-events: none;
        float: right;
        margin-left: -28px;
    }
}

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

.hsp-ctable__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

/* ── header row (product images + names) ────────────────────────────────── */

.hsp-ctable__corner {
    width: 140px;
    min-width: 120px;
    background: #FAFAF8;
    border-bottom: 2px solid #E5E7EB;
}

.hsp-ctable__prod-col {
    text-align: center;
    vertical-align: top;
    padding: 24px 14px 18px;
    background: #fff;
    border-bottom: 2px solid #E5E7EB;
    min-width: 150px;
    position: relative;
}

.hsp-ctable__prod-col--pick {
    background: #F0FDF4;
    box-shadow: inset 0 0 0 2px #1B4D3E;
}

.hsp-ctable__pick-badge {
    display: inline-block;
    background: #1B4D3E;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.hsp-ctable__prod-img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 10px;
    border-radius: 8px;
    background: #F9FAFB;
    padding: 6px;
}

.hsp-ctable__prod-name {
    display: block;
    font-family: "DM Serif Display", serif;
    font-size: 14px;
    line-height: 1.35;
    color: #1A1A2E;
}

/* ── row label (left column) ────────────────────────────────────────────── */

.hsp-ctable__row-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #6B7280;
    padding: 14px 16px;
    text-align: left;
    background: #FAFAF8;
    border-bottom: 1px solid #F3F4F6;
    white-space: nowrap;
    position: relative;
}

/* ── body cells ─────────────────────────────────────────────────────────── */

.hsp-ctable__cell {
    text-align: center;
    padding: 14px 12px;
    font-size: 14px;
    color: #1A1A2E;
    border-bottom: 1px solid #F3F4F6;
    background: #fff;
    vertical-align: middle;
}

.hsp-ctable__cell--pick {
    background: #F0FDF4;
}

.hsp-ctable__row:nth-child(even) .hsp-ctable__cell {
    background: #FAFAF8;
}

.hsp-ctable__row:nth-child(even) .hsp-ctable__cell--pick {
    background: #ECFDF5;
}

/* ── price tier pill ────────────────────────────────────────────────────── */

.hsp-ctable__tier-pill {
    display: inline-block;
    background: rgba(232, 168, 56, .12);
    color: #92400E;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 6px;
}

/* ── tier info button + tooltip ─────────────────────────────────────────── */

.hsp-ctable__tier-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #E5E7EB;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #6B7280;
    cursor: pointer;
    margin-left: 5px;
    padding: 0;
    vertical-align: middle;
    transition: background .15s, color .15s;
    position: relative;
    top: -1px;
}

.hsp-ctable__tier-btn:hover,
.hsp-ctable__tier-btn[aria-expanded="true"] {
    background: #1B4D3E;
    color: #fff;
}

.hsp-ctable__tier-tip {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    background: #1A1A2E;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
    pointer-events: none;
}

.hsp-ctable__tier-tip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-top: 0;
    border-bottom-color: #1A1A2E;
}

/* ── rating row ─────────────────────────────────────────────────────────── */

.hsp-ctable__stars {
    display: block;
    color: #E8A838;
    font-size: 17px;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 3px;
}

.hsp-ctable__star--empty { opacity: .18; }
.hsp-ctable__star--half  { opacity: .55; }

.hsp-ctable__rating-num {
    font-size: 12px;
    color: #6B7280;
}

/* ── check / cross / na ─────────────────────────────────────────────────── */

.hsp-ctable__check {
    color: #065F46;
    font-weight: 700;
    font-size: 16px;
}

.hsp-ctable__cross {
    color: #991B1B;
    font-size: 16px;
}

.hsp-ctable__na {
    color: #D1D5DB;
}

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

.hsp-ctable__cta-row {
    border-top: 2px solid #E5E7EB;
}

.hsp-ctable__cta-cell {
    padding: 16px 12px;
    text-align: center;
    background: #fff;
    vertical-align: middle;
}

.hsp-ctable__cta-cell.hsp-ctable__cell--pick {
    background: #F0FDF4;
}

.hsp-ctable__cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1.5px solid #D1D5DB;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}

.hsp-ctable__cta:hover {
    border-color: #1B4D3E;
    color: #1B4D3E;
    background: #fff;
}

.hsp-ctable__cta--pick {
    background: linear-gradient(135deg, #E8A838, #D4922A);
    border-color: transparent;
    color: #fff;
}

.hsp-ctable__cta--pick:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(232, 168, 56, .38);
    color: #fff;
    border-color: transparent;
}

/* ── tier legend ────────────────────────────────────────────────────────── */

.hsp-ctable__tier-legend {
    font-size: 12px;
    color: #9CA3AF;
    text-align: center;
    margin: 12px 0 0;
}

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

@media (max-width: 700px) {
    .hsp-ctable {
        padding: 0 16px;
    }

    .hsp-ctable__corner,
    .hsp-ctable__row-label {
        width: 90px;
        min-width: 90px;
        font-size: 10px;
        padding: 12px 8px;
    }

    .hsp-ctable__prod-col,
    .hsp-ctable__cell,
    .hsp-ctable__cta-cell {
        min-width: 130px;
        padding: 12px 10px;
    }

    .hsp-ctable__prod-img {
        width: 56px;
        height: 56px;
    }

    .hsp-ctable__prod-name {
        font-size: 13px;
    }

    .hsp-ctable__tier-tip {
        white-space: normal;
        max-width: 200px;
    }
}
