/* Templates Page Styles */
.xm-templates-hero {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #669df6 100%);
  padding: 64px 0 48px;
  text-align: center;
}

.xm-templates-hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.xm-templates-hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin: 0 auto 32px;
}

.xm-templates-search {
  max-width: 560px;
  margin: 0 auto;
}

.xm-templates-search .v-input__slot {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
  min-height: 52px !important;
}

/* Filter Bar */
.xm-filter-bar {
  background: #fff;
  border-bottom: 1px solid #e8eaed;
  padding: 16px 0;
  position: sticky;
  top: 64px;
  z-index: 10;
}

.xm-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.xm-filter-chip {
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  background: #f1f3f4;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.xm-filter-chip:hover {
  background: #e8f0fe;
  color: #1a73e8;
}

.xm-filter-chip.active {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #1a73e8;
  font-weight: 600;
}

/* Template Grid Card */
.xm-tpl-grid-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.xm-tpl-grid-card:hover {
  border-color: #d2e3fc;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}

.xm-tpl-grid-cover {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.xm-tpl-grid-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.xm-tpl-grid-card:hover .xm-tpl-grid-cover img {
  transform: scale(1.05);
}

.xm-tpl-grid-cover .xm-tpl-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xm-tpl-grid-cover .xm-tpl-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.xm-tpl-grid-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.xm-tpl-grid-name {
  font-size: 17px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 8px;
}

.xm-tpl-grid-desc {
  font-size: 13px;
  color: #5f6368;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xm-tpl-grid-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.xm-tpl-grid-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f3f4;
  color: #5f6368;
}

.xm-tpl-grid-tag.ai {
  background: #fef7e0;
  color: #e37400;
}

.xm-tpl-grid-footer {
  padding: 0 20px 20px;
  display: flex;
  gap: 10px;
}

/* Result count */
.xm-result-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 4px;
}

.xm-result-count {
  font-size: 14px;
  color: #5f6368;
}

/* Empty state */
.xm-empty-state {
  text-align: center;
  padding: 80px 20px;
}

.xm-empty-state .v-icon {
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .xm-templates-hero h1 {
    font-size: 26px;
  }
  .xm-tpl-grid-cover {
    height: 140px;
  }
}
