/* =====================================================================
   BIURO WYMARZONY KĄT - OFERTY STYLES
   Dark Theme | Accent: #daa520 | Font: Rubik | Flat Design
   ===================================================================== */

.esti-offers-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Rubik', sans-serif;
    color: #d0d0d0;
}

/* ===== TOOLBAR (filtry + sortowanie) ===== */
.esti-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #252524;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* PASEK FILTRÓW */
.esti-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.esti-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #444;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #aaa;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.2;
}

.esti-filter-btn:hover {
    background: rgba(218, 165, 32, 0.1);
    border-color: #daa520;
    color: #daa520;
}

.esti-filter-btn.active {
    background: #daa520;
    border-color: #daa520;
    color: #191918;
    font-weight: 600;
}

.esti-filter-label {
    font-weight: 600;
}

.esti-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.esti-filter-btn.active .esti-filter-count {
    background: rgba(0, 0, 0, 0.15);
    color: #191918;
}

.esti-filter-btn:not(.active) .esti-filter-count {
    color: #777;
}

.esti-filter-btn:hover .esti-filter-count {
    background: rgba(218, 165, 32, 0.2);
    color: #daa520;
}

/* PASEK SORTOWANIA */
.esti-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.esti-sort-label {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    white-space: nowrap;
}

.esti-sort-select {
    padding: 8px 32px 8px 14px;
    border: 1px solid #444;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #d0d0d0;
    background: #1e1e1d;
    cursor: pointer;
    appearance: auto;
    transition: border-color 0.2s ease;
    min-width: 200px;
}

.esti-sort-select:hover,
.esti-sort-select:focus {
    border-color: #daa520;
    outline: none;
}

/* LICZBA WYNIKÓW */
.esti-results-info {
    margin-bottom: 16px;
    padding: 0 4px;
}

.esti-results-info p {
    margin: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #777;
    font-weight: 400;
}

/* SIATKA OFERT */
.esti-offers-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.esti-offers-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.esti-offers-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.esti-offers-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.esti-offers-grid.cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* KARTA OFERTY */
.esti-offer-card {
    border: 1px solid #333;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: #252524;
}

.esti-offer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: #daa520;
}

/* OBRAZ KARTY */
.esti-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #1a1a19;
}

.esti-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.esti-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.esti-offer-card:hover .esti-card-image img {
    transform: scale(1.05);
}

/* BADGE TYPU */
.esti-card-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #daa520;
    color: #191918;
    padding: 4px 10px;
    font-family: 'Rubik', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ZAWARTOŚĆ KARTY */
.esti-card-content {
    padding: 18px;
}

.esti-card-title {
    margin: 0 0 12px 0;
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.esti-card-title a {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.esti-card-title a:hover {
    color: #daa520;
}

/* CENA */
.esti-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #daa520;
    margin-bottom: 12px;
}

/* META INFO (miasto | powierzchnia) */
.esti-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    color: #999;
}

.esti-card-meta svg {
    flex-shrink: 0;
    opacity: 0.5;
    vertical-align: -2px;
}

.esti-meta-sep {
    color: #444;
    font-weight: 300;
}

/* ADRES */
.esti-card-address {
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #666;
    margin-bottom: 14px;
    padding-top: 0;
}

/* STARSZA INFORMACJA (zachowana dla kompatybilności) */
.esti-card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

.esti-card-info-item {
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    color: #999;
}

.esti-card-info-item strong {
    display: block;
    color: #ccc;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    margin-bottom: 2px;
}

/* PRZYCISK */
.esti-card-button {
    display: inline-block;
    background: transparent;
    color: #daa520;
    padding: 10px 16px;
    text-decoration: none;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #daa520;
    cursor: pointer;
    text-align: center;
}

.esti-card-button:hover {
    background: #daa520;
    color: #191918;
    text-decoration: none;
}

/* PAGINACJA */
.esti-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.esti-pagination a,
.esti-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #252524;
    border: 1px solid #444;
    text-decoration: none;
    font-family: 'Rubik', sans-serif;
    color: #aaa;
    font-size: 14px;
    transition: all 0.2s ease;
}

.esti-pagination a:hover {
    background: #daa520;
    color: #191918;
    border-color: #daa520;
}

.esti-pagination .page-info {
    background: transparent;
    border: none;
    color: #666;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
}

/* KOMUNIKAT - BRAK OFERT */
.esti-no-offers {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    background: #252524;
    border: 1px solid #333;
    color: #888;
    font-family: 'Rubik', sans-serif;
}

