/* Rilano Bundle – style domyślne. Kolory pochodzą z WooCommerce → Rilano Bundle
   (wtyczka dopisuje po tym pliku własny blok :root z wartościami z ustawień). */
:root {
    --rb-accent: #4b8bc8;
    --rb-active-bg: #f2f7fc;
    --rb-bg: #fff;
    --rb-border: #e3e3e3;
    --rb-text: #1a1a1a;
    --rb-price: #1a1a1a;
    --rb-old: #9a9a9a;
    --rb-ribbon-bg: #e8a33d;
    --rb-ribbon-text: #fff;
    --rb-badge-bg: #e3f4e8;
    --rb-badge-text: #24723f;
    --rb-save-bg: #fdeaea;
    --rb-save-text: #c0392b;
    --rb-sticky-bg: #fff;
    --rb-btn-bg: #4b8bc8;
    --rb-btn-text: #fff;
    --rb-box-bg: #f2f7fc;
    --rb-box-border: #d6e6f5;
    --rb-box-accent: #4b8bc8;
    --rb-cs-btn-bg: #4b8bc8;
    --rb-cs-btn-text: #ffffff;
    --rb-radius: 12px;
}
.rb-bundle { width: 100%; margin: 0 0 18px; color: var(--rb-text); }
.rb-bundle *, .rb-sticky * { box-sizing: border-box; }
.rb-heading { margin: 0 0 12px; font-size: 15px; font-weight: 700; }

.rb-options { display: flex; flex-direction: column; gap: 14px; }

/* Kafelek */
.rb-bundle .rb-option {
    position: relative;
    display: flex; align-items: center; gap: 14px;
    margin: 0; padding: 18px 18px;
    background: var(--rb-bg);
    border: 2px solid var(--rb-border);
    border-radius: var(--rb-radius);
    cursor: pointer; user-select: none;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.rb-bundle .rb-option:hover { border-color: var(--rb-accent); }
.rb-bundle .rb-option.is-active {
    border-color: var(--rb-accent);
    background: var(--rb-active-bg);
    box-shadow: 0 0 0 1px var(--rb-accent);
}
.rb-bundle .rb-option:focus-visible { outline: 2px solid var(--rb-accent); outline-offset: 3px; }
.rb-bundle .rb-option.has-ribbon { margin-top: 8px; }

/* Kółko – zwykły element w rzędzie, więc nigdy nie nachodzi na tekst */
.rb-radio {
    position: relative; flex: 0 0 22px;
    width: 22px; height: 22px;
    border: 2px solid var(--rb-border); border-radius: 50%;
    background: #fff;
    transition: border-color .15s;
}
.rb-option.is-active .rb-radio { border-color: var(--rb-accent); }
.rb-option.is-active .rb-radio::after {
    content: ""; position: absolute; inset: 3px;
    border-radius: 50%; background: var(--rb-accent);
}

.rb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rb-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.rb-promo-inline { font-size: 13px; font-weight: 600; color: var(--rb-ribbon-bg); white-space: nowrap; }

.rb-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-pill {
    display: inline-block; padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.3;
}
.rb-badge { background: var(--rb-badge-bg); color: var(--rb-badge-text); }
.rb-save { background: var(--rb-save-bg); color: var(--rb-save-text); }
.rb-promo-pill { background: var(--rb-ribbon-bg); color: var(--rb-ribbon-text); }

.rb-ribbon {
    position: absolute; top: 0; right: 18px; transform: translateY(-50%);
    padding: 4px 12px; border-radius: 999px;
    background: var(--rb-ribbon-bg); color: var(--rb-ribbon-text);
    font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    white-space: nowrap; line-height: 1.3;
}

.rb-prices { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.rb-prices .amount, .rb-prices bdi { color: inherit; font: inherit; }
.rb-old { font-size: 13px; color: var(--rb-old); text-decoration: line-through; }
.rb-now { font-size: 19px; font-weight: 800; color: var(--rb-price); }
.rb-unit { font-size: 12px; color: var(--rb-old); }

/* Układ: kafelki obok siebie */
.rb-layout-grid .rb-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; padding-top: 10px; }
.rb-bundle.rb-layout-grid .rb-option { flex-direction: column; justify-content: flex-start; text-align: center; gap: 10px; margin-top: 0; padding: 24px 12px 16px; }
.rb-layout-grid .rb-ribbon {
    left: 50%; right: auto; transform: translate(-50%, -50%);
    width: max-content; max-width: 94%;
    white-space: normal; text-align: center; font-size: 10px; line-height: 1.2;
}
.rb-layout-grid .rb-pill { border-radius: 8px; font-size: 11px; padding: 3px 8px; }
.rb-layout-grid .rb-main { align-items: center; flex: 0 0 auto; }
.rb-layout-grid .rb-meta { justify-content: center; }
.rb-layout-grid .rb-prices { align-items: center; text-align: center; margin-top: auto; }

/* Układ: kompaktowa lista */
.rb-layout-compact .rb-options { gap: 10px; }
.rb-bundle.rb-layout-compact .rb-option { padding: 12px 14px; gap: 12px; }
.rb-layout-compact .rb-title { font-size: 14px; }
.rb-layout-compact .rb-main { gap: 4px; }
.rb-layout-compact .rb-pill { padding: 2px 8px; font-size: 11px; }
.rb-layout-compact .rb-prices { flex-direction: row; align-items: baseline; gap: 8px; }
.rb-layout-compact .rb-now { font-size: 16px; }
.rb-layout-compact .rb-unit { display: none; }

@media (max-width: 480px) {
    .rb-bundle .rb-option { padding: 16px 14px; gap: 12px; }
    .rb-title { font-size: 15px; }
    .rb-now { font-size: 17px; }
}

/* Sticky ATC */
.rb-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
    background: var(--rb-sticky-bg); color: var(--rb-text);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .12);
    transform: translateY(110%); transition: transform .25s ease;
}
.rb-sticky.is-visible { transform: translateY(0); }
.rb-sticky-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    max-width: 1200px; margin: 0 auto; padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.rb-sticky-info { display: flex; flex-direction: column; min-width: 0; }
.rb-sticky-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-sticky-prices { display: flex; align-items: baseline; gap: 8px; }
.rb-sticky-price { font-size: 16px; font-weight: 800; color: var(--rb-price); }
.rb-sticky-old { font-size: 13px; color: var(--rb-old); text-decoration: line-through; }
.rb-sticky .rb-sticky-btn {
    flex-shrink: 0; margin: 0; padding: 13px 24px;
    border: 0; border-radius: var(--rb-radius);
    background: var(--rb-btn-bg); color: var(--rb-btn-text);
    font-size: 15px; font-weight: 700; cursor: pointer;
}
@media (min-width: 769px) {
    .rb-sticky--mobile { display: none; }
}

