/* Przycisk "Kup w pakiecie" */
#rk-open-btn.rk-pakiet-btn { background-color: transparent !important; color: #777 !important; border: 1px solid #e8e8e8 !important; box-shadow: none !important; font-family: inherit !important; }
#rk-open-btn.rk-pakiet-btn:hover, #rk-open-btn.rk-pakiet-btn:focus { background-color: #d32230 !important; color: #fff !important; border-color: #d32230 !important; }

/* Overlay */
#rk-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99998; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
#rk-overlay.rk-active { opacity: 1; pointer-events: all; }

/* Drawer */
#rk-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(550px, 100vw); background: #fff; z-index: 99999; transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; box-shadow: -3px 0 24px rgba(0,0,0,.15); font-family: inherit; }
#rk-drawer.rk-active { transform: translateX(0); }

/* Nagłówek */
.rk-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #e8e8e8; flex-shrink: 0; }
.rk-drawer-title { font-size: 1.13rem; font-weight: 700; color: #353535; }
.rk-close-btn { background: none; border: none; cursor: pointer; font-size: 1.4rem; line-height: 1; color: #777; padding: 2px 8px; border-radius: 4px; transition: color .15s, background .15s; }
.rk-close-btn:hover { color: #353535; background: #f5f5f5; }

/* Body */
.rk-drawer-body { flex: 1; overflow-y: auto; padding: 22px 22px 28px; }

/* Kroki */
.rk-step { margin-bottom: 22px; }
.rk-label { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; color: #353535; margin-bottom: 10px; }
.rk-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #d32230; color: #fff; font-size: .80rem; font-weight: 700; flex-shrink: 0; }

/* Siatka typów dachu */
.rk-type-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.rk-type-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px 8px; background: #fafafa; border: 2px solid #e8e8e8; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: .9rem; color: #353535; transition: border-color .15s, background .15s; text-align: center; line-height: 1.3; }
.rk-type-btn:hover { border-color: #d32230; background: #fff; }
.rk-type-btn.rk-type-active { border-color: #d32230; background: #fff8f8; font-weight: 600; }
.rk-type-icon { font-size: 1.6rem; line-height: 1; }
.rk-type-label { font-size: .85rem; }

/* Select */
.rk-select-wrap select { width: 100%; padding: 9px 14px; font-family: inherit; font-size: 1rem; color: #353535; background: #fff; border: 1px solid #e8e8e8; border-radius: 4px; appearance: none; -webkit-appearance: none; cursor: pointer; outline: none; transition: border-color .2s; }
.rk-select-wrap select:focus { border-color: #d32230; }

/* Checkboxy opcji */
.rk-options { display: flex; flex-direction: column; gap: 6px; }
.rk-opt-row { display: flex; align-items: center; gap: 12px; padding: 10px 13px; cursor: pointer; border: 1px solid #e8e8e8; border-radius: 4px; background: #fafafa; transition: border-color .15s, background .15s; user-select: none; }
.rk-opt-row:hover { border-color: #d32230; background: #fff; }
.rk-opt-row:has(input:checked) { border-color: #d32230; background: #fff8f8; }
.rk-opt-check { position: relative; flex-shrink: 0; }
.rk-opt-check input[type=checkbox]{ position: absolute; opacity: 0; width: 0; height: 0; }
.rk-opt-box { display: block; width: 18px; height: 18px; border: 1.5px solid #e8e8e8; border-radius: 3px; background: #fff; transition: all .15s; }
.rk-opt-check input:checked ~ .rk-opt-box { background: #d32230; border-color: #d32230; }
.rk-opt-check input:checked ~ .rk-opt-box::after { content: ''; display: block; margin: 3px auto 0; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); }
.rk-opt-info { flex: 1; }
.rk-opt-name { display: block; font-size: 1rem; font-weight: 500; color: #353535; }
.rk-opt-desc { display: block; font-size: .88rem; color: #999; margin-top: 1px; }
.rk-opt-price { font-size: 1rem; font-weight: 600; color: #353535; white-space: nowrap; flex-shrink: 0; }

/* Lista produktów */
#rk-product-list { display: flex; flex-direction: column; gap: 7px; }
.rk-prod-row { border: 1px solid #e8e8e8; border-radius: 4px; padding: 10px 13px; background: #fafafa; }
.rk-prod-row.is-opt { border-style: dashed; }
.rk-prod-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 3px; }
.rk-prod-name { font-size: 1rem; font-weight: 500; color: #353535; }
.rk-prod-total { font-size: 1rem; font-weight: 700; color: #353535; white-space: nowrap; }
.rk-prod-kolor { display: block; font-size: .88rem; color: #999; margin: 3px 0; }
.rk-prod-packs { display: flex; flex-wrap: wrap; gap: 4px; }
.rk-pack-tag { font-size: .82rem; background: #fff; border: 1px solid #e8e8e8; border-radius: 20px; padding: 2px 9px; color: #353535; }
.rk-badge-required { font-size: .75rem; background: #d32230; color: #fff; border-radius: 3px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.rk-badge-opt { font-size: .75rem; background: #f0f0f0; color: #777; border-radius: 3px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* Podsumowanie */
.rk-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 4px; background: #f9f9f9; border: 1px solid #e8e8e8; margin-bottom: 14px; gap: 2px 0; }
.rk-summary-lbl { font-size: 1rem; font-weight: 600; color: #353535; }
.rk-summary-price { display: flex; align-items: baseline; gap: 4px; }
#rk-total-price { font-size: 1.35rem; font-weight: 700; color: #d32230; }
#rk-currency { font-size: 1rem; font-weight: 600; color: #353535; }
.rk-per-m2 { width: 100%; font-size: .88rem; color: #999; text-align: right; margin-top: 2px; }

/* Sukces */
.rk-success-msg { padding: 14px 16px; border-radius: 4px; background: #f0faf0; border: 1px solid #b2dfb2; margin-bottom: 12px; display: none; }
.rk-success-msg span { font-size: 1rem; font-weight: 600; color: #2e7d32; display: block; margin-bottom: 10px; }
.rk-success-btns { display: flex; gap: 8px; }
.rk-success-btns .button { flex: 1; text-align: center; font-size: .9rem; }

/* Błąd */
.rk-error-msg { padding: 10px 14px; border-radius: 4px; background: #fff3f3; border: 1px solid #f5c6cb; color: #842029; font-size: .9rem; margin-top: 8px; }

/* Submit */
#rk-submit-btn { width: 100%; font-size: 1rem; }
#rk-submit-btn.rk-loading { opacity: .7; cursor: wait; }

/* Scroll lock */
body.rk-drawer-open { overflow: hidden; }
