* { box-sizing: border-box; }
body { margin: 0; }
.grt-portada a { text-decoration: none; }

.portada-contenido {
    width: min(1380px, 100%);
    margin: 0 auto;
    padding: clamp(16px, 3vw, 44px);
}
.portada-encabezado {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    padding: clamp(24px, 4vw, 57px);
    margin: 0 0 20px;
    border: 1px solid #d5e4d4;
    border-radius: 22px;
    background: #e6efe2;
}
.portada-encabezado h1 {
    margin: 0;
    max-width: 680px;
    font-size: clamp(32px, 4.3vw, 64px);
    font-weight: 780;
    line-height: 1.02;
    letter-spacing: -.055em;
}
.portada-encabezado em { color: var(--grt-verde); font-style: normal; }
.portada-encabezado p { color: var(--grt-secundario); line-height: 1.55; max-width: 43ch; margin: 15px 0 0; }
.portada-publicar, .filter-form button, .publicidad-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--grt-verde);
    color: white;
    padding: 11px 16px;
    min-height: 44px;
    font: inherit;
    font-size: .9rem;
    font-weight: 710;
    cursor: pointer;
}
.portada-publicar { flex: 0 0 auto; white-space: nowrap; }
.portada-publicar:hover, .filter-form button:hover, .publicidad-btn:hover { background: var(--grt-verde-oscuro); }

.search-panel {
    padding: clamp(14px, 2vw, 23px);
    border: 1px solid var(--grt-borde);
    border-radius: 15px;
    background: white;
}
.filter-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.filter-form :is(input, select) {
    width: 100%;
    min-height: 44px;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fafbf9;
    border: 1px solid #cbd8cc;
    color: var(--grt-tinta);
    font: inherit;
    font-size: .91rem;
}
.portada-filtros { margin-top: 11px; }
.portada-filtros summary { cursor: pointer; color: var(--grt-verde-oscuro); font-size: .9rem; font-weight: 690; padding-block: 5px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: 12px; padding-top: 9px; }
.filter-group label { display: block; font-size: .81rem; font-weight: 650; margin-bottom: 4px; color: var(--grt-secundario); }
.filter-button { align-self: end; }
.filter-button button { width: 100%; }

.portada-categorias, .results-section { margin-top: 31px; }
.portada-categorias h2, .section-header h2 { margin: 0; font-size: clamp(20px, 2.35vw, 29px); letter-spacing: -.025em; }
.portada-categorias ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.portada-categorias a, .clear-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    min-height: 38px;
    border: 1px solid var(--grt-borde);
    border-radius: 8px;
    background: white;
    color: var(--grt-verde-oscuro);
    font-size: .85rem;
    font-weight: 650;
}
.portada-categorias a:hover, .clear-link:hover { background: #e6efe2; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr)); gap: 15px; }
.ad-card { min-width: 0; background: white; border: 1px solid var(--grt-borde); border-radius: 14px; overflow: hidden; }
.ad-card:hover { border-color: #9bbca4; }
.ad-image { display: block; position: relative; aspect-ratio: 4 / 3; background: #e9eee7; }
.ad-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.no-image { height: 100%; display: grid; place-items: center; color: var(--grt-secundario); }
.featured-badge {
    position: absolute;
    inset: 10px auto auto 10px;
    border-radius: 6px;
    background: #fff1c7;
    color: #684b17;
    font-size: .75rem;
    font-weight: 710;
    padding: 5px 8px;
}
.card-body { padding: 14px; overflow-wrap: anywhere; }
.card-category { color: var(--grt-secundario); font-size: .78rem; }
.card-body h3 { margin: 4px 0 8px; font-size: 1rem; }
.card-body h3 a { color: var(--grt-tinta); }
.card-price { margin: 0; color: var(--grt-verde-oscuro); font-size: 1.35rem; font-weight: 760; }
.card-location { margin: 9px 0; color: var(--grt-secundario); font-size: .85rem; }
.card-footer { display: flex; gap: 8px; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--grt-borde); font-size: .79rem; color: var(--grt-secundario); }
.card-footer a { color: var(--grt-verde-oscuro); font-weight: 700; }
.empty-state { padding: 23px; border: 1px dashed #b8cbbb; border-radius: 12px; background: white; }
.empty-state h3, .empty-state p { margin: 0; }
.empty-state p { margin-top: 6px; color: var(--grt-secundario); }

.publicidad-box { margin: 26px 0 0; padding: 15px; border: 1px solid var(--grt-borde); border-radius: 14px; background: white; }
.publicidad-head { margin-bottom: 10px; font-size: .76rem; font-weight: 700; color: var(--grt-secundario); }
.publicidad-producto { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--grt-tinta); }
.publicidad-img-wrap { width: 150px; height: 100px; background: #e6efe2; border-radius: 9px; overflow: hidden; }
.publicidad-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.publicidad-sin-img { height: 100%; display: grid; place-items: center; }
.publicidad-info { flex: 1 1 190px; overflow-wrap: anywhere; }
.publicidad-info :is(h3, p) { margin: 0 0 8px; }
.site-footer { padding: 14px 16px; border-top: 1px solid var(--grt-borde); text-align: center; color: var(--grt-secundario); font-size: .82rem; }

@media (max-width: 1090px) {
    .portada-encabezado { flex-wrap: wrap; align-items: start; }
}
@media (max-width: 480px) {
    .portada-encabezado { border-radius: 15px; }
    .section-header { align-items: start; }
    .filter-main button { padding-inline: 11px; }
}