/* ---------- Checkout ---------- */
.rb-checkout-item { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 8px; }
.rb-checkout-item *, .rb-box *, .rb-cs * { box-sizing: border-box; }

/* Ilość −/+ */
.rb-qty { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.rb-qty-label { color: inherit; opacity: .8; }
.rb-qty-box {
    display: inline-flex; align-items: center;
    background: #fff; border: 1px solid var(--rb-border); border-radius: 8px; overflow: hidden;
}
.rb-qty .rb-qty-btn {
    width: 32px; height: 32px; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    color: var(--rb-box-accent); font-size: 18px; font-weight: 600; line-height: 1;
    cursor: pointer; transition: background-color .15s;
}
.rb-qty .rb-qty-btn:hover:not(:disabled) { background: var(--rb-box-bg); }
.rb-qty .rb-qty-btn:disabled { color: var(--rb-border); cursor: default; }
.rb-qty-val {
    min-width: 34px; height: 32px; line-height: 32px; text-align: center;
    border-left: 1px solid var(--rb-border); border-right: 1px solid var(--rb-border);
    font-weight: 600; font-size: 14px;
}
.rb-qty:not(:has(.rb-qty-box)) .rb-qty-val { border: 0; min-width: 0; }
.rb-qty.is-loading { opacity: .5; pointer-events: none; }

/* Boksy (przy produkcie i pomoc) */
.rb-box {
    display: flex; align-items: flex-start; gap: 12px;
    width: 100%; padding: 12px 14px;
    background: var(--rb-box-bg); border: 1px solid var(--rb-box-border); border-radius: var(--rb-radius);
    font-size: 12px; line-height: 1.45; text-align: left;
}
.rb-box-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rb-box-title { font-size: 13px; font-weight: 700; }
.rb-box-text { opacity: .8; }
.rb-note-icon { flex: 0 0 auto; font-size: 20px; line-height: 1; }
.rb-help { margin: 16px 0 20px; padding: 16px; align-items: center; }
.rb-help-icon {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--rb-box-accent);
}
.rb-help .rb-help-phone { margin-top: 6px; color: var(--rb-box-accent); font-weight: 700; font-size: 14px; text-decoration: none; }
.rb-help .rb-help-phone:hover { text-decoration: underline; }

/* Cross-sell w checkout */
.rb-cs { margin: 16px 0; color: var(--rb-text); text-align: left; }
.rb-cs-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.rb-cs-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.rb-cs-text { font-size: 12px; opacity: .7; }
.rb-cs-list { display: flex; flex-direction: column; gap: 8px; }
.rb-cs-item {
    display: flex; align-items: center; gap: 12px; padding: 10px;
    background: var(--rb-bg); border: 1px solid var(--rb-border); border-radius: var(--rb-radius);
    transition: opacity .15s;
}
.rb-cs-item.is-loading { opacity: .5; pointer-events: none; }
.rb-cs-img { flex: 0 0 56px; width: 56px; height: 56px; border-radius: calc(var(--rb-radius) * .6); overflow: hidden; background: #f4f4f4; }
.rb-cs-img img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.rb-cs-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rb-cs-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.rb-cs-prices { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.rb-cs-price { color: var(--rb-price); font-weight: 700; }
.rb-cs-old { color: var(--rb-old); font-size: 12px; }
.rb-cs-prices .rb-pill { font-size: 10px; padding: 2px 6px; }
.rb-cs .rb-cs-btn {
    flex: 0 0 auto; margin: 0; padding: 8px 14px;
    background: var(--rb-cs-btn-bg); color: var(--rb-cs-btn-text);
    border: 0; border-radius: 8px; box-shadow: none;
    font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer;
    transition: filter .15s;
}
.rb-cs .rb-cs-btn:hover { filter: brightness(.92); }
