.template-gallery {
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.template-gallery h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.template-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.template-card.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.template-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.template-card h4 {
    margin: 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
}