/* Konfigurator Relax — styl dopasowany do meble Góreccy (redesign 1.0) */

.kalmus-konf-app {
    --kk-bg: #ffffff;
    --kk-surface: #ffffff;
    --kk-surface-dark: #111111;
    --kk-border: #e5e7eb;
    --kk-border-strong: #1a1a1a;
    --kk-text: #111111;
    --kk-text-muted: #6b7280;
    --kk-accent: #e6a13a;
    --kk-accent-hover: #cf8e2a;
    --kk-accent-soft: #fff4dd;
    --kk-radius-lg: 20px;
    --kk-radius-md: 12px;
    --kk-radius-sm: 8px;
    --kk-shadow: 0 6px 24px rgba(17, 17, 17, 0.06), 0 1px 2px rgba(17, 17, 17, 0.04);
    --kk-shadow-strong: 0 20px 50px rgba(17, 17, 17, 0.12);

    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    color: var(--kk-text);
    background: var(--kk-bg);
    padding: 48px 24px 64px;
    max-width: 1280px;
    margin: 0 auto;
    line-height: 1.5;
}

.kalmus-konf-app *,
.kalmus-konf-app *::before,
.kalmus-konf-app *::after { box-sizing: border-box; }

.kalmus-konf-app img { max-width: 100%; display: block; }

/* Reset form elements — motywy WordPress często ustawiają duże label/centered/itp.
   !important bo niektóre motywy (np. oparte na Elementorze) używają !important w swoich regułach. */
.kalmus-konf-app label {
    font-size: inherit !important; font-weight: inherit !important;
    letter-spacing: normal !important; text-transform: none !important;
    text-align: left !important; color: inherit !important;
    line-height: 1.4 !important; margin: 0 !important; display: block !important;
    max-width: none !important; width: auto !important;
}
.kalmus-konf-app input,
.kalmus-konf-app textarea,
.kalmus-konf-app select,
.kalmus-konf-app button {
    font-family: inherit !important; font-size: inherit !important;
    line-height: 1.4 !important; letter-spacing: normal !important;
    text-transform: none !important; color: inherit !important;
    margin: 0 !important; max-width: none !important;
}
.kalmus-konf-app input[type="text"],
.kalmus-konf-app input[type="number"],
.kalmus-konf-app input[type="email"],
.kalmus-konf-app textarea,
.kalmus-konf-app select { width: 100% !important; }
.kalmus-konf-app form { margin: 0; padding: 0; }
.kalmus-konf-app h1, .kalmus-konf-app h2, .kalmus-konf-app h3, .kalmus-konf-app h4 {
    margin: 0; font-family: inherit;
}
.kalmus-konf-app p { margin: 0; }
.kalmus-konf-app a { text-decoration: none; }

/* ─────────── Header ─────────── */
.kk-header { margin-bottom: 36px; }
.kk-eyebrow {
    display: inline-flex; align-items: center; gap: 14px;
    font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
    color: var(--kk-text-muted); margin-bottom: 14px;
}
.kk-eyebrow::before {
    content: ""; width: 44px; height: 2px; background: var(--kk-accent);
}
.kk-title {
    font-size: clamp(32px, 4.5vw, 56px);
    line-height: 1.05; margin: 0 0 10px; font-weight: 300; letter-spacing: -.01em;
}
.kk-title strong { font-weight: 800; }
.kk-subtitle { color: var(--kk-text-muted); max-width: 640px; margin: 0; }

/* ─────────── Main grid ─────────── */
.kk-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
    gap: 32px;
    align-items: start;
}

