/* bnc-deals.css — deals page + popup */

/* ===== DEALS PAGE ===== */
.bncd-page { max-width: 1100px; margin: 0 auto; padding: 0 1rem 3rem; }

.bncd-disclosure {
    font-size: .78rem; color: #888; margin-bottom: 1.5rem;
}
.bncd-stale {
    background: #fff8e1; border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem; border-radius: 4px; margin: 1.5rem 0;
}
.bncd-empty { text-align: center; padding: 3rem 1rem; color: #666; }
.bncd-meta  { font-size: .82rem; color: #888; margin-bottom: .4rem; }
.bncd-method{ font-size: .88rem; color: #555; margin-bottom: 2rem; line-height: 1.6; }

.bncd-cat-heading {
    font-size: 1.25rem; font-weight: 700; margin: 2.5rem 0 1rem;
    padding-bottom: .4rem; border-bottom: 2px solid #e5e7eb;
}

.bncd-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.bncd-card {
    border: 1px solid #e5e7eb; border-radius: 8px;
    overflow: hidden; display: flex; flex-direction: column;
    background: #fff; transition: box-shadow .15s;
}
.bncd-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

.bncd-card img {
    width: 100%; aspect-ratio: 1/1; object-fit: contain;
    background: #f9fafb; padding: .75rem;
}
.bncd-card-body {
    padding: .85rem; display: flex; flex-direction: column; flex: 1; gap: .35rem;
}
.bncd-title { font-size: .82rem; line-height: 1.4; margin: 0; }
.bncd-title a { color: inherit; text-decoration: none; }
.bncd-title a:hover { text-decoration: underline; }

.bncd-price { margin: .15rem 0; font-size: 1rem; }
.bncd-price strong { color: #16a34a; }
.bncd-was   { font-size: .82rem; color: #9ca3af; margin-left: .4rem; }
.bncd-pct   { font-size: .78rem; font-weight: 700; color: #dc2626; margin: 0; }

.bncd-badge {
    display: inline-block; font-size: .7rem; font-weight: 600;
    padding: .2rem .55rem; border-radius: 999px; margin: .2rem 0;
}
.bncd-badge-low30      { background: #dbeafe; color: #1d4ed8; }
.bncd-badge-below_typical { background: #dcfce7; color: #15803d; }
.bncd-badge-ltd_deal   { background: #fef9c3; color: #854d0e; }

.bncd-btn {
    display: block; text-align: center; margin-top: auto; padding: .55rem 1rem;
    background: #f59e0b; color: #111 !important; text-decoration: none !important;
    border-radius: 5px; font-size: .82rem; font-weight: 700;
    transition: background .15s;
}
.bncd-btn:hover { background: #d97706; }

/* ===== POPUP ===== */
#bncd-popup {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 99999;
    width: 480px; max-width: calc(100vw - 2rem);
    background: #fff; border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    font-family: inherit; font-size: 14px; line-height: 1.5;
    max-height: 90vh; overflow-y: auto;
}
#bncd-popup[hidden] { display: none; }

.bncd-popup-inner { padding: 1.25rem; }

.bncd-popup-hd {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .6rem;
}
.bncd-eyebrow {
    font-size: .66rem; font-weight: 700; letter-spacing: .07em;
    color: #6b7280; text-transform: uppercase;
}
.bncd-close {
    background: none; border: none; cursor: pointer; font-size: 1rem;
    color: #9ca3af; padding: 0 .25rem; line-height: 1;
}
.bncd-close:hover { color: #111; }

.bncd-popup-headline {
    font-size: 1rem; font-weight: 700; margin: 0 0 .4rem; line-height: 1.35;
}
.bncd-popup-method {
    font-size: .78rem; color: #6b7280; margin: 0 0 1rem; line-height: 1.5;
}

.bncd-popup-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: .75rem; margin-bottom: 1rem;
}

.bncd-popup-card {
    border: 1px solid #e5e7eb; border-radius: 7px; overflow: hidden;
    display: flex; flex-direction: column;
}
.bncd-popup-card img {
    width: 100%; aspect-ratio: 1/1; object-fit: contain;
    background: #f9fafb; padding: .5rem;
}
.bncd-popup-card-body {
    padding: .6rem; display: flex; flex-direction: column; gap: .2rem;
}
.bncd-popup-title { font-size: .72rem; line-height: 1.35; margin: 0; }
.bncd-popup-title a { color: inherit; text-decoration: none; }
.bncd-popup-title a:hover { text-decoration: underline; }

.bncd-popup-price { font-size: .82rem; margin: .1rem 0; }
.bncd-popup-price strong { color: #16a34a; }
.bncd-popup-price s { font-size: .72rem; color: #9ca3af; margin-left: .3rem; }

.bncd-popup-badge {
    font-size: .64rem; font-weight: 600; padding: .15rem .4rem;
    border-radius: 999px; display: inline-block;
}

.bncd-btn-sm {
    display: block; text-align: center; padding: .35rem .6rem;
    background: #f59e0b; color: #111 !important; text-decoration: none !important;
    border-radius: 4px; font-size: .72rem; font-weight: 700; margin-top: .3rem;
}
.bncd-btn-sm:hover { background: #d97706; }

.bncd-popup-footer {
    border-top: 1px solid #f3f4f6; padding-top: .85rem;
    font-size: .72rem; color: #9ca3af;
    display: flex; flex-direction: column; gap: .5rem;
}
.bncd-popup-actions {
    display: flex; align-items: center; gap: 1rem;
}
.bncd-see-all {
    font-size: .78rem; font-weight: 600; color: #2563eb;
    text-decoration: none;
}
.bncd-see-all:hover { text-decoration: underline; }
.bncd-no-thanks {
    background: none; border: none; cursor: pointer;
    font-size: .78rem; color: #9ca3af; padding: 0;
}
.bncd-no-thanks:hover { color: #374151; }

/* Mobile: bottom sheet */
@media (max-width: 540px) {
    #bncd-popup {
        bottom: 0; right: 0; left: 0;
        width: 100%; max-width: 100%; border-radius: 12px 12px 0 0;
        max-height: 70vh;
    }
    .bncd-popup-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ===== PILL ===== */
/* bottom: 86px = Kadence back-to-top (30px) + its height (42px) + gap (14px) */
#bncd-pill {
    position: fixed;
    bottom: 86px;
    right: 1.5rem;
    z-index: 99998;
    display: flex;
    align-items: stretch;
    background: #f59e0b;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    font-family: inherit;
    overflow: hidden;
    min-height: 48px;
}
#bncd-pill[hidden] { display: none; }

#bncd-pill-open {
    background: none;
    border: none;
    cursor: pointer;
    padding: .8rem 1rem .8rem .75rem;
    color: #111;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
    line-height: 1;
}
#bncd-pill-open svg { width: 16px; height: 16px; }
#bncd-pill-open:hover { background: rgba(0,0,0,.08); }

#bncd-pill-x {
    background: none;
    border: none;
    border-left: 1px solid rgba(0,0,0,.15);
    cursor: pointer;
    padding: .8rem .65rem;
    color: #111;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
}
#bncd-pill-x:hover { background: rgba(0,0,0,.12); }

@media (max-width: 540px) {
    #bncd-pill { bottom: 86px; right: 1rem; }
}
