
.view .card{
  height:100%;
  display:flex; flex-direction:column;
  border:1px solid #e1e3e6; border-radius:10px;
  background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.06);
  overflow:hidden; transition:transform .15s ease;
}
.view .card:hover{ transform:translateY(-2px); }

.view .card-img-top img{
  width:100%; height:150px; object-fit:cover; display:block;
}

.view .card-body{
  padding:.9rem 1rem;
  display:flex; flex-direction:column; gap:.35rem; flex:1;
}
.view .card-title{ font-size:1rem; margin:0; }
.view .card-text{ margin-top:auto; color:#555; font-size:.92rem; }

@media (max-width:900px){
  .view .view-content{ grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); }
}
@media (max-width:560px){
  .view .view-content{ grid-template-columns:1fr; }
}


/* Cards framework – only for views tagged with .cards-grid */
.view.cards-grid .view-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.view.cards-grid .view-content > .row,
.view.cards-grid .view-content > .row > .col { display: contents; }

.view.cards-grid .card {
  height: 100%;
  display: flex; flex-direction: column;
  border: 1px solid #e1e3e6; border-radius: 10px;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06);
  overflow: hidden; transition: transform .15s ease;
}
.view.cards-grid .card:hover { transform: translateY(-2px); }

.view.cards-grid .card-img-top img {
  width: 100%; height: 150px; object-fit: cover; display: block;
}
.view.cards-grid .card-body {
  padding: .9rem 1rem;
  display: flex; flex-direction: column; gap: .35rem; flex: 1;
}
.view.cards-grid .card-title { font-size: 1rem; margin: 0; }
.view.cards-grid .card-text  { margin-top: auto; color: #555; font-size: .92rem; }


/* Auto-scope grid only when .card exists in the view */
.view .view-content:has(.card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.view .view-content:has(.card) > .row,
.view .view-content:has(.card) > .row > .col { display: contents; }

/* Keep the card look scoped */
.view .view-content:has(.card) .card { /* same rules as above */ }
