/* ==========================================================================
   1. GŁÓWNY KONTENER I SIATKA
   ========================================================================== */
.lm-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px 30px; /* Duży odstęp w pionie, mniejszy w poziomie */
    margin: 40px 0;
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
    background: transparent;
}

/* ==========================================================================
   2. KARTA (Całkowicie płaska, bez ramek i cieni)
   ========================================================================== */
.lm-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   3. OBRAZEK I GALERIA (Ostre kąty)
   ========================================================================== */
.lm-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px; /* Stała wysokość lub użyj aspect-ratio: 4/3; */
    background-color: #eee;
    overflow: hidden;
}

.lm-img-wrapper img.main-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.lm-gallery-trigger {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.lm-gallery-trigger:hover {
    background: #ffffff;
}

/* ==========================================================================
   4. TREŚĆ (Zrównana do lewej, bez bocznego marginesu)
   ========================================================================== */
.lm-info {
    padding: 20px 0 0 0; /* Brak marginesów bocznych! */
    display: flex;
    flex-direction: column;
}

.lm-title {
    font-size: 22px !important;
    font-weight: 500 !important;
    color: #222 !important;
    margin: 0 0 5px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lm-subtitle {
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #555 !important;
    margin: 0 0 15px 0 !important;
}

/* ==========================================================================
   5. MINIATURKI WARIANTÓW (Mieszkania pod spodem)
   ========================================================================== */
.lm-variant-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.lm-v-btn {
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s ease;
    text-align: center;
}

.lm-v-btn:hover, .lm-v-btn.active {
    opacity: 1;
}

.lm-v-btn img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border: 1px solid #ddd;
    display: block;
    margin-bottom: 3px;
}

.lm-v-btn.active img {
    border-color: #222; /* Ciemna ramka dla aktywnego */
}

.lm-v-btn span {
    display: block;
    font-size: 10px;
    color: #222;
    font-weight: 600;
}

/* ==========================================================================
   6. DYNAMICZNE DANE (Stylizacja na rząd ikon rodem ze zdjęcia)
   ========================================================================== */
.lm-dynamic-data {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px; /* Odstępy między ikonami */
    margin-bottom: 20px;
}

/* Ukrywamy nagłówek z numerem mieszkania, bo jest w miniaturkach */
.lm-dynamic-data .v-name {
    display: none !important;
}

/* MAGICZNY TRIK: Ukrywamy teksty typu "Powierzchnia:" używając font-size: 0 */
.lm-dynamic-data p {
    font-size: 0 !important; 
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    color: #666;
}

/* Przywracamy widoczność samym wartościom ze spanów */
.lm-dynamic-data p span {
    font-size: 14px !important;
    font-weight: 400;
    color: #444;
}

/* Dodawanie Ikon z Dashicons przed wartościami */
.lm-dynamic-data p:nth-child(2)::before {
    content: '\f211'; /* Ikona kwadratu/rozszerzania dla Metrażu */
    font-family: 'dashicons';
    font-size: 18px;
    margin-right: 6px;
    color: #617b96; /* Kolor ikony - zgaszony niebiesko-szary */
}

.lm-dynamic-data p:nth-child(3)::before {
    content: '\f174'; /* Ikona metki dla Ceny za m2 */
    font-family: 'dashicons';
    font-size: 18px;
    margin-right: 6px;
    color: #617b96;
}

.lm-dynamic-data p.lm-price::before {
    content: '\f155'; /* Ikona Dolara / Waluty dla Ceny całkowitej */
    font-family: 'dashicons';
    font-size: 18px;
    margin-right: 6px;
    color: #617b96;
    font-weight: bold;
}

/* Opcjonalne pogrubienie sumy końcowej */
.lm-dynamic-data p.lm-price span {
    font-weight: 600;
    color: #222;
}

/* ==========================================================================
   7. PRZYCISK KONTAKTU (Minimalistyczny, konturowy)
   ========================================================================== */
.lm-open-modal {
    align-self: flex-start; /* Przycisk po lewej stronie, nie na całą szerokość */
    padding: 10px 20px;
    background-color: transparent;
    color: #222;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #222; /* Cienka czarna ramka */
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lm-open-modal:hover {
    background-color: #222;
    color: #fff;
}

/* ==========================================================================
   8. RESPONSYWNOŚĆ
   ========================================================================== */
@media (max-width: 768px) {
    .lm-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   9. MODAL KONTAKTOWY
   ========================================================================== */
.lm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.lm-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.lm-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 2;
    font-family: 'Inter', sans-serif;
}

.lm-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.lm-modal-close:hover {
    color: #222;
}

#lm-modal-title {
    margin-top: 0;
    font-size: 22px;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.lm-modal-body p {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
}

.lm-btn-contact {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.lm-btn-contact:hover {
    background: #555;
    color: #fff;
}

/* ==========================================================================
   10. LIGHTBOX (PODGLĄD OBRAZKA)
   ========================================================================== */
.lm-lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lm-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
    background: #fff; /* Tło w razie, gdyby png było przezroczyste */
}

/* Przesuwamy ikonę zamknięcia na górę powiększonego obrazka */
.lm-lightbox-content .lm-modal-close {
    top: -35px;
    right: 0;
    color: #fff;
}

.lm-lightbox-content .lm-modal-close:hover {
    color: #ccc;
}

.lm-contact-form { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; text-align: left; }
.lm-form-group { display: flex; flex-direction: column; }
.lm-form-group label { font-size: 14px; font-weight: bold; margin-bottom: 5px; color: black !important; }
.lm-form-group input, .lm-form-group textarea { padding: 10px; border: 1px solid black !important; border-radius: 5px; font-family: inherit; font-size: 14px; transition: border-color 0.3s; color: black !important; }
.lm-form-group input:focus, .lm-form-group textarea:focus { border-color: #0073aa; outline: none; }
.lm-btn-submit { background-color: #0073aa; color: #fff; border: none; padding: 12px; font-size: 16px; border-radius: 5px; cursor: pointer; font-weight: bold; transition: background 0.3s; }
.lm-btn-submit:hover { background-color: #005177; }
.lm-form-msg { padding: 10px; border-radius: 5px; display: none; font-weight: bold; text-align: center; }
.lm-form-msg.success { background-color: #d4edda; color: #155724; display: block; }
.lm-form-msg.error { background-color: #f8d7da; color: #721c24; display: block; }
/* Stylizowanie checkboxa RODO */
.lm-checkbox-group { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; }
.lm-checkbox-group input[type="checkbox"] { margin-top: 3px; cursor: pointer; width: 16px; height: 16px; flex-shrink: 0; }
.lm-checkbox-group label { font-size: 12px; font-weight: normal; color: black !important; line-height: 1.4; margin-bottom: 0; cursor: pointer; }

/* ==========================================================================
   11. PIONOWA NAWIGACJA FIXED (Prawy dolny róg)
   ========================================================================== */
.lm-fixed-nav {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.lm-nav-btn-fixed {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.9); /* Delikatne białe tło dla czytelności na zdjęciach */
    color: #222;
    text-decoration: none;
    border: 1px solid #222;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Ikony w przyciskach */
.lm-nav-btn-fixed .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

/* --- ANIMACJA --- */
.lm-nav-btn-fixed:hover {
    background-color: #222;
    color: #fff !important;
    transform: translateX(-10px); /* Wysunięcie w lewo */
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.lm-nav-btn-fixed:hover .dashicons {
    transform: scale(1.2);
}

/* Responsywność - mniejsze przyciski na mobile */
@media (max-width: 768px) {
    .lm-fixed-nav {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    .lm-nav-btn-fixed {
        padding: 10px 15px;
        font-size: 11px;
    }
    .lm-nav-label {
        display: none; /* Na bardzo małych ekranach zostawiamy same ikony */
    }
    .lm-nav-btn-fixed:hover {
        transform: translateX(-5px);
    }
}

/* ==========================================================================
   12. STYLIZACJA PAGINACJI
   ========================================================================== */
.lm-pagination {
    display: flex;
    justify-content: center; /* Wyśrodkowanie na stronie */
    align-items: center;
    gap: 10px;
    margin: 50px 0;
    font-family: 'Inter', sans-serif;
}

.lm-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    text-decoration: none;
    color: #222;
    border: 1px solid #222; /* Czarna ramka zgodnie z Twoim stylem */
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
}

/* Stan aktywny (obecna strona) */
.lm-pagination .page-numbers.current {
    background-color: #222;
    color: #fff;
    cursor: default;
}

/* Hover dla linków */
.lm-pagination a.page-numbers:hover {
    background-color: #222;
    color: #fff !important;
}

/* Stylizacja przycisków Następne / Poprzednie */
.lm-pagination .next, 
.lm-pagination .prev {
    padding: 0 20px; /* Szersze przyciski dla tekstu */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 600;
}

/* Responsywność dla urządzeń mobilnych */
@media (max-width: 480px) {
    .lm-pagination {
        gap: 5px;
    }
    .lm-pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }
    .lm-pagination .next, 
    .lm-pagination .prev {
        padding: 0 10px;
    }
}

/*lupka*/

.lm-lightbox-zoom-container {
    overflow: hidden;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 4px;
}

/* Obrazek w trybie zoom */
#lm-lightbox-img {
    transition: transform 0.1s ease-out; /* Płynność ruchu */
    max-width: 100%;
    height: auto;
    display: block;
}

/* Klasa aktywna lupy (dodawana przez JS) */
.lm-lightbox-zoom-container.is-zoomed {
    cursor: zoom-out;
}

.lm-lightbox-zoom-container.is-zoomed #lm-lightbox-img {
    transform: scale(2.5); /* Poziom przybliżenia - możesz zmienić na np. 2 lub 3 */
    max-width: none; 
}