/* Grid wrapper */
.iwss-templates-grid-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 12px;
  box-sizing: border-box;
}

/* Grid: 3 columns desktop, 2 tablet, 1 mobile */
.iwss-templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

/* Card in grid */
.iwss-template-card-grid {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(23,23,23,0.06);
  overflow: hidden;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
}

/* thumb */
.iwss-template-thumb {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 12px;
}
.iwss-template-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* title and actions reuse your classes if present */
.iwss-template-card-grid .iwss-template-title {
  font-size: 18px;
  margin: 8px 0 12px;
  color: #222;
  font-weight: 600;
  text-align: center;
}

/* actions */
.iwss-template-card-grid .iwss-template-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

/* reuse .iwss-btn styles if present; fallback */
.iwss-template-card-grid .iwss-btn {
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  min-width: 110px;
  text-align: center;
}
.iwss-template-card-grid .iwss-btn-demo {
  background: #f3f4f6;
  color: #1f2937;
}
.iwss-template-card-grid .iwss-btn-start {
  background: #0d6efd;
  color: #fff;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .iwss-templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .iwss-template-card-grid {
    min-height: 320px;
  }
}

@media (max-width: 600px) {
  .iwss-templates-grid {
    grid-template-columns: 1fr;
  }
  .iwss-template-thumb {
    height: 180px;
  }

  .iwss-template-card-grid {
    min-height: auto;
    padding: 12px;
  }

  .iwss-template-card-grid .iwss-template-actions {
    flex-direction: column;
  }
  .iwss-template-card-grid .iwss-btn {
    width: 100%;
  }
}
