@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   TOMAPA DESIGN SYSTEM - NOWOCZESNY BEZRAMKOWY MINIMALIZM (Apple / Linear)
   ========================================================================== */

:root {
    /* Paleta kolorów podstawowych */
    --color-primary: #0f172a;
    /* Głęboki grafit / węgiel */
    --color-primary-hover: #1e293b;
    --color-accent: #4f46e5;
    /* Nowoczesny indygo */
    --color-accent-hover: #4338ca;
    --color-accent-light: #eef2ff;

    /* Kolory tła (Subtelne przejścia tonalne zamiast ramek) */
    --bg-page: #f8fafc;
    /* Slate 50 - naturalne tło */
    --bg-surface: #ffffff;
    /* Czysta biel kart */
    --bg-subtle: #f1f5f9;
    /* Slate 100 - miękkie tło sekcji/pól */
    --bg-subtle-hover: #e2e8f0;
    /* Slate 200 */
    --bg-dark: #0f172a;
    /* Slate 900 */

    /* Typografia i kontrast */
    --text-main: #0f172a;
    /* Slate 900 - wysoki kontrast */
    --text-body: #334155;
    /* Slate 700 - czytelny tekst */
    --text-muted: #64748b;
    /* Slate 500 - podpisy i metadane */
    --text-subtle: #94a3b8;
    /* Slate 400 - placeholdery */
    --text-white: #ffffff;

    /* Kolory statusów */
    --color-success: #10b981;
    /* Emerald */
    --color-success-bg: #ecfdf5;
    --color-warning: #f59e0b;
    /* Amber */
    --color-warning-bg: #fffbeb;
    --color-danger: #e11d48;
    /* Rose */
    --color-danger-bg: #fff1f2;
    --color-info: #0284c7;
    /* Sky */
    --color-info-bg: #f0f9ff;

    /* Zaokrąglenia (Organic & Modern) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Cienie przestrzenne (Soft Elevation) */
    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --shadow-card-hover: 0 12px 32px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

    /* Przejścia */
    --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset bazowy */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   TYPOGRAFIA
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    margin-bottom: 0.75rem;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   UKŁAD STRONY & KONTENERY
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.container-fluid {
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

/* ==========================================================================
   GŁÓWNA NAWIGACJA (NAVBAR - BEZRAMKOWY BLUR)
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
    padding: 14px 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.brand-logo .accent {
    color: var(--color-accent);
}

.brand-logo-img {
    height: 32px;
    width: auto;
    max-height: 36px;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    padding: 8px 14px;
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--text-body);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
    background-color: var(--bg-subtle);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   PRZYCISKI (BUTTONS - MODERN & TACTILE)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.925rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    white-space: nowrap;
    user-select: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--text-white);
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
    color: var(--text-white);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
    background-color: var(--bg-subtle);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle-hover);
    color: var(--text-main);
}

.btn-danger {
    background-color: var(--color-danger);
    color: var(--text-white);
}

.btn-danger:hover {
    background-color: #be123c;
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-body);
}

.btn-ghost:hover {
    background-color: var(--bg-subtle);
    color: var(--text-main);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.825rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    padding: 10px;
    border-radius: var(--radius-md);
    line-height: 1;
}

/* ==========================================================================
   FORMULARZE (ZERO BORDER-CLUTTER: TŁA + FOCUS RING)
   ========================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-bottom: 16px;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-label .req {
    color: var(--color-danger);
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.925rem;
    color: var(--text-main);
    background-color: var(--bg-subtle);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 11px 16px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-subtle);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    background-color: var(--bg-surface);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    background-color: var(--color-danger-bg);
    border-color: var(--color-danger);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    background-color: var(--bg-surface);
    border-color: var(--color-danger);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.14);
}

.form-error {
    font-size: 0.8rem;
    color: var(--color-danger);
    font-weight: 500;
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
}

/* ==========================================================================
   KAFELKI OGŁOSZEŃ (PROPERTY CARDS - ULTRA-CLEAN & ELEVATED)
   ========================================================================== */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.prop-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.prop-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.prop-card-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: var(--bg-subtle);
    overflow: hidden;
}

.prop-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.prop-card:hover .prop-card-img {
    transform: scale(1.04);
}

.prop-card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.prop-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    color: var(--text-white);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.prop-card-fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-bounce);
    z-index: 2;
}

