/* ============================================================
   Social Proof Badges + Sale Countdown — Frontend Styles
   ============================================================ */

.jt-sale-countdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--jt-bg, #e31e24);
    color: var(--jt-fg, #ffffff);
    padding: 10px 14px;
    margin: 0 0 14px;
    border-radius: 2px;
    font-family: Lora, Georgia, serif;
    box-sizing: border-box;
}

.jt-sale-countdown__text {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    white-space: nowrap;
}

.jt-sale-countdown__timer {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.jt-sale-countdown__unit {
    width: 48px;
    min-height: 48px;
    background: var(--jt-box-bg, #ffffff);
    color: var(--jt-box-fg, #e31e24);
    border: 1px solid rgba(227, 30, 36, 0.15);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 6px 4px;
}

.jt-sale-countdown__unit span {
    font-size: 20px;
    font-weight: 700;
    font-family: Lora, Georgia, serif;
}

.jt-sale-countdown__unit small {
    margin-top: 4px;
    font-size: 11px;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 500;
    opacity: 0.95;
}

.spb-container {
    font-family: var(--spb-font, Lora, serif);
    font-size: var(--spb-fs, 15px);
    display: flex;
    flex-direction: column;
    gap: var(--spb-gap, 10px);
    margin: 14px 0 18px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.spb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--spb-pv, 6px) var(--spb-ph, 0);
    background: transparent;
    border: none;
    border-radius: 0;
    line-height: 1.45;
    color: #374151;
    box-sizing: border-box;
}

.spb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--spb-icon-size, 18px);
    height: var(--spb-icon-size, 18px);
    min-width: var(--spb-icon-size, 18px);
    min-height: var(--spb-icon-size, 18px);
    overflow: hidden;
}

.spb-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.spb-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.spb-item-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.spb-item-text strong {
    font-weight: 700;
}

.spb-sold-bar {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 160px;
    max-width: 45vw;
    height: 14px;
    background: #f6e7d8;
    border-radius: 999px;
    overflow: visible;
    vertical-align: middle;
}

.spb-sold-bar > i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #f0a500, #f5c16c);
    border-radius: 999px;
}

.spb-sold-bar > em {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #8a5a00;
    background: #ffe2b0;
    border-radius: 999px;
    padding: 1px 7px;
    line-height: 1.2;
    white-space: nowrap;
}

.spb-item--discount {
    align-items: flex-start;
}

.spb-item-content {
    flex: 1;
    min-width: 0;
}

.spb-discount-label {
    font-weight: 600;
    margin-bottom: 6px;
}

.spb-tiers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.spb-tiers a {
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 640px) {
    .jt-sale-countdown {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .jt-sale-countdown__text {
        white-space: normal;
        font-size: 16px;
    }
    .jt-sale-countdown__timer {
        gap: 6px;
    }
    .jt-sale-countdown__unit {
        width: 42px;
        min-height: 42px;
    }
    .jt-sale-countdown__unit span {
        font-size: 17px;
    }
}
