/* ============================================================
   D2C Product Booster — Frontend CSS
   All colours come from CSS variables injected by PHP.
   ============================================================ */

/* ── Rating Bar ── */
.d2cpb-rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;       /* tight — title comes right after */
    flex-wrap: wrap;
}
.d2cpb-rating-stars { display: flex; gap: 1px; }
.d2cpb-star         { font-size: 18px; line-height: 1; }
.d2cpb-star.full,
.d2cpb-star.half    { color: var(--d2cpb-star, #f5a623); }
.d2cpb-star.empty   { color: #ddd; }
.d2cpb-rating-score { font-weight: 700; font-size: 14px; color: #222; }
.d2cpb-rating-label { font-size: 13px; color: #666; }

/* ── SAVE % Badge — inline right of price ── */
/* Make WC price container flex so badge sits on same line */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.d2cpb-save-inline {
    display: inline-flex;
    align-items: center;
}
.d2cpb-save-wrap  { margin: 0; display: inline-flex; align-items: center; }
.d2cpb-save-badge {
    display:       inline-flex;
    align-items:   center;
    gap:           5px;
    background:    var(--d2cpb-primary, #307773);
    color:         var(--d2cpb-primary-text, #ffffff);
    font-size:     13px;
    font-weight:   800;
    letter-spacing:.3px;
    padding:       6px 14px;
    border-radius: var(--d2cpb-radius, 8px);
    white-space:   nowrap;
}

/* ── Badge Pills ── */
.d2cpb-badge-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}
.d2cpb-pill {
    display: inline-flex;
    align-items: center;
    background:    var(--d2cpb-badge-bg,     #ffffff);
    border:        1.5px solid var(--d2cpb-badge-border, #307773);
    color:         var(--d2cpb-badge-text,   #307773);
    padding:       5px 14px;
    border-radius: 999px;
    font-size:     13px;
    font-weight:   500;
}

/* ── Countdown ── */
.d2cpb-countdown-wrap {
    display:       flex;
    align-items:   center;
    gap:           12px;
    flex-wrap:     wrap;
    background:    var(--d2cpb-countdown-bg, #fffbe6);
    border:        1px solid rgba(0,0,0,.08);
    border-radius: var(--d2cpb-radius, 8px);
    padding:       12px 16px;
    margin:        0 0 14px;
}
.d2cpb-countdown-label { font-size: 14px; font-weight: 600; }
.d2cpb-timer           { display: flex; align-items: center; gap: 4px; }
.d2cpb-timer-block {
    background:    var(--d2cpb-timer-bg,   #1a1a1a);
    color:         var(--d2cpb-timer-text, #ffffff);
    border-radius: 6px;
    padding:       6px 10px;
    font-size:     22px;
    font-weight:   700;
    font-family:   monospace;
    min-width:     44px;
    text-align:    center;
}
.d2cpb-colon { font-size: 22px; font-weight: 700; color: #333; }

/* ── Bundle Selector ── */
.d2cpb-bundles-wrap {
    border:        1px solid #ddd;
    border-radius: var(--d2cpb-radius, 8px);
    overflow:      hidden;
    margin:        0 0 16px;
}
.d2cpb-bundle-title {
    text-align:     center;
    font-size:      11px;
    letter-spacing: 1.5px;
    font-weight:    700;
    color:          #888;
    padding:        10px;
    background:     #fff;
    border-bottom:  1px solid #eee;
    text-transform: uppercase;
}
.d2cpb-bundle-option {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         14px 16px;
    cursor:          pointer;
    position:        relative;
    border-bottom:   1px solid #eee;
    background:      #fff;
    transition:      background .2s;
}
.d2cpb-bundle-option:last-child { border-bottom: none; }
.d2cpb-bundle-option.active     { background: var(--d2cpb-bundle-active, #edf7f7); }
.d2cpb-bundle-option input[type="radio"] { display: none; }

.d2cpb-bundle-left  { display: flex; align-items: center; gap: 12px; }
.d2cpb-bundle-radio {
    width:         20px;
    height:        20px;
    border-radius: 50%;
    border:        2px solid #ccc;
    display:       flex;
    align-items:   center;
    justify-content: center;
    flex-shrink:   0;
    transition:    border-color .2s;
}
.d2cpb-bundle-option.active .d2cpb-bundle-radio { border-color: var(--d2cpb-primary, #307773); }
.d2cpb-bundle-radio span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: transparent;
    transition: background .2s;
}
.d2cpb-bundle-option.active .d2cpb-bundle-radio span { background: var(--d2cpb-primary, #307773); }

.d2cpb-bundle-info strong { display: block; font-size: 15px; font-weight: 700; }
.d2cpb-bundle-info small  { font-size: 12px; color: #666; }
.d2cpb-bundle-right       { text-align: right; }
.d2cpb-bundle-price       { display: block; font-size: 18px; font-weight: 700; color: #111; }
.d2cpb-bundle-mrp         { font-size: 13px; color: #aaa; text-decoration: line-through; }

.d2cpb-bundle-tag {
    position:      absolute;
    bottom:        10px;
    right:         10px;
    background:    var(--d2cpb-tag-bg,   #307773);
    color:         var(--d2cpb-tag-text, #ffffff);
    font-size:     11px;
    font-weight:   700;
    padding:       3px 8px;
    border-radius: 4px;
}

/* ── Delivery Estimate ── */
.d2cpb-delivery {
    font-size: 14px;
    color:     #444;
    margin:    0 0 14px;
}
.d2cpb-delivery strong { color: #111; }

/* ── Review Slider ── */
.d2cpb-reviews-wrap  { margin: 0 0 14px; overflow: hidden; }
.d2cpb-review-slider {
    border:        1px solid #e8e8e8;
    border-radius: var(--d2cpb-radius, 8px);
    overflow:      hidden;
    position:      relative;
    min-height:    90px;
}
.d2cpb-review-card             { display: none; padding: 16px; animation: d2cpbIn .35s ease; }
.d2cpb-review-card.active      { display: block; }
@keyframes d2cpbIn { from { opacity:0; transform:translateX(8px); } to { opacity:1; transform:none; } }

.d2cpb-review-top    { display: flex; align-items: flex-start; gap: 12px; }
.d2cpb-avatar {
    width:         38px;
    height:        38px;
    border-radius: 50%;
    background:    var(--d2cpb-primary, #307773);
    color:         var(--d2cpb-primary-text, #ffffff);
    font-size:     16px;
    font-weight:   700;
    display:       flex;
    align-items:   center;
    justify-content: center;
    flex-shrink:   0;
}
.d2cpb-review-meta   { display: flex; flex-direction: column; gap: 4px; }
.d2cpb-review-text   { font-size: 14px; color: #333; font-style: italic; }
.d2cpb-review-author { font-size: 13px; color: #666; font-weight: 600; }
.d2cpb-stars         { color: var(--d2cpb-star, #f5a623); font-size: 14px; }

.d2cpb-slider-dots {
    display:         flex;
    justify-content: center;
    gap:             6px;
    padding:         8px 0 2px;
}
.d2cpb-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.d2cpb-dot.active { background: var(--d2cpb-primary, #307773); transform: scale(1.3); }

/* ── Trust Badges ── */
.d2cpb-trust-badges {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   8px;
    padding:               16px 0;
    border-top:            1px solid #eee;
    margin:                0 0 8px;
}
.d2cpb-trust-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.d2cpb-trust-icon { font-size: 26px; line-height: 1; }
.d2cpb-trust-text { font-size: 11px; text-align: center; color: var(--d2cpb-trust-text,#444); font-weight: 600; }

/* ── Mobile ── */
@media (max-width: 600px) {
    .d2cpb-timer-block   { font-size: 18px; min-width: 36px; padding: 5px 8px; }
    .d2cpb-bundle-price  { font-size: 16px; }
    .d2cpb-trust-badges  { grid-template-columns: repeat(4,1fr); gap: 4px; }
    .d2cpb-trust-text    { font-size: 10px; }
}

/* Cart / checkout / order bundle label */
.d2cpb-cart-bundle-label { font-weight: 400; color: #555; font-size: 0.9em; }