.prop-card-fav-btn:hover {
    color: var(--color-danger);
    transform: scale(1.15);
    background-color: #ffffff;
}

.prop-card-fav-btn.active {
    color: var(--color-danger);
    background-color: #ffffff;
}

.prop-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.prop-card-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.prop-price {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.prop-price-sqm {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.prop-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prop-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Siatka metadanych nieruchomości (Data Matrix bez kratek) */
.prop-meta-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 14px;
    margin-top: auto;
    background-color: var(--bg-page);
    border-radius: var(--radius-lg);
    padding: 10px 12px;
}

.prop-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-body);
}

.prop-meta-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ==========================================================================
   WYSZUKIWARKA & WIDOK PODZIELONY Z MAPĄ (SPLIT VIEW)
   ========================================================================== */
.split-view-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: calc(100vh - 68px);
    overflow: hidden;
}

@media (max-width: 1024px) {
    .split-view-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
}

.split-list-pane {
    overflow-y: auto;
    padding: 12px;
    background-color: var(--bg-page);
}

.split-map-pane {
    position: sticky;
    top: 0px;
    height: calc(100vh);
    background-color: #e2e8f0;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, #f1f5f9 0%, #cbd5e1 100%);
    position: relative;
}

/* ==========================================================================
   MODALE (ALPINE.JS - BEZRAMKOWY ELEVATED DESIGN)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background-color: var(--bg-surface);
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-2xl);
    padding: 32px;
    box-shadow: var(--shadow-modal);
    transform: scale(0.95) translateY(10px);
    transition: var(--transition-smooth);
}

.modal-overlay.open .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-full);
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    background-color: var(--bg-subtle);
    color: var(--text-main);
}

/* ==========================================================================
   STATUS PILLS & ETYKIETY SYSTEMOWE
   ========================================================================== */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
}

.pill-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.pill-warning {
    background-color: var(--color-warning-bg);
    color: #b45309;
}

