/* ============================================================
   CB Add-ons Upsell — cbau-frontend.css  (Light Theme)

   Layout facts:
   - .site-header-cart-side: position:fixed, right:0, width:340px
     (min-width:1024px), z-index:999999999
   - .cart-side-overlay: position:fixed, 100vw × 100vh, z-index:997

   Strip: position:fixed, z-index:999999998, centred vertically,
   centred in left region (calc(100vw - 340px))
   ============================================================ */

/* ------------------------------------------------------------------ */
/*  Strip wrapper — fixed in left viewport region                      */
/* ------------------------------------------------------------------ */

#cbau-overlay-strip {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: calc(100vw - 340px);
    z-index: 999999998;
    pointer-events: auto;
    padding: 0 32px;
    box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/*  Inner panel — light card                                           */
/* ------------------------------------------------------------------ */

.cbau-strip-inner {
    background: #ffffff;
    border: 1.5px solid #ffe0c8;
    border-radius: 20px;
    padding: 24px 26px 26px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.30),
        0 4px 16px rgba(0, 0, 0, 0.12);
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/*  Header                                                              */
/* ------------------------------------------------------------------ */

.cbau-strip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.cbau-strip-emoji {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.cbau-strip-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.cbau-heading {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.cbau-sub-heading {
    display: block;
    font-size: 12px;
    color: #e65c00;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* Close button */
.cbau-strip-close {
    margin-left: auto;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    background: #f5f5f5;
    color: #666;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    padding: 0;
}

.cbau-strip-close:hover {
    background: #ffe0c8;
    border-color: #e65c00;
    color: #e65c00;
}

/* ------------------------------------------------------------------ */
/*  Cards row                                                           */
/* ------------------------------------------------------------------ */

.cbau-cards-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

/* ------------------------------------------------------------------ */
/*  Card                                                                */
/* ------------------------------------------------------------------ */

.cbau-card {
    flex: 1 1 0;
    min-width: 0;
    background: #fff8f3;
    border: 1.5px solid #ffe0c8;
    border-radius: 16px;
    padding: 16px 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 9px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cbau-card:hover {
    border-color: #e65c00;
    box-shadow: 0 6px 24px rgba(230, 92, 0, 0.14);
    transform: translateY(-2px);
}

/* Green flash when added */
.cbau-card--added {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.18) !important;
}

/* Sale badge */
.cbau-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e53935;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 20px;
    text-transform: uppercase;
    line-height: 1.4;
}

/* ------------------------------------------------------------------ */
/*  Image                                                               */
/* ------------------------------------------------------------------ */

.cbau-card-img-wrap {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fde8d8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbau-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* ------------------------------------------------------------------ */
/*  Text                                                                */
/* ------------------------------------------------------------------ */

.cbau-card-cat {
    font-size: 9px;
    color: #e65c00;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #fff0e6;
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1.5;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid #ffd5b8;
}

.cbau-card-name {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
    width: 100%;
}

.cbau-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.cbau-price-strike {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 500;
}

.cbau-price-current {
    font-size: 17px;
    font-weight: 700;
    color: #c0392b;
}

/* ------------------------------------------------------------------ */
/*  Add button                                                          */
/* ------------------------------------------------------------------ */

.cbau-add-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 10px 10px;
    background: #e65c00;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.cbau-add-btn:hover  { background: #d44e00; transform: scale(1.03); }
.cbau-add-btn:active { transform: scale(0.97); }

.cbau-add-icon  { font-size: 16px; font-weight: 700; line-height: 1; }
.cbau-add-label { font-size: 12.5px; font-weight: 700; }

.cbau-add-btn.cbau-adding { background: #f0a070; cursor: not-allowed; }
.cbau-add-btn.cbau-added  { background: #27ae60; }
.cbau-add-btn.cbau-added:hover { background: #229954; }
.cbau-add-btn.cbau-error  { background: #e74c3c; }

/* ------------------------------------------------------------------ */
/*  Mobile — bottom sheet                                               */
/* ------------------------------------------------------------------ */

@media ( max-width: 1023px ) {
    #cbau-overlay-strip {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        transform: none;
        padding: 0;
    }

    .cbau-strip-inner {
        border-radius: 18px 18px 0 0;
        max-width: 100%;
        padding: 16px 14px 24px;
    }

    .cbau-cards-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 10px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .cbau-cards-row::-webkit-scrollbar { display: none; }

    .cbau-card { flex: 0 0 140px; }
}
