.tdlre-wrap,
.tdlre-single {
    --tdlre-primary: #1f4fff;
    --tdlre-text: #111827;
    --tdlre-muted: #6b7280;
    --tdlre-border: #e5e7eb;
    --tdlre-bg: #ffffff;
    color: var(--tdlre-text);
}
.tdlre-filter {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 12px;
    padding: 18px;
    margin: 0 0 28px;
    background: #f8fafc;
    border: 1px solid var(--tdlre-border);
    border-radius: 18px;
}
.tdlre-filter label span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}
.tdlre-filter select,
.tdlre-filter input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}
.tdlre-filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}
.tdlre-filter-actions button,
.tdlre-detail,
.tdlre-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--tdlre-primary);
    color: #fff !important;
    border: 0;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
}
.tdlre-filter-actions a {
    color: var(--tdlre-muted);
    text-decoration: none;
    padding-bottom: 11px;
}
.tdlre-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 28px;
}
.tdlre-grid-1 { grid-template-columns: 1fr; }
.tdlre-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tdlre-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tdlre-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tdlre-card {
    background: var(--tdlre-bg);
    border: 1px solid var(--tdlre-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    transition: transform .18s ease, box-shadow .18s ease;
}
.tdlre-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}
.tdlre-card-image {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    background: #eef2ff;
    overflow: hidden;
}
.tdlre-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tdlre-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--tdlre-muted);
    font-weight: 700;
}
.tdlre-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    background: #e5e7eb;
    color: #111827;
}
.tdlre-card-badges {
    position: absolute;
    left: 12px;
    top: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}
.tdlre-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tdlre-badge-active { background: #dcfce7; color: #166534; }
.tdlre-badge-reserved { background: #fef3c7; color: #92400e; }
.tdlre-badge-sold { background: #fee2e2; color: #991b1b; }
.tdlre-badge-hidden { background: #e5e7eb; color: #374151; }
.tdlre-offer-badge { background: #dbeafe; color: #1e40af; }
.tdlre-offer-badge-doporucujeme { background: #ede9fe; color: #5b21b6; }
.tdlre-offer-badge-sleva { background: #ffedd5; color: #9a3412; }
.tdlre-offer-badge-exkluzivne { background: #fef9c3; color: #854d0e; }
.tdlre-status-sold .tdlre-card-image img,
.tdlre-sold-grid .tdlre-card-image img {
    filter: grayscale(50%);
    opacity: .72;
}
.tdlre-card-body {
    padding: 18px;
}
.tdlre-card h3 {
    margin: 0 0 9px;
    font-size: 20px;
    line-height: 1.25;
}
.tdlre-card h3 a {
    color: var(--tdlre-text);
    text-decoration: none;
}
.tdlre-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--tdlre-muted);
    font-size: 14px;
    margin-bottom: 12px;
}
.tdlre-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 15px;
}
.tdlre-terms span {
    display: inline-flex;
    border: 1px solid var(--tdlre-border);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    color: #374151;
    background: #fff;
}
.tdlre-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--tdlre-border);
    padding-top: 14px;
}
.tdlre-price {
    font-size: 18px;
    font-weight: 900;
}
.tdlre-price small,
.tdlre-single-price small {
    display: block;
    color: var(--tdlre-muted);
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
}
.tdlre-sold-heading {
    margin: 34px 0 18px;
}
.tdlre-empty {
    padding: 24px;
    border: 1px dashed var(--tdlre-border);
    border-radius: 18px;
    color: var(--tdlre-muted);
    text-align: center;
}
.tdlre-single-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}
.tdlre-single-hero h1 {
    margin: 12px 0 6px;
}
.tdlre-single-address {
    color: var(--tdlre-muted);
    margin: 0;
}
.tdlre-single-price {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}
.tdlre-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}
.tdlre-gallery a {
    display: block;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
    overflow: hidden;
    background: #f3f4f6;
}
.tdlre-gallery-main {
    grid-row: span 2;
    aspect-ratio: auto !important;
}
.tdlre-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tdlre-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    align-items: start;
}
.tdlre-single-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.tdlre-single-facts div {
    padding: 14px;
    border: 1px solid var(--tdlre-border);
    border-radius: 16px;
    background: #fff;
}
.tdlre-single-facts strong {
    display: block;
    font-size: 18px;
}
.tdlre-single-facts span {
    color: var(--tdlre-muted);
    font-size: 13px;
}
.tdlre-description {
    font-size: 17px;
    line-height: 1.7;
}
.tdlre-contact-box {
    position: sticky;
    top: var(--tdlre-contact-top, 110px);
    padding: 22px;
    border: 1px solid var(--tdlre-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.tdlre-contact-box h3 {
    margin-top: 0;
}
.tdlre-contact-button {
    width: 100%;
    margin: 10px 0;
}
.tdlre-phone,
.tdlre-side-link {
    display: block;
    color: var(--tdlre-primary);
    font-weight: 800;
    text-decoration: none;
    margin-top: 10px;
}
@media (max-width: 1024px) {
    .tdlre-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tdlre-grid-3,
    .tdlre-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tdlre-single-layout { grid-template-columns: 1fr; }
    .tdlre-contact-box { position: static; }
}
@media (max-width: 700px) {
    .tdlre-filter,
    .tdlre-grid,
    .tdlre-grid-2,
    .tdlre-grid-3,
    .tdlre-grid-4,
    .tdlre-single-facts { grid-template-columns: 1fr; }
    .tdlre-single-hero { display: block; }
    .tdlre-single-price { text-align: left; margin-top: 14px; }
    .tdlre-gallery { grid-template-columns: 1fr 1fr; }
    .tdlre-gallery-main { grid-column: 1 / -1; }
    .tdlre-card-bottom { align-items: start; flex-direction: column; }
}

.tdlre-lightbox-open {
    overflow: hidden;
}
.tdlre-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 76px;
    background: rgba(3, 7, 18, 0.88);
}
.tdlre-lightbox[hidden] {
    display: none !important;
}
.tdlre-lightbox-img {
    max-width: min(1200px, 100%);
    max-height: calc(100vh - 140px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    background: #111827;
}
.tdlre-lightbox-close,
.tdlre-lightbox-prev,
.tdlre-lightbox-next {
    position: absolute;
    border: 0;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.tdlre-lightbox-close {
    top: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    font-size: 34px;
    line-height: 42px;
    font-weight: 400;
}
.tdlre-lightbox-prev,
.tdlre-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 64px;
    border-radius: 16px;
    font-size: 54px;
    line-height: 56px;
}
.tdlre-lightbox-prev { left: 18px; }
.tdlre-lightbox-next { right: 18px; }
.tdlre-lightbox-caption {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 700;
}
@media (max-width: 700px) {
    .tdlre-lightbox { padding: 70px 14px; }
    .tdlre-lightbox-img { max-height: calc(100vh - 150px); border-radius: 12px; }
    .tdlre-lightbox-prev,
    .tdlre-lightbox-next { width: 42px; height: 52px; font-size: 44px; background: rgba(255,255,255,.92); }
}
