/* Shared public reset, page shell and generic component geometry. */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.public-front {
    margin: 0;
    min-height: 100vh;
    font-family: var(--zf-font);
    color: var(--zf-ink);
    background:
        radial-gradient(circle at 12% -10%, rgba(212,232,138,.34), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(198,160,106,.28), transparent 34%),
        linear-gradient(135deg, var(--zf-ivory-2) 0%, var(--zf-ivory) 46%, var(--zf-sand) 100%);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.public-container { min-height: 100vh; }

.public-section,
.public-card,
.plot-detail,
.price-auth-card {
    width: min(1120px, calc(100% - 32px));
    margin: 90px auto;
    padding: 28px;
    border: 1px solid var(--zf-line);
    border-radius: var(--zf-radius-xl);
    box-shadow: var(--zf-shadow);
}

.public-section h1,
.public-section h2 {
    margin: 0 0 10px;
    color: var(--zf-forest);
    font-family: var(--zf-font-display);
    font-weight: 600;
    letter-spacing: -.04em;
}

.public-section p { color: rgba(23,35,27,.70); }

.public-filter,
.public-auth-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-filter input,
.public-filter select,
.public-auth-form input {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--zf-line);
    border-radius: 16px;
    background: rgba(255,255,255,.70);
    font: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--zf-line);
    border-radius: var(--zf-radius-pill);
    background: rgba(255,250,238,.75);
    color: var(--zf-forest);
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.btn.primary {
    border-color: var(--zf-forest);
    background: var(--zf-forest);
    color: #fff9ec;
}

.catalog-grid,
.territory-grid,
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.plot-card,
.territory-card,
.service-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--zf-line);
    border-radius: var(--zf-radius-lg);
    background: rgba(255,255,255,.56);
    text-decoration: none;
}

.status-badge {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: var(--zf-radius-pill);
    background: rgba(101,122,73,.14);
    color: var(--zf-forest);
    font-size: 12px;
    font-weight: 850;
}

.map-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.map-status-available { color: #15803d; border-color: #bbf7d0; background: #ecfdf3; }
.map-status-sold { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.map-status-reserved { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.map-status-other { color: #7e22ce; border-color: #e9d5ff; background: #faf5ff; }

.public-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 60px auto 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(23,35,27,.65);
}

.public-footer a {
    color: inherit;
    text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

@media (max-width: 980px) {
    .public-footer { flex-direction: column; }
}