/* RESPONSYWNY */
@media (max-width: 1024px) {
    .esti-offers-grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .esti-offers-grid.cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .esti-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .esti-filter-bar {
        justify-content: center;
    }

    .esti-sort-bar {
        justify-content: center;
        width: 100%;
    }

    .esti-sort-select {
        flex: 1;
        min-width: 0;
    }

    .esti-offers-grid.cols-2,
    .esti-offers-grid.cols-3,
    .esti-offers-grid.cols-4,
    .esti-offers-grid.cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .esti-card-content {
        padding: 15px;
    }

    .esti-card-title {
        font-size: 15px;
    }

    .esti-card-price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .esti-toolbar {
        padding: 12px;
    }

    .esti-filter-bar {
        gap: 6px;
    }

    .esti-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .esti-filter-count {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .esti-sort-select {
        font-size: 13px;
        padding: 6px 28px 6px 12px;
    }

    .esti-offers-grid.cols-2,
    .esti-offers-grid.cols-3,
    .esti-offers-grid.cols-4,
    .esti-offers-grid.cols-6 {
        grid-template-columns: 1fr;
    }

    .esti-card-image {
        height: 150px;
    }

    .esti-card-info {
        grid-template-columns: 1fr;
    }
}

/* ===== SINGLE OFFER ===== */
.esti-single-offer {
    background: #252524;
    padding: 30px;
    border: 1px solid #333;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Rubik', sans-serif;
    color: #d0d0d0;
}

.esti-single-offer h2,
.esti-single-title {
    margin-top: 0;
    color: #f0f0f0;
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    font-weight: 600;
}

.esti-single-offer img,
.esti-single-image {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.esti-single-price {
    font-size: 24px;
    color: #daa520;
    font-weight: 700;
    margin-bottom: 20px;
}

.esti-single-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #1e1e1d;
    border: 1px solid #333;
}

.esti-detail-item {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #bbb;
}

.esti-detail-item strong {
    display: block;
    color: #daa520;
    font-family: 'Rubik', sans-serif;
    margin-bottom: 5px;
    font-weight: 600;
}

.esti-single-description {
    margin-top: 20px;
    padding: 20px;
    background: #1e1e1d;
    border: 1px solid #333;
    line-height: 1.7;
    color: #bbb;
}

.esti-single-footer {
    margin-top: 20px;
    text-align: center;
}

/* FILTER TYPÓW (dla shortcode esti_types_filter) */
.esti-types-filter {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.esti-type-link {
    display: inline-block;
    padding: 8px 16px;
    background: #252524;
    border: 1px solid #444;
    text-decoration: none;
    font-family: 'Rubik', sans-serif;
    color: #aaa;
    font-size: 14px;
    transition: all 0.2s ease;
}

.esti-type-link:hover {
    background: #daa520;
    color: #191918;
}

/* ACCESSIBILITY */
.esti-offer-card:focus-within {
    outline: 2px solid #daa520;
    outline-offset: 2px;
}

.esti-filter-btn:focus {
    outline: 2px solid #daa520;
    outline-offset: 2px;
}

.esti-card-button:focus {
    outline: 2px solid #daa520;
    outline-offset: 2px;
}

/* ===== SINGLE OFFER FULL VIEW ===== */
.esti-single-offer-full {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Rubik', sans-serif;
    color: #d0d0d0;
    background: #191918;
}

/* --- GALERIA --- */
.esti-gallery {
    margin-bottom: 32px;
    position: relative;
}

.esti-gallery-viewport {
    position: relative;
    width: 100%;
    height: 520px;
    background: #111;
    overflow: hidden;
}

.esti-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.esti-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.esti-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
}

/* Strzałki galerii */
.esti-gallery-prev,
.esti-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(25, 25, 24, 0.8);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
    opacity: 0;
}

.esti-gallery:hover .esti-gallery-prev,
.esti-gallery:hover .esti-gallery-next {
    opacity: 1;
}

.esti-gallery-prev { left: 0; }
.esti-gallery-next { right: 0; }

.esti-gallery-prev:hover,
.esti-gallery-next:hover {
    background: #daa520;
    color: #191918;
}

/* Licznik zdjęć */
.esti-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    letter-spacing: 0.3px;
}

/* Kropki (dots) */
.esti-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: #1e1e1d;
    border-top: 1px solid #2a2a29;
}

.esti-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3a3a39;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
}

.esti-dot.active,
.esti-dot:hover {
    background: #daa520;
}

/* --- LAYOUT 2-KOLUMNOWY --- */
.esti-single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

.esti-single-main {
    min-width: 0;
}

.esti-single-sidebar {
    position: sticky;
    top: 20px;
    min-width: 0;
}

/* --- HEADER --- */
.esti-single-header {
    margin-bottom: 28px;
}

.esti-single-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.esti-single-badge {
    display: inline-block;
    background: #daa520;
    color: #191918;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.esti-single-ref {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.esti-single-title {
    font-size: 28px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0 0 16px 0;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.esti-single-price-box {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.esti-single-price {
    font-size: 34px;
    font-weight: 700;
    color: #daa520;
    line-height: 1;
}

.esti-single-price small {
    font-size: 20px;
    font-weight: 500;
    color: #c8961e;
}

.esti-single-price-per-m {
    font-size: 15px;
    color: #777;
    font-weight: 400;
    background: #252524;
    padding: 4px 10px;
    border: 1px solid #333;
}

/* --- QUICK FACTS --- */
.esti-single-quick-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1px;
    background: #2a2a29;
    border: 1px solid #2a2a29;
}

.esti-fact {
    background: #1e1e1d;
    padding: 16px 12px;
    text-align: center;
}

.esti-fact-icon {
    display: block;
    margin-bottom: 8px;
}

.esti-fact-icon svg {
    color: #daa520;
    opacity: 0.7;
}

.esti-fact-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 2px;
}

