:root {
    --background: #ffffff;
    --foreground: #111827;
    --muted: #f4f6f8;
    --muted-strong: #e5e7eb;
    --muted-text: #64748b;
    --border: #dbe2ea;
    --card: #ffffff;
    --brand-red: #e11d48;
    --brand-blue: #2563eb;
    --brand-green: #16a34a;
    --brand-ink: #172033;
    --warning: #b45309;
    --radius: 8px;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

svg,
.lucide-icon-img {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
}

.sameline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--foreground);
    padding: 0.7rem 0.85rem;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.container {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(1rem, 3vw, 2.5rem);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.brand,
.sidebar-header {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    color: var(--brand-red);
}

.brand strong,
.sidebar-header strong,
.footer-brand strong {
    color: var(--brand-ink);
}

.brand-icon,
.auth-logo {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    object-fit: cover;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted-text);
    font-size: 0.94rem;
    font-weight: 600;
}

.main-nav a:hover {
    color: var(--brand-blue);
}

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    background: #fff;
    color: var(--foreground);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-sm {
    min-height: 32px;
    padding: 0.42rem 0.7rem;
    font-size: 0.85rem;
}

.btn-brand {
    background: var(--brand-blue);
    color: #fff;
}

.btn-brand-green {
    background: var(--brand-green);
    color: #fff;
}

.btn-brand-whatsapp {
    background: #25d366;
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--brand-ink);
}

.btn-outline {
    border-color: var(--border);
    color: var(--brand-ink);
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn:hover {
    filter: brightness(0.98);
}

.icon-button,
.icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-ink);
    cursor: pointer;
}

.icon-button.is-active {
    color: var(--brand-red);
    border-color: rgba(225, 29, 72, 0.35);
    background: #fff1f2;
}

.brand-icon-img {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
}

.btn-brand .lucide-icon-img,
.btn-brand-blue .lucide-icon-img,
.btn-brand-green .lucide-icon-img,
.btn-brand-red .lucide-icon-img,
.btn-brand-whatsapp .lucide-icon-img,
.share-icon .lucide-icon-img,
.btn .brand-icon-img,
.share-icon .brand-icon-img {
    filter: brightness(0) invert(1);
}

.detail-chip.is-active .lucide-icon-img,
.favorite-icon-button.is-active .lucide-icon-img,
.listing-fav-btn.is-active .lucide-icon-img,
.icon-button.is-active .lucide-icon-img {
    filter: invert(18%) sepia(92%) saturate(3604%) hue-rotate(335deg) brightness(95%) contrast(87%);
}

.hero-search .lucide-icon-img,
.listing-placeholder .lucide-icon-img,
.detail-placeholder .lucide-icon-img,
.stat-card .lucide-icon-img,
.agent-listings-link .lucide-icon-img,
.bottom-nav .lucide-icon-img {
    filter: invert(35%) sepia(92%) saturate(1913%) hue-rotate(213deg) brightness(94%) contrast(96%);
}

.input-with-icon > .lucide-icon-img,
.input-icon,
.section-title .lucide-icon-img,
.agent-profile-meta .lucide-icon-img {
    filter: invert(45%) sepia(14%) saturate(746%) hue-rotate(176deg) brightness(92%) contrast(86%);
}

.hero-band {
    min-height: 470px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.84), rgba(37, 99, 235, 0.58)),
        url("/favicon.png") center right 8% / min(44vw, 420px) no-repeat,
        #162033;
    color: #fff;
}

.hero-content {
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding: 4rem 0;
}

.hero-content h1,
.page-head h1 {
    font-size: clamp(2rem, 6vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero-content p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.1rem;
}

.eyebrow {
    margin-bottom: 0.35rem;
    color: var(--brand-blue);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-band .eyebrow {
    color: #bfdbfe;
}

.hero-search {
    max-width: 760px;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    margin: 1.75rem 0 1rem;
    padding: 0.4rem;
    border-radius: var(--radius);
    background: #fff;
    color: var(--foreground);
}

.hero-search svg,
.hero-search .lucide-icon-img {
    margin-left: 0.75rem;
    color: var(--brand-blue);
}

.hero-search input {
    border: 0;
    box-shadow: none;
}

.hero-actions,
.detail-price-row,
.contact-actions,
.form-actions,
.actions-cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2,
.admin-card h2,
.detail-sidebar h2 {
    margin-bottom: 0;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--brand-blue);
    font-weight: 800;
}

.horizontal-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
}

.horizontal-scroll > * {
    min-width: 280px;
    max-width: 320px;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 1rem;
}

.listing-card,
.card,
.admin-card,
.stat-card,
.auth-card,
.magazine-promo,
.pdf-shell {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.listing-card {
    position: relative;
    overflow: hidden;
    transition: none;
}

.listing-card:hover .listing-image {
    transform: none;
}

.listing-card-link {
    display: block;
}

.listing-image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--muted);
}