.pill-danger {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

.pill-info {
    background-color: var(--color-info-bg);
    color: var(--color-info);
}

.pill-muted {
    background-color: var(--bg-subtle);
    color: var(--text-muted);
}

/* ==========================================================================
   STOPKA (FOOTER - MINIMALISTYCZNA)
   ========================================================================== */
.footer {
    margin-top: auto;
    background-color: var(--bg-surface);
    padding: 60px 0 32px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-col h4 {
    margin-bottom: 18px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ATOMIC LAYOUT & UTILITY CLASSES (ELIMINATES INLINE STYLE)
   ========================================================================== */
/* Display & Flexbox */
.d-flex,
.flex {
    display: flex;
}

.d-inline-flex,
.inline-flex {
    display: inline-flex;
}

.d-grid,
.grid {
    display: grid;
}

.d-block {
    display: block;
}

.d-none {
    display: none;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-grow {
    flex-grow: 1;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.items-stretch {
    align-items: stretch;
}

.justify-center {
    justify-content: center;
}

.justify-between,
.flex-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gaps */
.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-5 {
    gap: 20px;
}

.gap-6 {
    gap: 24px;
}

.gap-8 {
    gap: 32px;
}

/* Grid Columns */
.grid-1 {
    grid-template-columns: 1fr;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.grid-auto-fill-cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-sidebar-layout {
    grid-template-columns: 280px 1fr;
}

.grid-detail-layout {
    grid-template-columns: 1fr 380px;
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-sidebar-layout {
        grid-template-columns: 1fr;
    }

    .grid-detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Spacing Helpers */
.m-0 {
    margin: 0;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.my-2 {
    margin-top: 8px;
    margin-bottom: 8px;
}

.my-4 {
    margin-top: 16px;
    margin-bottom: 16px;
}

.my-6 {
    margin-top: 24px;
    margin-bottom: 24px;
}

.my-8 {
    margin-top: 32px;
    margin-bottom: 32px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-0 {
    padding: 0;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.p-8 {
    padding: 32px;
}

.px-2 {
    padding-left: 8px;
    padding-right: 8px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.px-6 {
    padding-left: 24px;
    padding-right: 24px;
}

.px-8 {
    padding-left: 32px;
    padding-right: 32px;
}

.py-2 {
    padding-top: 8px;
    padding-bottom: 8px;
}

.py-4 {
    padding-top: 16px;
    padding-bottom: 16px;
}

.py-6 {
    padding-top: 24px;
    padding-bottom: 24px;
}

.py-8 {
    padding-top: 32px;
    padding-bottom: 32px;
}

.py-12 {
    padding-top: 48px;
    padding-bottom: 48px;
}

.py-16 {
    padding-top: 64px;
    padding-bottom: 64px;
}

/* Width & Height */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.h-full {
    height: 100%;
}

.max-w-xs {
    max-width: 320px;
}

.max-w-sm {
    max-width: 420px;
}

.max-w-md {
    max-width: 480px;
}

.max-w-lg {
    max-width: 640px;
}

.max-w-xl {
    max-width: 768px;
}

.max-w-2xl {
    max-width: 860px;
}

.max-w-4xl {
    max-width: 1024px;
}

.max-w-6xl {
    max-width: 1200px;
}

/* Typography Helpers */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.85rem;
}

.text-base {
    font-size: 0.95rem;
}

.text-lg {
    font-size: 1.15rem;
}

.text-xl {
    font-size: 1.35rem;
}

.text-2xl {
    font-size: 1.75rem;
}

.text-3xl {
    font-size: 2.25rem;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.text-main {
    color: var(--text-main);
}

.text-muted {
    color: var(--text-muted);
}

.text-subtle {
    color: var(--text-subtle);
}

.text-accent {
    color: var(--color-accent);
}

.text-danger {
    color: var(--color-danger);
}

.text-success {
    color: var(--color-success);
}

.text-white {
    color: var(--text-white);
}

/* Containers & Cards */
.card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-2xl);
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.card-compact {
    background-color: var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-subtle);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--bg-subtle);
}

/* ==========================================================================
   PANEL ADMINISTRATORA (ADMIN DASHBOARD, MODERATION, REPORTS)
   ========================================================================== */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 64px 24px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    background-color: var(--bg-surface);
    padding: 8px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-subtle);
    overflow-x: auto;
}

.admin-nav-tab {
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.admin-nav-tab:hover {
    color: var(--text-main);
    background-color: var(--bg-subtle);
}

.admin-nav-tab.active {
    color: var(--text-white);
    background-color: var(--color-primary);
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.stat-val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin-top: 4px;
}

.stat-lbl {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-primary {
    background-color: rgba(15, 23, 42, 0.08);
    color: var(--color-primary);
}

.stat-icon-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.stat-icon-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.stat-icon-danger {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

.stat-icon-info {
    background-color: var(--color-info-bg);
    color: var(--color-info);
}

/* Tabele w Adminie & Panelu Użytkownika */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-surface);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th {
    padding: 16px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background-color: var(--bg-subtle);
    border-bottom: 2px solid var(--bg-page);
}

.admin-table td {
    padding: 18px 20px;
    color: var(--text-body);
    border-bottom: 1px solid var(--bg-subtle);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: #fafbfc;
}

/* Form Sections */
.form-section {
    background-color: var(--bg-surface);
    padding: 32px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    margin-bottom: 28px;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
}

/* Autocomplete TERYT Popup & Dropdowns */
.teryt-autocomplete-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    z-index: 50;
    margin-top: 4px;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

.teryt-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-subtle);
    transition: var(--transition-smooth);
}

.teryt-autocomplete-item:hover {
    background-color: var(--bg-subtle);
}

.user-dropdown-popup {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    padding: 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    z-index: 50;
    margin-top: 8px;
}

/* Map Containers */
.interactive-map-frame {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 6px;
}

.search-map-frame {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   PROPERTY DETAIL PAGE
   ========================================================================== */
.detail-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 24px 64px 24px;
}

.detail-header-breadcrumb {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.detail-header-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-price-box {
    text-align: right;
    white-space: nowrap;
}

.detail-price-main {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.detail-price-sqm {
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

.gallery-container {
    margin-bottom: 36px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.gallery-main-frame {
    width: 100%;
    height: 500px;
    background-color: var(--bg-subtle);
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs-strip {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--bg-surface);
    overflow-x: auto;
}

.gallery-thumb-item {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.gallery-thumb-item:hover {
    opacity: 0.8;
}

.detail-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .detail-layout-grid {
        grid-template-columns: 1fr;
    }
}

.detail-specs-card {
    background-color: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-subtle);
    margin-bottom: 32px;
}

.detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 640px) {
    .detail-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detail-spec-item {
    display: flex;
    flex-direction: column;
}

.detail-spec-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-spec-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
}

.detail-amenities-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-amenity-pill {
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: var(--radius-full);
    background-color: var(--bg-subtle);
    color: var(--text-body);
}

.detail-description-body {
    color: var(--text-body);
    line-height: 1.8;
    white-space: pre-line;
    font-size: 1rem;
}

.detail-map-frame {
    width: 100%;
    height: 280px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.contact-sticky-sidebar {
    position: sticky;
    top: 90px;
}

.contact-box {
    background-color: var(--bg-surface);
    padding: 28px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
}

.agent-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-color: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-main);
    flex-shrink: 0;
}

.agent-name {
    font-weight: 700;
    color: var(--text-main);
}

.agent-sub {
    font-size: 0.825rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ACCOUNT & LISTINGS
   ========================================================================== */

.account-header {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.account-subtabs {
    display: flex;
    gap: 10px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.account-card {
    background-color: var(--bg-surface);
    padding: 32px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
}

.account-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .account-data-grid {
        grid-template-columns: 1fr;
    }
}

.account-data-item {
    display: flex;
    flex-direction: column;
}

.account-data-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.account-data-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.empty-state-card {
    padding: 60px 20px;
    text-align: center;
    background: var(--bg-surface);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-subtle);
}

/* ==========================================================================
   MESSAGES & CHAT
   ========================================================================== */

.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.conversation-card {
    background-color: var(--bg-surface);
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.conversation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.chat-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 32px 20px 80px 20px;
}

.chat-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 24px;
    align-items: start;
}

.chat-layout-single {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
}

.chat-property-sidebar {
    position: sticky;
    top: 90px;
}

.chat-property-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-property-thumb-wrap {
    display: block;
    width: 100%;
    height: 180px;
    background-color: var(--bg-subtle);
    overflow: hidden;
    position: relative;
}

.chat-property-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.chat-property-thumb-wrap:hover .chat-property-thumb {
    transform: scale(1.03);
}

.chat-property-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.chat-property-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.chat-property-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.chat-property-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    text-decoration: none;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-property-title:hover {
    color: var(--color-accent);
}

.chat-property-meta {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.chat-property-divider {
    height: 1px;
    background: var(--bg-subtle);
    margin: 14px 0 12px 0;
}

.chat-interlocutor-row {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chat-interlocutor-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
}

.chat-interlocutor-name {
    font-weight: 600;
    color: var(--text-main);
    margin-top: 2px;
}

.chat-main {
    min-width: 0;
}

.chat-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 580px;
}

.chat-header {
    padding: 14px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chat-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.chat-header-status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--color-success);
    display: inline-block;
}

.chat-header-property {
    font-size: 0.825rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.chat-header-property a {
    color: var(--text-main);
    font-weight: 500;
    text-decoration: underline;
}

.chat-messages-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-page);
}

.chat-bubble-outgoing {
    align-self: flex-end;
    max-width: 75%;
    background: var(--color-primary);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    box-shadow: var(--shadow-subtle);
}

.chat-bubble-incoming {
    align-self: flex-start;
    max-width: 75%;
    background: #ffffff;
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 16px 16px 16px 4px;
    box-shadow: var(--shadow-subtle);
}

.chat-sender-name {
    font-size: 0.75rem;
    margin-bottom: 4px;
    opacity: 0.8;
}

.chat-text {
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-time {
    font-size: 0.7rem;
    text-align: right;
    margin-top: 4px;
    opacity: 0.6;
}

.chat-input-bar {
    padding: 16px 20px;
    background: var(--bg-surface);
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--bg-subtle);
}

@media (max-width: 860px) {
    .chat-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chat-property-sidebar {
        position: static;
    }

    .chat-property-card {
        flex-direction: row;
        align-items: stretch;
    }

    .chat-property-thumb-wrap {
        width: 120px;
        height: auto;
        min-height: 95px;
        flex-shrink: 0;
    }

    .chat-property-info {
        padding: 12px 14px;
        flex-grow: 1;
        min-width: 0;
        justify-content: center;
    }

    .chat-property-price {
        font-size: 1.05rem;
        margin-bottom: 2px;
    }

    .chat-property-title {
        font-size: 0.875rem;
        margin-bottom: 4px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .chat-property-divider,
    .chat-interlocutor-row,
    .chat-property-info .btn {
        display: none;
    }

    .chat-header-property {
        display: none;
    }

    .chat-card {
        height: 500px;
    }
}

/* ==========================================================================
   GENERIC UTILITY HELPERS
   ========================================================================== */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.bottom-0 {
    bottom: 0;
}

.pill-accent {
    background-color: var(--color-accent);
    color: var(--text-white);
}

.cursor-pointer {
    cursor: pointer;
}

.rounded-full {
    border-radius: var(--radius-full);
}

.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-2xl {
    border-radius: var(--radius-2xl);
}

.overflow-hidden {
    overflow: hidden;
}

.btn-reset {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
}

.w-36 {
    width: 36px;
}

.h-36 {
    height: 36px;
}

.w-44 {
    width: 44px;
}

.h-44 {
    height: 44px;
}

.w-48 {
    width: 48px;
}

.h-48 {
    height: 48px;
}

.w-80 {
    width: 80px;
}

.h-60 {
    height: 60px;
}

.w-200 {
    width: 200px;
}

.w-220 {
    width: 220px;
}

.max-w-400 {
    max-width: 400px;
}

.min-h-500 {
    min-height: 500px;
}

.h-500 {
    height: 500px;
}

.h-280 {
    height: 280px;
}

.h-550 {
    height: 550px;
}

.z-50 {
    z-index: 50;
}

/* ==========================================================================
   Map Frames, Markers & Popups
   ========================================================================== */
.split-map-pane {
    position: sticky;
    top: 0px;
    height: calc(100vh);
    border-radius: 0;
    overflow: hidden;
    background-color: var(--bg-subtle);
}

.search-map-frame {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.detail-map-frame {
    width: 100%;
    height: 350px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background-color: var(--bg-subtle);
}

.picker-map-frame {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background-color: var(--bg-subtle);
}

.map-price-marker {
    background-color: var(--color-primary);
    color: var(--text-white);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    user-select: none;
}

.map-price-marker:hover {
    transform: scale(1.08);
    background-color: var(--color-accent);
}

.map-price-marker--promoted {
    background-color: var(--color-accent);
}

.map-price-marker--promoted:hover {
    background-color: var(--color-accent-hover);
}

.map-popup-card {
    padding: 8px;
    text-align: left;
    min-width: 200px;
    max-width: 240px;
}

.map-popup-img {
    height: 110px;
    margin: -8px -8px 8px -8px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.map-popup-price {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.map-popup-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-body);
    margin-bottom: 4px;
    line-height: 1.3;
}

.map-popup-location {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}


/* ==========================================================================
   LIGHTBOX FULLSCREEN PHOTO VIEWER
   ========================================================================== */
.gallery-main-frame {
    position: relative;
    cursor: zoom-in;
}

.gallery-zoom-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-main-frame:hover .gallery-zoom-badge {
    background: rgba(15, 23, 42, 0.9);
    transform: scale(1.04);
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.lightbox-top-bar {
    position: absolute;
    top: 20px;
    left: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100001;
}

.lightbox-counter {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.lightbox-btn-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-btn-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 100001;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-bottom-strip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    overflow-x: auto;
    z-index: 100001;
}

.lightbox-thumb {
    width: 54px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, outline 0.2s ease;
}

.lightbox-thumb:hover {
    opacity: 0.8;
}

.lightbox-thumb.active {
    opacity: 1;
    outline: 2px solid var(--color-accent);
}

@media (max-width: 768px) {
    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .lightbox-bottom-strip {
        bottom: 12px;
    }
}


/* ==========================================================================
   LIGHTBOX FULLSCREEN PHOTO VIEWER
   ========================================================================== */
.gallery-main-frame {
    position: relative;
    cursor: zoom-in;
}

.gallery-zoom-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-main-frame:hover .gallery-zoom-badge {
    background: rgba(15, 23, 42, 0.9);
    transform: scale(1.04);
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.lightbox-top-bar {
    position: absolute;
    top: 20px;
    left: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100001;
}

.lightbox-counter {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.lightbox-btn-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-btn-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 100001;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-bottom-strip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    overflow-x: auto;
    z-index: 100001;
}

.lightbox-thumb {
    width: 54px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, outline 0.2s ease;
}

.lightbox-thumb:hover {
    opacity: 0.8;
}

.lightbox-thumb.active {
    opacity: 1;
    outline: 2px solid var(--color-accent);
}

@media (max-width: 768px) {
    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .lightbox-bottom-strip {
        bottom: 12px;
    }
}