/* ─────────── Visualiser ─────────── */
.kk-visual {
    position: sticky; top: 24px;
    background: var(--kk-surface);
    border: 1px solid var(--kk-border);
    border-radius: var(--kk-radius-lg);
    box-shadow: var(--kk-shadow);
    overflow: hidden;
}
.kk-visual-stage {
    aspect-ratio: 4 / 3;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    position: relative;
}
.kk-visual-stage img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    transition: opacity .25s ease;
}
/* Overlay dodatki (sofa): pufa prawy dolny, fotel lewy dolny — zaokrąglone, z drop-shadow na sylwetkę */
.kk-visual-stage #obrazek2,
.kk-visual-stage #obrazek3 {
    position: absolute;
    bottom: 20px;
    max-width: 26%; max-height: 48%;
    object-fit: contain;
    border-radius: 14px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .15));
    display: none !important;
}
.kk-visual-stage #obrazek2 { right: 20px; }
.kk-visual-stage #obrazek3 { left: 20px; }
.kalmus-konf-app:has(#add-pufa-checkbox:checked) .kk-visual-stage #obrazek2 { display: block !important; }
.kalmus-konf-app:has(#add-fote-checkbox:checked) .kk-visual-stage #obrazek3 { display: block !important; }
.kk-visual-stage #obrazek { border-radius: 12px; }
.kk-visual-footer {
    display: grid; grid-template-columns: 1fr auto;
    gap: 16px; padding: 20px 24px;
    border-top: 1px solid var(--kk-border);
    background: var(--kk-surface);
}

.kk-metric-label {
    font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--kk-text-muted); margin-bottom: 6px;
}
.kk-metric-value { font-size: 18px; font-weight: 600; }
.kk-metric-sub {
    font-size: 11px; color: var(--kk-text-muted);
    margin-top: 4px; letter-spacing: .02em;
}
.kk-price-card {
    text-align: right;
    padding: 10px 18px;
    background: var(--kk-surface-dark);
    color: #fff;
    border-radius: var(--kk-radius-md);
    min-width: 170px;
}
.kk-price-card .kk-metric-label { color: rgba(255,255,255,.55); }
.kk-price-code {
    font-size: 26px; font-weight: 800;
    color: var(--kk-accent); letter-spacing: .02em;
}

/* Wielolinijkowa karta kodów (sofa + pufa + fotel) */
.kk-price-card--stack {
    display: flex; flex-direction: column; gap: 8px;
    text-align: right;
}
.kk-code-line {
    display: grid; grid-template-columns: 1fr auto;
    align-items: baseline; gap: 14px;
}
.kk-code-label {
    font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}
.kk-code-value {
    font-size: 20px; font-weight: 800; color: var(--kk-accent); letter-spacing: .02em;
    white-space: nowrap;
}
.kk-code-line--pufa, .kk-code-line--fotel { display: none; }
.kalmus-konf-app:has(#add-pufa-checkbox:checked) .kk-code-line--pufa { display: grid; }
.kalmus-konf-app:has(#add-fote-checkbox:checked) .kk-code-line--fotel { display: grid; }

/* ─────────── Options panel ─────────── */
.kk-options {
    display: flex; flex-direction: column; gap: 22px;
}
.kk-section {
    background: var(--kk-surface);
    border: 1px solid var(--kk-border);
    border-radius: var(--kk-radius-lg);
    padding: 22px 24px;
    box-shadow: var(--kk-shadow);
}
.kk-section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 0 16px;
    font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--kk-text);
}
.kk-section-title .kk-section-value {
    font-size: 12px; letter-spacing: .08em; text-transform: none;
    color: var(--kk-text-muted); font-weight: 500;
}

/* thumbnail options (boczek, poduszka, nóżki) */
.kk-opts-grid { display: grid; gap: 10px; }
.kk-opts-grid.kk-cols-7 { grid-template-columns: repeat(7, 1fr); }
.kk-opts-grid.kk-cols-6 { grid-template-columns: repeat(6, 1fr); }
.kk-opts-grid.kk-cols-2 { grid-template-columns: repeat(2, 1fr); }
.kk-opts-grid.kk-cols-3 { grid-template-columns: repeat(3, 1fr); }
.kk-opts-grid.kk-cols-4 { grid-template-columns: repeat(4, 1fr); }

.kk-opt {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: 2px solid var(--kk-border);
    border-radius: var(--kk-radius-md);
    background: #fff;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.kk-opt:hover { border-color: #d1d5db; transform: translateY(-1px); }
.kk-opt input[type="radio"],
.kk-opt input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.kk-opt-label { font-size: 12px; font-weight: 600; color: var(--kk-text); }
.kk-opt-thumb {
    width: 100%; max-width: 56px; aspect-ratio: 1 / 1;
    object-fit: cover; border-radius: 6px;
    background: #f5f5f5;
}
.kk-opt-chip {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
    width: 100%; padding: 8px 4px;
}

/* Hero-style cards (używane dla poduszek) */
.kk-opts-hero { gap: 14px; }
.kk-opts-hero .kk-opt {
    padding: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    justify-content: flex-end;
    background: #f5f5f5;
}
.kk-opts-hero .kk-opt .kk-opt-thumb {
    position: absolute; inset: 0;
    width: 100%; max-width: none; height: 100%; aspect-ratio: auto;
    object-fit: contain; object-position: center;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 0;
    z-index: 0;
}
.kk-opts-hero .kk-opt .kk-opt-label {
    position: absolute; left: 12px; bottom: 12px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(4px);
    padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .02em;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.kk-opts-hero .kk-opt .kk-opt-check { z-index: 2; }
.kk-opts-hero .kk-opt:has(input:checked) { background: #f5f5f5; }
.kk-opt:has(input:checked) {
    border-color: var(--kk-accent);
    background: var(--kk-accent-soft);
    box-shadow: 0 0 0 3px rgba(230, 161, 58, .18);
}
/* Fallback (bez :has) */
.kk-opt input:checked ~ .kk-opt-check { opacity: 1; }
.kk-opt-check {
    position: absolute; top: 6px; right: 6px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--kk-accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; line-height: 1; font-weight: 700;
    opacity: 0; transition: opacity .15s;
}

/* inline text/field */
.kk-field {
    display: flex; flex-direction: column; gap: 10px;
    align-items: stretch;
}
.kalmus-konf-app .kk-field label {
    font-size: 12px !important; letter-spacing: .14em !important;
    text-transform: uppercase !important;
    color: var(--kk-text-muted) !important; font-weight: 600 !important;
    text-align: left !important; display: block !important; line-height: 1.4 !important;
}
.kk-field input[type="text"],
.kk-field textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--kk-border); border-radius: var(--kk-radius-sm);
    font-size: 15px; color: var(--kk-text); background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    font-family: inherit;
}
.kk-field input[type="text"]:focus,
.kk-field textarea:focus {
    outline: none; border-color: var(--kk-accent);
    box-shadow: 0 0 0 3px rgba(230, 161, 58, .2);
}

/* size pills (szerokość/długość) */
.kk-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.kk-pill {
    position: relative;
    padding: 10px 18px;
    border: 2px solid var(--kk-border); border-radius: 999px;
    background: #fff; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--kk-text);
    transition: all .15s ease;
}
.kk-pill:hover { border-color: #d1d5db; }
.kk-pill input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.kk-pill:has(input:checked) {
    border-color: var(--kk-accent);
    background: var(--kk-accent);
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(230, 161, 58, .22);
}

/* summary / submit */
.kk-summary {
    background: var(--kk-surface-dark);
    color: #fff;
    border-radius: var(--kk-radius-lg);
    padding: 28px;
    display: grid; grid-template-columns: 1fr auto; gap: 20px;
    align-items: center;
    box-shadow: var(--kk-shadow-strong);
}
.kk-summary-title {
    font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
    color: rgba(255,255,255,.5); margin-bottom: 6px;
}
.kk-summary-price {
    font-size: 34px; font-weight: 800; color: var(--kk-accent); letter-spacing: .01em;
}
.kk-summary-dim { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 4px; }

.kk-submit {
    appearance: none; border: 0; cursor: pointer;
    padding: 18px 28px;
    background: var(--kk-accent); color: #fff;
    font-size: 14px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(230, 161, 58, .35);
    transition: background .15s ease, transform .15s ease;
}
.kk-submit:hover { background: var(--kk-accent-hover); transform: translateY(-1px); }
.kk-submit:active { transform: translateY(0); }

.kk-panel-link {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 14px; color: var(--kk-text-muted);
    text-decoration: none; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.kk-panel-link:hover { color: var(--kk-accent); }
.kk-panel-link::after {
    content: "→"; transition: transform .15s ease;
}
.kk-panel-link:hover::after { transform: translateX(3px); }

/* ═══════════ Panel Partnerski ═══════════ */

/* Hero z punktami (po zalogowaniu) */
.kk-panel-hero {
    display: grid; grid-template-columns: 1fr auto;
    gap: 28px; align-items: center;
    padding: 32px 36px; margin-bottom: 28px;
    background: var(--kk-surface-dark);
    color: #fff;
    border-radius: var(--kk-radius-lg);
    box-shadow: var(--kk-shadow-strong);
    position: relative; overflow: hidden;
}
.kk-panel-hero::before {
    content: ""; position: absolute; top: -60px; right: -60px;
    width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, rgba(230,161,58,.18) 0%, transparent 70%);
    pointer-events: none;
}
.kk-hello .kk-metric-label { color: rgba(255,255,255,.5); }
.kk-hello-title {
    font-size: clamp(22px, 3vw, 34px); line-height: 1.1; font-weight: 300;
    margin: 6px 0 0; color: #fff; letter-spacing: -.01em;
}
.kk-hello-title strong { font-weight: 800; }
.kk-points {
    text-align: right; padding-left: 28px;
    border-left: 1px solid rgba(255,255,255,.12);
    position: relative; z-index: 1;
}
.kk-points-value {
    font-size: clamp(44px, 6vw, 64px); font-weight: 800; color: var(--kk-accent);
    line-height: 1; margin: 8px 0 4px; letter-spacing: -.02em;
}
.kk-points-label {
    font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
    color: rgba(255,255,255,.55); font-weight: 600;
}

/* Katalog nagród — grid */
.kk-rewards-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.kk-reward {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--kk-border);
    border-radius: var(--kk-radius-md);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
}
.kk-reward.is-available:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(17,17,17,.12);
    border-color: var(--kk-accent);
}
.kk-reward.is-locked { opacity: .75; }
.kk-reward-media {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #fafafa 0%, #f1f1f1 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
}
.kk-reward-media img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.08));
}
.kk-reward-body { padding: 16px 18px 6px; flex: 1; }
.kk-reward-title {
    font-size: 14px; font-weight: 600; margin: 0 0 12px; line-height: 1.35;
    color: var(--kk-text);
}
.kk-reward-meta { display: flex; flex-direction: column; gap: 6px; }
.kk-reward-cost {
    font-size: 22px; font-weight: 800; color: var(--kk-accent);
    line-height: 1;
}
.kk-reward-cost span {
    font-size: 10px; font-weight: 700; color: var(--kk-text-muted);
    letter-spacing: .2em; text-transform: uppercase; margin-left: 4px;
}
.kk-reward-progress {
    height: 4px; background: #f1f1f1; border-radius: 999px; overflow: hidden;
    margin-top: 2px;
}
.kk-reward-progress-bar {
    height: 100%; background: var(--kk-accent);
    border-radius: 999px; transition: width .3s ease;
}
.kk-reward-remaining {
    font-size: 11px; color: var(--kk-text-muted); font-weight: 500;
}
.kk-reward-action { padding: 14px 18px 18px; }
.kk-submit--sm {
    width: 100%; padding: 12px 18px; font-size: 11px; letter-spacing: .18em;
    box-shadow: 0 6px 16px rgba(230,161,58,.28);
}
.kk-reward-locked-badge {
    text-align: center; padding: 12px 18px;
    background: #f5f5f5; color: var(--kk-text-muted);
    border-radius: 999px;
    font-size: 10px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700;
}

