Secciones de Página real-estateherosearchpropertylistingsform
Estate Hero
Hero inmobiliario con buscador de compra y alquiler (zona, tipo y precio máximo) que abre el listado ya filtrado, cifras de confianza y una propiedad destacada.
Vista Previa en Vivo
Agencia inmobiliaria de barrio
Encuentra tu casa en Valencia
Pisos, áticos y casas seleccionados por agentes que viven en cada barrio. Sin comisiones ocultas.
- viviendas vendidas
- 1.240
- tiempo medio de venta
- 28 días
- valoración de clientes
- 4,9/5
Uso
Copia y pega este código directamente en tu página de Astro:
astro
---
import { EstateHero } from 'astro-component-kit/sections';
---
<EstateHero listingsHref="/propiedades" title="Encuentra tu *casa* en Valencia" /> ---
import { EstateHero } from 'astro-component-kit/sections';
---
<EstateHero listingsHref="/propiedades" title="Encuentra tu *casa* en Valencia" /> Ejemplos en contexto
Código real del kit: cómo se usa esta pieza dentro de plantillas, secciones y otros componentes.
EstateHomePage.astro astro
<EstateHero
listingsHref={routes.listings}
zones={data.zones}
featured={featured}
featuredHref={`${routes.listings}/${featured.slug}`}
stats={data.stats}
/> <EstateHero
listingsHref={routes.listings}
zones={data.zones}
featured={featured}
featuredHref={`${routes.listings}/${featured.slug}`}
stats={data.stats}
/> Se usa en
Plantillas
Instalación Manual
Si no estás usando el paquete npm, crea un archivo nuevo y pega el siguiente código: src/components/lib/EstateHero.astro:
astro
---
/**
* EstateHero — Real estate landing hero with a property search form.
* Buy/rent toggle, zone, type and max price submit as a GET query (?op=&zone=&type=&max=)
* to the listings page, which EstateListingsGrid reads to pre-filter results.
*
* @param {string} title - Headline. Wrap a word in *asterisks* to highlight it.
* @param {string} subtitle - Supporting text.
* @param {string} listingsHref - Form action (listings page).
* @param {EstateZone[]} zones - Zones offered in the zone select.
* @param {EstateProperty} featured - Property shown on the card (split variant).
* @param {string} featuredHref - Link for the featured card.
* @param {Array<{value: string, label: string}>} stats - Trust figures under the form.
* @param {string} variant - 'split' (form + featured card) | 'centered'. Default 'split'.
* @param {string} class - Extra class for the root.
*
* Accessibility: role="search" form with a visible legend for the operation radios and
* labelled selects; the featured card is a single link with a descriptive name.
*/
import type { HTMLAttributes } from 'astro/types';
import '../templates/real-estate/real-estate-theme.css';
import EstatePropertyMedia from './EstatePropertyMedia.astro';
import {
estateZones,
estateProperties,
estateData,
estateTypeLabels,
formatEstatePrice,
type EstateProperty,
type EstateZone,
} from '../templates/real-estate/data';
interface OwnProps {
title?: string;
subtitle?: string;
listingsHref?: string;
zones?: EstateZone[];
featured?: EstateProperty;
featuredHref?: string;
stats?: Array<{ value: string; label: string }>;
variant?: 'split' | 'centered';
}
type Props = OwnProps & Omit<HTMLAttributes<'section'>, keyof OwnProps | 'class'> & { class?: string };
const {
title = 'Encuentra tu *casa* en Valencia',
subtitle = 'Pisos, áticos y casas seleccionados por agentes que viven en cada barrio. Sin comisiones ocultas.',
listingsHref = '/preview/real-estate/propiedades',
zones = estateZones,
featured = estateProperties[0],
featuredHref = `/preview/real-estate/propiedades/${estateProperties[0].slug}`,
stats = estateData.stats,
variant = 'split',
class: classAttr,
...rest
} = Astro.props;
const [before, highlight, after] = title.split('*');
const uid = `eh-${Math.random().toString(36).slice(2, 8)}`;
const priceOptions = [200000, 350000, 500000, 750000, 1000000];
---
<section class:list={['estate-ui', 'estate-hero', `estate-hero--${variant}`, classAttr]} aria-labelledby={`${uid}-title`} {...rest}>
<div class="estate-hero__inner">
<div class="estate-hero__copy">
<p class="estate-hero__eyebrow">Agencia inmobiliaria de barrio</p>
<h1 id={`${uid}-title`} class="estate-hero__title">
{before}{highlight && <em>{highlight}</em>}{after}
</h1>
<p class="estate-hero__subtitle">{subtitle}</p>
<form class="estate-search" role="search" action={listingsHref} method="get" aria-label="Buscar propiedades">
<fieldset class="estate-search__ops">
<legend class="estate-sr">Operación</legend>
<label class="estate-search__op">
<input type="radio" name="op" value="sale" checked />
<span>Comprar</span>
</label>
<label class="estate-search__op">
<input type="radio" name="op" value="rent" />
<span>Alquilar</span>
</label>
</fieldset>
<div class="estate-search__fields">
<div class="estate-search__field">
<label for={`${uid}-zone`}>Zona</label>
<select id={`${uid}-zone`} name="zone">
<option value="">Toda Valencia</option>
{zones.map((z) => <option value={z.name}>{z.name}</option>)}
</select>
</div>
<div class="estate-search__field">
<label for={`${uid}-type`}>Tipo</label>
<select id={`${uid}-type`} name="type">
<option value="">Cualquiera</option>
{Object.entries(estateTypeLabels).map(([value, label]) => <option value={value}>{label}</option>)}
</select>
</div>
<div class="estate-search__field">
<label for={`${uid}-max`}>Precio máx.</label>
<select id={`${uid}-max`} name="max">
<option value="">Sin límite</option>
{priceOptions.map((p) => <option value={p}>{formatEstatePrice(p)}</option>)}
</select>
</div>
<button type="submit" class="estate-search__submit">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true">
<circle cx="11" cy="11" r="7" /><path d="m20 20-3.5-3.5" />
</svg>
Buscar
</button>
</div>
</form>
{stats.length > 0 && (
<dl class="estate-hero__stats">
{stats.map((s) => (
<div class="estate-hero__stat">
<dt>{s.label}</dt>
<dd>{s.value}</dd>
</div>
))}
</dl>
)}
</div>
{variant === 'split' && featured && (
<a href={featuredHref} class="estate-hero__card">
<EstatePropertyMedia
type={featured.type}
hue={featured.hue}
src={featured.images?.[0]?.src}
alt={featured.images?.[0]?.alt ?? `Fachada: ${featured.title}`}
loading="eager"
class="estate-hero__media"
/>
<span class="estate-hero__card-body">
{featured.badge && <span class="estate-hero__badge">{featured.badge}</span>}
<span class="estate-hero__card-title">{featured.title}</span>
<span class="estate-hero__card-meta">
{featured.zone} · {featured.m2} m² · {featured.beds} hab.
</span>
<span class="estate-hero__card-price">{formatEstatePrice(featured.price, featured.operation)}</span>
</span>
</a>
)}
</div>
</section>
<style>
.estate-hero {
padding: var(--sp-12, 3rem) var(--sp-4, 1rem) var(--sp-16, 4rem);
background:
radial-gradient(60% 80% at 85% 10%, rgba(var(--estate-brand-rgb), 0.16), transparent 70%),
var(--estate-bg);
color: var(--estate-text);
font-family: var(--estate-font-body);
}
.estate-hero__inner {
max-width: 1280px;
margin: 0 auto;
display: grid;
gap: var(--sp-10, 2.5rem);
align-items: center;
}
.estate-hero--split .estate-hero__inner {
grid-template-columns: minmax(0, 1fr);
}
.estate-hero--centered .estate-hero__copy {
max-width: 820px;
margin: 0 auto;
text-align: center;
}
.estate-hero__eyebrow {
margin: 0 0 var(--sp-3, 0.75rem);
color: var(--estate-sage);
font-size: 0.85rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.estate-hero__title {
margin: 0;
font-family: var(--estate-font-display);
font-weight: 500;
font-size: clamp(2.4rem, 6vw, 4.4rem);
line-height: 1.04;
letter-spacing: -0.02em;
}
.estate-hero__title em {
font-style: italic;
color: var(--estate-brand);
}
.estate-hero__subtitle {
margin: var(--sp-4, 1rem) 0 var(--sp-8, 2rem);
max-width: 560px;
color: var(--estate-text-2);
font-size: 1.1rem;
line-height: 1.6;
}
.estate-hero--centered .estate-hero__subtitle {
margin-inline: auto;
}
.estate-search {
padding: var(--sp-4, 1rem);
border-radius: var(--r-xl, 28px);
background: var(--estate-bg-raised);
border: 1px solid var(--estate-border);
box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.6);
text-align: left;
}
.estate-search__ops {
display: inline-flex;
gap: var(--sp-1, 0.25rem);
margin: 0 0 var(--sp-3, 0.75rem);
padding: var(--sp-1, 0.25rem);
border: 0;
border-radius: var(--r-full, 999px);
background: var(--estate-surface);
}
.estate-search__op {
position: relative;
}
.estate-search__op input {
position: absolute;
opacity: 0;
inset: 0;
cursor: pointer;
}
.estate-search__op span {
display: inline-flex;
align-items: center;
min-height: 40px;
padding: 0 var(--sp-5, 1.25rem);
border-radius: var(--r-full, 999px);
color: var(--estate-text-2);
font-weight: 600;
font-size: 0.92rem;
transition: background 0.2s ease, color 0.2s ease;
}
.estate-search__op input:checked + span {
background: var(--estate-brand);
color: var(--estate-on-brand);
}
.estate-search__op input:focus-visible + span {
outline: 2px solid var(--estate-brand);
outline-offset: 2px;
}
.estate-search__fields {
display: grid;
grid-template-columns: 1fr;
gap: var(--sp-3, 0.75rem);
}
.estate-search__field {
display: flex;
flex-direction: column;
gap: var(--sp-1, 0.25rem);
}
.estate-search__field label {
font-size: 0.78rem;
font-weight: 600;
color: var(--estate-text-3);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.estate-search__field select {
min-height: 48px;
padding: 0 var(--sp-3, 0.75rem);
border-radius: var(--r-md, 12px);
border: 1px solid var(--estate-border-strong);
background: var(--estate-surface);
color: var(--estate-text);
font: inherit;
font-size: 1rem;
}
.estate-search__field select:focus-visible {
outline: 2px solid var(--estate-brand);
outline-offset: 1px;
}
.estate-search__submit {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--sp-2, 0.5rem);
min-height: 48px;
align-self: end;
padding: 0 var(--sp-6, 1.5rem);
border: 0;
border-radius: var(--r-md, 12px);
background: var(--estate-brand);
color: var(--estate-on-brand);
font: inherit;
font-weight: 700;
cursor: pointer;
transition: background 0.2s ease;
}
.estate-search__submit:hover {
background: var(--estate-brand-hover);
}
.estate-search__submit:focus-visible {
outline: 2px solid var(--estate-text);
outline-offset: 2px;
}
.estate-hero__stats {
display: flex;
flex-wrap: wrap;
gap: var(--sp-8, 2rem);
margin: var(--sp-8, 2rem) 0 0;
}
.estate-hero--centered .estate-hero__stats {
justify-content: center;
}
.estate-hero__stat {
display: flex;
flex-direction: column-reverse;
}
.estate-hero__stat dt {
color: var(--estate-text-3);
font-size: 0.88rem;
}
.estate-hero__stat dd {
margin: 0;
font-family: var(--estate-font-display);
font-size: 1.8rem;
font-weight: 600;
}
.estate-hero__card {
display: block;
overflow: hidden;
border-radius: var(--r-xl, 28px);
border: 1px solid var(--estate-border);
background: var(--estate-bg-raised);
color: inherit;
text-decoration: none;
transition: transform 0.3s ease, border-color 0.3s ease;
}
.estate-hero__card:hover {
transform: translateY(-4px);
border-color: var(--estate-border-strong);
}
.estate-hero__card:focus-visible {
outline: 2px solid var(--estate-brand);
outline-offset: 3px;
}
.estate-hero__card :global(.estate-hero__media) {
aspect-ratio: 5 / 4;
}
.estate-hero__card-body {
display: flex;
flex-direction: column;
gap: var(--sp-1, 0.25rem);
padding: var(--sp-5, 1.25rem) var(--sp-6, 1.5rem) var(--sp-6, 1.5rem);
}
.estate-hero__badge {
align-self: flex-start;
margin-bottom: var(--sp-1, 0.25rem);
padding: 0.2rem 0.6rem;
border-radius: var(--r-full, 999px);
background: rgba(var(--estate-brand-rgb), 0.16);
color: var(--estate-brand);
font-size: 0.78rem;
font-weight: 700;
}
.estate-hero__card-title {
font-family: var(--estate-font-display);
font-size: 1.3rem;
font-weight: 500;
}
.estate-hero__card-meta {
color: var(--estate-text-3);
font-size: 0.92rem;
}
.estate-hero__card-price {
margin-top: var(--sp-2, 0.5rem);
font-size: 1.35rem;
font-weight: 700;
}
.estate-sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
@media (min-width: 720px) {
.estate-search__fields {
grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}
}
@media (min-width: 1024px) {
.estate-hero {
padding-block: var(--sp-16, 4rem);
}
.estate-hero--split .estate-hero__inner {
grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
}
@media (prefers-reduced-motion: reduce) {
.estate-hero__card {
transition: none;
}
.estate-hero__card:hover {
transform: none;
}
}
</style> ---
/**
* EstateHero — Real estate landing hero with a property search form.
* Buy/rent toggle, zone, type and max price submit as a GET query (?op=&zone=&type=&max=)
* to the listings page, which EstateListingsGrid reads to pre-filter results.
*
* @param {string} title - Headline. Wrap a word in *asterisks* to highlight it.
* @param {string} subtitle - Supporting text.
* @param {string} listingsHref - Form action (listings page).
* @param {EstateZone[]} zones - Zones offered in the zone select.
* @param {EstateProperty} featured - Property shown on the card (split variant).
* @param {string} featuredHref - Link for the featured card.
* @param {Array<{value: string, label: string}>} stats - Trust figures under the form.
* @param {string} variant - 'split' (form + featured card) | 'centered'. Default 'split'.
* @param {string} class - Extra class for the root.
*
* Accessibility: role="search" form with a visible legend for the operation radios and
* labelled selects; the featured card is a single link with a descriptive name.
*/
import type { HTMLAttributes } from 'astro/types';
import '../templates/real-estate/real-estate-theme.css';
import EstatePropertyMedia from './EstatePropertyMedia.astro';
import {
estateZones,
estateProperties,
estateData,
estateTypeLabels,
formatEstatePrice,
type EstateProperty,
type EstateZone,
} from '../templates/real-estate/data';
interface OwnProps {
title?: string;
subtitle?: string;
listingsHref?: string;
zones?: EstateZone[];
featured?: EstateProperty;
featuredHref?: string;
stats?: Array<{ value: string; label: string }>;
variant?: 'split' | 'centered';
}
type Props = OwnProps & Omit<HTMLAttributes<'section'>, keyof OwnProps | 'class'> & { class?: string };
const {
title = 'Encuentra tu *casa* en Valencia',
subtitle = 'Pisos, áticos y casas seleccionados por agentes que viven en cada barrio. Sin comisiones ocultas.',
listingsHref = '/preview/real-estate/propiedades',
zones = estateZones,
featured = estateProperties[0],
featuredHref = `/preview/real-estate/propiedades/${estateProperties[0].slug}`,
stats = estateData.stats,
variant = 'split',
class: classAttr,
...rest
} = Astro.props;
const [before, highlight, after] = title.split('*');
const uid = `eh-${Math.random().toString(36).slice(2, 8)}`;
const priceOptions = [200000, 350000, 500000, 750000, 1000000];
---
<section class:list={['estate-ui', 'estate-hero', `estate-hero--${variant}`, classAttr]} aria-labelledby={`${uid}-title`} {...rest}>
<div class="estate-hero__inner">
<div class="estate-hero__copy">
<p class="estate-hero__eyebrow">Agencia inmobiliaria de barrio</p>
<h1 id={`${uid}-title`} class="estate-hero__title">
{before}{highlight && <em>{highlight}</em>}{after}
</h1>
<p class="estate-hero__subtitle">{subtitle}</p>
<form class="estate-search" role="search" action={listingsHref} method="get" aria-label="Buscar propiedades">
<fieldset class="estate-search__ops">
<legend class="estate-sr">Operación</legend>
<label class="estate-search__op">
<input type="radio" name="op" value="sale" checked />
<span>Comprar</span>
</label>
<label class="estate-search__op">
<input type="radio" name="op" value="rent" />
<span>Alquilar</span>
</label>
</fieldset>
<div class="estate-search__fields">
<div class="estate-search__field">
<label for={`${uid}-zone`}>Zona</label>
<select id={`${uid}-zone`} name="zone">
<option value="">Toda Valencia</option>
{zones.map((z) => <option value={z.name}>{z.name}</option>)}
</select>
</div>
<div class="estate-search__field">
<label for={`${uid}-type`}>Tipo</label>
<select id={`${uid}-type`} name="type">
<option value="">Cualquiera</option>
{Object.entries(estateTypeLabels).map(([value, label]) => <option value={value}>{label}</option>)}
</select>
</div>
<div class="estate-search__field">
<label for={`${uid}-max`}>Precio máx.</label>
<select id={`${uid}-max`} name="max">
<option value="">Sin límite</option>
{priceOptions.map((p) => <option value={p}>{formatEstatePrice(p)}</option>)}
</select>
</div>
<button type="submit" class="estate-search__submit">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true">
<circle cx="11" cy="11" r="7" /><path d="m20 20-3.5-3.5" />
</svg>
Buscar
</button>
</div>
</form>
{stats.length > 0 && (
<dl class="estate-hero__stats">
{stats.map((s) => (
<div class="estate-hero__stat">
<dt>{s.label}</dt>
<dd>{s.value}</dd>
</div>
))}
</dl>
)}
</div>
{variant === 'split' && featured && (
<a href={featuredHref} class="estate-hero__card">
<EstatePropertyMedia
type={featured.type}
hue={featured.hue}
src={featured.images?.[0]?.src}
alt={featured.images?.[0]?.alt ?? `Fachada: ${featured.title}`}
loading="eager"
class="estate-hero__media"
/>
<span class="estate-hero__card-body">
{featured.badge && <span class="estate-hero__badge">{featured.badge}</span>}
<span class="estate-hero__card-title">{featured.title}</span>
<span class="estate-hero__card-meta">
{featured.zone} · {featured.m2} m² · {featured.beds} hab.
</span>
<span class="estate-hero__card-price">{formatEstatePrice(featured.price, featured.operation)}</span>
</span>
</a>
)}
</div>
</section>
<style>
.estate-hero {
padding: var(--sp-12, 3rem) var(--sp-4, 1rem) var(--sp-16, 4rem);
background:
radial-gradient(60% 80% at 85% 10%, rgba(var(--estate-brand-rgb), 0.16), transparent 70%),
var(--estate-bg);
color: var(--estate-text);
font-family: var(--estate-font-body);
}
.estate-hero__inner {
max-width: 1280px;
margin: 0 auto;
display: grid;
gap: var(--sp-10, 2.5rem);
align-items: center;
}
.estate-hero--split .estate-hero__inner {
grid-template-columns: minmax(0, 1fr);
}
.estate-hero--centered .estate-hero__copy {
max-width: 820px;
margin: 0 auto;
text-align: center;
}
.estate-hero__eyebrow {
margin: 0 0 var(--sp-3, 0.75rem);
color: var(--estate-sage);
font-size: 0.85rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.estate-hero__title {
margin: 0;
font-family: var(--estate-font-display);
font-weight: 500;
font-size: clamp(2.4rem, 6vw, 4.4rem);
line-height: 1.04;
letter-spacing: -0.02em;
}
.estate-hero__title em {
font-style: italic;
color: var(--estate-brand);
}
.estate-hero__subtitle {
margin: var(--sp-4, 1rem) 0 var(--sp-8, 2rem);
max-width: 560px;
color: var(--estate-text-2);
font-size: 1.1rem;
line-height: 1.6;
}
.estate-hero--centered .estate-hero__subtitle {
margin-inline: auto;
}
.estate-search {
padding: var(--sp-4, 1rem);
border-radius: var(--r-xl, 28px);
background: var(--estate-bg-raised);
border: 1px solid var(--estate-border);
box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.6);
text-align: left;
}
.estate-search__ops {
display: inline-flex;
gap: var(--sp-1, 0.25rem);
margin: 0 0 var(--sp-3, 0.75rem);
padding: var(--sp-1, 0.25rem);
border: 0;
border-radius: var(--r-full, 999px);
background: var(--estate-surface);
}
.estate-search__op {
position: relative;
}
.estate-search__op input {
position: absolute;
opacity: 0;
inset: 0;
cursor: pointer;
}
.estate-search__op span {
display: inline-flex;
align-items: center;
min-height: 40px;
padding: 0 var(--sp-5, 1.25rem);
border-radius: var(--r-full, 999px);
color: var(--estate-text-2);
font-weight: 600;
font-size: 0.92rem;
transition: background 0.2s ease, color 0.2s ease;
}
.estate-search__op input:checked + span {
background: var(--estate-brand);
color: var(--estate-on-brand);
}
.estate-search__op input:focus-visible + span {
outline: 2px solid var(--estate-brand);
outline-offset: 2px;
}
.estate-search__fields {
display: grid;
grid-template-columns: 1fr;
gap: var(--sp-3, 0.75rem);
}
.estate-search__field {
display: flex;
flex-direction: column;
gap: var(--sp-1, 0.25rem);
}
.estate-search__field label {
font-size: 0.78rem;
font-weight: 600;
color: var(--estate-text-3);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.estate-search__field select {
min-height: 48px;
padding: 0 var(--sp-3, 0.75rem);
border-radius: var(--r-md, 12px);
border: 1px solid var(--estate-border-strong);
background: var(--estate-surface);
color: var(--estate-text);
font: inherit;
font-size: 1rem;
}
.estate-search__field select:focus-visible {
outline: 2px solid var(--estate-brand);
outline-offset: 1px;
}
.estate-search__submit {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--sp-2, 0.5rem);
min-height: 48px;
align-self: end;
padding: 0 var(--sp-6, 1.5rem);
border: 0;
border-radius: var(--r-md, 12px);
background: var(--estate-brand);
color: var(--estate-on-brand);
font: inherit;
font-weight: 700;
cursor: pointer;
transition: background 0.2s ease;
}
.estate-search__submit:hover {
background: var(--estate-brand-hover);
}
.estate-search__submit:focus-visible {
outline: 2px solid var(--estate-text);
outline-offset: 2px;
}
.estate-hero__stats {
display: flex;
flex-wrap: wrap;
gap: var(--sp-8, 2rem);
margin: var(--sp-8, 2rem) 0 0;
}
.estate-hero--centered .estate-hero__stats {
justify-content: center;
}
.estate-hero__stat {
display: flex;
flex-direction: column-reverse;
}
.estate-hero__stat dt {
color: var(--estate-text-3);
font-size: 0.88rem;
}
.estate-hero__stat dd {
margin: 0;
font-family: var(--estate-font-display);
font-size: 1.8rem;
font-weight: 600;
}
.estate-hero__card {
display: block;
overflow: hidden;
border-radius: var(--r-xl, 28px);
border: 1px solid var(--estate-border);
background: var(--estate-bg-raised);
color: inherit;
text-decoration: none;
transition: transform 0.3s ease, border-color 0.3s ease;
}
.estate-hero__card:hover {
transform: translateY(-4px);
border-color: var(--estate-border-strong);
}
.estate-hero__card:focus-visible {
outline: 2px solid var(--estate-brand);
outline-offset: 3px;
}
.estate-hero__card :global(.estate-hero__media) {
aspect-ratio: 5 / 4;
}
.estate-hero__card-body {
display: flex;
flex-direction: column;
gap: var(--sp-1, 0.25rem);
padding: var(--sp-5, 1.25rem) var(--sp-6, 1.5rem) var(--sp-6, 1.5rem);
}
.estate-hero__badge {
align-self: flex-start;
margin-bottom: var(--sp-1, 0.25rem);
padding: 0.2rem 0.6rem;
border-radius: var(--r-full, 999px);
background: rgba(var(--estate-brand-rgb), 0.16);
color: var(--estate-brand);
font-size: 0.78rem;
font-weight: 700;
}
.estate-hero__card-title {
font-family: var(--estate-font-display);
font-size: 1.3rem;
font-weight: 500;
}
.estate-hero__card-meta {
color: var(--estate-text-3);
font-size: 0.92rem;
}
.estate-hero__card-price {
margin-top: var(--sp-2, 0.5rem);
font-size: 1.35rem;
font-weight: 700;
}
.estate-sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
@media (min-width: 720px) {
.estate-search__fields {
grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}
}
@media (min-width: 1024px) {
.estate-hero {
padding-block: var(--sp-16, 4rem);
}
.estate-hero--split .estate-hero__inner {
grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
}
@media (prefers-reduced-motion: reduce) {
.estate-hero__card {
transition: none;
}
.estate-hero__card:hover {
transform: none;
}
}
</style>
Información Rápida
- Categoría
- Secciones de Página
- Nombre de archivo
EstateHero.astro- Dependencias
- Ninguna — Astro nativo + CSS puro
- Etiquetas
- real-estateherosearchpropertylistingsform