/* =========================================================
   Sokrates Wycena – style wtyczki (paleta zielona / SOLINEO)
   ========================================================= */

.sk-page *,
.sk-page *::before,
.sk-page *::after { box-sizing: border-box; }

.sk-page {
    --sk-green:      #5a7a3a;
    --sk-green-dark: #3f5828;
    --sk-dark:       #1a1a1a;
    --sk-mid:        #444;
    --sk-muted:      #777;
    --sk-white:      #ffffff;
    --sk-border:     #dde5d5;
    --sk-radius:     6px;
    --sk-font:       'Helvetica Neue', Arial, sans-serif;
    --sk-shadow:     0 2px 16px rgba(0,0,0,.08);

    font-family: var(--sk-font);
    color: var(--sk-dark);
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px 60px;
    /* izolacja – żeby style motywu nie wchodziły w nasze elementy */
    isolation: isolate;
}

/* ── Izolacja inputów od motywu ── */
.sk-page input,
.sk-page textarea,
.sk-page button,
.sk-page label {
    all: revert;
    box-sizing: border-box;
    font-family: var(--sk-font);
}

/* ── Breadcrumb ── */
.sk-breadcrumb {
    font-size: .82rem;
    color: var(--sk-muted);
    padding: 18px 0 0;
    line-height: 1.6;
}
.sk-breadcrumb a { color: var(--sk-muted); text-decoration: none; }
.sk-breadcrumb a:hover { color: var(--sk-green); }
.sk-sep { margin: 0 6px; }

/* ── Hero ── */
.sk-hero {
    background: linear-gradient(135deg, var(--sk-green) 0%, var(--sk-green-dark) 100%);
    color: #fff;
    border-radius: var(--sk-radius);
    padding: 44px 40px;
    margin: 16px 0 32px;
    position: relative;
    overflow: hidden;
}
.sk-hero::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 260px; height: 260px;
    border: 40px solid rgba(255,255,255,.07);
    border-radius: 50%;
    pointer-events: none;
}
.sk-hero__eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .75;
    margin: 0 0 10px;
}
.sk-hero__title {
    font-size: clamp(1.5rem, 5vw, 2.4rem);
    font-weight: 700;
    margin: 0 0 14px;
    line-height: 1.15;
}
.sk-hero__desc {
    font-size: 1rem;
    opacity: .88;
    margin: 0;
    line-height: 1.6;
}

/* ── Układ: desktop 2 kolumny, mobile 1 kolumna ── */
.sk-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

/* Tablet */
@media (max-width: 860px) {
    .sk-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Karta kontaktowa ── */
.sk-contact {
    background: var(--sk-white);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius);
    padding: 28px 24px;
    box-shadow: var(--sk-shadow);
    /* sticky tylko na desktop */
    position: sticky;
    top: 24px;
    /* zapewniamy że nie nachodzi na formularz */
    z-index: 1;
    overflow: hidden;
}

@media (max-width: 860px) {
    .sk-contact {
        position: static; /* wyłącz sticky na mobile */
        width: 100%;
    }
}

.sk-contact__heading {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--sk-green);
    color: var(--sk-dark);
}
.sk-contact__item,
.sk-contact__hours {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    font-size: .9rem;
    line-height: 1.55;
    color: var(--sk-mid);
    /* blokujemy overflow – placeholder z formularza nie wchodzi tu */
    overflow: hidden;
}
.sk-contact__item a {
    color: var(--sk-green);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}
.sk-contact__item a:hover { text-decoration: underline; }
.sk-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; line-height: 1; }
.sk-contact__promise {
    margin-top: 20px;
    padding: 10px 12px;
    background: #f2f6ee;
    border-left: 3px solid var(--sk-green);
    font-size: .8rem;
    color: var(--sk-muted);
    border-radius: 0 var(--sk-radius) var(--sk-radius) 0;
    line-height: 1.5;
    overflow: hidden;
}

/* ── Formularz ── */
.sk-form-wrap {
    background: var(--sk-white);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius);
    padding: 36px 40px;
    box-shadow: var(--sk-shadow);
    /* izolacja – żeby placeholder nie wychodzył poza kartę */
    overflow: hidden;
    min-width: 0; /* fix dla grid overflow */
}

@media (max-width: 600px) {
    .sk-form-wrap { padding: 24px 16px; }
    .sk-hero      { padding: 32px 20px; }
}

.sk-form-wrap__heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--sk-dark);
    all: revert;
    font-family: var(--sk-font);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--sk-dark);
}
.sk-form-wrap__sub {
    font-size: .88rem;
    color: var(--sk-muted);
    margin: 0 0 28px;
    line-height: 1.55;
}

/* ── Siatka pól ── */
.sk-fields {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}
.sk-fields--2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 580px) {
    .sk-fields--2 { grid-template-columns: 1fr; }
}