/* CTA "Masz inny pomysł?" */
.kk-cta-card {
    display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
    background: linear-gradient(135deg, #111 0%, #1c1c1c 100%);
    color: #fff;
    border: none;
    box-shadow: var(--kk-shadow-strong);
}
.kk-cta-card .kk-eyebrow { color: var(--kk-accent); }
.kk-cta-card .kk-eyebrow::before { background: var(--kk-accent); }
.kk-cta-title {
    font-size: clamp(22px, 2.5vw, 30px); margin: 8px 0 6px;
    font-weight: 300; color: #fff;
}
.kk-cta-title strong { font-weight: 800; }
.kk-cta-hint { color: rgba(255,255,255,.65); margin: 0; max-width: 520px; }
.kk-cta-phone {
    display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
    padding: 18px 26px;
    background: var(--kk-accent); color: #fff;
    border-radius: 999px;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
    box-shadow: 0 10px 24px rgba(230,161,58,.35);
}
.kk-cta-phone:hover { background: var(--kk-accent-hover); transform: translateY(-1px); color: #fff; }
.kk-cta-phone-label {
    font-size: 10px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700;
    color: rgba(255,255,255,.85);
}
.kk-cta-phone-number { font-size: 20px; font-weight: 800; letter-spacing: .02em; }

/* Formularz logowania (standalone) */
.kk-login-card { max-width: 520px; margin: 0 auto; }
.kk-login-form .kk-submit { width: 100%; margin-top: 18px; justify-content: center; }
.kk-login-hint {
    text-align: center; margin: 20px 0 0;
    font-size: 13px; color: var(--kk-text-muted);
}
.kk-login-hint a { color: var(--kk-accent); font-weight: 600; text-decoration: none; }
.kk-login-hint a:hover { text-decoration: underline; }

@media (max-width: 700px) {
    .kk-panel-hero { grid-template-columns: 1fr; text-align: left; padding: 24px; }
    .kk-points { text-align: left; padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
    .kk-cta-card { grid-template-columns: 1fr; text-align: left; }
    .kk-cta-phone { align-items: center; text-align: center; width: 100%; }
}

/* ─────────── Responsive ─────────── */
@media (max-width: 960px) {
    .kalmus-konf-app { padding: 28px 16px 48px; }
    .kk-main { grid-template-columns: 1fr; gap: 20px; }
    .kk-visual { position: relative; top: auto; }
    .kk-summary { grid-template-columns: 1fr; text-align: left; }
    .kk-submit { width: 100%; justify-content: center; }
}
@media (max-width: 500px) {
    .kk-opts-grid.kk-cols-7 { grid-template-columns: repeat(4, 1fr); }
    .kk-opts-grid.kk-cols-6 { grid-template-columns: repeat(3, 1fr); }
    .kk-pills .kk-pill { flex: 1 1 calc(50% - 8px); text-align: center; padding: 10px 12px; }
}