.esti-fact-label {
    display: block;
    font-size: 10px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* --- SEKCJE --- */
.esti-single-section {
    margin-bottom: 24px;
    padding: 24px;
    background: #1e1e1d;
    border: 1px solid #2a2a29;
}

.esti-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a29;
    letter-spacing: -0.2px;
}

.esti-description-content {
    line-height: 1.75;
    color: #bbb;
    font-size: 14px;
}

.esti-description-content p {
    margin: 0 0 12px;
}

.esti-description-content p:last-child {
    margin-bottom: 0;
}

/* --- TAGI --- */
.esti-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.esti-tag {
    display: inline-block;
    padding: 5px 12px;
    background: transparent;
    border: 1px solid #3a3a39;
    font-size: 12px;
    color: #999;
    font-weight: 400;
    transition: border-color 0.2s, color 0.2s;
}

.esti-tag:hover {
    border-color: #daa520;
    color: #daa520;
}

/* --- SZCZEGÓŁY GRID --- */
.esti-details-grid {
    display: grid;
    gap: 0;
}

.esti-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a29;
}

.esti-detail-row:last-child {
    border-bottom: none;
}

.esti-detail-label {
    font-size: 13px;
    color: #888;
}

.esti-detail-value {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
    text-align: right;
}

/* --- LOKALIZACJA --- */
.esti-location-address {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 16px;
    line-height: 1.6;
}

.esti-map-container {
    height: 300px;
    border: 1px solid #333;
}

/* --- SIDEBAR --- */
.esti-sidebar-card {
    padding: 20px;
    background: #1e1e1d;
    border: 1px solid #2a2a29;
    margin-bottom: 16px;
}

.esti-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a29;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Kontakt */
.esti-contact-company {
    font-size: 12px;
    color: #999;
    margin: 0 0 6px 0;
}

.esti-contact-name {
    font-size: 15px;
    font-weight: 500;
    color: #f0f0f0;
    margin: 0 0 14px 0;
}

.esti-contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #3a3a39;
    transition: all 0.2s;
    background: transparent;
    box-sizing: border-box;
}

.esti-contact-btn svg {
    flex-shrink: 0;
}

.esti-contact-phone {
    color: #daa520;
    border-color: #daa520;
}

.esti-contact-phone:hover {
    background: #daa520;
    color: #191918;
}

.esti-contact-email {
    color: #bbb;
    border-color: #3a3a39;
}

.esti-contact-email:hover {
    border-color: #daa520;
    color: #daa520;
}

.esti-contact-btn:last-child {
    margin-bottom: 0;
}

.esti-update-date {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.esti-back-btn {
    display: block;
    text-align: center;
    padding: 11px;
    background: transparent;
    border: 1px solid #3a3a39;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.2s;
}

.esti-back-btn:hover {
    border-color: #daa520;
    color: #daa520;
}

/* Leaflet dark tile override (opcjonalnie, bo domyślna mapa jest jasna) */
.esti-map-container .leaflet-container {
    background: #111;
}

/* --- LIGHTBOX --- */
.esti-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.esti-lightbox.active {
    display: flex;
}

.esti-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.esti-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    cursor: default;
}

.esti-lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    padding: 4px;
}

.esti-lightbox-close:hover {
    color: #daa520;
}

.esti-lightbox-prev,
.esti-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: background 0.2s;
}

.esti-lightbox-prev { left: 10px; }
.esti-lightbox-next { right: 10px; }

.esti-lightbox-prev:hover,
.esti-lightbox-next:hover {
    background: #daa520;
    color: #191918;
}

.esti-lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 14px;
    z-index: 10000;
}

/* --- RESPONSYWNY SINGLE --- */
@media (max-width: 900px) {
    .esti-single-layout {
        grid-template-columns: 1fr;
    }

    .esti-single-sidebar {
        position: static;
        order: -1;
    }

    .esti-gallery-viewport {
        height: 380px;
    }

    .esti-single-title {
        font-size: 24px;
    }

    .esti-single-price {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .esti-gallery {
        margin-bottom: 20px;
    }

    .esti-gallery-viewport {
        height: 280px;
    }

    .esti-gallery-prev,
    .esti-gallery-next {
        width: 36px;
        height: 36px;
        font-size: 16px;
        opacity: 1;
    }

    .esti-single-section {
        padding: 16px;
    }

    .esti-single-title {
        font-size: 20px;
    }

    .esti-single-price {
        font-size: 26px;
    }

    .esti-single-quick-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .esti-sidebar-card {
        padding: 16px;
    }

    .esti-map-container {
        height: 220px;
    }
}