.listing-image,
.detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-placeholder,
.detail-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #eff6ff, #fff1f2);
    color: var(--brand-ink);
    text-align: center;
    font-weight: 800;
}

.listing-placeholder svg,
.detail-placeholder svg,
.listing-placeholder .lucide-icon-img,
.detail-placeholder .lucide-icon-img {
    width: 42px;
    height: 42px;
    color: var(--brand-blue);
}

.listing-badges {
    position: absolute;
    left: 0.65rem;
    bottom: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.listing-badges span {
    padding: 0.18rem 0.45rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand-ink);
    font-size: 0.72rem;
    font-weight: 800;
}

.listing-content {
    padding: 1rem;
}

.listing-content h3 {
    min-height: 3rem;
    margin-bottom: 0.55rem;
    font-size: 1rem;
}

.listing-kicker,
.muted,
.help,
.small {
    color: var(--muted-text);
}

.listing-kicker {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.price {
    display: block;
    color: var(--brand-blue);
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.favorite-form {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
    align-items: start;
}

.magazine-promo {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #111827;
    color: #fff;
}

.magazine-promo svg,
.magazine-promo .lucide-icon-img {
    width: 40px;
    height: 40px;
    color: #bfdbfe;
    filter: brightness(0) invert(1);
}

.page-head {
    padding: 2.25rem 0 1rem;
}

.page-head p {
    max-width: 680px;
    color: var(--muted-text);
}

.filter-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: end;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
}

label {
    display: grid;
    gap: 0.38rem;
    color: var(--brand-ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a,
.pagination .gap {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination a {
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pagination a.active {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
}

.pagination .gap {
    color: var(--muted-text);
    font-weight: 700;
}

.pagination-helper {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-ink);
}

.pagination-helper:hover {
    background: var(--muted);
}

.pagination-helper--disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1.5rem;
    padding-top: 1.25rem;
}

.breadcrumb {
    color: var(--muted-text);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.detail-gallery {
    position: relative;
    min-height: 300px;
    height: min(52vh, 540px);
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--muted);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.gallery-nav.left {
    left: 1rem;
}

.gallery-nav.right {
    right: 1rem;
}

.gallery-counter {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.detail-price-row {
    justify-content: space-between;
    margin: 1.2rem 0 0.75rem;
}

.detail-price-row strong {
    color: var(--brand-blue);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.location-line {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.tabs-list {
    display: flex;
    gap: 0.3rem;
    margin-top: 1.5rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--muted);
}

.tab-trigger {
    flex: 1;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted-text);
    font-weight: 800;
    cursor: pointer;
}

.tab-trigger.active {
    background: #fff;
    color: var(--brand-ink);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.tab-panel {
    padding: 1rem 0;
}

.muted-map {
    min-height: 220px;
    place-items: center;
    border-radius: var(--radius);
    background: var(--muted);
    text-align: center;
}

.muted-map:not([hidden]) {
    display: grid;
}

.detail-sidebar {
    display: grid;
    gap: 1rem;
    align-content: start;
    position: sticky;
    top: 84px;
}

.padded {
    padding: 1rem;
}

.property-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.property-table tr {
    border-bottom: 1px solid var(--border);
}

.property-table tr:last-child {
    border-bottom: 0;
}

.property-table td {
    padding: 0.7rem 0;
}

.property-table td:first-child {
    color: var(--brand-ink);
    font-weight: 800;
}

.property-table td:last-child {
    color: var(--muted-text);
    text-align: right;
}

.agent-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.agent-card img,
.agent-avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
}

.agent-avatar {
    display: grid;
    place-items: center;
    background: var(--muted);
    color: var(--brand-blue);
}

.contact-actions {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pdf-shell {
    overflow: hidden;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.pdf-shell iframe {
    width: 100%;
    height: min(78vh, 900px);
    border: 0;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    color: var(--muted-text);
    text-align: center;
}

.footer-island {
    width: min(1400px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 2rem;
    margin: 3rem auto 5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.footer-island a {
    display: block;
    color: var(--muted-text);
    margin-top: 0.4rem;
}

.footer-brand {
    color: var(--brand-red);
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.bottom-nav {
    display: none;
}

.flash-stack {
    position: fixed;
    top: 78px;
    right: 1rem;
    z-index: 90;
    display: grid;
    gap: 0.5rem;
    width: min(360px, calc(100% - 32px));
}

.flash-stack.in-flow {
    position: static;
    width: 100%;
    margin-bottom: 1rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow);
    font-weight: 700;
}

.flash-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.flash-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

.auth-card {
    width: min(430px, 100%);
    display: grid;
    gap: 1rem;
    padding: 2rem;
}

.auth-logo {
    width: 56px;
    height: 56px;
}

.login-card {
    gap: 1.5rem;
    padding: 2.5rem 2rem;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.login-head {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    text-align: center;
}

.login-head .auth-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 0.35rem;
}

.login-head h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--brand-ink);
}

.login-head .muted {
    margin: 0;
    font-size: 0.9rem;
}

.login-form label {
    gap: 0.45rem;
    font-size: 0.85rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon > svg,
.input-with-icon > i,
.input-with-icon > .lucide-icon-img {
    position: absolute;
    left: 0.85rem;
    color: var(--muted-text);
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 2.5rem;
    height: 2.75rem;
}

.login-submit {
    min-height: 2.85rem;
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

.stack-form {
    display: grid;
    gap: 0.85rem;
}

.full-width {
    width: 100%;
}

.admin-body {
    overflow: hidden;
    background: #f8fafc;
}

.admin-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 270px;
    flex: 0 0 270px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: #fff;
}

.sidebar-header {
    min-height: 64px;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem;
    overflow-y: auto;
}

.nav-label {
    margin: 1rem 0 0.35rem;
    color: var(--muted-text);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    color: var(--muted-text);
    font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
    background: var(--brand-ink);
    color: #fff;
}

.nav-item.danger {
    color: var(--brand-red);
}

.nav-item.danger:hover {
    background: #fff1f2;
    color: var(--brand-red);
}

.nav-spacer {
    flex: 1;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.topbar h1 {
    font-size: 1.35rem;
    margin-bottom: 0;
}

.admin-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-ink);
    font-weight: 800;
}

.admin-content {
    flex: 1;
    overflow: auto;
    padding: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    position: relative;
    padding: 1.25rem;
}

.stat-card span {
    color: var(--muted-text);
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 2rem;
}

.stat-card svg,
.stat-card .lucide-icon-img {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    color: var(--brand-blue);
}

.admin-card {
    padding: 1rem;
}

.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted-text);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 900;
}

.status.on {
    background: #dcfce7;
    color: #166534;
}

.status.off {
    background: #fef3c7;
    color: var(--warning);
}

.actions-cell form {
    display: inline;
}

.single-magazine-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.single-magazine-icon {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: 1rem;
    background: #fee2e2;
    color: var(--brand-red);
}

.single-magazine-body h3 {
    margin: 0.5rem 0 0.25rem;
}

.single-magazine-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-grid.narrow {
    max-width: 860px;
}

.full {
    grid-column: 1 / -1;
}

.checkline {
    display: flex;
    grid-template-columns: none;
    flex-direction: row;
    align-items: center;
}

.checkline input {
    width: auto;
}

.help {
    font-size: 0.82rem;
    font-weight: 500;
}

.media-list {
    display: grid;
    gap: 0.75rem;
}

.rte-field {
    display: grid;
    gap: 0.45rem;
}

.rte-label {
    color: var(--brand-ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.rte-editor {
    min-height: 220px;
    border-radius: var(--radius);
    background: #fff;
    font-size: 0.95rem;
    line-height: 1.55;
}

.rte-field .ql-toolbar.ql-snow,
.rte-field .ql-container.ql-snow {
    border-color: var(--border);
}

.rte-field .ql-toolbar.ql-snow {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    background: var(--muted);
}

.rte-field .ql-container.ql-snow {
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    min-height: 220px;
}

.rte-field .ql-editor {
    min-height: 220px;
    font-family: inherit;
}

.rich-text {
    color: var(--brand-ink);
    line-height: 1.6;
}

.rich-text p {
    margin: 0 0 0.85rem;
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
    margin: 1.25rem 0 0.5rem;
    color: var(--brand-ink);
    line-height: 1.3;
}

.rich-text h2 { font-size: 1.25rem; }
.rich-text h3 { font-size: 1.1rem; }
.rich-text h4 { font-size: 1rem; }

.rich-text ul,
.rich-text ol {
    margin: 0 0 0.85rem;
    padding-left: 1.25rem;
}

.rich-text li {
    margin-bottom: 0.25rem;
}

.rich-text blockquote {
    margin: 0 0 0.85rem;
    padding: 0.6rem 0.9rem;
    border-left: 3px solid var(--brand-blue);
    background: var(--muted);
    color: var(--brand-ink);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.rich-text a {
    color: var(--brand-blue);
    text-decoration: underline;
}

.detail-map-frame {
    width: 100%;
    height: 320px;
    border: 0;
    border-radius: var(--radius);
}

.detail-chip.is-active {
    color: var(--brand-red);
    border-color: rgba(225, 29, 72, 0.35);
    background: #fff1f2;
}

.detail-chip.is-active svg {
    fill: currentColor;
}

.detail-gallery-trigger {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    display: block;
}

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

.agent-card h2 {
    margin: 0;
    font-size: 1.1rem;
}

.agent-avatar-link {
    display: inline-flex;
    flex-shrink: 0;
}

.agent-avatar-link img,
.agent-avatar-link .agent-avatar {
    transition: transform 0.15s ease;
}

.agent-avatar-link:hover img,
.agent-avatar-link:hover .agent-avatar {
    transform: scale(1.05);
}

.agent-name-link {
    color: var(--brand-ink);
}

.agent-name-link:hover {
    color: var(--brand-blue);
}

.agent-listings-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    color: var(--brand-blue);
    font-size: 0.85rem;
    font-weight: 800;
}

.agent-listings-link svg,
.agent-listings-link .lucide-icon-img {
    width: 14px;
    height: 14px;
}

.agent-profile-head {
    padding: 2rem 0 1rem;
}

.agent-profile-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.agent-profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
}

.agent-profile-info h1 {
    margin: 0.1rem 0 0.25rem;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.agent-profile-info .muted {
    margin: 0 0 0.6rem;
}

.agent-profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 1rem;
    color: var(--muted-text);
    font-size: 0.9rem;
}

.agent-profile-meta svg,
.agent-profile-meta .lucide-icon-img {
    width: 16px;
    height: 16px;
}

.agent-profile-divider {
    color: var(--border);
}

.agent-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .agent-profile-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* Share modal */
.share-modal {
    width: min(440px, calc(100% - 2rem));
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--foreground);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.share-modal::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.share-modal[open] {
    animation: filter-modal-pop 0.16s ease-out;
}

.share-modal-inner {
    padding: 1rem 1.25rem 1.5rem;
}

.share-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.share-modal-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 1.05rem;
    color: var(--brand-ink);
}

.share-modal-close {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-ink);
    cursor: pointer;
}

.share-modal-close:hover {
    background: var(--muted);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.9rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--brand-ink);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.share-option:hover {
    background: var(--muted);
}

.share-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
}

.share-icon .brand-icon-img {
    width: 18px;
    height: 18px;
}

.share-whatsapp { background: #25d366; }
.share-telegram { background: #229ed9; }
.share-x        { background: #0f172a; }
.share-facebook { background: #1877f2; }
.share-mail     { background: var(--brand-red); }
.share-copy     { background: var(--brand-blue); }

@media (max-width: 480px) {
    .share-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lightbox */
.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.94);
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.94);
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
    top: 1.25rem;
    right: 1.25rem;
}

.lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
}

@media (max-width: 640px) {
    .lightbox-close { top: 0.75rem; right: 0.75rem; }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}

.media-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.media-row img {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

.media-row.video-row {
    grid-template-columns: 160px 1fr auto;
}

.media-row video {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    background: #000;
}

.detail-videos {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.detail-video {
    width: 100%;
    max-height: 480px;
    border-radius: var(--radius);
    background: #000;
}

.mobile-toggle {
    display: none;
}

@media (max-width: 980px) {
    .main-nav {
        display: none;
    }

    .hero-band {
        min-height: 430px;
        background:
            linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(37, 99, 235, 0.58)),
            #162033;
    }

    .hero-search {
        grid-template-columns: 24px 1fr;
    }

    .hero-search .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .two-column,
    .detail-layout,
    .footer-island {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        transform: translateX(-100%);
        transition: transform 0.2s;
        box-shadow: var(--shadow);
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 66px;
    }

    .container {
        width: min(100% - 24px, 1400px);
    }

    .hero-content {
        width: min(100% - 24px, 900px);
    }

    .hero-actions,
    .detail-price-row,
    .contact-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .filter-panel,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .tabs-list {
        border-radius: var(--radius);
        flex-direction: column;
    }

    .tab-trigger {
        width: 100%;
        border-radius: 6px;
    }

    .pdf-toolbar,
    .admin-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .single-magazine-card {
        grid-template-columns: 1fr;
    }

    .single-magazine-actions {
        justify-content: stretch;
    }

    .bottom-nav {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        border-top: 1px solid var(--border);
        background: #fff;
    }

    .bottom-nav a {
        min-height: 62px;
        display: grid;
        place-items: center;
        gap: 0.15rem;
        color: var(--muted-text);
        font-size: 0.72rem;
        font-weight: 800;
    }

    .bottom-nav svg,
    .bottom-nav .lucide-icon-img {
        width: 20px;
        height: 20px;
        color: var(--brand-blue);
    }

    .footer-island {
        margin-bottom: 5.5rem;
    }
}

/* Public prototype alignment */
.header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 2.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.header-logo {
    display: inline-flex;
    align-items: center;
    color: var(--brand-red);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.header-logo span {
    color: var(--brand-ink);
    margin-left: 0.25rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.desktop-link {
    color: var(--muted-text);
    font-size: 0.85rem;
    font-weight: 800;
}

.desktop-link:hover {
    color: var(--brand-blue);
}

.btn-icon {
    width: 2.5rem;
    min-height: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
}

.btn-ghost {
    border-color: transparent;
    background: transparent;
}

.btn-brand-red {
    background: var(--brand-red);
    color: #fff;
}

.btn-brand-blue {
    background: var(--brand-blue);
    color: #fff;
}

.header-pill {
    height: 2rem;
    min-height: 2rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.header-menu {
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
}

.home-shell {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.magazine-read-button {
    width: 100%;
    min-height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-size: 1.1rem;
    font-weight: 900;
}

.magazine-read-button svg,
.magazine-read-button .lucide-icon-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.home-search {
    max-width: 800px;
    margin: 0 auto;
}

.input {
    height: 3rem;
    border-radius: 999px;
    padding: 0 3.2rem 0 2.65rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--muted-text);
    pointer-events: none;
    z-index: 1;
}

.input-action {
    position: absolute;
    right: 0.25rem;
    top: 0.25rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    margin: 1.5rem 0 1rem;
    color: var(--brand-ink);
    font-size: 1.125rem;
    font-weight: 900;
}

.section-title svg,
.section-title .lucide-icon-img {
    color: var(--muted-text);
}

.featured-showcase {
    height: clamp(420px, 44vw, 520px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 0 1rem;
    margin-bottom: 2rem;
}

.featured-showcase.has-pages {
    grid-template-areas:
        "stage thumbs"
        "dots thumbs";
    grid-template-rows: 1fr 54px;
}

.featured-showcase.is-single {
    grid-template-areas: "stage thumbs";
    grid-template-rows: 1fr;
}

.featured-stage {
    grid-area: stage;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    background: #111827;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.featured-stage.is-dragging {
    cursor: grabbing;
}

.featured-showcase.is-single .featured-stage {
    border-radius: var(--radius);
}

.featured-slide,
.featured-slide-link {
    height: 100%;
}

.featured-slide[hidden] {
    display: none;
}

.featured-slide-link {
    position: relative;
    display: block;
    overflow: hidden;
    color: #fff;
}

.featured-slide-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.40)),
        linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
}

.featured-slide-image,
.featured-slide-placeholder {
    width: 100%;
    height: 100%;
}

.featured-slide-image {
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.featured-slide-placeholder {
    display: grid;
    place-items: center;
    gap: 0.65rem;
    background: linear-gradient(135deg, #eff6ff, #fff1f2);
    color: var(--brand-ink);
    text-align: center;
    font-weight: 900;
}

.featured-slide-placeholder .lucide-icon-img {
    width: 46px;
    height: 46px;
}

.featured-slide-content {
    position: absolute;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1.25rem, 3vw, 2rem);
    left: clamp(1rem, 3vw, 2rem);
    z-index: 1;
    max-width: 760px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

.featured-slide-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.55rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 700;
}

.featured-slide-meta span + span::before {
    content: "-";
    margin-right: 0.5rem;
    color: rgba(255, 255, 255, 0.62);
}

.featured-slide-content h2 {
    max-width: 720px;
    margin: 0 0 0.35rem;
    font-size: 1.9rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.featured-slide-price {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.25;
    font-weight: 900;
}

.featured-thumbs {
    grid-area: thumbs;
    position: relative;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.featured-thumb {
    width: 100%;
    min-height: 108px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--brand-ink);
    padding: 0.9rem 1rem;
    text-align: left;
    cursor: pointer;
}

.featured-thumbs::-webkit-scrollbar {
    display: none;
}


.featured-thumb:last-child {
    border-bottom: 0;
}

.featured-thumb.is-active {
    background: #fff;
    box-shadow: inset 4px 0 0 var(--brand-red);
}

.featured-thumb img,
.featured-thumb-placeholder {
    width: 92px;
    height: 68px;
    border-radius: 6px;
    background: var(--muted);
}

.featured-thumb img {
    object-fit: cover;
}

.featured-thumb-placeholder {
    display: grid;
    place-items: center;
    color: var(--brand-blue);
}

.featured-thumb-copy {
    min-width: 0;
    display: grid;
    gap: 0.3rem;
}

.featured-thumb-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--brand-ink);
    font-size: 0.95rem;
    line-height: 1.22;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.featured-thumb-copy span {
    overflow: hidden;
    color: var(--muted-text);
    font-size: 0.75rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-dots {
    grid-area: dots;
    display: grid;
    grid-template-columns: repeat(var(--featured-count), minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #f3f4f6;
}

.featured-dot {
    min-width: 0;
    border: 0;
    border-right: 1px solid var(--border);
    background: transparent;
    color: #2f343b;
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
}

.featured-dot:last-child {
    border-right: 0;
}

.featured-dot.is-active {
    background: #000;
    color: #fff;
}

@media (max-width: 980px) {
    .featured-showcase,
    .featured-showcase.has-pages,
    .featured-showcase.is-single {
        height: auto;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .featured-showcase.has-pages {
        grid-template-areas:
            "stage"
            "dots"
            "thumbs";
        grid-template-rows: auto auto auto;
    }

    .featured-showcase.is-single {
        grid-template-areas:
            "stage"
            "thumbs";
        grid-template-rows: auto auto;
    }

    .featured-stage,
    .featured-showcase.is-single .featured-stage {
        min-height: 320px;
        aspect-ratio: 16 / 10;
        border-radius: var(--radius);
    }

    .featured-dots {
        min-height: 48px;
        border-top: 1px solid var(--border);
        border-radius: var(--radius);
    }

    .featured-thumbs {
        max-height: calc(92px * 3 + 2px);
        overflow-x: hidden;
        overflow-y: scroll;
        scrollbar-width: none;
    }

    .featured-thumbs::-webkit-scrollbar {
        display: none;
    }

    .featured-thumb {
        min-height: 92px;
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .featured-thumb img,
    .featured-thumb-placeholder {
        width: 84px;
        height: 62px;
    }
}

@media (max-width: 640px) {
    .featured-showcase {
        margin-bottom: 1.5rem;
    }

    .featured-stage,
    .featured-showcase.is-single .featured-stage {
        min-height: 260px;
        aspect-ratio: 4 / 3;
    }

    .featured-slide-content h2 {
        font-size: 1.45rem;
        line-height: 1.18;
    }

    .featured-slide-price {
        font-size: 1.05rem;
    }

    .featured-slide-meta {
        font-size: 0.72rem;
    }

    .featured-thumb {
        min-height: 86px;
        grid-template-columns: 74px minmax(0, 1fr);
        padding: 0.75rem;
    }

    .featured-thumb img,
    .featured-thumb-placeholder {
        width: 74px;
        height: 56px;
    }

    .featured-dot {
        min-height: 46px;
        font-size: 0.72rem;
    }

    .featured-thumbs {
        max-height: calc(86px * 3 + 2px);
    }
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.horizontal-scroll {
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll > .listing-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
}

.listing-card.card {
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: none;
    transition: none;
}

.listing-card.card:hover {
    box-shadow: none;
    transform: none;
}

.listing-card:hover .listing-img,
.listing-card:hover .listing-image {
    transform: none;
}

.listing-card-link {
    height: 100%;
}

.listing-img-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--muted);
}

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

.listing-fav-btn-form {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.listing-fav-btn {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(4px);
    color: var(--brand-ink);
}

.listing-fav-btn.is-active {
    color: var(--brand-red);
}

.listing-fav-btn.is-active svg {
    fill: currentColor;
}

.icon-button.is-active svg {
    fill: currentColor;
}

.listing-badges {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 900;
}

.listing-content {
    padding: 1rem;
}

.listing-title {
    margin-bottom: 0.25rem;
    color: var(--muted-text);
    font-size: 0.75rem;
    line-height: 1rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-price {
    min-height: 0;
    margin: 0 0 0.25rem;
    color: var(--brand-ink);
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 900;
}

.listing-type,
.listing-location {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.75rem;
    line-height: 1rem;
}

.list-search-header {
    position: sticky;
    top: 4rem;
    z-index: 35;
    display: flex;
    justify-content: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
}

.search-toggle-btn {
    display: none;
}

.advanced-search-wrapper {
    width: min(760px, 100%);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    padding: 0.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.advanced-search-field {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.advanced-search-icon {
    position: absolute;
    left: 1rem;
    color: var(--brand-blue);
}

.advanced-search-input {
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    padding: 0 0.5rem 0 2.5rem;
    box-shadow: none;
}

.btn-search-pink {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: #ffd1dc;
    color: var(--brand-red);
    cursor: pointer;
}

.btn-filter {
    position: relative;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 0.75rem;
    background: #fff;
    color: var(--brand-ink);
    font-size: 0.75rem;
    font-weight: 900;
}

.filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-red);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
}

.list-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    color: var(--muted-text);
    font-size: 0.75rem;
    margin-bottom: 0;
}

.breadcrumb strong,
.breadcrumb a {
    color: var(--brand-ink);
}

.sort-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted-text);
    font-size: 0.8rem;
}

.sort-options a {
    color: var(--brand-blue);
    font-weight: 800;
}

.sort-results-count {
    margin-left: 0.25rem;
}

.sort-dropdown {
    position: relative;
}

.sort-dropdown > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    cursor: pointer;
    color: var(--brand-blue);
    font-weight: 800;
    user-select: none;
    outline: none;
}

.sort-dropdown > summary::-webkit-details-marker {
    display: none;
}

.sort-dropdown > summary::marker {
    display: none;
    content: "";
}

.sort-dropdown-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
}

.sort-dropdown[open] > summary .sort-dropdown-caret {
    transform: rotate(180deg);
}

.sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 50;
    min-width: 200px;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
    animation: sort-dropdown-pop 0.12s ease-out;
}

@keyframes sort-dropdown-pop {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sort-dropdown-menu li {
    margin: 0;
    padding: 0;
}

.sort-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    color: var(--brand-ink);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.sort-dropdown-item:hover {
    background: var(--muted);
    color: var(--brand-ink);
}

.sort-dropdown-item.is-active {
    color: var(--brand-ink);
}

.sort-dropdown-check {
    width: 16px;
    height: 16px;
    color: var(--brand-ink);
    flex-shrink: 0;
}

.compact-filter-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
    background: #fff;
}

.filter-modal {
    width: min(720px, calc(100% - 2rem));
    max-width: 720px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    background: #fff;
    color: var(--foreground);
}

.filter-modal::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.filter-modal[open] {
    animation: filter-modal-pop 0.16s ease-out;
}

@keyframes filter-modal-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.filter-modal-inner {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.filter-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.filter-modal-head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--brand-ink);
}

.filter-modal-close {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-ink);
    cursor: pointer;
}

.filter-modal-close:hover {
    background: var(--muted);
}

.filter-modal-body {
    overflow-y: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    padding: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #fff;
}

@media (max-width: 640px) {
    .filter-modal {
        width: 100%;
        max-width: 100%;
        margin: auto 0 0;
        border-radius: 14px 14px 0 0;
    }

    .filter-modal-inner {
        max-height: 92vh;
    }

    .filter-modal-body {
        grid-template-columns: 1fr;
    }

    .filter-modal-foot {
        flex-direction: column-reverse;
    }

    .filter-modal-foot .btn {
        width: 100%;
    }
}

.compact-filter-panel label span {
    font-size: 0.78rem;
}

.compact-filter-panel input,
.compact-filter-panel select {
    height: 2.45rem;
    padding: 0 0.65rem;
    font-size: 0.85rem;
}

.list-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 4rem;
}

.detail-mini-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 2.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.detail-mini-header .btn-icon {
    color: var(--brand-red);
}

.favorite-icon-button.is-active svg {
    fill: currentColor;
}

.prototype-detail-layout {
    grid-template-columns: minmax(0, 1fr) 410px;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.detail-title {
    padding: 0 0 1rem;
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.45rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.detail-gallery {
    height: 40vh;
    min-height: 250px;
    border-radius: 0;
}

.gallery-nav {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(4px);
}

.detail-price-row {
    justify-content: flex-start;
    padding: 1.5rem 0 0.5rem;
    margin: 0;
}

.detail-price-row strong {
    color: var(--brand-blue);
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 900;
}

.detail-breadcrumb {
    margin-bottom: 1rem;
}

.action-buttons-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.action-buttons-row::-webkit-scrollbar {
    display: none;
}

.detail-chip {
    min-height: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.prototype-detail-layout .card {
    box-shadow: none;
}

.prototype-detail-layout .tabs-list {
    margin-top: 2rem;
}

.prototype-detail-layout .agent-card {
    margin-top: 2rem;
}

.detail-related-listings {
    padding-bottom: 12rem;
}

.detail-related-listings .section-heading {
    align-items: center;
}

.detail-related-listings .list-grid-cards {
    margin-bottom: 0;
}

.sticky-actions {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 55;
    display: flex;
    gap: 0.5rem;
    max-width: 1400px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
    padding: 1rem;
}

.sticky-actions .btn {
    flex: 1;
    min-height: 3rem;
}

.magazine-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #111;
    color: #fff;
}

.magazine-header {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 2.5rem;
    border-bottom: 1px solid #333;
    background: #111;
}

.magazine-header .header-logo,
.magazine-header .header-logo span,
.magazine-header .btn {
    color: #fff;
}

.magazine-issue-label {
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 800;
}

.magazine-container {
    width: min(920px, calc(100% - 2rem));
    margin: 1.5rem auto 2rem;
    overflow: hidden;
    border-color: #333;
    background: #fff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5), inset 2px 0 10px rgba(0, 0, 0, 0.1);
}

.magazine-container .pdf-toolbar {
    color: var(--brand-ink);
}

.magazine-container iframe {
    height: calc(100vh - 11rem);
    min-height: 520px;
}

.magazine-empty {
    width: min(520px, calc(100% - 2rem));
    display: grid;
    place-items: center;
    gap: 1rem;
    margin: auto;
    text-align: center;
}

.magazine-empty svg,
.magazine-empty .lucide-icon-img {
    width: 48px;
    height: 48px;
    color: #fff;
    filter: brightness(0) invert(1);
}

.footer-island {
    display: block;
    border-radius: var(--radius);
    box-shadow: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 1fr 1fr;
    gap: 2rem;
}

.footer-brand {
    color: var(--brand-red);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.footer-brand span {
    color: var(--brand-ink);
}

.footer-contact-pill {
    width: fit-content;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    background: var(--muted);
    color: var(--brand-ink) !important;
    font-weight: 800;
}

.footer-contact-pill svg,
.footer-contact-pill .lucide-icon-img {
    color: var(--brand-red);
    filter: invert(18%) sepia(92%) saturate(3604%) hue-rotate(335deg) brightness(95%) contrast(87%);
}

.footer-link-title {
    margin: 0 0 0.8rem;
    color: var(--brand-ink);
}

.footer-link-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted-text);
    font-size: 0.75rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-social-link {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.footer-social-link .brand-icon-img {
    width: 22px;
    height: 22px;
    filter: none;
}

.footer-social-link:hover {
    background: var(--muted);
}

.legal-hero {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.legal-hero-inner {
    padding: 2.75rem 0 1.75rem;
}

.legal-hero h1 {
    max-width: 900px;
    margin-bottom: 0.8rem;
    color: var(--brand-ink);
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.06;
}

.legal-hero p {
    max-width: 780px;
    color: var(--muted-text);
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    color: var(--brand-ink);
    font-size: 0.88rem;
    font-weight: 800;
}

.legal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legal-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.legal-nav {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.legal-nav h2 {
    margin: 0;
    color: var(--brand-ink);
    font-size: 1rem;
}

.legal-nav-list {
    display: grid;
    gap: 0.35rem;
}

.legal-nav-list a {
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    color: var(--muted-text);
    font-weight: 800;
}

.legal-nav-list a:hover,
.legal-nav-list a.active {
    background: var(--muted);
    color: var(--brand-blue);
}

.legal-document {
    min-width: 0;
    max-width: 940px;
}

.legal-section {
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--border);
}

.legal-section:first-child {
    padding-top: 0;
}

.legal-section h2 {
    margin-bottom: 0.75rem;
    color: var(--brand-ink);
    font-size: 1.28rem;
    line-height: 1.3;
}

.legal-section p,
.legal-section li {
    color: #334155;
}

.legal-section p {
    margin-bottom: 0.85rem;
}

.legal-section ul {
    display: grid;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    padding-left: 1.25rem;
}

.legal-note {
    margin: 0.85rem 0;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--brand-blue);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--muted);
    color: var(--brand-ink);
    font-weight: 700;
}

.legal-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 0.85rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.legal-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.legal-table th,
.legal-table td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--muted);
    color: var(--brand-ink);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.legal-table tr:last-child td {
    border-bottom: 0;
}

@media (min-width: 992px) {
    .bottom-nav {
        max-width: 1400px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}

@media (max-width: 980px) {
    .header,
    .detail-mini-header,
    .magazine-header {
        padding: 0 1rem;
    }

    .desktop-link {
        display: none;
    }

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

    .compact-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .legal-shell {
        grid-template-columns: 1fr;
    }

    .legal-nav {
        position: static;
    }

    .legal-nav-list {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .legal-nav-list a {
        flex: 0 0 auto;
    }
}

@media (max-width: 640px) {
    .header-logo {
        font-size: 0.98rem;
    }

    .header-pill {
        display: none;
    }

    .header .btn,
    .detail-mini-header .btn,
    .magazine-header .btn,
    .listing-fav-btn,
    .btn-search-pink,
    .btn-icon {
        width: 2.5rem;
    }

    .header-menu {
        display: none;
    }

    .home-shell {
        padding-top: 0.75rem;
    }

    .magazine-read-button {
        min-height: 3.25rem;
        font-size: 1rem;
    }

    .advanced-search-wrapper {
        flex-wrap: wrap;
        border-radius: var(--radius);
        padding: 0.35rem;
        gap: 0.35rem;
    }

    .advanced-search-field {
        flex: 1;
        min-width: 0;
    }

    .btn-search-pink {
        flex-shrink: 0;
    }

    .btn-filter {
        flex: 1 1 100%;
        justify-content: center;
        height: 2.75rem;
        border-radius: calc(var(--radius) - 2px);
    }

    .list-search-header {
        display: none;
        padding: 0.5rem 0.75rem;
    }

    .list-search-header.has-open-search {
        display: flex;
        justify-content: center;
    }

    .search-toggle-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        flex-shrink: 0;
        border: 1px solid var(--border);
        border-radius: 50%;
        background: #fff;
        color: var(--brand-blue);
        cursor: pointer;
    }

    .search-toggle-btn.is-active {
        background: var(--brand-blue);
        color: #fff;
        border-color: var(--brand-blue);
    }

    .search-toggle-btn.is-active .lucide-icon-img {
        filter: brightness(0) invert(1);
    }

    .advanced-search-wrapper {
        display: none;
        width: 100%;
    }

    .advanced-search-wrapper.is-open {
        display: flex;
    }

    .list-subheader {
        gap: 0;
        row-gap: 0.35rem;
        padding: 0.65rem 0 0.5rem;
        margin-bottom: 0.75rem;
        align-items: flex-start;
    }

    .list-subheader .breadcrumb {
        flex: 0 0 100%;
    }

    .list-subheader .sort-options {
        flex: 0 0 100%;
        justify-content: space-between;
        font-size: 0.75rem;
    }

    .list-subheader .sort-options > span:first-child {
        display: none;
    }

    .compact-filter-panel {
        grid-template-columns: 1fr;
    }

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

    .listing-content {
        padding: 0.8rem;
    }

    .listing-price {
        font-size: 1rem;
    }

    .detail-gallery {
        height: 34vh;
        min-height: 230px;
    }

    .detail-title {
        font-size: 1rem;
    }

    .sticky-actions {
        right: 0;
        bottom: 0;
        left: 0;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
    }

    .magazine-container {
        width: 100%;
        margin: 0;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .magazine-container iframe {
        min-height: 0;
        height: calc(100vh - 10rem);
    }

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

    .bottom-nav-item {
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        color: var(--muted-text);
        font-size: 0.65rem;
        font-weight: 800;
    }
}