.sk-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
    min-width: 0; /* fix grid overflow */
}
.sk-field:last-child { margin-bottom: 0; }

.sk-field > label {
    display: block;
    font-size: .8rem !important;
    font-weight: 600 !important;
    color: var(--sk-mid) !important;
    letter-spacing: .02em;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    cursor: default;
}
.req { color: var(--sk-green) !important; }

.sk-field input[type="text"],
.sk-field input[type="email"],
.sk-field input[type="tel"],
.sk-field textarea {
    display: block !important;
    width: 100% !important;
    border: 1px solid var(--sk-border) !important;
    border-radius: var(--sk-radius) !important;
    padding: 10px 13px !important;
    font-size: .93rem !important;
    font-family: var(--sk-font) !important;
    color: var(--sk-dark) !important;
    background: var(--sk-white) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .2s, box-shadow .2s;
    margin: 0 !important;
    max-width: 100%;
    /* kluczowe – placeholder nie wychodzi poza input */
    overflow: hidden;
    text-overflow: ellipsis;
}
.sk-field input:focus,
.sk-field textarea:focus {
    border-color: var(--sk-green) !important;
    box-shadow: 0 0 0 3px rgba(90,122,58,.13) !important;
}
.sk-field input.error,
.sk-field textarea.error {
    border-color: #c0392b !important;
}
.sk-field textarea {
    resize: vertical;
    min-height: 110px;
    overflow: auto !important; /* textarea scrollable, nie clipped */
}

/* ── RODO ── */
.sk-field--rodo { margin-bottom: 24px; }
.sk-checkbox {
    display: flex !important;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-size: .82rem !important;
    color: var(--sk-muted) !important;
    line-height: 1.5;
    font-weight: normal !important;
}
.sk-checkbox input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0;
    margin-top: 2px !important;
    margin-right: 0 !important;
    accent-color: var(--sk-green);
    cursor: pointer;
    padding: 0 !important;
}

/* ── Przycisk ── */
.sk-btn {
    display: block !important;
    width: 100% !important;
    background: var(--sk-green) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--sk-radius) !important;
    padding: 13px 32px !important;
    font-size: .97rem !important;
    font-weight: 700 !important;
    font-family: var(--sk-font) !important;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .02em;
    text-align: center;
    line-height: 1.4 !important;
}
.sk-btn:hover { background: var(--sk-green-dark) !important; }
.sk-btn:active { transform: scale(.99); }
.sk-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Powiadomienia ── */
.sk-notice {
    padding: 13px 16px;
    border-radius: var(--sk-radius);
    margin-bottom: 20px;
    font-size: .9rem;
    line-height: 1.5;
}
.sk-notice--ok {
    background: #eef5e8;
    border: 1px solid #9ab87a;
    color: #2d5a1b;
}
.sk-notice--err {
    background: #fdf0ef;
    border: 1px solid #e4a09a;
    color: #922b21;
}

/* ── Galeria produktów ── */
.sk-gallery {
    margin: 0 0 36px;
}
.sk-gallery__lead {
    font-size: .95rem;
    color: var(--sk-muted);
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.6;
}
.sk-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
/* Gdy galeria ma tylko 1 zdjęcie (np. kategorie typu "Lustra") –
   wyśrodkuj je i ogranicz szerokość, żeby nie rozciągało się na całą sekcję */
.sk-gallery__grid:has(.sk-gallery__item:only-child) {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
}
@media (max-width: 640px) {
    .sk-gallery__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
.sk-gallery__item {
    border-radius: var(--sk-radius);
    overflow: hidden;
    box-shadow: var(--sk-shadow);
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}
.sk-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s ease;
}
.sk-gallery__item:hover img {
    transform: scale(1.03);
}

/* Wariant z jednym, większym zdjęciem (np. kategoria "Lustra") –
   wyśrodkowane, bez agresywnego przycinania */
.sk-gallery__grid:has(.sk-gallery__item:only-child) .sk-gallery__item {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sk-gallery__grid:has(.sk-gallery__item:only-child) .sk-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ── Lightbox ── */
.sk-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.92);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.sk-lightbox.is-open {
    display: flex;
}
.sk-lightbox__img {
    max-width: 94vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0,0,0,.6);
    cursor: default;
    user-select: none;
}
.sk-lightbox__close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: .8;
    padding: 0;
    transition: opacity .15s;
}
.sk-lightbox__close:hover { opacity: 1; }
.sk-lightbox__prev,
.sk-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .15s;
    line-height: 1;
}
.sk-lightbox__prev { left: 16px; }
.sk-lightbox__next { right: 16px; }
.sk-lightbox__prev:hover,
.sk-lightbox__next:hover { background: rgba(255,255,255,.25); }

/* kursor na miniaturach */
.sk-gallery__item { cursor: zoom-in; }
