#cctv-app { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; max-width: 900px; margin: 0 auto; color: #333; }
.cctv-header { font-size: 24px; font-weight: 700; margin-bottom: 25px; padding-bottom: 10px; border-bottom: 2px solid #eee; }

.cctv-step-row { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 15px; overflow: hidden; transition: border-color 0.3s ease; }
.cctv-step-disabled { opacity: 0.5; background: #f9f9f9; }

.cctv-step-main { display: flex; align-items: flex-start; padding: 20px; }
.cctv-step-title { width: 25%; font-weight: 600; font-size: 16px; margin-top: 5px; }

.cctv-step-selected { width: 55%; padding: 0 15px; }
.cctv-placeholder { color: #888; font-style: italic; margin-top: 5px; }
.cctv-hint { display: block; font-size: 12px; color: #d9534f; margin-top: 5px; font-style: normal; }

.cctv-selected-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.cctv-selected-item { display: flex; align-items: center; gap: 10px; background: #f8fcfd; border: 1px solid #e1f0f6; padding: 8px 12px; border-radius: 6px; }
.cctv-selected-item img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; background: #fff; border: 1px solid #eee; }
.cctv-s-name { font-weight: 500; font-size: 14px; flex: 1; line-height: 1.3; }
.cctv-s-price { font-weight: 700; color: #007cba; white-space: nowrap; font-size: 14px; }
.cctv-qty-wrapper { display: flex; align-items: center; font-size: 13px; gap: 5px; font-weight: bold; }
.cctv-qty-input { width: 55px; padding: 6px; border: 1px solid #ccc; border-radius: 4px; text-align: center; font-weight: bold; }
.cctv-item-remove { background: none; border: none; color: #d9534f; font-weight: bold; font-size: 18px; cursor: pointer; padding: 0 5px; margin-left: 5px; transition: transform 0.2s; }
.cctv-item-remove:hover { transform: scale(1.2); }

.cctv-step-actions { width: 20%; text-align: right; margin-top: 5px; }
.cctv-btn-open-grid { background: #fff; border: 1px solid #007cba; color: #007cba; padding: 8px 16px; border-radius: 4px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.cctv-btn-open-grid:hover { background: #007cba; color: #fff; }

.cctv-products-grid { background: #fafafa; border-top: 1px solid #eee; padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.cctv-product-card { background: #fff; border: 1px solid #eaeaea; border-radius: 6px; padding: 15px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.cctv-product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.08); }
.cctv-product-card img { max-width: 100%; height: 120px; object-fit: contain; margin-bottom: 15px; }
.cctv-card-info h4 { font-size: 14px; margin: 0 0 10px 0; line-height: 1.4; color: #333; flex-grow: 1; }
.cctv-product-card .cctv-price { font-size: 16px; font-weight: 700; color: #007cba; margin-bottom: 15px; }

/* NOWE STYLE: Kwadraciki z kolorami */
.cctv-color-swatches { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; }
.cctv-color-swatch { width: 22px; height: 22px; border-radius: 4px; border: 1px solid #ddd; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.cctv-color-swatch:hover { transform: scale(1.1); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.cctv-color-swatch.active { border: 2px solid #007cba; transform: scale(1.2); box-shadow: 0 0 8px rgba(0, 124, 186, 0.4); }

.cctv-btn-add-product { background: #007cba; color: #fff; border: none; padding: 10px; border-radius: 4px; cursor: pointer; font-weight: 600; width: 100%; }
.cctv-btn-add-product:hover { background: #006ba1; }

.cctv-summary-container { background: #f4f8fb; border: 1px solid #dbe9f4; padding: 25px; border-radius: 8px; margin-top: 30px; }
.cctv-summary-container h3 { margin-top: 0; font-size: 18px; border-bottom: 1px solid #dbe9f4; padding-bottom: 10px; margin-bottom: 15px; }
#cctv-summary-list { list-style: none; padding: 0; margin: 0 0 20px 0; }
#cctv-summary-list li { padding: 8px 0; border-bottom: 1px dashed #ccc; font-size: 15px; }
#cctv-summary-list li span { color: #666; float: right; }
.empty-summary { color: #888; font-style: italic; border: none !important; }

#cctv-discount-box { background: #fff; border: 1px dashed #007cba; border-radius: 6px; padding: 15px; margin-bottom: 20px; }
.cctv-discount-missing { color: #555; font-size: 14px; }
.cctv-discount-missing strong { color: #007cba; }
.info-icon { font-style: normal; font-size: 16px; margin-right: 5px; }
.cctv-discount-active { background: #e8f5e9; padding: 10px; border-radius: 4px; border: 1px solid #c8e6c9; color: #2e7d32; font-size: 15px; }

.cctv-summary-footer { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.cctv-total-text { font-size: 18px; color: #555; }
#cctv-old-price { font-size: 16px; text-decoration: line-through; color: #999; margin-left: 5px; margin-right: 5px; }
#cctv-total-price { font-size: 28px; color: #d9534f; transition: color 0.3s ease; }

#cctv-add-to-cart { background: #5cb85c; color: #fff; border: none; padding: 15px 30px; font-size: 18px; font-weight: 700; border-radius: 6px; cursor: pointer; transition: background 0.2s; }
#cctv-add-to-cart:hover:not(:disabled) { background: #4cae4c; }
#cctv-add-to-cart:disabled { background: #ccc; cursor: not-allowed; }

@media(max-width: 768px) {
    .cctv-step-main { flex-direction: column; align-items: flex-start; gap: 15px; }
    .cctv-step-title, .cctv-step-selected, .cctv-step-actions { width: 100%; text-align: left; }
    .cctv-summary-footer { flex-direction: column; gap: 15px; text-align: center; }
    #cctv-add-to-cart { width: 100%; }
    .cctv-selected-item { flex-wrap: wrap; }
    .cctv-qty-wrapper { margin-left: auto; }
}